/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    cursor: none; /* Oculta cursor para TV */
}

/* Utilitários */
.hidden {
    display: none !important;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tela de Configuração */
#setup-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.setup-container {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 600px;
    width: 90%;
}

.setup-header {
    margin-bottom: 40px;
}

.tv-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.setup-header h1 {
    font-size: 48px;
    margin-bottom: 15px;
    color: #333;
}

.setup-header p {
    font-size: 24px;
    color: #666;
}

.setup-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 30px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: #333;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 24px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.setup-footer {
    font-size: 16px;
    color: #888;
}

/* Tela de Carregamento */
#loading-screen {
    background: #000;
}

.loading-container {
    text-align: center;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid #333;
    border-top: 8px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.loading-container p {
    font-size: 20px;
    color: #ccc;
}

/* Tela Principal */
#display-screen {
    background: #000;
    align-items: stretch;
    justify-content: stretch;
}

.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
    font-size: 18px;
}

.status-info {
    display: flex;
    gap: 30px;
}

.content-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-player {
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border: none;
}

#pdf-player {
    width: 100vw;
    height: 100vh;
}

#video-player {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}

/* Tela de Sem Conteúdo */
.no-content {
    text-align: center;
    padding: 60px;
}

.no-content-icon {
    font-size: 120px;
    margin-bottom: 30px;
    opacity: 0.5;
}

.no-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ccc;
}

.no-content p {
    font-size: 24px;
    color: #888;
    margin-bottom: 30px;
}

.tv-id-display {
    font-size: 20px;
    color: #666;
    font-family: monospace;
}

/* Barra de Progresso */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 100;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.1s linear;
/* Controles de debug */
.controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.control-btn {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Botão de Reconfiguração - Criado dinamicamente */
.reconfigure-section {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.reconfigure-section:hover {
    opacity: 1;
}

.reconfigure-btn {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 2px solid #333;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.reconfigure-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #666;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}   background: #1a1a1a;
}

.error-container {
    text-align: center;
    padding: 60px;
}

.error-icon {
    font-size: 120px;
    margin-bottom: 30px;
    color: #ff6b6b;
}

.error-container h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ff6b6b;
}

.error-container p {
    font-size: 24px;
    color: #ccc;
    margin-bottom: 40px;
}

.btn-secondary {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #ff5252;
}

/* Transições */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.fade-out {
    animation: fadeOut 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Responsividade para diferentes tamanhos de TV */
@media (max-width: 1920px) {
    .setup-container {
        padding: 40px;
        max-width: 500px;
    }
    
    .setup-header h1 {
        font-size: 36px;
    }
    
    .setup-header p {
        font-size: 18px;
    }
}

@media (max-width: 1366px) {
    .setup-container {
        padding: 30px;
        max-width: 400px;
    }
    
    .setup-header h1 {
        font-size: 28px;
    }
    
    .tv-icon {
        font-size: 60px;
    }
}

/* Modo Debug (ativado via JavaScript) */
body.debug-mode {
    cursor: default;
}

body.debug-mode .status-bar,
body.debug-mode .controls {
    display: flex !important;
}

/* Animações de transição entre conteúdos */
.content-transition {
    animation: contentTransition 0.8s ease-in-out;
}

@keyframes contentTransition {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

