@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #22d3ee;
    --accent-dark: #06b6d4;
    --bg: #0f172a;
    --bg-light: #1e293b;
    --surface: #1e293b;
    --surface-light: #334155;
    --surface-lighter: #475569;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(99, 102, 241, 0.15);
    --border-light: rgba(255,255,255,0.06);
    --green: #34d399;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 30px rgba(99,102,241,0.15);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: 200ms ease;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 0.95rem;
    -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.3; color: var(--text); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Navbar ──────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    padding: 0 24px;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text);
}
.navbar-brand .logo-icon {
    font-size: 1.5rem;
}
.navbar-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, var(--bg) 0%, #1a1a4e 50%, var(--bg) 100%);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(34,211,238,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; max-width: 650px; }
.hero-badge {
    display: inline-block;
    background: rgba(99,102,241,0.15);
    color: var(--primary-light);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(99,102,241,0.2);
}
.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.15;
}
.hero h1 .highlight { color: var(--accent); }
.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 520px;
    line-height: 1.8;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    transition: all var(--transition);
    cursor: pointer;
    text-align: center;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
}
.btn-primary:hover { background: var(--primary-light); color: #fff; transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--surface-light);
}
.btn-outline:hover { border-color: var(--primary); color: var(--text); }
.btn-accent {
    background: var(--accent);
    color: var(--bg);
    border: none;
}
.btn-accent:hover { background: var(--accent-dark); color: var(--bg); transform: translateY(-1px); }

/* ── Section ─────────────────────────────────────────── */
.section { padding: 60px 0; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.section-title {
    font-size: 1.6rem;
    font-weight: 600;
}
.section-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
}
.section-link:hover { color: var(--primary-light); }

/* ── Category Cards ──────────────────────────────────── */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.category-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text);
}
.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
    color: var(--text);
}
.category-card .cat-icon { font-size: 2rem; margin-bottom: 12px; }
.category-card h3 { font-size: 1rem; margin-bottom: 6px; }
.category-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ── Article Cards ───────────────────────────────────── */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.article-card {
    display: flex;
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text);
}
.article-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
    color: var(--text);
}
.article-card-image {
    width: 200px;
    min-height: 160px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.article-card-image .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
}
.article-card-body { padding: 20px 20px 20px 0; display: flex; flex-direction: column; justify-content: center; }
.article-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-card-meta .cat-badge {
    background: rgba(99,102,241,0.12);
    color: var(--primary-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
}
.article-card h3 { font-size: 1rem; margin-bottom: 8px; line-height: 1.4; }
.article-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ── Featured Card ───────────────────────────────────── */
.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    margin-bottom: 40px;
}
.featured-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    color: var(--text);
}
.featured-card-image {
    min-height: 320px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.featured-card-image .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--surface));
}
.featured-card-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.featured-card-body .cat-badge {
    display: inline-block;
    background: rgba(99,102,241,0.12);
    color: var(--primary-light);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 16px;
    width: fit-content;
}
.featured-card-body h2 { font-size: 1.5rem; margin-bottom: 12px; }
.featured-card-body p { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 20px; }
.featured-card-body .meta { font-size: 0.78rem; color: var(--text-muted); }

/* ── Comparison Cards ────────────────────────────────── */
.compare-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.compare-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}
.compare-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(34,211,238,0.1);
    transform: translateY(-2px);
    color: var(--text);
}
.compare-card .icon { font-size: 2.2rem; margin-bottom: 12px; }
.compare-card h3 { font-size: 0.95rem; margin-bottom: 8px; }
.compare-card .price-tag {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green);
    font-family: var(--font-heading);
}

/* ── Article Detail ──────────────────────────────────── */
.article-header {
    padding: 60px 0 40px;
    background: linear-gradient(180deg, rgba(30,41,59,0.5) 0%, var(--bg) 100%);
}
.article-header .cat-badge {
    display: inline-block;
    background: rgba(99,102,241,0.12);
    color: var(--primary-light);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.article-header h1 { font-size: 2.2rem; margin-bottom: 16px; max-width: 700px; }
.article-header .meta { color: var(--text-muted); font-size: 0.85rem; display: flex; gap: 16px; flex-wrap: wrap; }
.article-header .meta span { display: flex; align-items: center; gap: 4px; }

.article-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}
.article-content h2 {
    font-size: 1.4rem;
    margin: 36px 0 14px;
    padding-top: 8px;
}
.article-content h3 {
    font-size: 1.1rem;
    margin: 28px 0 10px;
    color: var(--text-secondary);
}
.article-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}
.article-content ul, .article-content ol {
    margin: 0 0 16px 20px;
    color: var(--text-secondary);
}
.article-content li { margin-bottom: 6px; }

