/* style.css */

/* Paleta de Cores Andes de Inverno Vibrante */
:root {
    --branco-nevado: #E0F2F7; /* Mais luminoso, com toque azulado */
    --cinza-rochoso-escuro: #2B3A42; /* Mais profundo e com tom azulado */
    --azul-ceu-profundo: #007BFF; /* Azul médio vibrante */
    --azul-esverdeado-glacial: #00BCD4; /* Azul-ciano brilhante */
    --cinza-claro-nebuloso: #CFD8DC; /* Cinza claro e neutro */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--branco-nevado); /* Fundo principal */
    color: var(--cinza-rochoso-escuro); /* Cor padrão do texto */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Evita scroll horizontal indesejado */
}

/* --- Header e Navegação --- */
header {
    background-color: var(--cinza-rochoso-escuro);
    color: var(--branco-nevado);
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--branco-nevado);
    text-decoration: none;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--cinza-claro-nebuloso);
    text-decoration: none;
    font-size: 1.1em;
    padding: 5px 0;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--branco-nevado);
    border-bottom: 2px solid var(--azul-esverdeado-glacial);
}

/* --- Main Content - Clock Container (para todas as páginas) --- */
.clock-container {
    flex-grow: 1; /* Faz o container crescer e ocupar o espaço disponível */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    transform-origin: center center; /* Garante que o zoom seja do centro */
    transition: transform 0.3s ease; /* Transição suave para o zoom */
}

.page-title {
    font-size: 2.5em;
    color: var(--cinza-rochoso-escuro);
    margin-bottom: 30px;
}

.time-display {
    font-size: 8em; /* Grande para ser o foco */
    font-weight: bold;
    color: var(--azul-ceu-profundo); /* Azul vibrante para a hora */
    margin-bottom: 10px;
    letter-spacing: -3px; /* Ajuste para melhor leitura */
}

.date-display {
    font-size: 2em;
    color: var(--cinza-rochoso-escuro);
    margin-top: 5px;
    margin-bottom: 40px; /* Espaçamento maior antes dos controles */
}

/* --- Controles (Botões de Tela Cheia e Zoom) --- */
.controls {
    margin-top: 40px;
    display: flex;
    gap: 15px; /* Espaçamento entre os botões */
    flex-wrap: wrap; /* Permite quebrar linha em telas pequenas */
    justify-content: center;
}

.controls button {
    background-color: var(--azul-esverdeado-glacial); /* Cor do tema Andes de Inverno */
    color: var(--branco-nevado);
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.controls button:hover {
    background-color: #00A9C0; /* Um pouco mais escuro ao passar o mouse */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* --- Estilos para Horários Mundiais (Página Index) --- */
.world-clocks {
    margin-top: 60px;
    width: 90%;
    max-width: 800px;
    background-color: var(--cinza-claro-nebuloso);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.world-clocks h2 {
    font-size: 2em;
    color: var(--azul-ceu-profundo);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--azul-esverdeado-glacial);
    padding-bottom: 10px;
}

#world-clocks-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.city-time {
    background-color: var(--branco-nevado);
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.city-time h3 {
    font-size: 1.4em;
    color: var(--cinza-rochoso-escuro);
    margin: 0 0 10px 0;
}

.city-time .time {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--azul-ceu-profundo);
    margin-bottom: 5px;
}

.city-time .timezone-diff {
    font-size: 0.95em;
    color: var(--azul-esverdeado-glacial);
}

/* --- Seção "Como Usar" e Novas Seções de Conteúdo --- */
.how-to-use-section, .content-section {
    background-color: var(--cinza-claro-nebuloso);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-top: 40px; /* Espaçamento acima */
    width: 90%;
    max-width: 800px;
    text-align: left; /* Alinha o texto à esquerda */
}

.how-to-use-section h2, .content-section h2 {
    font-size: 2em;
    color: var(--azul-ceu-profundo);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--azul-esverdeado-glacial);
    padding-bottom: 10px;
}

.how-to-use-section h3, .content-section h3 {
    font-size: 1.5em;
    color: var(--cinza-rochoso-escuro);
    margin-top: 25px;
    margin-bottom: 15px;
}

.how-to-use-section p, .content-section p {
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--cinza-rochoso-escuro);
    margin-bottom: 15px;
}

.how-to-use-section ul, .content-section ul {
    list-style: disc; /* Marcadores de lista */
    margin-left: 20px;
    padding-left: 0;
    color: var(--cinza-rochoso-escuro);
    margin-bottom: 15px;
}

