/* ==========================================================================
   Page polish: detail hero and episodes, search, sign-in.
   Loaded after design.css; watch.css still loads last.
   ========================================================================== */

/* ---- Detail ------------------------------------------------------------------- */
.detail-hero {
    min-height: 0; margin-bottom: 26px; border: 1px solid var(--border);
    background: var(--surface);
}
.detail-hero-bg {
    opacity: .4 !important; filter: saturate(1.15) !important; transform: scale(1.03);
}
.detail-hero-content { position: relative; z-index: 2; gap: 22px; padding: 22px; align-items: flex-end; }
.detail-poster {
    width: 132px; border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.detail-info { min-width: 0; flex: 1 1 320px; }
.detail-info h1 {
    margin: 6px 0 4px; font-size: clamp(1.6rem, 4vw, 2.9rem); line-height: 1.08; letter-spacing: -.015em;
}
.native-title { margin: 0 0 10px; font-size: .9rem; }
.detail-desc { max-width: 760px; font-size: .95rem; line-height: 1.62; }
.genre-row { margin-bottom: 10px; }
.genre-chip { padding: 3px 10px; border-radius: 999px; font-size: .72rem; }
.hero-actions { margin-top: 14px; }
@media (min-width: 640px) {
    .detail-hero-content { padding: 30px; gap: 30px; }
    .detail-poster { width: 180px; }
}
@media (min-width: 1024px) {
    .detail-hero { min-height: 440px; }
    .detail-hero-content { padding: 44px; gap: 40px; }
    .detail-poster { width: 230px; }
}

/* Episodes */
.section-title-icon { color: var(--accent); margin-right: 2px; }
.count-pill {
    display: inline-flex; align-items: center; padding: 2px 9px; margin-left: 8px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: .72rem; font-weight: 700;
}
.ep-card {
    overflow: hidden; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ep-card:hover { transform: translateY(-2px); border-color: var(--accent-border); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.ep-card.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ep-thumb-wrap { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.ep-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.ep-num-badge {
    position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px;
    background: rgba(0, 0, 0, .7); color: #fff; font-size: .7rem; font-weight: 700;
}
.ep-card-title { font-weight: 700; font-size: .86rem; padding: 9px 10px 0; }
.ep-card-sub {
    padding: 2px 10px 10px; font-size: .74rem; color: var(--muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- Search ---------------------------------------------------------------------- */
.section-head .count-pill { margin-left: 6px; }

/* ---- Sign-in ----------------------------------------------------------------------- */
body:has(.auth-card) {
    min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
    background:
        radial-gradient(900px 480px at 50% -12%, var(--accent-soft), transparent 70%),
        var(--bg);
}
.auth-card {
    width: min(420px, 100%); padding: 30px 26px 26px; border-radius: 22px;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.auth-logo-wrap { display: flex; justify-content: center; margin-bottom: 22px; }
.auth-logo-svg { height: 52px; width: auto; color: var(--accent); }
.auth-tabs {
    display: flex; gap: 4px; padding: 4px; margin-bottom: 18px;
    border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
}
.auth-tab {
    flex: 1; min-height: 38px; border: 0; border-radius: 999px; background: none;
    color: var(--muted); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer;
}
.auth-tab.is-active { background: var(--accent); color: var(--accent-fg); }
.auth-field input {
    height: 46px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg);
    color: var(--text); padding: 0 14px; font: inherit; font-size: .95rem; width: 100%;
}
.auth-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-btn {
    width: 100%; height: 48px; margin-top: 6px; border: 0; border-radius: 12px;
    background: var(--accent); color: var(--accent-fg); font: inherit; font-weight: 800; cursor: pointer;
}
.auth-btn:disabled { opacity: .6; cursor: default; }
