/* ─── Rahabash TV Styles ─── */
/* Optimized for Smart TV browsers (Tizen, webOS, Android TV) */

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

:root {
    --gold: #d4af37;
    --gold-dim: rgba(212, 175, 55, 0.25);
    --cream: #f5f0e1;
    --dark: #0c0c0c;
    --panel: rgba(0, 0, 0, 0.55);
    --ok: #4ade80;
    --warn: #fbbf24;
    --err: #f87171;
}

@font-face {
    font-family: 'TVFont';
    src: local('Vazirmatn'), local('IranSans'), local('Tahoma'), local('Segoe UI');
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--dark);
    font-family: 'TVFont', Tahoma, sans-serif;
    color: var(--cream);
    font-size: 2.4vh;
    line-height: 1.7;
    padding: 4vh 4vw;
}

/* ─── Background Cover Image ─── */
.cover-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.65;
}

.vignette {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.7) 80%, rgba(0, 0, 0, 0.95) 100%);
    pointer-events: none;
}

/* ─── Start Overlay ─── */
.start-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3vh;
    transition: opacity 0.6s ease, visibility 0.6s;
}

.start-overlay.gone {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.start-overlay h1 {
    font-size: 5vh;
    color: var(--gold);
    text-shadow: 0 0 2vh var(--gold-dim);
}

.start-overlay p {
    font-size: 2.2vh;
    color: rgba(245, 240, 225, 0.8);
}

.btn-start {
    background: var(--gold);
    color: var(--dark);
    border: none;
    padding: 1.8vh 5vw;
    font-size: 2.6vh;
    border-radius: 1.2vh;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-start:focus,
.btn-start.focused {
    outline: none;
    box-shadow: 0 0 0 0.5vh #fff, 0 0 2vh var(--gold);
    transform: scale(1.06);
}

/* ─── UI Layer ─── */
.ui {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.ui>* {
    pointer-events: auto;
}

/* ─── Top Bar ─── */
.top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Status – Top Left */
.status {
    display: flex;
    align-items: center;
    gap: 1.2vw;
    background: var(--panel);
    padding: 1.2vh 2vw;
    border-radius: 1vh;
    border: 0.15vh solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.status-dot {
    width: 1.6vh;
    height: 1.6vh;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.ok {
    background: var(--ok);
    box-shadow: 0 0 1.2vh var(--ok);
    animation: breathe 2.5s ease-in-out infinite;
}

.status-dot.warn {
    background: var(--warn);
    box-shadow: 0 0 1.2vh var(--warn);
    animation: breathe 1.2s ease-in-out infinite;
}

.status-dot.err {
    background: var(--err);
    box-shadow: 0 0 1.2vh var(--err);
    animation: none;
}

@keyframes breathe {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}

.status-txt {
    font-size: 1.9vh;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Title – Top Center */
.badge {
    position: absolute;
    top: 3vh;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold-dim);
    border: 0.2vh solid var(--gold);
    color: var(--gold);
    padding: 1vh 3.5vw;
    border-radius: 5vh;
    font-size: 2.1vh;
    font-weight: 800;
    letter-spacing: 0.12em;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

/* ─── Center Play Indicator ─── */
.big-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    font-size: 12vh;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    text-shadow: 0 0 4vh rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 3;
}

.big-icon.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ─── Bottom Section ─── */
.bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 3vw;
}

/* Info Box */
.info {
    flex: 1;
    background: var(--panel);
    padding: 2.2vh 2.5vw;
    border-radius: 1.5vh;
    border: 0.15vh solid var(--gold-dim);
    backdrop-filter: blur(10px);
    max-width: 68vw;
}

.info h2 {
    color: var(--gold);
    font-size: 2.3vh;
    margin-bottom: 1.2vh;
    padding-bottom: 1vh;
    border-bottom: 0.15vh solid var(--gold-dim);
}

.info p {
    font-size: 1.75vh;
    line-height: 1.85;
    color: rgba(245, 240, 225, 0.92);
    margin-bottom: 0.8vh;
}

.info strong {
    color: #fff;
    font-weight: 700;
}

.info a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 0.3vh;
}

.info a:focus {
    outline: 0.4vh solid var(--gold);
    outline-offset: 0.3vh;
    border-radius: 0.3vh;
}

/* QR – Bottom Left */
.qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
    background: var(--panel);
    padding: 1.5vh;
    border-radius: 1.5vh;
    border: 0.15vh solid var(--gold-dim);
    backdrop-filter: blur(10px);
}

.qr-wrap img {
    width: 11vh;
    height: 11vh;
    border-radius: 0.8vh;
    background: #fff;
    padding: 0.4vh;
    display: block;
}

.qr-wrap span {
    font-size: 1.4vh;
    color: var(--gold);
    font-weight: 600;
}

/* Footer URLs */
.urls {
    position: absolute;
    bottom: 2.5vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4vw;
    font-size: 1.6vh;
    color: rgba(245, 240, 225, 0.5);
    white-space: nowrap;
}

/* ─── TV Focus ─── */
.focusable {
    outline: none;
}

.focusable:focus-visible,
.focusable.focused {
    outline: 0.4vh solid var(--gold);
    outline-offset: 0.3vh;
    border-radius: 0.5vh;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .status-dot {
        animation: none !important;
    }

    .big-icon {
        transition: none;
    }
}