/* =========================================
   FONTE PIXEL / RETRO
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Inter:wght@400;700&display=swap');

:root {
    --bg-color: #f4ece1;      /* Cor de papel/café com leite */
    --accent: #8b5e3c;        /* Marrom café */
    --secondary: #6b8e23;     /* Verde oliva (estilo lo-fi) */
    --text: #433422;          /* Marrom escuro quase preto */
    --border-pixel: 4px solid #433422;
    --card-bg: #ffffff;
}

/* =========================================
   GLOBAL RESET (Restaurado)
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated; /* Mantido conforme seu original */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(#dcd0c0 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text);
    padding-top: 100px; 
    transition: background-color 0.4s ease; /* Para a troca de cor lo-fi ser suave */
}

/* =========================================
   NAVIGATION (Fix do Pulo e Mobile)
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-color);
    border-bottom: var(--border-pixel);
    z-index: 1000;
    padding: 10px 0;
}

.nav-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-family: 'VT323', monospace;
    font-size: 2.5rem;
    color: var(--accent);
    text-decoration: none;
    text-transform: uppercase;
}

/* Botão Hamburguer (Novo, necessário para mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-family: 'VT323', monospace;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text);
}

.menu {
    display: flex;
    align-items: center;
}

.menu a {
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    margin-left: 20px;
    color: var(--text);
    text-decoration: none;
    transition: 0.2s;
    /* FIX PARA O PULO: Largura mínima evita que o menu se mexa ao mudar fonte */
    min-width: 85px;
    text-align: center;
}

.menu a:hover {
    color: var(--secondary);
    background: #e6d5bc;
}

/* =========================================
   RESPONSIVIDADE MOBILE (Adicionado sem remover o resto)
   ========================================= */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .menu {
        display: none; /* Escondido por padrão no mobile */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        border-bottom: var(--border-pixel);
        padding: 10px 0;
    }

    .menu.show { display: flex; } /* Classe para abrir o menu */

    .menu a {
        margin: 10px 0;
        width: 100%;
        font-size: 1.8rem;
    }

    #display { font-size: 5rem !important; }
}

/* =========================================
   TIMER CARD (Mantido original)
   ========================================= */
header {
    text-align: center;
    margin-bottom: 50px;
}

.timer-card {
    background: var(--card-bg);
    max-width: 480px;
    margin: 0 auto;
    padding: 30px;
    border: var(--border-pixel);
    box-shadow: 10px 10px 0px #dcd0c0;
    text-align: center;
}

.modes {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mode-btn {
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    background: #fff;
    border: 3px solid var(--text);
    padding: 5px 20px;
    cursor: pointer;
    transition: 0.1s;
}

#display {
    font-family: 'VT323', monospace;
    font-size: 8rem;
    margin: 10px 0;
    color: var(--accent);
    text-shadow: 4px 4px 0px #e6d5bc;
    line-height: 1;
}

.timer-settings {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    background: #e6d5bc;
    padding: 15px;
    border: 3px solid var(--text);
    margin: 20px 0;
}

.setting-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.setting-group label {
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: bold;
}

.setting-group input {
    width: 60px;
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    text-align: center;
    border: 3px solid var(--text);
    background: #fff;
    color: var(--text);
    outline: none;
}

.pixel-btn-main {
    width: 100%;
    font-family: 'VT323', monospace;
    font-size: 2.5rem;
    background: var(--secondary);
    color: #fff;
    border: var(--border-pixel);
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 6px 0 #3d5214;
    transition: all 0.1s;
}

.pixel-btn-main:active {
    box-shadow: 0 0 0 #3d5214;
    transform: translateY(6px);
}

#cycle-counter {
    margin-top: 15px;
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    color: var(--accent);
}

/* =========================================
   CONTEÚDO, FOOTER E COOKIES (Mantidos intactos)
   ========================================= */
.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px 20px;
    background: #fff;
    border: var(--border-pixel);
}

h1, h2 {
    font-family: 'VT323', monospace;
    color: var(--accent);
    margin-bottom: 20px;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
p { margin-bottom: 20px; line-height: 1.6; font-size: 1.1rem; }

footer {
    text-align: center;
    padding: 60px;
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    color: var(--text);
}

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: #fff;
    border: var(--border-pixel);
    padding: 20px;
    z-index: 9999;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.1);
}

.cookie-content p {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
}

.cookie-buttons button {
    font-family: 'VT323', monospace;
    padding: 5px 15px;
    font-size: 1rem;
    border: 2px solid var(--text);
    cursor: pointer;
    margin-right: 10px;
}