html,
body {
    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    overflow: hidden;

    background: #020812;
    color: #ffffff;

    font-family: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

#app {
    width: 100%;
    height: 100%;
}


/* =========================================================
   SPLASH
   ========================================================= */

.splash-screen {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            180deg,
            #07162a 0%,
            #020812 100%
        );
}

.splash-content {
    text-align: center;
}

.splash-logo {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: 3px;

    color: #ffffff;
}

.splash-message {
    margin-top: 28px;

    color: #91a3bd;

    font-size: 22px;
}

.splash-loader {
    width: 54px;
    height: 54px;

    margin: 38px auto 0;

    border: 5px solid rgba(44, 157, 255, 0.20);
    border-top-color: #2c9dff;
    border-radius: 50%;

    animation: ultim-spin 0.9s linear infinite;
}

@keyframes ultim-spin {
    to {
        transform: rotate(360deg);
    }
}

.splash-error {
    margin-top: 28px;
    margin-bottom: 30px;

    color: #ff8080;

    font-size: 22px;
}

.tv-button {
    min-width: 220px;

    padding: 18px 30px;

    border: 2px solid #2c9dff;
    border-radius: 12px;

    background: #0d2039;
    color: #ffffff;

    font-size: 22px;
}


/* =========================================================
   ACTIVATION
   ========================================================= */

.activation-screen {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            #07162a 0%,
            #020812 100%
        );
}

.activation-glow {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 180px;

    background:
        linear-gradient(
            180deg,
            rgba(26, 117, 255, 0) 0%,
            rgba(26, 117, 255, 0.10) 100%
        );

    pointer-events: none;
}

.activation-layout {
    position: relative;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;

    gap: 70px;

    padding:
        55px
        90px
        55px
        105px;
}

.activation-left {
    flex: 1;

    min-width: 0;
}


/* =========================================================
   ACTIVATION LOGO
   ========================================================= */

.activation-logo-container {
    width: 390px;
    min-height: 90px;

    display: flex;
    align-items: center;
}

.activation-logo-image {
    display: block;

    width: 380px;
    max-height: 100px;

    object-fit: contain;
    object-position: left center;
}

.activation-logo-fallback {
    font-size: 58px;
    font-weight: 900;
    letter-spacing: -2px;

    line-height: 1;
}

.activation-logo-ultim {
    color: #ffffff;
}

.activation-logo-tv {
    color: #2c9dff;
}

.activation-tagline {
    margin-top: 15px;

    color: #7691b7;

    font-size: 15px;
    font-weight: 600;

    letter-spacing: 4px;
}

.activation-title {
    margin:
        48px
        0
        0;

    color: #ffffff;

    font-size: 58px;
    line-height: 1.1;

    font-weight: 800;
}

.activation-description {
    max-width: 780px;

    margin:
        18px
        0
        0;

    color: #91a3bd;

    font-size: 27px;
    line-height: 1.4;
}

.activation-code-label {
    margin-top: 44px;

    color: #8bb5f4;

    font-size: 18px;
    font-weight: 700;

    letter-spacing: 3px;
}

.activation-code-box {
    width: 760px;
    height: 112px;

    margin-top: 13px;

    display: flex;
    align-items: center;

    gap: 14px;

    padding: 14px 18px;

    background: #08182c;

    border: 3px solid #2c9dff;
    border-radius: 24px;
}

.activation-digit {
    flex: 1;

    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #0d2039;

    border: 1px solid #203a5c;
    border-radius: 15px;

    color: #ffffff;

    font-size: 47px;
    font-weight: 800;
}

.activation-help {
    margin-top: 21px;

    color: #7287a5;

    font-size: 18px;
}

.activation-url {
    margin-top: 7px;

    color: #b6ceff;

    font-size: 27px;
    font-weight: 700;
}

.activation-trial {
    display: flex;
    align-items: center;

    gap: 16px;

    margin-top: 31px;

    color: #6f86a6;

    font-size: 15px;
    font-weight: 600;

    letter-spacing: 1px;
}

.activation-trial-line {
    display: block;

    width: 42px;
    height: 3px;

    background: #2c9dff;
}

