/* ==========================================================================
   tvideo look: navy page, white cards, green/red stat cards,
   yellow and cyan calls to action. Loaded after style.css.
   ========================================================================== */

:root {
    --tv-navy: #08306e;
    --tv-navy-deep: #052356;
    --tv-navy-line: rgba(255, 255, 255, 0.10);
    --tv-white: #ffffff;
    --tv-ink: #0f172a;
    --tv-ink-2: #475569;
    --tv-soft: #b9c8e4;
    --tv-green: #12892f;
    --tv-green-text: #0b8a3c;
    --tv-red: #d93a32;
    --tv-yellow: #f6c21c;
    --tv-yellow-ink: #3a2a00;
    --tv-cyan: #06c3d6;
    --tv-cyan-ink: #06203d;
    --tv-cyan-text: #0aa3bd;
    --tv-blue: #1a6ee0;
    --tv-grey: #8796ad;
    --tv-panel: #f1f5f9;

    /* re-point the base stylesheet's tokens so the other pages follow */
    --bg-body: var(--tv-navy);
    --bg-surface: #ffffff;
    --bg-subtle: #f1f5f9;
    --accent: var(--tv-blue);
    --accent-hover: #155bc0;
    --accent-soft: #dbeafe;
    --accent-text: #1546a0;
    --radius-md: 12px;
    --radius-lg: 14px;
}

body.tv-body {
    background: var(--tv-navy);
    color: #fff;
    font-family: 'DM Sans', system-ui, sans-serif;
    padding-bottom: 72px;
}
body.tv-bare { padding-bottom: 32px; }

