/* Estilos para a Tela de Exibição (index.php) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: #000000;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

.display-container.hidden {
    display: none;
    opacity: 0;
    visibility: hidden;
}

#mics-iframe {
    width: 100%;
    height: 100vh;
    border: none;
    display: none;
}

.display-container {
    width: 100%;
    height: 100vh;
    background-color: #000000;
    color: #ffffff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

/* Relógio - Canto Superior Esquerdo */
#clock-wrapper {
    position: absolute;
    top: 3vh;
    left: 3vw;
    text-align: left;
    transition: all 0.5s ease;
}
#clock-label {
    font-size: 3.5vw; 
    color: #cccccc;
    font-weight: 900;
    margin-bottom: 0.5vh;
}
#clock {
    font-size: 8vw;
    color: #ffffff;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    transition: all 0.5s ease;
    line-height: 0.9;
    white-space: nowrap;
}

/* Elementos novos (Ocultos por padrão) */
#standby-header, #standby-logo {
    display: none;
}

/* Tempo de Culto - Canto Superior Direito */
#service-time-wrapper {
    position: absolute;
    top: 3vh;
    right: 3vw;
    text-align: right;
}
#service-time-label {
    font-size: 3.5vw;
    color: #cccccc;
    font-weight: 900;
    margin-bottom: 0.5vh;
}
#service-time {
    font-size: 8vw;
    color: #0099ff;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    transition: color 0.3s ease;
    line-height: 0.9;
    white-space: nowrap;
}

/* Wrapper da Contagem Regressiva */
#main-countdown-wrapper {
    text-align: center;
    transition: transform 0.5s ease-in-out;
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}
#main-countdown-wrapper.aviso-ativo {
    transform: translate(-50%, 120%) scale(0.6);
}
#countdown-label {
    font-size: 4vw;
    color: #ffffff;
    margin-bottom: 1vh;
    font-weight: 900;
}
#countdown-timer {
    font-size: 25vw;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    transition: color 0.3s ease;
    line-height: 0.8;
    letter-spacing: -0.05em;
}
#countdown-timer.expired {
    color: #ff0000;
    animation: flash 0.5s infinite;
}

@keyframes flash {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.3; }
}

/* Overlay de Avisos */
#announcement-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s ease-in;
}
#announcement-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#announcement-content {
    width: 95vw;
    font-size: 10vw;
    color: #ffff00;
    text-align: center;
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(255, 255, 0, 0.6);
    animation: flash 1s infinite;
    word-wrap: break-word;
    overflow-wrap: break-word; 
}

/* Tamanhos Dinâmicos dos Avisos */
.text-huge { font-size: 20vw; line-height: 1; }
.text-big { font-size: 12vw; line-height: 1.1; }
.text-medium { font-size: 7vw; line-height: 1.2; }
.text-small { font-size: 4.5vw; line-height: 1.3; text-align: left; }

/* Botões de Controle */
#fullscreen-btn, #admin-btn {
    position: absolute; bottom: 2vh; width: 6vh; height: 6vh; font-size: 3vh;
    background-color: rgba(255, 255, 255, 0.2); color: #ffffff;
    border: 2px solid #ffffff; border-radius: 0.5vh; cursor: pointer;
    transition: all 0.3s ease; z-index: 50; opacity: 0.3;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
}
#fullscreen-btn { right: 2vw; }
#admin-btn { left: 2vw; }
#fullscreen-btn:hover, #admin-btn:hover { opacity: 1; background-color: rgba(255, 255, 255, 0.4); }

/* --- REGRAS DO MODO STANDBY --- */
body.standby-mode #service-time-wrapper,
body.standby-mode #main-countdown-wrapper,
body.standby-mode #announcement-overlay,
body.standby-mode #fullscreen-btn,
body.standby-mode #admin-btn,
body.standby-mode #clock-label {
    display: none !important;
}

body.standby-mode #clock-wrapper {
    /* Centraliza e empilha verticalmente */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Exibe os elementos novos no standby */
body.standby-mode #standby-header {
    display: block;
    font-size: 5vw;
    font-weight: 900;
    color: #0099ff; /* Azul para destaque, pode mudar para #ffffff se preferir */
    letter-spacing: 0.2em;
    margin-bottom: 2vh;
}

body.standby-mode #clock {
    /* Reduzido um pouco para dar espaço ao header e logo */
    font-size: 20vw; 
    line-height: 1;
    margin-bottom: 4vh;
}

body.standby-mode #standby-logo {
    display: block;
    width: 30vw; /* Ajuste este valor se a logo ficar muito grande ou pequena */
    max-width: 400px;
    height: auto;
}

/* Responsividade */
@media (max-width: 768px) {
    #clock-label { font-size: 4vw; }
    #clock { font-size: 12vw; }
    #service-time-label { font-size: 4vw; }
    #service-time { font-size: 12vw; }
    #countdown-label { font-size: 6vw; }
    #countdown-timer { font-size: 30vw; }
    
    /* Ajustes do standby para celular */
    body.standby-mode #standby-header { font-size: 8vw; }
    body.standby-mode #clock { font-size: 25vw; }
    body.standby-mode #standby-logo { width: 50vw; }
}