        /* ==========================================================
           ESTILOS LEGADOS DO DASBOARDKSSINO.CSS (PRESERVADOS LINHA A LINHA)
           ========================================================== */
        * {
            margin: 0;
            padding: 0;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
        }

        html, body {
            width: 100%;
            height: 100%;
            overflow: hidden;
            background-color: #000;
            font-family: Arial, Helvetica, sans-serif;
            color: #ffffff;
        }

        #dashboard-root {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 99999;
            background-color: #000000;
        }

        /* --- CONTAINER DO VÍDEO COMPLETO E ELEMENTOS DE FUNDO --- */
        .video-wrapper {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            overflow: hidden;
        }

        .video-wrapper iframe {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 100vw;
            height: 100vh;
            transform: translate(-50%, -50%);
            -webkit-transform: translate(-50%, -50%);
            -ms-transform: translate(-50%, -50%);
            border: none;
            transition: transform 0.2s ease-out;
        }

        @media (min-aspect-ratio: 16/9) {
            .video-wrapper iframe { height: 56.25vw; }
        }
        @media (max-aspect-ratio: 16/9) {
            .video-wrapper iframe { width: 177.78vh; }
        }

        /* Estilização das Imagens Estáticas de Fundo (Compatível e responsiva com object-fit) */
        .bg-static-image {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            border: none;
        }

        .overlay-dim {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.25);
            z-index: 2;
        }

        /* --- ZONAS DE TOQUE LATERAIS (MODO RETRATO) --- */
        .touch-pan-zone {
            display: none;
            position: absolute;
            top: 25%;
            height: 50%;
            width: 15%;
            z-index: 9990;
            background: transparent;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            cursor: pointer;
            user-select: none;
            -webkit-user-select: none;
        }

        .touch-pan-left { left: 0; }
        .touch-pan-right { right: 0; }

        .touch-pan-zone i {
            font-size: 24px;
            color: #fff;
            opacity: 0;
            transition: opacity 0.15s ease-in-out;
            pointer-events: none;
        }

        .touch-pan-zone:active i {
            opacity: 0.5;
        }

        /* --- INTERFACE SUPERIOR --- */
        .dashboard-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 3;
            padding: 40px;
            background: transparent;
            background: -webkit-linear-gradient(top, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.4) 100%);
            background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.4) 100%);
        }

        .text-drop-shadow {
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), -1px -1px 4px rgba(0, 0, 0, 0.5);
        }

        .top-table {
            display: table;
            width: 100%;
        }

        .top-cell-left {
            display: table-cell;
            text-align: left;
            vertical-align: top;
        }

        .top-cell-right {
            display: table-cell;
            text-align: right;
            vertical-align: top;
        }

        .clock-main {
            font-size: 75px;
            font-weight: bold;
            display: inline-block;
            line-height: 0.9;
        }

        .clock-seconds {
            font-size: 28px;
            display: inline-block;
            vertical-align: top;
            margin-top: 5px;
            margin-left: 4px;
            opacity: 0.9;
        }

        .date-day {
            font-size: 34px;
            font-weight: bold;
            line-height: 1.2;
        }

        .date-month {
            font-size: 26px;
            opacity: 0.85;
            text-transform: lowercase;
        }

        .location-title {
            position: absolute;
            top: 105px; 
            left: 25px; 
            font-size: 14px; 
            font-weight: bold;
            letter-spacing: 1px;
            opacity: 0.85;
            text-align: left;
        }

        .camera-author {
            display: block;
            font-size: 10px;
            font-weight: normal;
            margin-top: 4px;
        }

        /* --- INTERFACE INFERIOR DIREITA (CONTROLES E CRIPTO) --- */
        .right-controls-container {
            position: absolute;
            bottom: 20px;
            right: 20px;
            z-index: 9999;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            -webkit-box-align: end;
            -webkit-align-items: flex-end;
            -ms-flex-align: end;
            align-items: flex-end;
            gap: 15px;
        }

        /* Bloco Dinâmico da Cotação */
        .crypto-display-block {
            display: none;
            text-align: right;
            user-select: none;
            margin-bottom: 5px;
        }

        .crypto-asset-name {
            font-size: 16px;
            font-weight: bold;
            letter-spacing: 0.5px;
            line-height: 1.1;
            text-transform: uppercase;
        }

        .crypto-asset-price {
            font-size: 14px;
            font-weight: bold;
            line-height: 1.4;
            opacity: 0.85;
        }

        .controls-row {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            gap: 10px;
        }

        .btn-control-trigger {
            background: rgba(30, 30, 30, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: #fff;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 16px;
            cursor: pointer;
            padding: 0 !important;
            margin: 0 !important;
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            transition: background 0.2s, border-color 0.2s;
        }

        .btn-control-trigger:active, 
        .btn-control-trigger:hover {
            background: rgba(30, 30, 30, 0.8);
            border-color: rgba(255, 255, 255, 0.6);
        }

        /* --- PAINEL FLUTUANTE DE CONFIGURAÇÕES --- */
        .settings-panel {
            display: none; 
            position: absolute;
            bottom: 70px;
            right: 0;
            background: rgba(20, 20, 20, 0.92);
            border: 1px solid rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border-radius: 8px;
            padding: 15px;
            width: 210px;
            z-index: 100005;
            box-shadow: 0 4px 15px rgba(0,0,0,0.5);
            text-align: left;
        }

        .settings-panel h4 {
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding-bottom: 5px;
            color: rgba(255, 255, 255, 0.7);
        }

        .settings-option {
            display: -webkit-box;
            display: -webkit-flex;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-pack: justify;
            -webkit-justify-content: space-between;
            -ms-flex-pack: justify;
            justify-content: space-between;
            -webkit-box-align: center;
            -webkit-align-items: center;
            -ms-flex-align: center;
            align-items: center;
            margin-bottom: 10px;
            font-size: 13px;
            cursor: pointer;
            user-select: none;
        }

        .settings-option input[type="checkbox"],
        .settings-option input[type="radio"] {
            cursor: pointer;
            width: 15px;
            height: 15px;
            accent-color: #ff0000;
        }

        /* Sub-painel Cripto em Linhas Expandidas */
        .crypto-sub-inputs {
            display: none;
            margin-top: 5px;
            padding-top: 8px;
            border-top: 1px dashed rgba(255,255,255,0.1);
        }

        .crypto-input-group {
            margin-bottom: 8px;
        }

        .crypto-input-group label {
            display: block;
            font-size: 11px;
            color: rgba(255,255,255,0.6);
            margin-bottom: 3px;
        }

        .crypto-sub-inputs input[type="text"],
        .crypto-sub-inputs input[type="number"] {
            width: 100%;
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 4px;
            color: #fff;
            padding: 5px 8px;
            font-size: 12px;
            outline: none;
        }

        .crypto-sub-inputs input:focus {
            border-color: rgba(255, 0, 0, 0.5);
        }

        /* Sub-painel de Alternância de Fundo Dinâmico */
        .bg-sub-panel {
            margin-top: 5px;
            padding-top: 8px;
            border-top: 1px dashed rgba(255,255,255,0.1);
        }
        
        .bg-choice-group {
            display: none;
            padding-left: 12px;
            margin-top: 6px;
            border-left: 1px dashed rgba(255,255,255,0.2);
        }

        /* --- INTERFACE INFERIOR (CLIMA) --- */
        .bottom-weather {
            position: absolute;
            bottom: 40px;
            left: 40px;
            right: 40px;
            text-align: left;
        }

        .main-temp-num {
            font-size: 85px;
            font-weight: bold;
            line-height: 1;
        }

        .current-weather-icon {
            font-size: 42px;
            margin: 10px 0 5px 0;
        }

        .weather-sub-info {
            font-size: 18px;
            font-weight: bold;
            line-height: 1.4;
        }

        .weather-sub-info span {
            display: block;
        }

        .brand-footer {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            background: rgba(0, 0, 0, 0.6); 
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            padding: 2px 0; 
            text-align: center;
            font-size: 11px;
            letter-spacing: 0.5px;
            color: rgba(255, 255, 255, 0.5);
            z-index: 9998;
            font-weight: normal;
            margin: 0 !important;
        }

        .brand-footer a {
            color: #ff0000;
            text-decoration: none;
            font-weight: bold;
            margin-left: 3px;
        }

        .brand-footer a:hover {
            text-decoration: underline;
        }

        /* ==========================================================
           RESPONSIVO: MODO RETRATO (CELULAR EM PÉ)
           ========================================================== */
        @media (max-width: 768px) and (orientation: portrait) {
            .touch-pan-zone {
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
            }

            .dashboard-container { padding: 25px; }
            .clock-main { font-size: 55px; }
            .clock-seconds { font-size: 20px; }
            .date-day { font-size: 24px; }
            .date-month { font-size: 18px; }
            .main-temp-num { font-size: 60px; }
            .bottom-weather { bottom: 25px; left: 25px; }
            
            .location-title {
                top: 90px;
                left: 25px;
                font-size: 13px;
            }

            .settings-panel {
                 right: 25px;
            }

            .brand-footer {
                font-size: 10px;
                padding: 2px 0;
            }
        }

        /* ==========================================================
           RESPONSIVO: MODO PAISAGEM (SMART TV OU MONITORES - ESPAÇAMENTO COMPATÍVEL)
           ========================================================== */
        @media (orientation: landscape) {
            .location-title {
                position: absolute;
                top: 15px;
                left: 0;
                right: 0;
                width: 100%;
                text-align: center;
                font-size: 18px; 
                letter-spacing: 2px;
                opacity: 1;
            }

            .right-controls-container {
                bottom: 25px;
                display: block;
                text-align: right;
            }

            /* Compatibilidade máxima com Smart TVs antigas: evita-se o uso de gap em fluxos de bloco */
            .controls-row {
                display: block;
                text-align: right;
            }

            .crypto-display-block {
                display: block;
                margin-bottom: 30px;
            }

            .crypto-asset-name {
                font-size: 16px;
                font-weight: bold;
                line-height: 1.1;
            }

            .crypto-asset-price {
                font-size: 30px;
                font-weight: bold;
                line-height: 1.2;
                opacity: 1;
                margin-top: 2px;
            }

            .btn-control-trigger {
                display: inline-block;
                vertical-align: middle;
                width: 40px;
                height: 40px;
                line-height: 38px;
                font-size: 14px;
                margin-left: 14px;
            }

            .btn-control-trigger:first-child {
                margin-left: 0;
            }

            .brand-footer {
                left: auto;
                right: 0;
                width: auto;
                padding: 2px 25px 2px 50px;
                text-align: right;
                font-size: 12px;
                background: rgba(0, 0, 0, 0.75);
                clip-path: polygon(25px 0%, 100% 0%, 100% 100%, 0% 100%);
                -webkit-clip-path: polygon(25px 0%, 100% 0%, 100% 100%, 0% 100%);
                border-top: none;
            }
        }

          /* ==========================================================
           RESPONSIVO: MODO PAISAGEM COM POUCA ALTURA (CELULAR DEITADO)
           ========================================================== */
        @media (orientation: landscape) and (max-height: 600px) {
            .dashboard-container { padding: 12px; }
            
            .clock-main { font-size: 42px; }
            .clock-seconds { font-size: 16px; }
            .date-day { font-size: 18px; }
            .date-month { font-size: 14px; }

            /* CORREÇÃO DO PAINEL: Ajustado o bottom para desgrudar do botão e adicionado scroll caso falte espaço */
            .settings-panel {
                bottom: 50px;         
                right: 0;             
                width: auto;          
                min-width: 210px;
                max-height: calc(100vh - 70px); /* Garante que o painel nunca passe da altura da tela */
                padding: 12px;
                overflow-y: auto; /* Se a tela for muito baixa, cria scroll interno em vez de vazar */
                z-index: 100005; 
            }

            .settings-wrapper {
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;        
                gap: 15px;            
            }

            .settings-col-main {
                width: 170px;         
                -webkit-flex-shrink: 0;
                -ms-flex-negative: 0;
                flex-shrink: 0;
            }

            .settings-panel label.settings-option {
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
                width: 100%;          
                margin-bottom: 6px;
                font-size: 12px;
            }

            /* Sub-painel Cripto vira a Coluna Direita */
            .crypto-sub-inputs {
                width: 170px;         
                margin-top: 0;
                padding-top: 0;
                border-top: none;
                border-left: 1px dashed rgba(255,255,255,0.15); 
                padding-left: 15px;
                -webkit-flex-shrink: 0;
                -ms-flex-negative: 0;
                flex-shrink: 0;
            }

            .crypto-sub-inputs h4 {
                font-size: 12px;
                text-transform: uppercase;
                letter-spacing: 1px;
                margin-bottom: 10px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                padding-bottom: 5px;
                color: rgba(255, 255, 255, 0.7);
            }

            .crypto-input-group {
                margin-bottom: 6px;
            }

            .crypto-input-group label {
                font-size: 10px;
            }

            .crypto-sub-inputs input[type="text"],
            .crypto-sub-inputs input[type="number"] {
                padding: 4px 6px;
                font-size: 11px;
            }

            .location-title {
                position: absolute;
                top: 12px;
                left: 0;
                right: 0;
                width: 100%;
                text-align: center;
                font-size: 16px; 
                letter-spacing: 2px;
                opacity: 1;
            }

            /* CORREÇÃO DO CLIMA E ÁREA DE TOQUE DA ENGRENAGEM */
            .bottom-weather {
                bottom: 12px;
                left: 12px;
                right: auto;
                width: auto;
                max-width: calc(100% - 130px); /* Abre espaço físico obrigatório na direita para os botões */
                display: table;
            }

            .main-temp-num {
                display: table-cell;
                font-size: 30px;
                vertical-align: middle;
                width: 65px;
            }

            .current-weather-icon {
                display: table-cell;
                font-size: 22px;
                vertical-align: middle;
                width: 40px;
                margin: 0;
            }

            .weather-sub-info {
                display: table-cell;
                font-size: 12px;
                vertical-align: middle;
                line-height: 1.2;
                white-space: nowrap;
            }

            .weather-sub-info span {
                display: inline-block;
                margin-right: 12px;
            }

            /* Organiza a seção do Fundo de Tela para não estourar para baixo */
            .bg-sub-panel {
                margin-top: 6px;
                padding-top: 6px;
            }

            .bg-sub-panel h4 {
                margin-bottom: 6px;
            }

            /* Alinha os botões "Ao Vivo" e "Imagem" lado a lado para economizar altura */
            .bg-sub-panel .settings-option {
                display: inline-flex !important;
                width: auto !important;
                margin-right: 10px;
                margin-bottom: 0 !important;
            }

            .brand-footer {
                left: auto;
                right: 0;
                width: auto;
                padding: 2px 15px 2px 35px;
                text-align: right;
                font-size: 9px;
                background: rgba(0, 0, 0, 0.8);
                clip-path: polygon(15px 0%, 100% 0%, 100% 100%, 0% 100%);
                -webkit-clip-path: polygon(15px 0%, 100% 0%, 100% 100%, 0% 100%);
                border-top: none;
            }
        }