/* BingeYet - minimal, white, mobile-first.
   The only color comes from the binge verdict and the service circle. */

:root {
    --ink: #202124;
    --muted: #5f6368;
    --line: #ebebeb;
    --field: #dfe1e5;
    --bg: #ffffff;

    --go: #1e8e3e;      /* bingeable */
    --go-bg: #e6f4ea;
    --wait: #b06000;    /* not binge yet */
    --wait-bg: #fef7e0;
    --none: #5f6368;    /* no data */
    --none-bg: #f1f3f4;

    --maxw: 640px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

/* Wordmark */
.brand {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
}
.brand b { color: var(--go); font-weight: 700; }

/* ---- Home ---- */
.home {
    min-height: 78vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 8vh;
}
.home .brand { font-size: 44px; margin-bottom: 6px; }
.home .tag { color: var(--muted); margin: 0 0 28px; font-size: 17px; }

.search {
    width: 100%;
    max-width: 480px;
    display: flex;
    gap: 8px;
}
.search input {
    flex: 1;
    font-size: 16px;
    padding: 13px 18px;
    border: 1px solid var(--field);
    border-radius: 24px;
    outline: none;
    transition: box-shadow .15s, border-color .15s;
}
.search input:focus {
    border-color: transparent;
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
}
.search button {
    font-size: 15px;
    padding: 0 20px;
    border: 1px solid var(--field);
    border-radius: 24px;
    background: #f8f9fa;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.search button:hover { box-shadow: 0 1px 3px rgba(32,33,36,.2); }
.search .btn-icon { display: none; }

/* ---- Results list ---- */
.results { width: 100%; max-width: 480px; margin: 18px auto 0; text-align: left; }
.result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 6px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
}
.result:hover { background: #fafafa; }
.result .thumb {
    flex: 0 0 auto;
    width: 46px; height: 64px;
    border-radius: 6px;
    object-fit: cover;
    background: #f1f3f4;
}
.result .thumb--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    color: #b8bcc2;
}
.result .thumb--empty svg { width: 62%; height: 62%; }
.result .meta { flex: 1; min-width: 0; }
.result .title { font-weight: 500; }
.result .sub { color: var(--muted); font-size: 13px; }
.result .sub .svc { margin-right: 2px; }
.note { color: var(--muted); font-size: 14px; padding: 14px 6px; }

/* Service circle */
.svc {
    width: 11px; height: 11px; border-radius: 50%;
    background: #9aa0a6; display: inline-block; flex: 0 0 auto;
    vertical-align: middle;
}
.svc.netflix   { background: #e50914; }
.svc.paramount { background: #0064ff; }
.svc.max, .svc.hbo, .svc.hbo-max { background: #5a2d9e; }
.svc.apple-tv, .svc.apple-tv- { background: #111111; }
.svc.hulu      { background: #1ce783; }
.svc.prime-video, .svc.amazon, .svc.prime { background: #00a8e1; }
.svc.disney, .svc.disney- { background: #113ccf; }
.svc.peacock   { background: #05a081; }
.svc.amc       { background: #d2122e; }
.svc.cbs, .svc.paramount-network { background: #0339a6; }
.svc.nbc       { background: #f37021; }
.svc.fox       { background: #1c8cff; }
.svc.the-cw, .svc.cw { background: #00843d; }

/* ---- Show page ---- */
.topbar {
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; }
.topbar .brand { font-size: 22px; }
.topbar .search { max-width: none; }
.topbar .search input { padding: 9px 16px; }

.show { padding-top: 40px; padding-bottom: 60px; }

.showhead { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 4px; }
.showhead .poster {
    flex: 0 0 auto;
    width: 92px; height: 132px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f3f4;
}
.showhead .poster--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    color: #b8bcc2;
}
.showhead .poster--empty svg { width: 60%; height: 60%; }
.showhead .headmeta { min-width: 0; }
.showhead h1 { margin-top: 0; }
.showhead .svcline { margin-bottom: 16px; }

.show h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: -0.01em; }
.show .svcline { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 7px; margin-bottom: 22px; }

.verdict {
    display: inline-block;
    font-size: 22px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 12px;
}
.verdict.go   { color: var(--go);   background: var(--go-bg); }
.verdict.wait { color: var(--wait); background: var(--wait-bg); }
.verdict.none { color: var(--none); background: var(--none-bg); }

.season {
    margin-top: 26px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
}
.season h2 { font-size: 15px; margin: 0 0 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-size: 17px; font-weight: 500; }
.stat .v .wd { display: block; font-size: 15px; }

.upcoming { margin-top: 24px; }
.upcoming h2, .older h2 { font-size: 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.upcoming ul { list-style: none; padding: 0; margin: 8px 0 0; }
.upcoming li { display: flex; justify-content: space-between; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.upcoming li .ep { color: var(--muted); }

.older { margin-top: 26px; }
.older details { border-top: none; }
.older summary { cursor: pointer; padding: 12px 2px; color: var(--muted); font-size: 14px; }
.older table { width: 100%; border-collapse: collapse; font-size: 14px; }
.older td { padding: 7px 2px; border-bottom: 1px solid var(--line); }
.older td:last-child { text-align: right; color: var(--muted); }

.empty { padding: 60px 0; text-align: center; }
.empty h1 { font-size: 22px; margin-bottom: 8px; }
.empty p { color: var(--muted); }

.foot {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 30px 20px 40px;
    border-top: 1px solid var(--line);
    margin-top: 40px;
}
.foot p { margin: 4px 0; }
.foot .heart { color: #e50914; }
.foot a { color: var(--muted); }
.foot .credit { font-size: 12px; opacity: .85; }

@media (max-width: 480px) {
    .wrap { padding: 0 18px; }
    .topbar { padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: 14px; }
    .show { padding-top: 40px; padding-bottom: 80px; }
    .home .brand { font-size: 38px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .topbar .wrap { flex-wrap: wrap; }
    .showhead { gap: 14px; }
    .showhead .poster { width: 76px; height: 110px; }
    .show h1 { font-size: 24px; }
    .search .btn-text { display: none; }
    .search .btn-icon { display: block; }
    .search button { width: 46px; padding: 0; flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
