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

:root {
    --primary: #ff6b35;
    --primary-dark: #e55a28;
    --secondary: #1a1a2e;
    --accent: #16213e;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #2d2d2d;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --success: #10b981;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
    background: var(--secondary);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a { color: #d1d5db; font-size: 0.9rem; }
.nav-links a:hover { color: #fff; }

.nav-btn {
    background: var(--primary);
    color: #fff !important;
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
}

.nav-user {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-disabled { background: #d1d5db; color: #6b7280; cursor: not-allowed; }

/* ── Flash Messages ──────────────────────────────────────────── */
.flash-container { max-width: 800px; margin: 1rem auto; padding: 0 1.5rem; }
.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.flash-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.flash-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.flash-info { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* ── Main Content ────────────────────────────────────────────── */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; }

/* ── How It Works ────────────────────────────────────────────── */
.how-it-works { padding: 3rem 0; }
.how-it-works h2 { text-align: center; margin-bottom: 2rem; font-size: 1.6rem; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.step {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.step-num {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.step p { color: var(--text-light); font-size: 0.9rem; }

/* ── Preview Section ─────────────────────────────────────────── */
.preview { padding: 3rem 0; }
.preview h2 { text-align: center; margin-bottom: 0.5rem; font-size: 1.6rem; }
.section-sub { text-align: center; color: var(--text-light); margin-bottom: 2rem; }

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
}

.preview-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.preview-card h3 { margin-bottom: 0.3rem; }
.preview-stats { color: var(--text-light); font-size: 0.85rem; margin-bottom: 1rem; }

.preview-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.preview-table th { text-align: left; padding: 0.5rem; border-bottom: 2px solid var(--border); }
.preview-table td { padding: 0.5rem; border-bottom: 1px solid var(--border); }
.preview-table .score { color: var(--primary); font-weight: 600; }
.blurred-row td { color: var(--text-light); font-style: italic; }

/* ── Pricing ─────────────────────────────────────────────────── */
.pricing { padding: 3rem 0; }
.pricing h2 { text-align: center; margin-bottom: 0.5rem; font-size: 1.6rem; }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
}

.pricing-card.featured { border: 2px solid var(--primary); }

.pricing-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.price { font-size: 2.2rem; font-weight: 800; color: var(--secondary); }
.price-per { color: var(--text-light); font-size: 0.85rem; margin-bottom: 1.5rem; }

.pricing-card ul { list-style: none; text-align: left; margin-bottom: 1.5rem; }
.pricing-card li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}
.pricing-card li::before {
    content: "\2713";
    color: var(--success);
    margin-right: 0.5rem;
    font-weight: 700;
}

/* ── Categories Page ─────────────────────────────────────────── */
.page-header { text-align: center; margin-bottom: 2rem; }
.page-header h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.page-header p { color: var(--text-light); }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.2rem;
}

.category-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
}

.category-card.purchased { border-left: 3px solid var(--success); }

.badge-owned {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--success);
    color: #fff;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.category-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }

.category-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.coming-soon { color: #f59e0b; font-style: italic; }

.category-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Success Page ────────────────────────────────────────────── */
.success-page { text-align: center; padding: 4rem 0; }
.success-icon {
    width: 64px;
    height: 64px;
    background: var(--success);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}
.success-page h1 { margin-bottom: 0.5rem; }
.success-page p { color: var(--text-light); margin-bottom: 2rem; }
.success-actions { display: flex; gap: 1rem; justify-content: center; }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}
.footer-sub { font-size: 0.75rem; margin-top: 0.3rem; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .preview-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 0.8rem; }
}
