:root {
    /* ── Color Palette ── */
    --c-bg: #0b0d10;
    --c-surface: #14171c;
    --c-card: #1a1e25;
    --c-input: #23282f;
    --c-border: #2a3040;

    --c-text: #e8eaed;
    --c-text-2: #9aa0ab;
    --c-text-3: #5c6370;

    --c-brand: #ff6b35;
    --c-brand-2: #ff9f1c;
    --c-brand-g: linear-gradient(135deg, #ff6b35, #ff9f1c);

    --c-kofi: #29abe0;
    --c-success: #4caf50;
    --c-danger: #ef5350;

    /* ── Typography ── */
    --f-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --f-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* ── Spacing Scale (4px base) ── */
    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-5: 1.25rem;
    --s-6: 1.5rem;
    --s-8: 2rem;
    --s-10: 2.5rem;
    --s-12: 3rem;
    --s-16: 4rem;
    --s-20: 5rem;

    /* ── Radii ── */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --r-full: 999px;

    /* ── Shadows ── */
    --sh-sm: 0 1px 3px rgba(0, 0, 0, .3);
    --sh-md: 0 4px 12px rgba(0, 0, 0, .4);
    --sh-lg: 0 12px 32px rgba(0, 0, 0, .5);
    --sh-glow: 0 0 20px rgba(255, 107, 53, .15);

    /* ── Layout ── */
    --max-w: 1100px;
}

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

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

button {
    font: inherit;
    cursor: pointer;
}

a {
    color: inherit;
}

ul,
ol {
    list-style: none;
}

/* ─── BASE ──────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--f-sans);
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ─── UTILITIES ─────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--s-4);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ─── FOCUS RING ────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--c-brand);
    outline-offset: 2px;
}

/* ─── HEADER ────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 13, 16, .85);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border-bottom: 1px solid var(--c-border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    text-decoration: none;
}

.logo-mark {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.logo-wordmark {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--c-brand-g);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: var(--s-4);
}

.nav-link {
    color: var(--c-text-2);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r-sm);
    transition: color .2s, background .2s;
}

.nav-link:hover {
    color: var(--c-text);
    background: rgba(255, 255, 255, .05);
}

.nav-link--kofi {
    color: var(--c-kofi);
}

.nav-link--kofi:hover {
    background: rgba(41, 171, 224, .1);
}

/* ─── AD BANNER ─────────────────────────────────────── */
.ad-banner {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    position: relative;
    overflow: hidden;
}

.ad-banner__track {
    position: relative;
    min-height: 56px;
}

.ad-banner__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
}

.ad-banner__slide.active {
    opacity: 1;
    pointer-events: auto;
}

.ad-banner__text {
    color: var(--c-text-2);
    font-size: .875rem;
}

.ad-banner__text strong {
    color: var(--c-text);
}

.ad-banner__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-1) var(--s-3);
    border-radius: var(--r-full);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--c-border);
    color: var(--c-text);
    transition: border-color .2s, background .2s;
}

.ad-banner__cta:hover {
    border-color: var(--c-brand);
    background: rgba(255, 107, 53, .08);
}

.ad-banner__dots {
    display: flex;
    justify-content: center;
    gap: var(--s-2);
    padding-bottom: var(--s-2);
}

.ad-banner__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-text-3);
    border: none;
    cursor: pointer;
    transition: background .2s, transform .2s;
    padding: 0;
}

.ad-banner__dot.active {
    background: var(--c-brand);
    transform: scale(1.3);
}

/* ─── HERO ──────────────────────────────────────────── */
.hero {
    padding: var(--s-16) 0 var(--s-12);
    text-align: center;
}

.hero__title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: var(--s-3);
}

.hero__title .gradient-text {
    background: var(--c-brand-g);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__sub {
    color: var(--c-text-2);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto var(--s-8);
}

/* Search Bar */
.search-bar {
    display: flex;
    max-width: 620px;
    margin: 0 auto;
    background: var(--c-card);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-xl);
    padding: var(--s-1);
    box-shadow: var(--sh-lg), var(--sh-glow);
    transition: border-color .25s, transform .25s;
}

