/* CSS Reset and Variables */
:root {
    --primary-color: #0064C8;
    --primary-hover: #0050a0;
    --secondary-color: #1677FF;
    --text-color: #1d1d1f;
    --text-light: #6e6e73;
    --bg-color: #ffffff;
    --bg-light: #f5f7fa;
    --bg-dark: #0a0a0c;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    --radius: 12px;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    background: #eff6ff;
    color: var(--primary-color);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

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

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

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 64px;
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
}

.logo-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Hero Section */
.hero {
    padding-top: 120px;
    padding-bottom: 80px;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, #e8f1ff 0%, #ffffff 60%);
    overflow: hidden;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 100, 200, 0.08);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 100, 200, 0.15);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.6rem;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 680px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #0064C8 0%, #0050a0 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 100, 200, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1677FF 0%, #0064C8 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 100, 200, 0.4);
    color: #ffffff;
}

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

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

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 70px;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-meta i {
    color: var(--primary-color);
}

/* Popup Mockup */
.hero-visual {
    display: flex;
    justify-content: center;
}

.popup-window {
    background: #1c1c1e;
    border-radius: 14px;
    box-shadow: var(--shadow-xl);
    border: 1px solid #2a2a2c;
    max-width: 720px;
    width: 100%;
    overflow: hidden;
    transform: perspective(1400px) rotateX(2deg);
    transition: transform 0.6s ease;
}

.popup-window:hover {
    transform: perspective(1400px) rotateX(0deg);
}

.popup-header {
    background: #2a2a2c;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #3a3a3c;
}

.popup-dots {
    display: flex;
    gap: 6px;
}

.popup-dots.small .dot {
    width: 9px;
    height: 9px;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot.red { background-color: #ff5f57; }
.dot.yellow { background-color: #febc2e; }
.dot.green { background-color: #28c840; }

.popup-pill {
    background: rgba(0, 100, 200, 0.18);
    color: #6cb6ff;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-grow: 1;
    text-align: left;
}

.popup-pin {
    color: #86868b;
    font-size: 0.85rem;
}

.popup-body {
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.popup-shot {
    width: 100%;
    height: auto;
    display: block;
}

/* Section base */
section {
    padding: 100px 0;
}

.features {
    background-color: white;
}

.section-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    font-family: var(--font-heading);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 60px;
    font-size: 1.1rem;
}

/* Features Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: white;
    padding: 32px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* Screenshot Gallery */
.preview {
    background-color: var(--bg-dark);
}

.preview .section-title,
.preview .section-subtitle {
    color: #f5f5f7;
}

.preview .section-subtitle {
    color: #a1a1a6;
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.gallery-tab {
    background: #1c1c1e;
    color: #a1a1a6;
    border: 1px solid #2a2a2c;
    padding: 9px 18px;
    border-radius: 100px;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-body);
}

.gallery-tab:hover {
    color: #fff;
    border-color: #3a3a3c;
}

.gallery-tab.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.gallery-stage {
    display: flex;
    justify-content: center;
}

.gallery-frame {
    background: #1c1c1e;
    border-radius: 14px;
    box-shadow: var(--shadow-xl);
    border: 1px solid #2a2a2c;
    max-width: 760px;
    width: 100%;
    overflow: hidden;
}

.gallery-header {
    background: #2a2a2c;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #3a3a3c;
}

.gallery-caption {
    color: #a1a1a6;
    font-size: 0.82rem;
    flex-grow: 1;
    text-align: left;
}

.gallery-shot {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    transition: opacity 0.3s ease;
}

/* Comparison Section */
.comparison {
    background-color: var(--bg-light);
}

.comparison-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

.comparison-box {
    flex: 1;
    max-width: 460px;
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.comparison-box.before {
    border-top: 4px solid #94a3b8;
}

.comparison-box.after {
    border-top: 4px solid var(--primary-color);
    background: linear-gradient(to bottom right, #ffffff, #f0f7ff);
}

.comparison-header {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-box.before .comparison-header { color: #64748b; }
.comparison-box.after .comparison-header { color: var(--primary-color); }

.comparison-list li {
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.comparison-box.before .fa-xmark { color: #ef4444; margin-top: 4px; }
.comparison-box.after .fa-check { color: #10b981; margin-top: 4px; }

.comparison-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #cbd5e1;
}

/* Data Sources */
.sources {
    background-color: white;
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    max-width: 1000px;
    margin: 0 auto;
}

.src-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 600px;
}

.src-table th {
    background: #f7f9fb;
    color: #1a1a1a;
    font-weight: 600;
    padding: 14px 18px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.src-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.src-table tr:last-child td { border-bottom: none; }

.src-table tr:hover td { background: #fafbfc; }

.src-table td:first-child { font-weight: 600; }

.tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
}

.tag-green { background: #d1fae5; color: #059669; }
.tag-orange { background: #fef3c7; color: #d97706; }

.src-note {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 20px;
}

.src-note i { color: var(--primary-color); }

/* How It Works */
.how-it-works {
    background-color: var(--bg-light);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 50px;
}

.step-card {
    text-align: center;
    position: relative;
    background: white;
    padding: 32px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.step-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 56px;
    right: -16px;
    width: 32px;
    height: 2px;
    background: #cbd5e1;
    z-index: 0;
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 18px;
    position: relative;
    z-index: 1;
    font-size: 1rem;
    font-family: var(--font-heading);
}

.step-card h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.step-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, #0a0a0c 0%, #1c1c1e 100%);
    color: #fff;
    text-align: center;
    padding: 80px 0;
}

.cta-banner h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
}

.cta-banner p {
    color: #a1a1a6;
    margin-bottom: 32px;
}

/* Footer */
.footer {
    background-color: #0a0a0c;
    color: #e5e7eb;
    padding: 48px 0 32px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.footer-logo .logo-icon {
    filter: brightness(0) invert(1);
}

.footer-left p {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 6px;
}

.credits a {
    color: #fff;
    font-weight: 500;
}

.credits a:hover { color: var(--secondary-color); }

.footer-right {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-right a {
    color: #e5e7eb;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-right a:hover { color: var(--secondary-color); }

/* Responsive */
@media (max-width: 900px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .step-card:nth-child(2)::after { display: none; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.4rem; }
    .nav-links a:not(.github-link) { display: none; }
    .comparison-container { flex-direction: column; }
    .comparison-arrow { transform: rotate(90deg); margin: 8px 0; }
    .steps-grid { grid-template-columns: 1fr; }
    .step-card:not(:last-child)::after { display: none; }
    .footer-content { flex-direction: column; text-align: center; }
    .hero-meta { gap: 16px; }
    section { padding: 70px 0; }
}