.activation-error {
    margin-top: 20px;

    color: #ff8080;

    font-size: 18px;
}


/* =========================================================
   QR CARD
   ========================================================= */

.activation-qr-card {
    width: 500px;
    height: 790px;

    flex: 0 0 500px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 45px 38px;

    background:
        linear-gradient(
            180deg,
            #0d1d34 0%,
            #081423 100%
        );

    border: 1px solid #27496e;
    border-radius: 38px;
}

.activation-qr-title {
    color: #b9d1fa;

    font-size: 27px;
    line-height: 1.35;

    font-weight: 700;

    text-align: center;
}

.activation-qr-container {
    width: 340px;
    height: 340px;

    margin-top: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;

    background: #ffffff;

    border: 3px solid #2c9dff;
    border-radius: 28px;
}

.activation-qr-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: #07162a;
}

.activation-qr-code {
    font-size: 55px;
    font-weight: 900;

    letter-spacing: 5px;
}

.activation-qr-placeholder-text {
    margin-top: 20px;

    color: #51647d;

    font-size: 17px;
    font-weight: 700;

    letter-spacing: 4px;
}

.activation-qr-unavailable {
    color: #15243a;

    font-size: 20px;
    font-weight: 700;
}

.activation-qr-separator {
    width: 100%;
    height: 1px;

    margin-top: 45px;

    background: #263b56;
}

.activation-qr-footer {
    margin-top: 28px;

    color: #7691b7;

    font-size: 14px;
    font-weight: 600;

    letter-spacing: 3px;

    text-align: center;
}


/* ============================================================
   HOME
   ============================================================ */

.home-screen {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            #071326 0%,
            #050c18 52%,
            #030812 100%
        );

    color: #ffffff;
}


/* ============================================================
   HOME BACKGROUND DECORATION
   ============================================================ */

.home-bg-glow {
    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}

.home-bg-glow-top {
    width: 620px;
    height: 620px;

    right: -180px;
    top: -260px;

    background:
        radial-gradient(
            circle,
            rgba(94, 167, 255, 0.15) 0%,
            rgba(94, 167, 255, 0) 70%
        );
}

.home-bg-glow-left {
    width: 560px;
    height: 560px;

    left: -300px;
    bottom: -240px;

    background:
        radial-gradient(
            circle,
            rgba(85, 230, 165, 0.10) 0%,
            rgba(85, 230, 165, 0) 70%
        );
}

.home-bg-glow-bottom {
    width: 900px;
    height: 500px;

    left: 50%;
    bottom: -390px;

    transform: translateX(-50%);

    background:
        radial-gradient(
            ellipse,
            rgba(155, 124, 255, 0.09) 0%,
            rgba(155, 124, 255, 0) 70%
        );
}


/* ============================================================
   HOME CONTENT
   ============================================================ */

.home-content {
    position: relative;

    z-index: 2;

    width: 100%;
    height: 100%;

    padding:
        34px
        76px
        30px
        76px;

    display: flex;
    flex-direction: column;
}


/* ============================================================
   HOME HEADER
   ============================================================ */

.home-header {
    width: 100%;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.home-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.home-license {
    margin-bottom: 8px;

    color: #86bba7;

    font-size: 17px;
    font-weight: 600;
}

.home-logo {
    display: block;

    width: 315px;
    height: auto;

    object-fit: contain;
}

.home-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.home-clock {
    color: #ffffff;

    font-size: 26px;
    font-weight: 600;
}

.home-date {
    margin-top: 4px;

    color: #9eb2c8;

    font-size: 16px;
}


/* ============================================================
   HOME HERO
   ============================================================ */

.home-hero {
    position: relative;

    margin-top: 32px;
}

.home-hero-halo {
    position: absolute;

    z-index: -1;

    width: 500px;
    height: 300px;

    left: -130px;
    top: -140px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(94, 167, 255, 0.12) 0%,
            rgba(94, 167, 255, 0) 72%
        );
}

.home-title {
    margin: 0;

    color: #ffffff;

    font-size: 45px;
    line-height: 1.1;

    font-weight: 700;
}

.home-subtitle {
    margin:
        9px
        0
        0;

    color: #a0b1c8;

    font-size: 22px;
}


