/* 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);
}

/* --- 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;
    }

    .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;
    }

    .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,nav ul{margin:0;padding:0;display:flex}.city-time .time,.logo{font-size:1.8em;font-weight:700}.city-time,.clock-container,.controls,body,nav,nav ul{display:flex}footer,header{background-color:var(--cinza-rochoso-escuro)}footer,nav ul li a{color:var(--cinza-claro-nebuloso)}.logo,footer a,nav ul li a{text-decoration:none}:root{--branco-nevado:#E0F2F7;--cinza-rochoso-escuro:#2B3A42;--azul-ceu-profundo:#007BFF;--azul-esverdeado-glacial:#00BCD4;--cinza-claro-nebuloso:#CFD8DC}body{font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;background-color:var(--branco-nevado);color:var(--cinza-rochoso-escuro);flex-direction:column;min-height:100vh;overflow-x:hidden}.controls button,.logo,header{color:var(--branco-nevado)}header{padding:15px 30px;box-shadow:0 2px 10px rgba(0,0,0,.1)}nav{justify-content:space-between;align-items:center;max-width:1200px;margin:0 auto}nav ul{list-style:none}nav ul li{margin-left:25px}nav ul li a{font-size:1.1em;padding:5px 0;transition:color .3s,border-bottom .3s}nav ul li a.active,nav ul li a:hover{color:var(--branco-nevado);border-bottom:2px solid var(--azul-esverdeado-glacial)}.clock-container{flex-grow:1;flex-direction:column;justify-content:center;align-items:center;padding:20px;text-align:center;transform-origin:center center;transition:transform .3s}.page-title{font-size:2.5em;color:var(--cinza-rochoso-escuro);margin-bottom:30px}.time-display{font-size:8em;font-weight:700;color:var(--azul-ceu-profundo);margin-bottom:10px;letter-spacing:-3px}.date-display{font-size:2em;color:var(--cinza-rochoso-escuro);margin-top:5px;margin-bottom:40px}.controls{margin-top:40px;gap:15px;flex-wrap:wrap;justify-content:center}.controls button{background-color:var(--azul-esverdeado-glacial);border:none;padding:12px 25px;font-size:1.1em;border-radius:8px;cursor:pointer;transition:background-color .3s,transform .2s,box-shadow .3s;box-shadow:0 4px 8px rgba(0,0,0,.1)}.controls button:hover{background-color:#00a9c0;transform:translateY(-2px);box-shadow:0 6px 12px rgba(0,0,0,.15)}.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,.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,.05);flex-direction:column;justify-content:space-between}.adsense-banner-bottom,.adsense-placeholder{padding:10px;color:var(--cinza-rochoso-escuro)}.city-time h3{font-size:1.4em;color:var(--cinza-rochoso-escuro);margin:0 0 10px}body.fullscreen-mode,body.fullscreen-mode #stopwatch-display,body.fullscreen-mode #timer-display,body.fullscreen-mode .time-display,footer a:hover{color:var(--branco-nevado)}.city-time .time{color:var(--azul-ceu-profundo);margin-bottom:5px}.city-time .timezone-diff,footer a{color:var(--azul-esverdeado-glacial)}.city-time .timezone-diff{font-size:.95em}.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;font-size:1.1em;text-align:center}.adsense-placeholder{margin:0;font-style:italic}footer{text-align:center;padding:20px;font-size:.9em;margin-top:auto}footer a{margin:0 8px;transition:color .3s}@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}.adsense-banner-bottom{margin-top:40px;max-width:728px;min-height:60px}}@media (max-width:480px){.city-time .time,.page-title,.world-clocks h2{font-size:1.5em}.time-display{font-size:3.5em}.city-time h3,.date-display{font-size:1.2em}.controls{flex-direction:column;gap:10px}.world-clocks{padding:15px}.adsense-banner-bottom{max-width:320px;min-height:50px}}body.fullscreen-mode{background-color:#000}body.fullscreen-mode .date-display{color:var(--cinza-claro-nebuloso)}body.fullscreen-mode .adsense-banner-bottom,body.fullscreen-mode .alarm-list-container,body.fullscreen-mode .alarm-setup-container,body.fullscreen-mode .displayed-timer-title,body.fullscreen-mode .page-title,body.fullscreen-mode .timer-input-container,body.fullscreen-mode .timer-message,body.fullscreen-mode .timer-settings,body.fullscreen-mode .world-clocks,body.fullscreen-mode footer,body.fullscreen-mode header{display:none}
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 {
    display: none;
}
