/* MORE Video Stream — Tizen TV port
   نفس ألوان وتصميم نسخة الأندرويد (activity_code_entry / activity_server_mode / activity_splash) */

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

html, body {
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    font-family: 'Tizen Sans', Tahoma, Arial, sans-serif;
    -webkit-user-select: none;
    user-select: none;
}

.screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.screen.active { display: block; }

/* ===== Splash ===== */
#screen-splash {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#screen-splash img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

/* ===== Server Mode / Code Input (نفس خلفية #1E3C72) ===== */
.form-screen {
    background: #1E3C72;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.form-screen h1 {
    color: #FFFFFF;
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 40px;
    text-align: center;
}

.form-box {
    width: 100%;
    max-width: 520px;
}

.tv-input {
    width: 100%;
    height: 56px;
    margin-top: 24px;
    padding: 12px 16px;
    background: #2A5298;
    border: 2px solid #FFD700;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 18px;
    outline: none;
}
.tv-input::placeholder { color: #BBDEFB; }

.tv-button {
    width: 100%;
    height: 56px;
    margin-top: 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(45deg, #1ABC9C, #FFA500);
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}
.tv-button:disabled { opacity: 0.6; }

/* لعنصر التركيز على الريموت (TV focus ring) */
.tv-input:focus, .tv-button:focus {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

.hidden { display: none !important; }

.error-msg {
    color: #FFCDD2;
    margin-top: 12px;
    min-height: 20px;
    text-align: center;
}

/* ===== TV Screen (activity_tv) ===== */
#screen-tv {
    background: #000;
    overflow: hidden;
}

#rootWrapper, #mediaContainer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.media-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity 400ms ease;
}
.media-layer.fade-in-start { opacity: 0; }

.media-layer img.media-fit,
.media-layer video.media-fit {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.grid-wall {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: grid;
}

.grid-cell {
    position: relative;
    overflow: hidden;
    background: #000;
}

.videowall-cell {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #000;
}
.videowall-cell video {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
}

.pdf-canvas-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}
.pdf-canvas-wrap canvas { max-width: 100%; max-height: 100%; }