/* ============================================================
   HOME EXPLORE
   ============================================================ */

.home-explore {
    margin-top: 40px;
}

.home-section-label {
    margin-bottom: 14px;

    color: #7f94ad;

    font-size: 14px;
    font-weight: 700;

    letter-spacing: 2.5px;
}


/* ============================================================
   HOME GRID
   ============================================================ */

.home-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    grid-template-rows:
        repeat(2, 190px);

    gap: 18px;
}


/* ============================================================
   HOME TILE
   ============================================================ */

.home-tile {
    position: relative;

    height: 190px;

    padding:
        18px
        24px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background:
        linear-gradient(
            145deg,
            rgba(16, 35, 57, 0.96),
            rgba(8, 23, 40, 0.96)
        );

    border: 2px solid #1b324f;
    border-radius: 20px;

    transform: scale(1);

    transition:
        transform 120ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease,
        background 120ms ease;
}

.home-tile.focused {
    transform: scale(1.035);

    background:
        linear-gradient(
            145deg,
            rgba(22, 47, 75, 0.98),
            rgba(10, 27, 47, 0.98)
        );
}


/* ============================================================
   HOME TILE TOP
   ============================================================ */

.home-tile-top {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;
}

.home-tile-icon-box {
    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    /*
     * On évite color-mix() pour maximiser la compatibilité
     * avec les moteurs Web Samsung plus anciens.
     */
    background: rgba(255, 255, 255, 0.06);
}

.home-tile.focused .home-tile-icon-box {
    background: rgba(255, 255, 255, 0.10);
}

.home-tile-ok {
    opacity: 0;

    color: #ffffff;

    font-size: 15px;
    font-weight: 700;

    transition: opacity 100ms ease;
}

.home-tile.focused .home-tile-ok {
    opacity: 1;
}


/* ============================================================
   HOME TEMPORARY ICONS
   ============================================================ */

.home-icon-symbol {
    color: var(--tile-accent);

    font-size: 37px;
    font-weight: 700;

    line-height: 1;
}


/* TV */

