/* ===== CSS Variables & Reset ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #22223a;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-dark: #4a3db5;
    --gradient-1: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --gradient-2: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    --gradient-hero: linear-gradient(160deg, #0a0a0f 0%, #16163a 40%, #0a0a0f 100%);
    --border-color: rgba(108, 92, 231, 0.15);
    --border-glow: rgba(108, 92, 231, 0.4);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.15);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

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

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-primary);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loading-spinner { position: relative; width: 60px; height: 60px; }
.spinner-ring {
    position: absolute; inset: 0;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}
.spinner-ring:nth-child(2) { inset: 6px; border-top-color: var(--accent-light); animation-duration: 1.6s; animation-direction: reverse; }
.spinner-ring:nth-child(3) { inset: 12px; border-top-color: var(--text-muted); animation-duration: 2s; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { margin-top: 20px; color: var(--text-secondary); font-size: 0.9rem; letter-spacing: 1px; }

/* ===== Navbar ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}
.navbar.scrolled { background: rgba(10, 10, 15, 0.95); box-shadow: var(--shadow-md); }

.nav-container {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; gap: 10px; color: var(--text-primary); font-weight: 700; font-size: 1.1rem; }
.nav-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); }

.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text-primary); }

.nav-hamburger {
    display: none; background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 5px; padding: 4px;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
    display: none; flex-direction: column; padding: 16px 24px 20px;
    border-top: 1px solid var(--border-color);
}
.nav-mobile.active { display: flex; }
.nav-mobile a { padding: 10px 0; color: var(--text-secondary); font-size: 0.95rem; }

/* ===== Hero Section ===== */
.hero-section {
    position: relative; min-height: 100vh;
    padding: 120px 24px 80px;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.shape {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: 0.12;
}
.shape-1 { width: 500px; height: 500px; background: var(--accent); top: -100px; right: -100px; animation: float 8s ease-in-out infinite; }
.shape-2 { width: 400px; height: 400px; background: #a29bfe; bottom: -50px; left: -100px; animation: float 10s ease-in-out infinite reverse; }
.shape-3 { width: 300px; height: 300px; background: #fd79a8; top: 50%; left: 50%; animation: float 12s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -30px); } }

.hero-container {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 60px; align-items: center;
    position: relative; z-index: 1;
}

.hero-app-info { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.hero-icon {
    width: 120px; height: 120px; border-radius: 26px;
    box-shadow: var(--shadow-lg); flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.hero-text h1 { font-size: 1.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 4px; }
.hero-developer { color: var(--accent-light); font-size: 0.95rem; font-weight: 500; margin-bottom: 8px; }

.hero-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.stars { display: flex; gap: 2px; }
.star { color: #ffd700; font-size: 1rem; }
.star.empty { color: var(--text-muted); }
.rating-text { color: var(--text-secondary); font-size: 0.85rem; }

.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
    padding: 4px 12px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.3px;
}
.badge-price { background: rgba(108, 92, 231, 0.2); color: var(--accent-light); }
.badge-category { background: rgba(162, 155, 254, 0.15); color: var(--accent-light); }
.badge-age { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

.hero-description { color: var(--text-secondary); font-size: 1rem; line-height: 1.7; margin-bottom: 28px; max-width: 520px; }

.download-btn {
    display: inline-flex; align-items: center; gap: 12px;
    background: var(--text-primary); color: var(--bg-primary);
    padding: 14px 32px; border-radius: 14px;
    font-family: var(--font); font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}
.download-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--bg-primary); }
.download-btn .apple-logo { flex-shrink: 0; }
.btn-text { display: flex; flex-direction: column; line-height: 1.2; }
.btn-small { font-size: 0.65rem; font-weight: 400; }
.btn-large { font-size: 1.15rem; font-weight: 700; }

/* Screenshots Carousel */
.hero-screenshots {
    display: flex; gap: 16px; overflow-x: auto;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    padding: 20px 0; scrollbar-width: none;
}
.hero-screenshots::-webkit-scrollbar { display: none; }

.screenshot-item {
    flex-shrink: 0; scroll-snap-align: center;
    border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    max-height: 500px;
}
.screenshot-item:hover { transform: scale(1.02); }
.screenshot-item img { height: 100%; width: auto; object-fit: contain; display: block; }

/* ===== Info Section ===== */
.info-section { padding: 80px 24px; background: var(--bg-secondary); }
.info-container { max-width: 1200px; margin: 0 auto; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; }

.info-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 24px 20px;
    text-align: center; transition: var(--transition);
}
.info-card:hover { border-color: var(--border-glow); transform: translateY(-4px); box-shadow: var(--shadow-glow); }

.info-card-icon { color: var(--accent-light); margin-bottom: 12px; display: flex; justify-content: center; }
.info-card h3 { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.info-card p { font-size: 1rem; font-weight: 600; color: var(--text-primary); }

/* ===== Description Section ===== */
.description-section { padding: 80px 24px; }
.description-container { max-width: 800px; margin: 0 auto; }
.description-container h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 24px; }

.description-content { position: relative; }
.description-text {
    color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8;
    max-height: 200px; overflow: hidden; transition: max-height 0.5s;
    white-space: pre-line;
}
.description-text.expanded { max-height: 3000px; }

.description-content::after {
    content: ''; position: absolute; bottom: 40px; left: 0; right: 0;
    height: 80px; background: linear-gradient(transparent, var(--bg-primary));
    pointer-events: none; transition: opacity 0.3s;
}
.description-content.expanded::after { opacity: 0; }

.read-more-btn {
    background: none; border: 1px solid var(--accent);
    color: var(--accent-light); padding: 10px 28px;
    border-radius: 30px; cursor: pointer; font-family: var(--font);
    font-size: 0.9rem; font-weight: 500; margin-top: 16px;
    transition: var(--transition);
}
.read-more-btn:hover { background: var(--accent); color: white; }

/* ===== What's New ===== */
.whats-new-section { padding: 60px 24px 80px; background: var(--bg-secondary); }
.whats-new-container { max-width: 800px; margin: 0 auto; }
.whats-new-container h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 16px; }
.whats-new-meta { display: flex; gap: 16px; margin-bottom: 16px; }
.whats-new-version { background: rgba(108,92,231,0.2); color: var(--accent-light); padding: 4px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.whats-new-date { color: var(--text-muted); font-size: 0.85rem; display: flex; align-items: center; }
.whats-new-container > p { color: var(--text-secondary); line-height: 1.8; white-space: pre-line; }

/* ===== Features ===== */
.features-section { padding: 80px 24px; }
.features-container { max-width: 1200px; margin: 0 auto; }
.features-container h2 { font-size: 1.8rem; font-weight: 800; text-align: center; margin-bottom: 48px; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }

.feature-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 36px 28px;
    transition: var(--transition); position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--gradient-1); opacity: 0; transition: var(--transition);
}
.feature-card:hover { border-color: var(--border-glow); transform: translateY(-6px); box-shadow: var(--shadow-glow); }
.feature-card:hover::before { opacity: 1; }

.feature-icon { color: var(--accent-light); margin-bottom: 16px; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* ===== Footer ===== */
.footer { padding: 48px 24px 32px; background: var(--bg-secondary); border-top: 1px solid var(--border-color); }
.footer-container { max-width: 1200px; margin: 0 auto; }

.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.footer-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); }

