:root {
    --bg: #0a0e17;
    --bg2: #0f1524;
    --card: #131a2c;
    --card2: #182036;
    --line: #232d47;
    --text: #eef1f8;
    --muted: #9aa5c0;
    --accent: #ff4d5a;
    --accent2: #ff8a5c;
    --gold: #ffce3f;
    --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: radial-gradient(1200px 500px at 70% -10%, #17203a 0%, var(--bg) 55%) fixed, var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ===== topbar ===== */
.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 26px;
    padding: 14px 28px;
    background: rgba(9, 12, 21, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.logo {
    font-size: 21px; font-weight: 800; letter-spacing: 1px;
    color: var(--text);
}
.logo span { color: var(--accent); }
.nav { display: flex; gap: 20px; flex: 1; }
.nav a { color: var(--muted); font-weight: 600; font-size: 15px; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.counter {
    display: flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, rgba(255,77,90,0.14), rgba(255,138,92,0.10));
    border: 1px solid rgba(255, 77, 90, 0.35);
    color: #ffd9dc;
    padding: 7px 14px; border-radius: 999px; font-size: 14px;
    white-space: nowrap;
}
.counter b { color: #fff; font-size: 15px; }
.counter-label { color: var(--muted); font-size: 12.5px; }

/* ===== hero ===== */
.hero {
    position: relative;
    min-height: 520px;
    background-size: cover; background-position: center;
    display: flex; align-items: flex-end;
}
.hero::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,14,23,0.15) 0%, rgba(10,14,23,0.55) 55%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 48px 28px 56px; max-width: 780px; }
.hero-tag {
    display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; color: #ffd9dc;
    background: rgba(255, 77, 90, 0.18); border: 1px solid rgba(255,77,90,0.45);
    padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hero h1 { font-size: 46px; line-height: 1.08; margin: 0 0 14px; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.hero-meta .rate { color: var(--gold); font-weight: 700; }
.hero-desc { color: #c9d1e4; font-size: 16.5px; max-width: 620px; margin: 0 0 24px; }
.hero-actions { display: flex; gap: 12px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 26px; border-radius: 12px; font-weight: 700; font-size: 15.5px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 8px 24px rgba(255, 77, 90, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 77, 90, .45); }
.btn-ghost { background: rgba(255,255,255,0.08); border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.14); }

/* ===== sections & grid ===== */
.wrap { max-width: 1240px; margin: 0 auto; padding: 34px 28px 60px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin: 26px 0 18px; }
.sec-head h2 { font-size: 24px; margin: 0; letter-spacing: .3px; }
.sec-count {
    background: var(--card); border: 1px solid var(--line); color: var(--muted);
    font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    display: flex; flex-direction: column;
}
.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 77, 90, .55);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 77, 90, .25);
}
.card-poster { position: relative; aspect-ratio: 2/3; overflow: hidden; background: #0d1120; }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-poster img { transform: scale(1.05); }
.badge-type {
    position: absolute; top: 10px; left: 10px;
    font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
    background: rgba(8, 10, 18, .72); color: #dbe3f5;
    border: 1px solid rgba(255,255,255,.14);
    padding: 4px 9px; border-radius: 999px; backdrop-filter: blur(4px);
}
.badge-rate {
    position: absolute; top: 10px; right: 10px;
    font-size: 12.5px; font-weight: 800;
    background: rgba(8, 10, 18, .72); color: var(--gold);
    border: 1px solid rgba(255, 206, 63, .35);
    padding: 4px 9px; border-radius: 999px; backdrop-filter: blur(4px);
}
.card-body { padding: 12px 14px 14px; }
.card-title { font-weight: 700; font-size: 15.5px; margin-bottom: 3px; }
.card-meta { color: var(--muted); font-size: 13px; }

/* ===== detail page ===== */
.detail {
    position: relative; background-size: cover; background-position: center 20%;
}
.detail::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,14,23,.72) 0%, rgba(10,14,23,.88) 60%, var(--bg) 100%);
}
.detail-inner {
    position: relative; z-index: 2;
    display: flex; gap: 34px; align-items: flex-end;
    max-width: 1240px; margin: 0 auto; padding: 64px 28px 40px;
}
.detail-poster img {
    width: 260px; border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
}
.detail-info { flex: 1; padding-bottom: 6px; }
.detail-info h1 { font-size: 40px; margin: 0 0 12px; text-shadow: 0 2px 18px rgba(0,0,0,.55); }

/* ===== player ===== */
.player-section { margin-top: 8px; }
.player-frame {
    position: relative; width: 100%; aspect-ratio: 16/9;
    background:
        radial-gradient(600px 300px at 50% 38%, rgba(255,77,90,.10), transparent 70%),
        linear-gradient(160deg, #101628 0%, #0b0f1c 70%);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 80px rgba(0,0,0,.45);
}
.player-frame iframe {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.player-ph { text-align: center; padding: 24px; }
.play-btn {
    width: 92px; height: 92px; border-radius: 50%;
    border: 0; cursor: pointer;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff; font-size: 30px; padding-left: 8px;
    box-shadow: 0 14px 40px rgba(255,77,90,.4), 0 0 0 10px rgba(255,77,90,.12);
    transition: transform .15s ease;
    margin-bottom: 20px;
}
.play-btn:hover { transform: scale(1.06); }
.ph-title { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.ph-note { color: var(--muted); font-size: 14.5px; max-width: 520px; margin: 0 auto; }
.player-note {
    color: var(--muted); font-size: 13.5px; margin-top: 14px;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 12px 16px;
}
.player-note code { color: #ffc2c7; background: rgba(255,77,90,.1); padding: 1px 6px; border-radius: 6px; }

/* ===== misc ===== */
.notfound { text-align: center; padding: 80px 0; }
.notfound h1 { font-size: 34px; margin-bottom: 10px; }
.notfound p { color: var(--muted); margin-bottom: 24px; }

.footer {
    border-top: 1px solid var(--line);
    background: var(--bg2);
    padding: 26px 28px 34px;
    display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: center;
}
.foot-brand { font-weight: 800; letter-spacing: 1px; }
.foot-brand span { color: var(--accent); }
.foot-counter { color: #ffd9dc; font-size: 14.5px; }
.foot-counter b { color: #fff; }
.foot-note { color: var(--muted); font-size: 13px; margin-left: auto; }

/* ===== responsive ===== */
@media (max-width: 860px) {
    .topbar { padding: 12px 16px; gap: 14px; }
    .nav { gap: 12px; }
    .counter-label { display: none; }
    .hero h1 { font-size: 34px; }
    .hero-inner { padding: 34px 16px 44px; }
    .detail-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
    .detail-poster img { width: 190px; }
    .detail-info h1 { font-size: 30px; }
    .wrap { padding: 22px 16px 50px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
}