.search-bar:focus-within {
    border-color: var(--c-brand);
    transform: translateY(-2px);
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--c-text);
    font-size: 1rem;
    padding: var(--s-3) var(--s-4);
    outline: none;
    min-width: 0;
}

.search-bar input::placeholder {
    color: var(--c-text-3);
}

.search-bar button {
    background: var(--c-brand-g);
    border: none;
    color: #fff;
    font-weight: 700;
    padding: var(--s-3) var(--s-6);
    border-radius: calc(var(--r-xl) - 3px);
    white-space: nowrap;
    transition: filter .2s, transform .15s;
}

.search-bar button:hover {
    filter: brightness(1.12);
}

.search-bar button:active {
    transform: scale(.97);
}

/* ─── PLAYER ────────────────────────────────────────── */
.player-section {
    padding-bottom: var(--s-12);
}

.player-frame {
    background: var(--c-card);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-lg);
    aspect-ratio: 16 / 9;
    position: relative;
}

.player-frame .modal_inner {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.player-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.player-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s-4);
    color: var(--c-text-3);
}

.player-placeholder__icon {
    width: 64px;
    height: 64px;
    opacity: .4;
}

/* ─── CONTENT GRID ──────────────────────────────────── */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-6);
    padding-bottom: var(--s-12);
}

@media (min-width:768px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: var(--s-6);
    transition: border-color .2s, transform .2s;
}

.card:hover {
    border-color: rgba(255, 107, 53, .25);
    transform: translateY(-2px);
}

.card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--s-3);
}

.card__text {
    color: var(--c-text-2);
    line-height: 1.7;
}

.card__text+.card__text {
    margin-top: var(--s-3);
}

/* Extension Badge */
.ext-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-5);
    background: var(--c-input);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    color: var(--c-text);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    transition: background .2s, border-color .2s;
    margin-top: var(--s-4);
}

.ext-badge:hover {
    background: var(--c-border);
    border-color: var(--c-text-3);
}

.ext-badge__icon {
    width: 20px;
    height: 20px;
    opacity: .8;
}

.ext-badge__meta {
    font-size: .75rem;
    font-weight: 400;
    color: var(--c-text-3);
    display: block;
}

/* ─── ADSENSE SLOT ──────────────────────────────────── */
.adsense-slot {
    margin-bottom: var(--s-12);
    text-align: center;
}

/* ─── FOOTER ────────────────────────────────────────── */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--c-border);
    background: var(--c-surface);
    padding: var(--s-12) 0 var(--s-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-8);
    text-align: center;
}

@media (min-width:640px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
}

.footer-support {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: var(--s-6);
    text-align: center;
}

.footer-support__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--s-2);
}

.footer-support__text {
    color: var(--c-text-2);
    font-size: .9rem;
    margin-bottom: var(--s-4);
}

.btn-kofi {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    background: var(--c-kofi);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    padding: var(--s-3) var(--s-5);
    border-radius: var(--r-full);
    text-decoration: none;
    transition: transform .2s, filter .2s;
}

.btn-kofi:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.footer-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--s-3);
}

.footer-links a {
    color: var(--c-text-2);
    text-decoration: none;
    font-size: .85rem;
    transition: color .2s;
}

.footer-links a:hover {
    color: var(--c-text);
}

.footer-bottom {
    margin-top: var(--s-8);
    padding-top: var(--s-6);
    border-top: 1px solid var(--c-border);
    text-align: center;
    color: var(--c-text-3);
    font-size: .8rem;
}

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width:480px) {
    .search-bar {
        flex-direction: column;
        border-radius: var(--r-lg);
    }

    .search-bar input {
        padding: var(--s-3);
    }

    .search-bar button {
        border-radius: var(--r-md);
        margin: var(--s-1);
    }

    .hero {
        padding: var(--s-10) 0 var(--s-8);
    }

    .ad-banner__slide {
        flex-wrap: wrap;
        text-align: center;
    }
}