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

:root {
    --cor-primaria: #34495e;
    --cor-secundaria: #5d6d7e;
    --cor-texto: #2c3e50;
    --cor-texto-claro: #ffffff;
    --cor-destaque: #7f8c8d;
    --cor-guiche: #52616b;
    --cor-fundo-card: #f8f9fa;
    --cor-borda: #dee2e6;
    --cor-laranja: #ff8c00;
    --cor-laranja-escuro: #ff6b00;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #e8eaf6 0%, #d6d9e0 100%);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/default-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    opacity: 0.1;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    z-index: -1;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
    z-index: 1;
    max-width: 100%;
}

/* 1. HEADER - LOGO */
.header-logo {
    background: linear-gradient(135deg, #ffffff 0%, #f5f6fa 100%);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.8s ease;
    border-bottom: 1px solid var(--cor-borda);
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--cor-primaria);
    text-shadow: none;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
}

/* 2. ÁREA DE PUBLICIDADE/IMAGEM */
/* Proporção 1600x760 = ~2.1:1 */
.publicidade {
    width: 100%;
    height: 0;
    padding-bottom: 47.5%; /* 760/1600 = 0.475 = 47.5% */
    overflow: hidden;
    position: relative;
    animation: fadeIn 1s ease 0.3s both;
}

.publicidade img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 3. SENHA ATUAL - DESTAQUE PRINCIPAL */
.senha-atual {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    animation: fadeIn 1s ease 0.6s both;
    border-top: 3px solid var(--cor-primaria);
    border-bottom: 3px solid var(--cor-primaria);
}

.senha-label {
    font-size: 1.6rem;
    color: var(--cor-destaque);
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 8px;
    text-transform: uppercase;
}

.senha-numero {
    font-size: 12rem;
    font-weight: 900;
    color: var(--cor-laranja);
    margin: 1.5rem 0;
    text-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
    font-family: 'Bebas Neue', 'Impact', sans-serif;
    animation: pulse 2s ease-in-out infinite;
    letter-spacing: 15px;
    line-height: 1;
}

.mensagem-balcao {
    font-size: 2rem;
    color: var(--cor-laranja-escuro);
    margin-top: 2rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* 4. ÚLTIMAS 5 SENHAS */
.ultimas-senhas {
    flex: 1;
    background: #fafbfc;
    padding: 0;
    animation: fadeIn 1s ease 0.9s both;
}

.ultimas-header {
    background: linear-gradient(135deg, #f5f6fa 0%, #e8eaf0 100%);
    padding: 1.2rem 2rem;
    text-align: center;
    border-bottom: 2px solid var(--cor-borda);
}

.ultimas-titulo {
    font-size: 1.8rem;
    color: var(--cor-primaria);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.senhas-list {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.8rem;
}

.senha-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 1.5rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-left: 4px solid var(--cor-primaria);
    border: 1px solid var(--cor-borda);
    border-left: 4px solid var(--cor-primaria);
}

.senha-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.senha-item-label {
    font-size: 1.2rem;
    color: var(--cor-destaque);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.senha-item-numero {
    font-size: 3rem;
    font-weight: 700;
    color: var(--cor-primaria);
    font-family: 'Playfair Display', serif;
    letter-spacing: 3px;
}

.senha-item-status {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--cor-guiche);
    background: var(--cor-fundo-card);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    border: 1px solid var(--cor-borda);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mensagem quando não há senhas */
.sem-senhas {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--cor-destaque);
    font-size: 1.6rem;
    font-weight: 400;
}

/* 5. RODAPÉ COM RELÓGIO */
.footer-relogio {
    background: linear-gradient(135deg, #ffffff 0%, #f5f6fa 100%);
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    border-top: 1px solid var(--cor-borda);
    animation: fadeIn 1s ease 1.2s both;
}

.clock {
    font-size: 2.5rem;
    color: var(--cor-primaria);
    font-weight: 600;
    text-shadow: none;
    background: var(--cor-fundo-card);
    padding: 0.8rem 2rem;
    border-radius: 10px;
    border: 2px solid var(--cor-borda);
    letter-spacing: 3px;
    font-family: 'Poppins', sans-serif;
}

/* Animações */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes chamarSenha {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    }
    25% {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(255, 140, 0, 0.3);
        border-top-color: var(--cor-laranja);
        border-bottom-color: var(--cor-laranja);
    }
    50% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    }
    75% {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(255, 140, 0, 0.3);
        border-top-color: var(--cor-laranja);
        border-bottom-color: var(--cor-laranja);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    }
}

.senha-atual.chamando {
    animation: chamarSenha 2s ease 2;
}

/* Responsividade para diferentes resoluções verticais */

/* TV Full HD Vertical (1080x1920) */
@media (min-width: 1080px) and (orientation: portrait) {
    .publicidade {
        padding-bottom: 47.5%;
    }
    
    .senha-numero {
        font-size: 14rem;
    }
    
    .mensagem-balcao {
        font-size: 2.2rem;
    }
}

/* TV HD Vertical (720x1280) */
@media (max-width: 900px) and (orientation: portrait) {
    .logo h1 {
        font-size: 2rem;
    }
    
    .clock {
        font-size: 2rem;
        padding: 0.6rem 1.5rem;
    }
    
    .publicidade {
        padding-bottom: 47.5%;
    }
    
    .senha-numero {
        font-size: 10rem;
    }
    
    .guiche-numero {
        font-size: 5rem;
    }
    
    .senha-item-numero {
        font-size: 2.5rem;
    }
    
    .senha-item-status {
        font-size: 1.5rem;
    }
}

/* Tablets e telas menores */
@media (max-width: 600px) {
    .header-logo {
        padding: 1rem 1.5rem;
    }
    
    .logo h1 {
        font-size: 1.6rem;
    }
    
    .footer-relogio {
        padding: 1rem 1.5rem;
    }
    
    .clock {
        font-size: 1.8rem;
        padding: 0.6rem 1.3rem;
    }
    
    .publicidade {
        padding-bottom: 47.5%;
    }
    
    .senha-atual {
        padding: 1.5rem;
    }
    
    .senha-label {
        font-size: 1.6rem;
    }
    
    .senha-numero {
        font-size: 8rem;
        margin: 1rem 0;
    }
    
    .mensagem-balcao {
        font-size: 1.6rem;
    }
    
    .ultimas-titulo {
        font-size: 1.6rem;
    }
    
    .senha-item {
        padding: 1.2rem 1.5rem;
    }
    
    .senha-item-numero {
        font-size: 2rem;
    }
    
    .senha-item-status {
        font-size: 1.2rem;
        padding: 0.4rem 1rem;
    }
}

/* Modo Landscape (caso rotacionem a TV) */
@media (orientation: landscape) {
    .container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .header-logo {
        width: 100%;
    }
    
    .publicidade {
        width: 40%;
        padding-bottom: 40%;
        height: 0;
    }
    
    .senha-atual {
        width: 60%;
    }
    
    .ultimas-senhas {
        width: 100%;
    }
    
    .footer-relogio {
        width: 100%;
    }
}

/* Ajustes para impressão/PDF */
@media print {
    .background-overlay,
    body::before {
        display: none;
    }
}