.home-icon-tv {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-icon-tv-screen {
    width: 39px;
    height: 27px;

    border:
        3px solid
        var(--tile-accent);

    border-radius: 5px;
}

.home-icon-tv-foot {
    width: 20px;
    height: 3px;

    margin-top: 4px;

    border-radius: 2px;

    background:
        var(--tile-accent);
}


/* ============================================================
   HOME TILE TEXT
   ============================================================ */

.home-tile-title {
    color: #ffffff;

    font-size: 27px;
    font-weight: 600;
}

.home-tile-subtitle {
    margin-top: 5px;

    color: #8fa2ba;

    font-size: 17px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================================
   HOME FOOTER
   ============================================================ */

.home-footer {
    margin-top: auto;

    display: flex;
    align-items: center;

    gap: 9px;

    color: #64798f;

    font-size: 14px;
}

.home-footer-key {
    min-width: 27px;

    padding:
        4px
        7px;

    text-align: center;

    color: #a8bad0;

    border: 1px solid #31475f;
    border-radius: 6px;

    background: #0c1929;
}

.home-footer-separator {
    margin:
        0
        5px;

    color: #3c5067;
}


/* ============================================================
   TEMPORARY SCREEN
   Used for screens not yet ported to Tizen.
   ============================================================ */

.temporary-screen {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            180deg,
            #07162a 0%,
            #020812 100%
        );

    color: #ffffff;
}

.temporary-screen-content {
    text-align: center;
}

.temporary-screen-logo {
    display: block;

    width: 340px;
    height: auto;

    margin:
        0 auto 45px auto;
}

.temporary-screen-content h1 {
    margin: 0;

    color: #ffffff;

    font-size: 52px;
    font-weight: 700;
}

.temporary-screen-content p {
    margin-top: 18px;

    color: #91a3bd;

    font-size: 23px;
}

.temporary-screen-back {
    margin-top: 45px;

    color: #8bb5f4;

    font-size: 20px;
}

/* =========================================================
   ACTIVATION - REAL QR CODE
   ========================================================= */

   .activation-qr-real {
    width: 280px;
    height: 280px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #ffffff;
}

.activation-qr-real img,
.activation-qr-real canvas {
    display: block;

    width: 280px !important;
    height: 280px !important;

    margin: 0 !important;
    padding: 0 !important;
}

.activation-qr-unavailable {
    width: 280px;
    height: 280px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    color: #07162A;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
}

/* Android-inspired ULTIM TV home, Tizen safe fallback */
.home-screen { background: linear-gradient(145deg,#071326,#030812); }
.home-content { padding:24px 55px 24px; overflow-y:auto; box-sizing:border-box; }
.home-content::-webkit-scrollbar {display:none}
.home-header {margin-bottom:18px; flex-shrink:0}
.home-premium-grid { display:grid; grid-template-columns: 1.18fr 1fr; grid-template-rows: 320px 190px; gap:16px; flex-shrink:0; }
.home-tile { height:auto; min-height:0; overflow:hidden; padding:0; background:#091523; border-radius:19px; box-sizing:border-box; }
.home-tile.focused { transform:scale(1.012); background:#091523; z-index:3; }
.home-premium-art {position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#0b1727; }
.home-premium-shade {position:absolute;inset:0;z-index:2;background:linear-gradient(to bottom,rgba(3,9,17,.08),rgba(3,9,17,.12) 45%,rgba(3,9,17,.86));pointer-events:none}
.home-premium-text {position:absolute;bottom:13px;left:18px;right:16px;z-index:3}
.home-tile-title {font-size:22px;font-weight:700;color:white;text-shadow:0 2px 12px #000;margin:0}
.home-live-meta {font-size:21px;font-weight:700;color:white;max-width:95%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:7px;text-shadow:0 2px 12px #000}
.home-live-label {position:absolute;z-index:4;top:13px;left:17px;background:rgba(15,38,61,.88);color:#65f4b4;border:1px solid rgba(91,227,167,.5);padding:5px 10px;border-radius:6px;font-weight:700;font-size:11px;letter-spacing:1px}
.home-live-object,.home-live-placeholder {position:absolute;inset:0;width:100%;height:100%;border:0}
.home-live-placeholder {background:linear-gradient(135deg,#173656,#071423);display:flex;align-items:center;justify-content:center}
.home-live-tv-icon {font-size:65px;color:#315f8c}
.premium-live {grid-column:1;grid-row:1 / 3;aspect-ratio:auto}
.premium-live .home-tile-title {font-size:18px;color:#afd3f9}
.premium-movies {grid-column:2;grid-row:1; width:calc(50% - 8px)}
.premium-series {grid-column:2;grid-row:1; width:calc(50% - 8px);margin-left:calc(50% + 8px)}
.premium-playlists,.premium-search,.premium-settings {grid-row:2;width:calc(33.333% - 11px)}
.premium-playlists {grid-column:2}
.premium-search {grid-column:2;margin-left:calc(33.333% + 5px)}
.premium-settings {grid-column:2;margin-left:calc(66.666% + 11px)}
.premium-playlists .home-tile-title,.premium-search .home-tile-title,.premium-settings .home-tile-title {font-size:17px}
.home-continue {margin-top:22px}
.home-footer {margin-top:14px}
@media (max-width:1300px) { .home-content {padding:20px 38px} .home-premium-grid {grid-template-rows:250px 150px} .home-tile-title{font-size:19px} .home-live-meta{font-size:18px} }

.home-exit-overlay {position:absolute;inset:0;background:rgba(0,5,12,.83);z-index:20;display:flex;align-items:center;justify-content:center}
.home-exit-dialog {width:520px;box-sizing:border-box;padding:34px;text-align:center;background:#0c1c30;border:1px solid #34587e;border-radius:20px;box-shadow:0 18px 60px #0009}
.home-exit-title {font-size:27px;font-weight:700;color:#fff;margin-bottom:12px}
.home-exit-message {font-size:17px;color:#a8bbd2;margin-bottom:28px}
.home-exit-actions {display:flex;gap:16px;justify-content:center}
.home-exit-action {padding:14px 30px;border:2px solid #263f5f;border-radius:12px;font-size:18px;color:#b8cadd}
.home-exit-action.selected {border-color:#69aeff;background:#19426b;color:#fff}
