/* ============================================
   Translator Landing Page - Design System
   ============================================ */

/* ==================== CSS Variables ==================== */
:root {
    /* Brand Blue - Professional Translation Tool */
    --color-primary: #0066FF;
    --color-primary-hover: #0052CC;
    --color-primary-light: #E6F0FF;

    --color-secondary: #6366F3;
    --color-accent: #FF9500;

    /* Neutral Colors */
    --color-bg: #FAFAFA;
    --color-bg-alt: #F5F5F7;
    --color-surface: #FFFFFF;

    /* Text Colors */
    --color-text: #1A1A1A;
    --color-text-secondary: #4A4A4A;
    --color-text-muted: #9E9E9E;

    /* Border Colors */
    --color-border: #E0E0E0;
    --color-border-light: #F0F0F0;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);

    /* VIP Gold Colors */
    --color-vip: #FFB800;
    --color-vip-bg: #FFFBEB;
    --color-vip-text: #9A6800;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Container */
    --container-max: 1200px;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
}

a {
    color: inherit;
    text-decoration: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
}

ul { list-style: none; }

/* ==================== Layout ==================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section { padding: var(--space-24) 0; }

/* ==================== Navigation ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-light);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 600;
    font-size: 1.125rem;
}

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

.nav-menu { display: flex; gap: var(--space-8); }

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.nav-link:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.nav-toggle { display: none; }

/* ==================== Hero Section ==================== */
.hero {
    position: relative;
    padding: calc(64px + var(--space-24)) 0 var(--space-24);
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-bg) 50%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-primary-light) 0%, transparent 70%);
    opacity: 0.5;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-6);
}

.hero-content h1 { margin-bottom: var(--space-5); }

.hero-content h1 .highlight { color: var(--color-primary); }

.hero-content p {
    font-size: 1.125rem;
    max-width: 480px;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.hero-image { display: flex; justify-content: center; }

.hero-image img {
    width: 100%;
    max-width: 320px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

/* ==================== Section Header ==================== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-header h2 { margin-bottom: var(--space-3); }

.section-header p {
    font-size: 1.125rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ==================== Features ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.feature-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    text-align: center;
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-5);
    background: var(--color-primary-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-primary);
}

.feature-card h3 { margin-bottom: var(--space-2); }

.feature-card p { font-size: 0.9375rem; }

/* ==================== Screenshots ==================== */
.screenshots-section { background: var(--color-bg-alt); }

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.screenshot-item {
    position: relative;
    aspect-ratio: 9/19.5;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.screenshot-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ==================== Lightbox ==================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox-close {
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
}

.lightbox-nav:hover:not(.disabled) { background: rgba(255, 255, 255, 0.2); }
.lightbox-nav.prev { left: var(--space-6); }
.lightbox-nav.next { right: var(--space-6); }
.lightbox-nav.disabled { opacity: 0.3; cursor: not-allowed; }

.lightbox-counter {
    position: absolute;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-2) var(--space-4);
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.9375rem;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: var(--radius-lg);
}

/* ==================== Pricing ==================== */
.pricing-section { background: var(--color-bg-alt); }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    text-align: center;
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
}

.pricing-card.featured {
    border-color: var(--color-vip);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.pricing-card.featured::before {
    content: 'Recommended';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-1) var(--space-4);
    background: var(--color-vip);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
}

.pricing-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-4);
}

.pricing-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.pricing-card.featured .pricing-price { color: var(--color-vip); }

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

.pricing-features {
    margin: var(--space-8) 0;
    text-align: left;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.pricing-features li::before {
    content: '';
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    mask-size: contain;
    flex-shrink: 0;
}

.pricing-card.featured .pricing-features li::before { background: var(--color-vip); }

.pricing-card .btn {
    width: 100%;
    margin-top: var(--space-8);
}

/* ==================== Download ==================== */
.download-section {
    background: transparent;
    color: var(--color-text);
    text-align: center;
    padding: var(--space-20) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.download-section h2 { color: var(--color-text); }
.download-section p { color: var(--color-text-secondary); }

.download-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-5);
    margin-top: var(--space-8);
    flex-wrap: wrap;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-8);
    background: white;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
}

.store-btn:hover:not(.disabled) {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 24px rgba(0, 102, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.store-btn:active:not(.disabled) {
    transform: translateY(-2px) scale(0.98);
}

.store-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.store-btn svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 102, 255, 0.3));
}

.store-text span:first-child {
    display: block;
    font-size: 0.6875rem;
    color: var(--color-text-muted);
}

.store-text span:last-child {
    display: block;
    font-size: 1rem;
    font-weight: 500;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--color-bg-alt);
    padding: var(--space-16) 0 var(--space-8);
    border-top: 1px solid var(--color-border-light);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: var(--space-16);
    margin-bottom: var(--space-12);
}

.footer-brand { max-width: 280px; }

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.footer-brand .logo img {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
}

.footer-brand .tagline {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-links { display: flex; gap: var(--space-12); }

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.footer-column a {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    padding: var(--space-2) 0;
}

.footer-column a:hover { color: var(--color-primary); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border-light);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.footer-bottom a { color: var(--color-text-secondary); }
.footer-bottom a:hover { color: var(--color-primary); }

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content p { margin: 0 auto var(--space-6); }
    .hero-buttons { justify-content: center; }
    .hero-image { order: -1; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .screenshots-grid { grid-template-columns: repeat(3, 1fr); }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); max-width: 900px; }
    .footer-content { flex-wrap: wrap; }
}

@media (max-width: 768px) {
    .container { padding: 0 var(--space-5); }
    .nav-menu { display: none; }
    .nav-toggle { display: flex; }
    .features-grid { grid-template-columns: 1fr; }
    .screenshots-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }
    .pricing-grid { grid-template-columns: 1fr; }
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
    .store-btn {
        width: 100%;
        max-width: 320px;
    }
    .footer-links { flex-wrap: wrap; gap: var(--space-8); }
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-3);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero { padding: calc(64px + var(--space-6)) 0; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; }
}