.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-secondary); font-size: 0.85rem; }
.footer-links a:hover { color: var(--text-primary); }

.footer-divider { height: 1px; background: var(--border-color); margin: 24px 0; }
.footer-bottom { text-align: center; }
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; }

/* ===== Legal Pages ===== */
.legal-page { padding: 100px 24px 80px; min-height: 100vh; }
.legal-container { max-width: 800px; margin: 0 auto; }
.legal-container h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 8px; }
.legal-date { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 40px; display: block; }
.legal-container h2 { font-size: 1.3rem; font-weight: 700; margin: 32px 0 12px; color: var(--text-primary); }
.legal-container p, .legal-container li { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8; margin-bottom: 12px; }
.legal-container ul { padding-left: 24px; margin-bottom: 16px; }
.legal-container a { color: var(--accent-light); }
.legal-container a:hover { text-decoration: underline; }

/* Support Page */
.support-hero { text-align: center; margin-bottom: 48px; }
.support-hero h1 { font-size: 2.4rem; margin-bottom: 12px; }
.support-hero p { color: var(--text-secondary); font-size: 1.1rem; }

.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 48px; }

.support-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 36px 28px; text-align: center;
    transition: var(--transition);
}
.support-card:hover { border-color: var(--border-glow); transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.support-card-icon { color: var(--accent-light); margin-bottom: 16px; display: flex; justify-content: center; }
.support-card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.support-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }
.support-card a.support-btn {
    display: inline-block; padding: 10px 24px; border-radius: 30px;
    background: var(--accent); color: white; font-weight: 600;
    font-size: 0.9rem; transition: var(--transition);
}
.support-card a.support-btn:hover { background: var(--accent-dark); color: white; transform: translateY(-2px); }

.faq-section { margin-top: 48px; }
.faq-section h2 { font-size: 1.6rem; text-align: center; margin-bottom: 32px; }
.faq-item {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden;
}
.faq-question {
    width: 100%; background: none; border: none; color: var(--text-primary);
    padding: 20px 24px; font-family: var(--font); font-size: 1rem; font-weight: 600;
    text-align: left; cursor: pointer; display: flex; justify-content: space-between;
    align-items: center; transition: var(--transition);
}
.faq-question:hover { background: var(--bg-card-hover); }
.faq-question .faq-arrow { transition: var(--transition); color: var(--accent-light); }
.faq-question.active .faq-arrow { transform: rotate(180deg); }
.faq-answer { padding: 0 24px; max-height: 0; overflow: hidden; transition: max-height 0.3s, padding 0.3s; }
.faq-answer.active { padding: 0 24px 20px; max-height: 300px; }
.faq-answer p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }

    .hero-section { padding: 100px 20px 60px; }
    .hero-container { grid-template-columns: 1fr; gap: 40px; }
    .hero-icon { width: 80px; height: 80px; border-radius: 18px; }
    .hero-text h1 { font-size: 1.4rem; }
    .hero-description { font-size: 0.9rem; }

    .hero-screenshots { gap: 12px; padding: 10px 0; }
    .screenshot-item { max-height: 380px; }

    .info-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr; }

    .footer-top { flex-direction: column; align-items: flex-start; }
    .footer-links { flex-direction: column; gap: 12px; }

    .legal-container h1 { font-size: 1.6rem; }
    .support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .info-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .info-card { padding: 16px 12px; }
    .hero-meta { gap: 6px; }
    .badge { font-size: 0.7rem; padding: 3px 10px; }
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