.how-to-use-section ul li, .content-section ul li {
    margin-bottom: 8px;
    font-size: 1.05em;
    line-height: 1.5;
}

/* Estilo para FAQ */
.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--cinza-rochoso-escuro);
    padding-bottom: 15px;
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item h3 {
    font-size: 1.25em;
    color: var(--azul-ceu-profundo);
    margin-bottom: 10px;
    cursor: pointer; /* Indica que é clicável */
}

.faq-item p {
    font-size: 1em;
    color: var(--cinza-rochoso-escuro);
    line-height: 1.5;
    display: none; /* Oculta a resposta por padrão */
}

.faq-item p.active {
    display: block; /* Mostra a resposta ativa */
}


/* --- Espaço para AdSense --- */
.adsense-banner-bottom {
    margin-top: 60px;
    width: 100%;
    max-width: 970px;
    min-height: 90px;
    background-color: var(--cinza-claro-nebuloso);
    border: 1px dashed var(--cinza-rochoso-escuro);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--cinza-rochoso-escuro);
    font-size: 1.1em;
    text-align: center;
    padding: 10px;
}

.adsense-placeholder {
    margin: 0;
    padding: 10px;
    font-style: italic;
    color: var(--cinza-rochoso-escuro);
}

/* --- Footer --- */
footer {
    background-color: var(--cinza-rochoso-escuro);
    color: var(--cinza-claro-nebuloso);
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    margin-top: auto;
}

footer a {
    color: var(--azul-esverdeado-glacial);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--branco-nevado);
}

/* Responsividade Geral */
@media (max-width: 768px) {
    header {
        padding: 10px 15px;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        margin-top: 10px;
        width: 100%;
        justify-content: space-around;
    }

    nav ul li {
        margin-left: 0;
    }

    nav ul li a {
        font-size: 1em;
        padding: 5px 8px;
    }

    .logo {
        font-size: 1.5em;
        margin-bottom: 10px;
    }

    .page-title {
        font-size: 2em;
        margin-bottom: 20px;
    }

    .time-display {
        font-size: 5em;
    }

    .date-display {
        font-size: 1.5em;
    }

    .world-clocks {
        padding: 20px;
        width: 95%;
    }

    .world-clocks h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    #world-clocks-display {
        grid-template-columns: 1fr;
    }

    .controls button {
        padding: 10px 20px;
        font-size: 1em;
    }

    .how-to-use-section, .content-section {
        padding: 20px;
        width: 95%;
    }

    .how-to-use-section h2, .content-section h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .adsense-banner-bottom {
        margin-top: 40px;
        max-width: 728px;
        min-height: 60px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5em;
    }
    .time-display {
        font-size: 3.5em;
    }

    .date-display {
        font-size: 1.2em;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }

    .world-clocks {
        padding: 15px;
    }

    .world-clocks h2 {
        font-size: 1.5em;
    }

    .city-time h3 {
        font-size: 1.2em;
    }

    .city-time .time {
        font-size: 1.5em;
    }

    .how-to-use-section, .content-section {
        padding: 15px;
    }

    .how-to-use-section h2, .content-section h2 {
        font-size: 1.5em;
    }

    .how-to-use-section p, .how-to-use-section ul li,
    .content-section p, .content-section ul li {
        font-size: 0.95em;
    }

    .adsense-banner-bottom {
        max-width: 320px;
        min-height: 50px;
    }
}

/* Estilos para o modo Tela Cheia (aplica-se a todas as páginas) */
body.fullscreen-mode {
    background-color: black;
    color: var(--branco-nevado);
}

body.fullscreen-mode .time-display,
body.fullscreen-mode #timer-display,
body.fullscreen-mode #stopwatch-display {
    color: var(--branco-nevado);
}

body.fullscreen-mode .date-display {
    color: var(--cinza-claro-nebuloso);
}

body.fullscreen-mode .page-title,
body.fullscreen-mode .world-clocks,
body.fullscreen-mode .adsense-banner-bottom,
body.fullscreen-mode .alarm-setup-container,
body.fullscreen-mode .alarm-list-container,
body.fullscreen-mode .timer-settings,
body.fullscreen-mode .timer-input-container,
body.fullscreen-mode .timer-message,
body.fullscreen-mode .displayed-timer-title,
body.fullscreen-mode header,
body.fullscreen-mode footer,
body.fullscreen-mode .how-to-use-section,
body.fullscreen-mode .content-section { /* Adicionado para esconder em tela cheia */
    display: none;
}
