/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
    /* Colors */
    --primary-color: #1a73e8;
    --secondary-color: #8b5cf6;
    --dark-color: #1a1a2e;
    --light-color: #ffffff;
    --gray-color: #6b7280;
    --light-gray: #f3f4f6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1a73e8 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(135deg, rgba(26, 115, 232, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);

    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 48px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

/* ===========================
   Utilities
   =========================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--dark-color);
}

/* ===========================
   Notice Bar
   =========================== */
.notice-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    padding: 12px 20px;
    animation: slideDown 0.3s ease;
}

.notice-bar.notice-info {
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    color: var(--light-color);
}

.notice-bar.notice-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: var(--light-color);
}

.notice-bar.notice-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--light-color);
}

.notice-bar.notice-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--light-color);
}

.notice-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.notice-message {
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Adjust navbar position when notice is shown */
.navbar.with-notice {
    top: 44px;
}

/* ===========================
   Navigation Bar
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: var(--light-color);
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.brand-name {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--dark-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.lang-switch {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--gradient-primary);
    color: var(--light-color);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-switch:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) 0;
    margin-top: 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content {
    text-align: center;
    z-index: 10;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--light-color);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 14px 32px;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--light-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--light-color);
    border: 2px solid var(--light-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--light-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ===========================
   Features Section
   =========================== */
.features {
    padding: var(--spacing-xl) 0;
    background: var(--light-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.feature-card {
    background: var(--light-color);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: var(--spacing-md);
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: var(--light-color);
}

.feature-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-color);
}

.feature-desc {
    font-size: var(--font-size-base);
    color: var(--gray-color);
    line-height: 1.7;
}

/* ===========================
   Privacy Section
   =========================== */
.privacy {
    padding: var(--spacing-xl) 0;
    background: var(--light-color);
}

.privacy-content {
    max-width: 900px;
    margin: 0 auto;
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.privacy-item {
    background: var(--light-color);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.privacy-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 0, 0, 0.12);
}

.privacy-item h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-color);
}

.privacy-item p {
    font-size: var(--font-size-base);
    color: var(--gray-color);
    line-height: 1.8;
}

/* ===========================
   Download Section
   =========================== */
.download {
    padding: var(--spacing-xl) 0;
    background: var(--light-gray);
}

.download-desc {
    text-align: center;
    font-size: var(--font-size-lg);
    color: var(--gray-color);
    margin-bottom: var(--spacing-lg);
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
}

.download-card {
    background: var(--light-color);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    text-align: center;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.download-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.download-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md);
    fill: var(--primary-color);
}

.download-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: var(--spacing-sm);
}

.download-card p {
    font-size: var(--font-size-base);
    color: var(--gray-color);
}

.download-note {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--dark-color);
    color: var(--light-color);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.footer-tagline {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--light-color);
}

.footer-bottom {
    text-align: center;
}

.copyright {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    :root {
        --font-size-3xl: 32px;
        --font-size-2xl: 24px;
        --font-size-xl: 20px;
        --spacing-xl: 3rem;
    }

    .hero {
        min-height: 80vh;
        padding: var(--spacing-lg) 0;
    }

    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .privacy-grid {
        grid-template-columns: 1fr;
    }

    .download-options {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .navbar .container {
        padding-top: var(--spacing-xs);
        padding-bottom: var(--spacing-xs);
    }

    .logo {
        width: 32px;
        height: 32px;
    }

    .brand-name {
        font-size: var(--font-size-base);
    }

    .feature-card {
        padding: var(--spacing-md);
    }
}
