/* ondeck-core.css — shared styles for all On Deck HTML clients */

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    background: #1a1a2e;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: #1a1a2e;
    color: #e0e0e0;
    font-family: 'Segoe UI', Arial, sans-serif;
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    transform-origin: 0 0;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */

.header-bar {
    background: linear-gradient(135deg, #1e1245 0%, #13132a 50%, #0d1f3c 100%);
    border-bottom: 2px solid rgba(99,102,241,0.35);
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 0 60px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    position: relative;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 8px;
}

.brand-name {
    font-size: 81px;
    font-weight: 700;
    letter-spacing: 14px;
    text-transform: uppercase;
    margin-top: -6px;
    background: linear-gradient(90deg, #7b2ff2 0%, #2563eb 20%, #06b6d4 40%, #16a34a 57%, #ca8a04 72%, #ea580c 87%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-clock {
    text-align: right;
    line-height: 1;
}

.clock-time {
    font-size: 74px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 4px;
}

.clock-date {
    font-size: 43px;
    font-weight: 300;
    color: #aaa;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.header-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}


.header-stats {
    font-size: 26px;
    color: #aaa;
    letter-spacing: 1px;
}

.reveal-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    color: #e85050;
    font-weight: 600;
    letter-spacing: 2px;
    white-space: nowrap;
    display: none;
}

.reveal-indicator.active {
    display: block;
}

/* ── Main content ────────────────────────────────────────────────────────────── */

.main-content {
    padding: 30px 60px 40px 60px;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 600px;
    font-size: 48px;
    color: #888;
}

.error {
    background: #4a1a1a;
    border: 1px solid #ff4444;
    color: #ff8888;
    padding: 30px 45px;
    border-radius: 12px;
    font-size: 33px;
    margin-top: 20px;
}

.no-episodes {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
    font-size: 42px;
    color: #666;
}

/* ── Day groups ──────────────────────────────────────────────────────────────── */

.day-group {
    margin-bottom: 28px;
}

.day-header {
    position: relative;
    font-size: 39px;
    font-weight: 700;
    color: #e6a919;
    padding: 10px 0;
    border-bottom: 2px solid #333;
    margin-bottom: 12px;
}

.day-header.today {
    color: #4fc3f7;
}

.day-header.past {
    color: #e85050;
}

.day-header-hint {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 39px;
    font-weight: 700;
    color: #aaa;
    cursor: pointer;
    white-space: nowrap;
}

/* ── Episode rows ────────────────────────────────────────────────────────────── */

.episode-row {
    display: flex;
    align-items: center;
    padding: 14px 22px;
    border-radius: 9px;
    margin-bottom: 6px;
    font-size: 40px;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: background 0.2s, min-height 0.3s ease, opacity 0.3s;
    min-height: 0;
}

.episode-row:hover {
    background: rgba(255,255,255,0.07);
}

.episode-row.focused {
    background: rgba(79,195,247,0.15);
    outline: 2px solid #4fc3f7;
}

.episode-row.watched {
    opacity: 0.30;
}

.episode-row.watched.focused {
    opacity: 0.50;
}

.episode-row.hidden-revealed {
    opacity: 0.30;
    background: rgba(232, 80, 80, 0.06);
}

.episode-row.hidden-revealed:hover {
    background: rgba(232, 80, 80, 0.12);
}

.episode-row.hidden-revealed.focused {
    opacity: 0.50;
    background: rgba(232, 80, 80, 0.15);
    outline: 2px solid #e85050;
}

.episode-row.expanded {
    align-items: flex-start;
    padding-top: 18px;
    padding-bottom: 18px;
}

.episode-row.expanded .ep-show,
.episode-row.expanded .ep-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.3;
}

/* ── Episode row cells ───────────────────────────────────────────────────────── */

.watched-indicator {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid #555;
    margin-right: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.watched-indicator.is-watched {
    background: #4caf50;
    border-color: #4caf50;
}

.watched-indicator.is-watched::after {
    content: '\2713';
    color: #fff;
    font-size: 22px;
    font-weight: bold;
}

.watched-indicator.is-hidden {
    background: #e85050;
    border-color: #e85050;
}

.watched-indicator.is-hidden::after {
    content: '\2715';
    color: #fff;
    font-size: 22px;
    font-weight: bold;
}

.ep-show {
    width: 680px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: white-space 0s;
}

.ep-info {
    width: 264px;
    color: #888;
    font-size: 36px;
    flex-shrink: 0;
}

.ep-title {
    flex: 1;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: white-space 0s;
}

.ep-service {
    width: 330px;
    text-align: right;
    font-size: 35px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #888;
}

/* Deep-linking: shown when the service has a known app (browser + webOS + Fire TV premium) */
.ep-service.has-app {
    color: #4fc3f7;
}

.ep-service.no-app {
    color: #888;
}

/* Premium: ▶ after name + pointer — inherits blue from .has-app */
.ep-service-link {
    cursor: pointer;
}

/* ── Scroll container ────────────────────────────────────────────────────────── */

.scroll-container {
    height: 780px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.scroll-container::-webkit-scrollbar {
    width: 9px;
}

.scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 5px;
}

/* ── Toast ───────────────────────────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: #fff;
    padding: 20px 50px;
    border-radius: 12px;
    font-size: 36px;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 100;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

/* ── Demo pair card (shown in demo mode above the episode list) ──────────────── */

.demo-pair-card {
    background: rgba(79, 70, 229, 0.18);
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    padding: 28px 40px;
    cursor: pointer;
}

.demo-pair-card.focused {
    background: rgba(79, 70, 229, 0.35);
    outline: 2px solid #a5b4fc;
}

.demo-pair-body { flex: 1; }

.demo-pair-title {
    font-size: 44px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.demo-pair-sub {
    font-size: 30px;
    color: #a5b4fc;
}

.demo-pair-hint {
    font-size: 32px;
    color: #666;
    margin-left: 40px;
    white-space: nowrap;
}

/* ── Welcome screen ──────────────────────────────────────────────────────────── */

.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding: 0 120px 10px;
    margin-top: 20px;
    gap: 26px;
}

.welcome-headline {
    font-size: 80px;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(90deg, #a5b4fc, #7b2ff2, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.welcome-sub {
    font-size: 36px;
    color: #aaa;
    text-align: center;
    max-width: 1400px;
    line-height: 1.4;
}

.welcome-body {
    display: flex;
    gap: 120px;
    align-items: flex-start;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.welcome-feature {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 32px;
    color: #ddd;
}

.welcome-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(99,102,241,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.welcome-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 440px;
}

.welcome-nav-title {
    font-size: 24px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 4px;
}

.welcome-nav-item {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 30px;
    color: #bbb;
}

.welcome-nav-key {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    padding: 4px 16px;
    font-size: 24px;
    color: #fff;
    min-width: 68px;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.welcome-buttons {
    display: flex;
    gap: 56px;
}

.welcome-btn {
    padding: 22px 70px;
    border-radius: 14px;
    font-size: 38px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
}

.welcome-btn-primary {
    background: rgba(79,70,229,0.35);
    border-color: rgba(99,102,241,0.55);
    color: #fff;
}

.welcome-btn-primary.focused {
    background: rgba(79,70,229,0.65);
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(165,180,252,0.35);
}

.welcome-note {
    font-size: 28px;
    color: #777;
    text-align: center;
    max-width: 1200px;
    line-height: 1.4;
}

.welcome-note strong { color: #a5b4fc; }

/* ── Pairing screen ──────────────────────────────────────────────────────────── */

.pairing-screen {
    position: fixed;
    inset: 0;
    background: #0f0f1a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.pairing-card {
    background: #1a1a2e;
    border: 2px solid rgba(99,102,241,0.4);
    border-radius: 24px;
    padding: 80px 120px;
    text-align: center;
    max-width: 1100px;
}

.pairing-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    margin-bottom: 0;
}

.pairing-left {
    flex: 1;
    text-align: center;
}

.pairing-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pairing-qr-label {
    font-size: 26px;
    color: #888;
    letter-spacing: 2px;
}

.pairing-qr-box {
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    display: inline-block;
}

.pairing-title {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: 8px;
    background: linear-gradient(90deg, #7b2ff2, #2563eb, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.pairing-sub {
    font-size: 32px;
    color: #888;
    margin-bottom: 60px;
}

.pairing-url {
    font-size: 36px;
    color: #a5b4fc;
    margin-bottom: 40px;
}

.pairing-code {
    font-size: 120px;
    font-weight: 700;
    letter-spacing: 24px;
    color: #fff;
    font-family: 'Consolas', monospace;
    margin-bottom: 48px;
}

.pairing-status {
    font-size: 30px;
    color: #666;
}
