/* Font definitions */
@font-face {
    font-family: 'Horizon';
    src: url('../assets/fonts/Horizon.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    position: relative;
    display: flex;
    flex-direction: column;
    /* Safe area insets for top notch */
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top);
}

/* Fix for mobile Safari viewport height */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
}

/* Loading styles removed - no longer needed */

/* Main content container */
.content-container {
    /* Remove conflicting flex layout - let .home-page handle sticky footer */
}

.page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 50px;
    flex: 1;
}

/* Floating download button */
.floating-download-btn {
    position: fixed;
    bottom: 84px; /* 上移以避开底部导航与系统手势区域 */
    right: 20px;
    width: 60px; /* 稍大可点区域 */
    height: 60px;
    background-color: #fff;
    color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1000;
    will-change: transform;
    /* Avoid home indicator overlap */
    bottom: calc(84px + constant(safe-area-inset-bottom));
    bottom: calc(84px + env(safe-area-inset-bottom));
}

.floating-download-btn:hover {
    transform: translateY(-2px) scale3d(1.04, 1.04, 1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.floating-download-btn svg {
    display: block;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Brand styles */
.brand-title {
    font-family: 'Horizon', 'Roboto', sans-serif;
    font-size: 40px;
    text-align: center;
    margin: 10px 0;
}

/* Tips section */
.tips-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    min-height: 100px;
}

.tips-prefix {
    color: #666;
    font-size: 20px;
    margin-right: 10px;
}

.tips-rotating {
    width: 100px;
    color: #666;
    font-size: 20px;
    text-align: center;
}

/* Welcome text */
.welcome-text {
    font-size: 16px;
    line-height: 1.8;
    text-align: center;
    margin: 10px 0 50px 0;
}

/* Bonus page styles */
.bonus-page {
    background-color: #fdf5ec;
    min-height: 100vh;
}

.bonus-slogan {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    text-align: center;
    padding: 20px 30px;
    margin: 30px 0;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bonus-slogan::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    margin-top: -10px;
}

.bonus-slogan::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    margin-bottom: -10px;
}

@media (max-width: 768px) {
    .bonus-slogan {
        font-size: 22px;
        letter-spacing: 1.5px;
        padding: 15px 20px;
    }
}

.bonus-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.bonus-tips {
    color: #666;
    font-size: 14px;
    font-weight: 200;
    letter-spacing: 1px;
    text-align: center;
    padding: 0 50px;
    margin: 50px 0;
}

.bonus-tip {
    margin: 10px 0;
}

.download-button {
    width: 230px;
    height: 70px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: background-color 0.3s ease, transform 0.3s ease;
    will-change: transform;
}

.download-button:hover {
    background-color: #45a049;
    transform: scale3d(1.05, 1.05, 1);
}

/* Detail page styles */
.detail-page {
    padding: 20px;
}

.detail-content {
    position: relative;
}

.detail-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
}

.detail-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto 30px auto;
    border-radius: 8px;
}

.detail-body {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.fuzzy-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    pointer-events: none;
}

.open-app-button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: block;
    margin: 20px auto;
    transition: background-color 0.3s ease, transform 0.3s ease;
    will-change: transform;
}

.open-app-button:hover {
    background-color: #1976D2;
    transform: scale3d(1.05, 1.05, 1);
}

/* Responsive design */
@media (max-width: 768px) {
    .page-container {
        padding: 20px;
    }
    
    .brand-title {
        font-size: 32px;
    }
    
    .tips-prefix, .tips-rotating {
        font-size: 18px;
    }
    
    .bonus-slogan {
        font-size: 20px;
    }
    
    .bonus-tips {
        padding: 0 20px;
    }
    
    .download-button {
        width: 200px;
        height: 60px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 15px;
    }
    
    .brand-title {
        font-size: 28px;
    }
    
    .tips-container {
        flex-direction: column;
        text-align: center;
    }
    
    .tips-prefix {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Home page layout for sticky footer */
.home-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure minimum height */
}

.home-page .page-container {
    flex: 1;
    padding-bottom: 20px;
}

/* Fix for mobile Safari viewport height */
@supports (-webkit-touch-callout: none) {
    .home-page {
        min-height: -webkit-fill-available;
    }
}

/* Home page footer styles */
.home-footer {
    position: relative;
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    color: #6c757d;
    /* Ensure footer is at bottom */
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #495057;
    text-decoration: underline;
}

.footer-link svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.footer-separator {
    color: #adb5bd;
    font-size: 14px;
    opacity: 0.7;
}

/* 删除 .home-footer .back-to-top 及其 hover 样式 */
.home-footer .back-to-top {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
    opacity: 0.8;
    z-index: 1000;
}

.home-footer .back-to-top:hover {
    background-color: #e9ecef;
    color: #495057;
    opacity: 1;
}

@media (max-width: 768px) {
    .home-page {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    .home-footer {
        margin-top: 40px;
        padding: 15px 0 20px 0;
        position: relative;
        /* Add bottom safe area padding */
        padding-bottom: calc(20px + constant(safe-area-inset-bottom));
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 12px;
    }
    
    .footer-separator {
        display: none;
    }
    
    .footer-link {
        font-size: 16px;
        padding: 8px 0;
    }
}