:root {
    --bg: #080808;
    --panel: #111216;
    --panel-2: #17191f;
    --text: #f5f5f0;
    --muted: #b9b8aa;
    --line: #2a2a24;
    --yellow: #ffd21f;
    --yellow-2: #ffb800;
    --cyan: #39c6d6;
    --danger: #ff4d5a;
    --radius: 8px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { width: min(1180px, calc(100% - 24px)); margin-inline: auto; }
.narrow { width: min(820px, calc(100% - 24px)); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 8, 8, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}
.site-header__inner {
    min-height: 72px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 1fr);
    gap: 18px;
    align-items: center;
}
.site-logo {
    justify-self: center;
    color: var(--yellow);
    font-weight: 900;
    font-size: 24px;
    white-space: nowrap;
}
.site-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.site-menu a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 6px 10px;
    color: var(--muted);
    border-radius: var(--radius);
}
.site-menu a:hover { color: var(--bg); background: var(--yellow); }

.live-search { position: relative; justify-self: end; width: min(100%, 360px); }
.live-search form {
    display: flex;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: var(--radius);
    overflow: hidden;
}
.live-search__input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    padding: 12px;
}
.live-search__button {
    width: 44px;
    border: 0;
    background: var(--yellow);
    color: #090909;
    font-size: 22px;
    cursor: pointer;
}
.live-search__results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.live-search.is-open .live-search__results { display: block; }
.live-search__item {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 9px;
    border-bottom: 1px solid var(--line);
}
.live-search__item:hover { background: #202128; }
.live-search__item img, .live-search__thumb {
    width: 46px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #272727;
    border-radius: 6px;
}
.live-search__item span { font-size: 13px; }
.live-search__item b { color: var(--yellow); font-size: 12px; }
.live-search__empty { padding: 14px; color: var(--muted); }

.content-band { padding: 28px 0 44px; }
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.section-head h1, .section-head h2 {
    margin: 0;
    font-size: 24px;
    color: var(--yellow);
}
.post-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.post-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.movie-card { min-width: 0; }
.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.movie-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease, filter .25s ease;
}
.movie-card:hover img { transform: scale(1.04); filter: saturate(1.08); }
.movie-card__title {
    margin: 8px 2px 0;
    font-size: 15px;
    line-height: 1.45;
    text-align: center;
}
.movie-card__title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.movie-card__episode {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,.82);
    color: var(--yellow);
    border: 1px solid rgba(255,210,31,.55);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
}
.movie-card__quality {
    position: absolute;
    top: 14px;
    left: -36px;
    width: 140px;
    transform: rotate(-38deg);
    background: var(--yellow);
    color: #111;
    text-align: center;
    font-size: 12px;
    font-weight: 900;
    padding: 4px 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.movie-card__placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    padding: 16px;
    text-align: center;
    color: var(--muted);
}

.pagination-wrap { margin-top: 28px; }
.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.page-numbers {
    min-width: 38px;
    min-height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--text);
    padding: 6px 10px;
}
.page-numbers.current, .page-numbers:hover {
    background: var(--yellow);
    color: #080808;
}

.single-layout { padding: 24px 0 50px; }
.single-head h1 {
    margin: 0 0 18px;
    font-size: clamp(24px, 4vw, 36px);
    color: var(--yellow);
    line-height: 1.35;
}
.watch-box__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.watch-box iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.watch-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 100%;
    border: 0;
    background-color: #111;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}
.watch-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.56);
}
.play-pulse {
    position: relative;
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--yellow);
    color: #080808;
    font-size: 32px;
    box-shadow: 0 0 0 0 rgba(255,210,31,.55);
    animation: ycsPulse 1.45s infinite;
}
@keyframes ycsPulse {
    70% { box-shadow: 0 0 0 22px rgba(255,210,31,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,210,31,0); }
}
.watch-box.is-playing .watch-cover { display: none; }
.watch-empty {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    padding: 20px;
    text-align: center;
}
.server-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.server-list button, .error-search button, .home-link {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--text);
    min-height: 40px;
    padding: 8px 14px;
    cursor: pointer;
}
.server-list button.is-active, .server-list button:hover, .error-search button, .home-link {
    background: var(--yellow);
    color: #090909;
}
.episodes-list {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 20px 0;
}
.episodes-list a {
    min-width: 42px;
    min-height: 38px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
}
.episodes-list a.is-current, .episodes-list a:hover {
    background: var(--cyan);
    color: #061113;
}
.story-box, .page-content {
    margin-top: 24px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
}
.story-box h2, .page-content h1 {
    margin-top: 0;
    color: var(--yellow);
}
.entry-text { color: #e7e5d7; }
.related-posts { margin-top: 34px; }

.site-footer {
    border-top: 1px solid var(--line);
    background: #050505;
    color: var(--muted);
}
.site-footer__inner {
    min-height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--yellow); }

.error-page {
    min-height: 62vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 40px 0;
}
.error-page h1 {
    margin: 0;
    font-size: 92px;
    color: var(--yellow);
    line-height: 1;
}
.error-search {
    display: flex;
    gap: 8px;
    margin: 20px auto;
}
.error-search input {
    flex: 1;
    min-height: 42px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    padding: 8px 12px;
}
.home-link { display: inline-grid; place-items: center; }
.empty-state { color: var(--muted); text-align: center; padding: 40px 0; }

@media (max-width: 760px) {
    .site-header__inner {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 10px;
        padding-block: 10px;
    }
    .site-logo { order: -1; font-size: 22px; }
    .site-nav, .live-search { width: 100%; justify-self: stretch; }
    .site-menu { justify-content: center; }
    .post-grid, .post-grid--related {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .movie-card__title { font-size: 13px; }
    .movie-card__quality {
        left: -42px;
        width: 132px;
        font-size: 11px;
    }
    .section-head h1, .section-head h2 { font-size: 20px; }
    .site-footer__inner { flex-direction: column; justify-content: center; text-align: center; padding: 18px 0; }
}