/* Article tip box */
.article-tip {
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin: 24px 0;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
}
.article-tip strong { color: var(--primary-light); }

/* Product pick */
.product-pick {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    margin: 20px 0;
}
.product-pick h3 { font-size: 1.05rem; margin-bottom: 10px; color: var(--text); }
.product-pick p { font-size: 0.88rem; color: var(--text-secondary); }
.product-pick .btn {
    margin-top: 12px;
    padding: 10px 20px;
    font-size: 0.85rem;
    background: var(--accent);
    color: var(--bg);
}
.product-pick .btn:hover { background: var(--accent-dark); }

/* ── Comparison Detail ───────────────────────────────── */
.compare-detail-header { padding: 60px 0 20px; }
.compare-detail-header .icon { font-size: 3rem; margin-bottom: 16px; }
.compare-detail-header h1 { font-size: 2rem; margin-bottom: 12px; }
.compare-detail-header .verdict { color: var(--text-secondary); font-size: 0.95rem; max-width: 650px; line-height: 1.7; }

.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-light);
    margin: 32px 0 60px;
}
.compare-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--surface-light);
    border-bottom: 1px solid var(--border-light);
}
.compare-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .price { font-weight: 700; font-family: var(--font-heading); font-size: 1rem; }
.compare-table .best-badge {
    display: inline-block;
    background: rgba(52,211,153,0.12);
    color: var(--green);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 8px;
}
.compare-table .note { font-size: 0.8rem; color: var(--text-muted); }
.compare-table .na { color: var(--surface-lighter); font-style: italic; }

/* ── About Page ──────────────────────────────────────── */
.about-content { max-width: 700px; margin: 0 auto; padding: 60px 24px; }
.about-content h1 { font-size: 2rem; margin-bottom: 24px; }
.about-content h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.about-content p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.8; }

.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.team-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.team-card .avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-heading);
    margin: 0 auto 12px;
}
.team-card h3 { font-size: 1rem; margin-bottom: 4px; }
.team-card p { font-size: 0.82rem; color: var(--text-muted); }

/* ── Footer ──────────────────────────────────────────── */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    padding: 40px 0;
    margin-top: 40px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}
.footer-brand span { color: var(--accent); }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { color: var(--text-muted); font-size: 0.82rem; }
.footer-links a:hover { color: var(--text); }
.footer-copy { width: 100%; text-align: center; font-size: 0.78rem; color: var(--text-muted); margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-light); }
.footer-copy a { color: var(--text-muted); }

/* ── Disclaimer ──────────────────────────────────────── */
.disclaimer {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 32px 0;
}

/* ── Page header (for index pages) ───────────────────── */
.page-header {
    padding: 50px 0 30px;
    border-bottom: 1px solid var(--border-light);
}
.page-header h1 { font-size: 2rem; margin-bottom: 8px; }
.page-header p { color: var(--text-muted); font-size: 0.95rem; }

/* ── Related articles ────────────────────────────────── */
.related-section { padding: 40px 0; border-top: 1px solid var(--border-light); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}
.related-card:hover { border-color: var(--primary); color: var(--text); }
.related-card .icon { font-size: 1.5rem; margin-bottom: 8px; }
.related-card h3 { font-size: 0.9rem; margin-bottom: 6px; }
.related-card p { font-size: 0.78rem; color: var(--text-muted); }

/* ── Newsletter ──────────────────────────────────────── */
.newsletter {
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(34,211,238,0.05));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    margin: 40px 0;
}
.newsletter h3 { font-size: 1.2rem; margin-bottom: 8px; }
.newsletter p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 20px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border-light);
        padding: 16px 24px;
        gap: 16px;
    }
    .nav-toggle { display: block; }

    .hero h1 { font-size: 1.9rem; }
    .hero p { font-size: 0.95rem; }

    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .articles-grid { grid-template-columns: 1fr; }
    .compare-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }

    .featured-card { grid-template-columns: 1fr; }
    .featured-card-image { min-height: 200px; }
    .featured-card-body { padding: 24px; }

    .article-card { flex-direction: column; }
    .article-card-image { width: 100%; min-height: 180px; }
    .article-card-body { padding: 16px; }

    .article-header h1 { font-size: 1.6rem; }
    .team-grid { grid-template-columns: 1fr; }

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

    .compare-table { font-size: 0.82rem; }
    .compare-table th, .compare-table td { padding: 10px 12px; }
}

@media (max-width: 480px) {
    .category-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; }
}