/* Top bar */
.tv-topbar, .tv-closebar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; min-height: 64px;
    background: rgba(5, 35, 86, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--tv-navy-line);
}
.tv-brand { display: flex; align-items: center; gap: 10px; color: #fff; margin-right: auto; min-width: 0; }
.tv-brand:hover { color: #fff; }
.tv-logo {
    width: 40px; height: 40px; border-radius: 10px; flex: none;
    display: grid; place-items: center;
    background: #0b0f1a; color: #fff; font-size: 16px;
    box-shadow: inset 0 0 0 2px #1f6fe0;
}
.tv-brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tv-brand-text strong { font: 800 19px/1.1 'Manrope', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-brand-text span { font-size: 12px; color: var(--tv-soft); }
.tv-topbar-right { display: flex; align-items: center; gap: 6px; flex: none; }
.tv-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; font-size: 18px; border-radius: 50%; }
.tv-icon:hover { color: #fff; background: var(--tv-navy-line); }
.tv-icon-lg { font-size: 26px; }

.tv-close { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; font-size: 22px; border-radius: 50%; flex: none; }
.tv-close:hover { color: #fff; background: var(--tv-navy-line); }
.tv-closebar-text { display: flex; flex-direction: column; min-width: 0; }
.tv-closebar-text strong { font: 800 18px/1.2 'Manrope', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-closebar-text span { font-size: 12px; color: var(--tv-soft); font-weight: 600; letter-spacing: 0.02em; }

/* Page */
.tv-page { max-width: 640px; margin: 0 auto; padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 16px; }
.tv-page > .flash-stack { margin: 0; }

.tv-hello { padding-top: 4px; }
.tv-eyebrow-soft { color: var(--tv-soft); font-size: 15px; font-weight: 500; }
.tv-h1 { font: 800 30px/1.15 'Manrope', sans-serif; color: #fff; margin-top: 2px; }
.tv-h2 { font: 800 28px/1.15 'Manrope', sans-serif; color: #fff; }
.tv-h3 { font: 800 20px/1.2 'Manrope', sans-serif; color: #fff; }
.tv-eyebrow { color: var(--tv-cyan); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 4px; }

/* Buttons */
.tv-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px; border-radius: 8px; border: 0;
    font: 700 14px/1 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; text-decoration: none;
    transition: filter 0.15s ease, transform 0.15s ease;
}
.tv-btn:hover { filter: brightness(0.95); }
.tv-btn:active { transform: scale(0.98); }
.tv-btn:disabled { opacity: 0.55; cursor: not-allowed; filter: none; transform: none; }
.tv-btn-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.tv-btn-lg { height: 48px; font-size: 16px; border-radius: 10px; }
.tv-btn-block { width: 100%; }
.tv-btn-yellow { background: var(--tv-yellow); color: var(--tv-yellow-ink); box-shadow: 0 2px 10px rgba(246, 194, 28, 0.25); }
.tv-btn-yellow:hover { color: var(--tv-yellow-ink); }
.tv-btn-cyan { background: var(--tv-cyan); color: var(--tv-cyan-ink); }
.tv-btn-cyan:hover { color: var(--tv-cyan-ink); }
.tv-btn-white { background: #fff; color: var(--tv-ink); }
.tv-btn-white:hover { color: var(--tv-ink); }
.tv-btn-blue { background: var(--tv-blue); color: #fff; }
.tv-btn-blue:hover { color: #fff; }
.tv-btn-grey { background: var(--tv-grey); color: #fff; }
.tv-btn-grey:hover { color: #fff; }

/* Stat cards */
.tv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tv-stat { border-radius: 12px; padding: 16px; color: #fff; display: flex; flex-direction: column; gap: 10px; min-height: 168px; }
.tv-stat-green { background: var(--tv-green); }
.tv-stat-red { background: var(--tv-red); }
.tv-stat-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.tv-stat-head i { font-size: 18px; opacity: 0.95; }
.tv-stat-value { font: 800 24px/1.2 'Manrope', sans-serif; font-variant-numeric: tabular-nums; }
.tv-stat-sub { font-size: 13px; opacity: 0.9; margin-top: auto; }
.tv-stat .tv-btn { margin-top: auto; }

/* White call-to-action card */
.tv-cta-card { background: #fff; color: var(--tv-ink); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.tv-cta-card h3 { font: 800 20px/1.3 'Manrope', sans-serif; color: var(--tv-ink); }
.tv-cta-card p { color: var(--tv-ink-2); font-size: 15px; line-height: 1.5; }
.tv-cta-card .tv-btn { margin-top: 4px; }
.tv-cta-foot { text-align: center; font-size: 14px; }
.tv-cta-foot a { color: var(--tv-blue); font-weight: 700; }

/* Task list */
.tv-tasks { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.tv-tasks-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.tv-count { background: rgba(255, 255, 255, 0.12); color: #dbe6ff; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }

.tv-video-list { display: flex; flex-direction: column; gap: 16px; }
.tv-video { background: #fff; color: var(--tv-ink); border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.4); }
.tv-video.hidden { display: none; }
.tv-thumb { position: relative; display: block; aspect-ratio: 16 / 10; background: #0b1a33; }
.tv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-id, .tv-dur {
    position: absolute; background: rgba(15, 23, 42, 0.82); color: #fff;
    font-size: 13px; font-weight: 700; border-radius: 6px; padding: 4px 8px; line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.tv-id { top: 10px; left: 10px; }
.tv-dur { right: 10px; bottom: 10px; display: inline-flex; gap: 5px; align-items: center; }
.tv-done { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; background: rgba(5, 35, 86, 0.62); color: #fff; font-weight: 700; font-size: 15px; }
.tv-done i { font-size: 28px; color: #4ade80; }

.tv-video-body { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px 4px; }
.tv-video-info { min-width: 0; }
.tv-cat { display: block; color: var(--tv-cyan-text); font-size: 12px; font-weight: 700; letter-spacing: 0.03em; }
.tv-video h3 { font: 700 18px/1.3 'DM Sans', sans-serif; color: var(--tv-ink); margin-top: 4px; }
.tv-reward { text-align: right; flex: none; display: flex; flex-direction: column; gap: 2px; }
.tv-reward span { font-size: 13px; color: var(--tv-ink-2); }
.tv-reward strong { color: var(--tv-green-text); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tv-video-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 16px 16px; }
.tv-video.is-completed .tv-video-actions { grid-template-columns: 1fr; }

.tv-empty { background: #fff; color: var(--tv-ink-2); border-radius: 12px; padding: 32px 20px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.tv-empty i { font-size: 28px; color: var(--tv-grey); }
.tv-empty.hidden { display: none; }

/* Watch page */
.tv-watch { display: flex; flex-direction: column; gap: 16px; }
.tv-player { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,0.5); }
.tv-player #ytPlayerMount, .tv-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tv-panel { background: #fff; color: var(--tv-ink); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.tv-timer { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--tv-panel); border-radius: 10px; padding: 14px 16px; }
.tv-timer span { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.tv-timer span i { color: var(--tv-blue); font-size: 20px; }
.tv-timer strong { font: 800 24px/1 'Manrope', sans-serif; color: var(--tv-blue); font-variant-numeric: tabular-nums; }
.tv-progress { margin: -4px 0 0; height: 6px; background: #e2e8f0; }
.tv-progress .progress-fill { background: var(--tv-blue); }
.tv-progress-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--tv-ink-2); flex-wrap: wrap; }
.tv-progress-meta .timer-status-pill { background: none; padding: 0; color: var(--tv-ink-2); font-size: 13px; }
.tv-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tv-rules li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 15px; line-height: 1.45; color: var(--tv-ink-2); }
.tv-rules li b { color: var(--tv-ink); }
.tv-rules i { font-size: 18px; margin-top: 2px; }
.tv-ok { color: var(--tv-green-text); }
.tv-warn { color: var(--tv-red); }
.tv-info { color: var(--tv-cyan-text); }
.tv-watch-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.tv-watch-actions.hidden { display: none; }

.tv-success { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 8px 0; }
.tv-success.hidden { display: none; }
.tv-success-check { width: 56px; height: 56px; border-radius: 50%; background: var(--tv-green); color: #fff; display: grid; place-items: center; font-size: 24px; }
.tv-success h3 { font: 800 20px/1.2 'Manrope', sans-serif; color: var(--tv-ink); }
.tv-success p { color: var(--tv-ink-2); }
.tv-success-actions { display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; margin-top: 4px; }
.tv-success-actions .btn { height: 48px; justify-content: center; border-radius: 10px; font-weight: 700; }
.tv-success-actions .btn-primary { background: var(--tv-blue); color: #fff; }

.tv-next { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.tv-next-item { display: grid; grid-template-columns: 128px 1fr; gap: 12px; background: #fff; color: var(--tv-ink); border-radius: 12px; padding: 8px; align-items: center; }
.tv-next-item:hover { color: var(--tv-ink); }
.tv-next-item img { width: 128px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.tv-next-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tv-next-text strong { font-size: 15px; line-height: 1.3; }
.tv-next-reward { color: var(--tv-green-text); font-weight: 800; font-size: 14px; }

/* Floating customer-support button */
.tv-support {
    position: fixed; right: 12px; bottom: 88px; z-index: 50;
    width: 88px; height: 88px; border-radius: 50%;
    background: var(--tv-cyan); color: var(--tv-cyan-ink);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    text-align: center; box-shadow: 0 8px 24px rgba(6, 195, 214, 0.35);
}
.tv-support:hover { color: var(--tv-cyan-ink); }
.tv-support i { font-size: 22px; }
.tv-support span { font-size: 9px; font-weight: 800; text-transform: uppercase; line-height: 1.15; max-width: 64px; }
body.tv-bare .tv-support { bottom: 20px; }

/* Bottom navigation */
.tv-bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(5, 35, 86, 0.98); border-top: 1px solid var(--tv-navy-line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tv-bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--tv-soft); font-size: 11px; font-weight: 600; padding: 6px 0; border-radius: 8px; }
.tv-bottomnav a i { font-size: 18px; }
.tv-bottomnav a.active, .tv-bottomnav a:hover { color: #fff; }
.tv-bottomnav a.active i { color: var(--tv-yellow); }

.tv-footer { max-width: 640px; margin: 0 auto; padding: 8px 16px 24px; display: flex; justify-content: space-between; align-items: center; color: var(--tv-soft); font-size: 13px; }
.tv-linkbtn { background: none; border: 0; color: var(--tv-soft); font: inherit; cursor: pointer; text-decoration: underline; }

/* Other pages (wallet, withdraw, history, referrals, profile, login, register):
   their content sits in .card boxes that stay white; loose headings turn white */
.tv-page > h1, .tv-page > h2, .tv-page > h3,
.tv-page .section-title, .tv-page .page-title { color: #fff; }
.tv-page .section-subtitle { color: var(--tv-soft); }
.tv-page .card { color: var(--tv-ink); }
.tv-page .card h1, .tv-page .card h2, .tv-page .card h3 { color: var(--tv-ink); }

@media (min-width: 720px) {
    .tv-topbar, .tv-closebar { padding-left: max(16px, calc((100vw - 640px) / 2)); padding-right: max(16px, calc((100vw - 640px) / 2)); }
}
@media (max-width: 380px) {
    .tv-brand-text span { display: none; }
    .tv-stat-value { font-size: 21px; }
    .tv-btn-yellow.tv-btn-sm span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
}
.tv-page .stat-card, .tv-page .stat-card .stat-value,
.tv-page .data-table, .tv-page .empty-state { color: var(--tv-ink); }

/* ==========================================================================
   Sileo-Style Animated Toasts & Post-Video Demo Alert Popup
   ========================================================================== */

.sileo-toast-root {
    position: fixed;
    top: 74px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 95;
    width: calc(100% - 24px);
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.sileo-pill {
    pointer-events: auto;
    width: 100%;
    background: #0b1220;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    padding: 12px 14px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.sileo-pill.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.sileo-pill.is-leaving {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
}

.sileo-pill-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(6, 195, 214, 0.18);
    color: var(--tv-cyan);
    display: grid;
    place-items: center;
    font-size: 15px;
    flex: none;
}

.sileo-pill-body {
    flex: 1;
    min-width: 0;
}

.sileo-pill-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 2px;
}

.sileo-pill-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sileo-pill-close {
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    color: #cbd5e1;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    flex: none;
    font-size: 14px;
}
.sileo-pill-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

/* Sileo Modal Popup */
.sileo-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(2, 10, 28, 0.72);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sileo-modal-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.sileo-modal-card {
    width: 100%;
    max-width: 410px;
    background: #0b1220;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    padding: 24px 20px 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    text-align: center;
    transform: translateY(18px) scale(0.94);
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.sileo-modal-backdrop.is-open .sileo-modal-card {
    transform: translateY(0) scale(1);
}

.sileo-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    cursor: pointer;
    font-size: 16px;
    display: grid;
    place-items: center;
}
.sileo-modal-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.sileo-demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(246, 194, 28, 0.18);
    color: #fde047;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.sileo-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
    display: grid;
    place-items: center;
    font-size: 24px;
    margin: 0 auto 12px;
}

.sileo-modal-card h3 {
    color: #ffffff;
    font: 800 21px/1.2 'Manrope', sans-serif;
    margin-bottom: 6px;
}

.sileo-modal-sub {
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 12px;
}

.sileo-points-box {
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(74, 222, 128, 0.28);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.sileo-points-box span {
    display: block;
    font-size: 12px;
    color: #bbf7d0;
    font-weight: 600;
}

.sileo-points-box strong {
    display: block;
    font: 800 24px/1.2 'Manrope', sans-serif;
    color: #4ade80;
    margin-top: 2px;
}

.sileo-demo-note {
    background: rgba(246, 194, 28, 0.12);
    border: 1px solid rgba(246, 194, 28, 0.3);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.45;
    color: #fef08a;
    margin-bottom: 16px;
    text-align: left;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.sileo-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
