:root {
    --bg: #090a0d;
    --bg-elev: #12141b;
    --bg-elev-2: #181b24;
    --line: #2a3140;
    --ink: #f4f1ea;
    --muted: #9aa3b2;
    --accent: #2ee6b6;
    --accent-dim: rgba(46, 230, 182, 0.14);
    --hot: #ff4d6d;
    --chip: #1d2430;
    --radius: 14px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --font: "Figtree", system-ui, sans-serif;
    --display: "Syne", "Figtree", sans-serif;
    --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(46, 230, 182, 0.08), transparent 50%),
        radial-gradient(900px 400px at 100% 0%, rgba(255, 77, 109, 0.07), transparent 45%),
        var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.55;
    min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, .logo-text, .kicker {
    font-family: var(--display);
    letter-spacing: -0.03em;
}
h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; margin: 0 0 0.6rem; }
h2 { font-size: 1.25rem; margin: 0 0 0.8rem; }
.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.muted { color: var(--muted); }
.skip-link {
    position: absolute; left: -999px; top: 0;
}
.skip-link:focus { left: 1rem; top: 1rem; background: var(--accent); color: #04140f; padding: 0.4rem 0.7rem; z-index: 20; }

.site-header {
    position: sticky; top: 0; z-index: 10;
    background: rgba(9, 10, 13, 0.86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex; align-items: center; gap: 1rem;
    min-height: 72px;
}
.logo { display: flex; align-items: center; gap: 0.65rem; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark {
    width: 36px; height: 36px; display: grid; place-items: center;
    background: linear-gradient(145deg, var(--accent), #1aa884);
    color: #04140f; font-family: var(--display); font-weight: 800; border-radius: 9px;
}
.logo-text { font-weight: 800; font-size: 1.2rem; }
.logo-text span { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 1.1rem; margin-left: 0.5rem; }
.site-nav > a, .nav-drop > span {
    font-weight: 600; font-size: 0.92rem; color: var(--ink);
}
.nav-drop { position: relative; }
.nav-drop > span { cursor: default; }
.nav-menu {
    display: none; position: absolute; top: 100%; left: 0;
    min-width: 180px; padding: 0.5rem;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 12px; box-shadow: var(--shadow);
}
.nav-drop:hover .nav-menu, .nav-drop:focus-within .nav-menu { display: grid; }
.nav-menu a { padding: 0.4rem 0.6rem; border-radius: 8px; }
.nav-menu a:hover { background: var(--accent-dim); color: var(--accent); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 0.7rem; }
.header-search input {
    background: var(--bg-elev); border: 1px solid var(--line); color: var(--ink);
    border-radius: 999px; padding: 0.45rem 0.9rem; width: 220px;
}
.lang-switch {
    display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
}
.lang-switch a { padding: 0.3rem 0.65rem; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.lang-switch a.is-active { background: var(--accent); color: #04140f; }
.nav-toggle {
    display: none; margin-left: auto;
    background: var(--bg-elev); color: var(--ink); border: 1px solid var(--line);
    border-radius: 8px; padding: 0.4rem 0.7rem;
}

.ad-slot {
    margin: 0.9rem auto;
    width: min(var(--max), calc(100% - 2rem));
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
    padding: 0.5rem;
    text-align: center;
}
.ad-label {
    display: block; font-size: 0.68rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem;
}
.ad-placeholder {
    min-height: 90px; display: grid; place-items: center;
    color: var(--muted); font-weight: 600;
}
.ad-header .ad-placeholder { min-height: 90px; }
.ad-sidebar { width: 100%; position: sticky; top: 88px; }
.ad-sidebar .ad-placeholder { min-height: 250px; }
.ad-inarticle { margin: 1.4rem 0; }
.ad-feed { grid-column: 1 / -1; }

.home { padding: 1.6rem 0 3rem; }
.hero-slider {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    min-height: 460px;
    border: 1px solid var(--line);
    background: #0c0e14;
    box-shadow: var(--shadow);
}
.hero-viewport { position: relative; min-height: 460px; }
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}
.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}
.hero-media {
    position: absolute;
    inset: 0;
    background: #0e1016;
}
.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 7s linear;
}
.hero-slide.is-active .hero-media img { transform: scale(1); }
.hero-copy {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    padding: 5.5rem 1.8rem 4.2rem;
    background: linear-gradient(180deg, transparent 0%, rgba(9, 10, 13, 0.55) 28%, rgba(9, 10, 13, 0.94) 100%);
    max-width: 780px;
}
.hero-title {
    font-size: clamp(1.55rem, 3.2vw, 2.45rem);
    line-height: 1.12;
    margin: 0 0 0.55rem;
}
.hero-title a { color: var(--ink); }
.hero-title a:hover { color: var(--accent); }
.kicker {
    color: var(--hot); font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 0.5rem;
}
.lede { color: var(--muted); font-size: 1.05rem; }
.hero-controls {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(9, 10, 13, 0.55);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.25rem 0.35rem;
    backdrop-filter: blur(10px);
}
.hero-btn {
    width: 36px; height: 36px;
    border: 0; border-radius: 50%;
    background: transparent;
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.hero-btn:hover { color: var(--accent); }
.hero-dots { display: flex; gap: 0.35rem; align-items: center; padding: 0 0.2rem; }
.hero-dot {
    width: 8px; height: 8px; padding: 0;
    border: 0; border-radius: 999px;
    background: #5b6474;
    cursor: pointer;
}
.hero-dot.is-active { width: 22px; background: var(--accent); }
.hero-progress {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: rgba(255,255,255,0.08);
    z-index: 3;
}
.hero-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
}
.hero-slider.is-playing .hero-progress span {
    animation: heroBar 6.5s linear forwards;
}
@keyframes heroBar {
    from { width: 0; }
    to { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-slide, .hero-media img, .hero-progress span { transition: none; animation: none !important; }
}

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.7rem; }
.chip {
    background: var(--accent-dim); color: var(--accent);
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; padding: 0.2rem 0.55rem; border-radius: 999px;
}
.chip-ghost { background: var(--chip); color: var(--muted); }
.chip-lang { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.platform-row { margin: 2rem 0 1.4rem; }
.platform-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.platform-pills a {
    border: 1px solid var(--line); background: var(--bg-elev);
    padding: 0.45rem 0.9rem; border-radius: 999px; font-weight: 600;
}
.platform-pills a:hover { border-color: var(--accent); color: var(--accent); }

.section-title { margin: 0 0 1rem; }
.home-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.6rem; }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.card {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
}
.card-media { aspect-ratio: 16 / 9; background: #10131a; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.card-title { font-size: 1.05rem; margin: 0; line-height: 1.3; }
.card-title a { color: var(--ink); }
.card-excerpt { color: var(--muted); font-size: 0.92rem; margin: 0; }
.card-meta { color: var(--muted); font-size: 0.8rem; margin: 0.4rem 0 0; }

.rail-block {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 16px; padding: 1rem 1.1rem; margin-top: 1rem;
}
.rail-block ul { list-style: none; padding: 0; margin: 0; }
.rail-block li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.rail-block li:last-child { border-bottom: 0; }
.rail-block time { display: block; color: var(--muted); font-size: 0.75rem; }

.listing, .story, .prose-page { padding: 2rem 0 3.5rem; }
.listing-head { margin-bottom: 1.4rem; }
.listing-grid { grid-template-columns: repeat(3, 1fr); }
.search-hero { display: flex; gap: 0.6rem; margin-bottom: 1.5rem; }
.search-hero input {
    flex: 1; background: var(--bg-elev); border: 1px solid var(--line);
    color: var(--ink); border-radius: 12px; padding: 0.75rem 1rem;
}
.empty { color: var(--muted); padding: 2rem 0; }
.pager { margin-top: 1.5rem; }

.story-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.6rem; }
.story-hero { margin: 0 0 1.2rem; border-radius: 16px; overflow: hidden; }
.story-hero img { width: 100%; max-height: 420px; object-fit: cover; }
.story-meta { color: var(--muted); }
.notice {
    background: var(--accent-dim); border-left: 3px solid var(--accent);
    padding: 0.8rem 1rem; border-radius: 0 12px 12px 0; color: var(--ink);
}
.prose { max-width: 68ch; }
.prose p, .prose-page p { color: #d6dbe6; }
.prose a, .prose-page a { color: var(--accent); text-decoration: underline; }
.related { margin-top: 2.5rem; }
.related-grid { grid-template-columns: 1fr 1fr; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: #04140f; font-weight: 700;
    border: 0; border-radius: 999px; padding: 0.65rem 1.15rem; cursor: pointer;
}
.btn:hover { filter: brightness(1.05); color: #04140f; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-small { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.site-footer {
    border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted);
}
.footer-grid { display: grid; gap: 1rem; }
.footer-grid nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-brand { color: var(--ink); margin: 0; }

.cookie-bar {
    position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
    width: min(720px, calc(100% - 1.5rem));
    background: var(--bg-elev-2); border: 1px solid var(--line);
    border-radius: 14px; padding: 0.9rem 1rem; display: flex; gap: 1rem;
    align-items: center; box-shadow: var(--shadow); z-index: 30;
}
.cookie-bar p { margin: 0; font-size: 0.9rem; color: var(--muted); }

@media (max-width: 960px) {
    .hero-slider, .hero-viewport { min-height: 380px; }
    .hero-copy { padding: 4rem 1.1rem 3.6rem; max-width: none; }
    .home-grid, .story-layout { grid-template-columns: 1fr; }
    .card-grid, .listing-grid, .related-grid { grid-template-columns: 1fr 1fr; }
    .header-search { display: none; }
    .nav-toggle { display: inline-flex; }
    .site-nav {
        display: none; position: absolute; top: 72px; left: 0; right: 0;
        background: var(--bg); border-bottom: 1px solid var(--line);
        padding: 1rem 1.2rem 1.2rem; flex-direction: column; align-items: flex-start;
    }
    .site-nav.is-open { display: flex; }
    .nav-menu { position: static; display: grid; box-shadow: none; border: 0; padding: 0.2rem 0 0.4rem 0.6rem; }
}
@media (max-width: 640px) {
    .card-grid, .listing-grid, .related-grid { grid-template-columns: 1fr; }
    .cookie-bar { flex-direction: column; align-items: stretch; }
}
