   * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: Arial, Helvetica, sans-serif;
        }
        
        html {
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box; /* 🔥 APLICAR EM TODOS OS ELEMENTOS */
        }
        
        body {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: #000;
            display: flex;
            justify-content: center;
            align-items: center;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
        }
        
        /* Modal de Conexão */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vh;
            height: 100vw;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            transform: rotate(90deg) translateY(-100%);
            transform-origin: top left;
            overflow: hidden;
        }
        
        .modal-content {
            background: white;
            padding: 40px;
            border-radius: 15px;
            text-align: center;
            max-width: 400px;
            width: 90%;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        }
        
        .modal-content h2 {
            margin-top: 0;
            color: #333;
            font-size: 24px;
        }
        
        .modal-content input {
            width: 100%;
            padding: 15px;
            font-size: 18px;
            border: 2px solid #ddd;
            border-radius: 8px;
            margin: 20px 0;
            box-sizing: border-box;
            text-align: center;
        }
        
        .modal-content button {
            width: 100%;
            padding: 15px;
            font-size: 18px;
            background: black;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
        }
        
        .modal-content button:hover {
            background: #2277dd;
        }
        
        .modal-content .error {
            color: #ff0000;
            margin-top: 10px;
            font-size: 14px;
        }
        
        .hidden {
            display: none;
        }
        
        .container {
            /* TV DEITADA (landscape), APP RODANDO EM PÉ (portrait) - ROTACIONA 90° */
            width: 100vh;
            height: 100vw;
            min-width: 100vh;
            min-height: 100vw;
            max-width: 100vh;
            max-height: 100vw;
            display: flex;
            flex-direction: column;
            background: white;
            position: fixed;
            top: 0;
            left: 0;
            transform: rotate(90deg) translateY(-100%);
            transform-origin: top left;
            overflow: hidden;
            margin: 0; /* 🔥 REMOVER MARGEM */
            padding: 0; /* 🔥 REMOVER PADDING */
            gap: 0; /* 🔥 REMOVER GAP */
        }
        
        /* Template 2 - Tela cheia sem notícias */
        .container.template-2 .barcode {
            height: 4vw !important; /* 4% - Otimizado para mídias 720x1224 */
        }

        .container.template-2 .anuncio {
            height: 96vw !important; /* 96% - Encaixe perfeito para proporção 1.7:1 */
        }

        .container.template-2 .noticia {
            display: none !important;
        }
        
        .barcode {
            width: 100%;
            max-width: 100%;
            height: 5vw; /* 5% da LARGURA (porque tá rotacionado 90°) */
            padding: 0 8px 0 22px; /* GAMBIARRA: mais padding à esquerda para evitar data/hora escapar */
            background: #ffffff;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', sans-serif;
            color: #1a1a1a;
            margin: 0;
            box-sizing: border-box;
            border-bottom: 2px solid #e0e0e0;
            flex-wrap: nowrap;
            overflow: hidden;
            position: relative;
        }

        .barcode-left {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            gap: 0px;
            flex-shrink: 0;
            flex-basis: auto;
            max-width: 20%;
            overflow: hidden;
        }

        .barcode-center {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 6px;
            flex: 1 1 auto;
            padding: 0 4px;
            min-width: 0;
            overflow: hidden;
        }

        .barcode-right {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 6px;
            justify-content: flex-end;
            flex-shrink: 0;
            flex-basis: auto;
        }
        
        .anuncio {
            height: 75vw; /* 75% da LARGURA (porque tá rotacionado 90°) */
            background: black;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            font-weight: bold;
            color: white;
            position: relative;
            overflow: hidden;
            margin: 0; /* 🔥 SEM MARGEM */
            padding: 0; /* 🔥 SEM PADDING */
            box-sizing: border-box; /* 🔥 GARANTIR BOX-SIZING */
        }
        
        .anuncio > div {
            position: absolute;
            width: 100%;
            height: 100%;
            margin: 0; /* 🔥 SEM MARGEM */
            padding: 0; /* 🔥 SEM PADDING */
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
        }
        
        .anuncio video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            margin: 0; /* 🔥 SEM MARGEM */
            padding: 0; /* 🔥 SEM PADDING */
            display: block; /* 🔥 REMOVER ESPAÇO EMBAIXO (inline default) */
        }
        
        .anuncio img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            margin: 0; /* 🔥 SEM MARGEM */
            padding: 0; /* 🔥 SEM PADDING */
            display: block; /* 🔥 REMOVER ESPAÇO EMBAIXO (inline default) */
        }
        
        .noticia {
            height: 20vw; /* 20% da LARGURA (porque tá rotacionado 90°) */
            background: #000000; /* fundo preto */
            display: flex;
            align-items: center;
            position: relative;
            overflow: hidden;
            margin: 0;
        }

        .noticia-content {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            padding: 16px 24px;
            box-sizing: border-box;
            background: #000000; /* fundo preto garantido */
            color: #FFFFFF; /* texto branco */
            gap: 20px;
        }
        /* Estilos do cabeçalho - COMPACTO E SEM OVERFLOW */
        .hour {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            gap: 0px;
            height: 100%;
        }

        .hour h1 {
            margin: 0 !important;
            padding: 0 !important;
            font-size: 26px !important;
            font-weight: 700 !important;
            line-height: 1 !important;
            color: #000000;
            letter-spacing: 0.5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        #currentDate {
            font-size: 11px !important;
            font-weight: 700 !important;
            color: #444444;
            text-transform: lowercase;
            margin: 0 !important;
            padding: 0 !important;
            line-height: 1 !important;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        .infos {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            white-space: nowrap;
            height: 100%;
        }

        .infos.temp-info {
            margin-right: 6px;
        }

        .infos > div,
        .infos > span {
            font-size: 16px !important;
            font-weight: 600 !important;
            color: #222222;
        }

        .currency-label {
            font-size: 12px !important;
            font-weight: 500 !important;
            color: #666666 !important;
        }

        .fi.fis {
            border-radius: 50% !important;
            width: 18px !important;
            height: 18px !important;
            object-fit: cover;
            flex-shrink: 0;
        }

        /* Logo e redes sociais */
        .barcode-right img {
            width: 36px !important;
            height: 36px !important;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid #ddd;
            flex-shrink: 0;
        }

        .barcode-right > div {
            display: flex;
            flex-direction: column;
            gap: 0px;
            justify-content: center;
            height: 100%;
        }

        .barcode-right > div > div {
            font-size: 10px !important;
            font-weight: 600 !important;
            color: #333333;
            display: flex;
            align-items: center;
            gap: 3px;
            white-space: nowrap;
            line-height: 1.2 !important;
        }

        .barcode-right .fab {
            font-size: 12px !important;
            flex-shrink: 0;
        }
        .imagensNoticias {
            flex: 0 0 18%; /* ~imagem ocupa cerca de 1/5 da largura da barra */
            max-height: 100%;
            display: flex;
            align-items: center;
        }

        .imagensNoticias img {
            width: 100%;
            height: 100%;
            max-height: 100%;
            border-radius: 12px;
            object-fit: cover;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
        }

        .textos {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            color: #FFFFFF;
        }

        .titleNoticia {
            display: flex;
            align-items: center;
            color: #FFFFFF;
            font-weight: 800;
            font-size: 18px; /* Reduzido de 24px para 18px no Template 1 */
            line-height: 1.3;
            margin-bottom: 8px;
            gap: 8px;
        }
        
        /* Template 2: título maior */
        .container.template-2 .titleNoticia {
            font-size: 24px;
        }

        .badge-noticia {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 1px;
            padding: 4px 8px;
            border-radius: 999px;
            background: #FF4444;
            color: #FFFFFF;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
        }
        
        /* Animações de transição - Slide */
        /* Animações suaves de fade (sem tela escura) */
        @keyframes fadeOut {
            from {
                opacity: 1;
            }
            to {
                opacity: 0;
            }
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }
        
        .fade-out {
            animation: fadeOut 0.3s ease-out forwards;
        }
        
        .fade-in {
            animation: fadeIn 0.3s ease-in forwards;
        }
        
        /* Estilo para mensagens de avisos */
        .aviso-elegante {
            background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
            border-left: 5px solid #ffffff;
            border-right: 5px solid #ffffff;
            position: relative;
            overflow: hidden;
        }
        
        .aviso-elegante::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, transparent, #ffffff, transparent);
        }
        
        .aviso-elegante::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, transparent, #ffffff, transparent);
        }
        
        .aviso-titulo {
            font-size: 48px;
            font-weight: bold;
            color: #ffffff;
            text-transform: uppercase;
            letter-spacing: 3px;
            margin-bottom: 30px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            border-bottom: 2px solid rgba(255, 255, 255, 0.3);
            padding-bottom: 20px;
        }
        
        .aviso-mensagem {
            font-size: 28px;
            line-height: 1.6;
            color: #f0f0f0;
            text-align: justify;
            padding: 0 60px;
            font-weight: 300;
        }
        
        .aviso-detalhe {
            position: absolute;
            width: 100px;
            height: 100px;
            border: 2px solid rgba(255, 255, 255, 0.2);
        }
        
        .aviso-detalhe.top-left {
            top: 20px;
            left: 20px;
            border-right: none;
            border-bottom: none;
        }
        
        .aviso-detalhe.top-right {
            top: 20px;
            right: 20px;
            border-left: none;
            border-bottom: none;
        }
        
        .aviso-detalhe.bottom-left {
            bottom: 20px;
            left: 20px;
            border-right: none;
            border-top: none;
        }
        
        .aviso-detalhe.bottom-right {
            bottom: 20px;
            right: 20px;
            border-left: none;
            border-top: none;
        }
        
        /* 🚀 Splash Screen de Carregamento */
        #loadingSplash {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            transition: opacity 0.5s ease-out;
        }
        
        #loadingSplash.hidden {
            opacity: 0;
            pointer-events: none;
        }
        
        .loading-logo {
            font-size: 48px;
            font-weight: 900;
            color: white;
            margin-bottom: 20px;
            text-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }
        
        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .loading-text {
            color: white;
            font-size: 16px;
            margin-top: 20px;
            font-weight: 300;
        }