:root {
    --fundo: #0e0e0e;
    --texto-principal: #e2e2e2;
    --texto-secundario: #888888;
    --cor-destaque: #42e355;
    --fundo-painel: rgba(31, 31, 31, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--fundo);
    color: var(--texto-principal);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.cronometro-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 600px;
}

.display h1 {
    font-size: clamp(3.5rem, 15vw, 6rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    justify-content: center;
    letter-spacing: -2px;
    text-align: center;
}

#milissegundos {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    color: var(--texto-secundario);
    font-weight: 600;
    margin-left: 10px;
    letter-spacing: normal;
}

.controles {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

button {
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#btn-voltas, #btn-resetar {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
    background: var(--fundo-painel);
    color: var(--texto-principal);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: clamp(0.7rem, 3vw, 0.9rem);
}

#btn-voltas:hover, #btn-resetar:hover {
    background: rgba(255, 255, 255, 0.1);
}

#btn-iniciar {
    width: clamp(90px, 25vw, 120px);
    height: clamp(90px, 25vw, 120px);
    background-color: var(--cor-destaque);
    color: #000000;
    font-size: clamp(1rem, 4vw, 1.2rem);
    box-shadow: 0 0 30px rgba(66, 227, 85, 0.3);
}

#btn-iniciar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(66, 227, 85, 0.5);
}

.historico-voltas {
    width: 100%;
    background: var(--fundo-painel);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.historico-voltas h3 {
    font-size: 0.8rem;
    color: var(--texto-secundario);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#lista-voltas {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

@media (max-width: 480px) {
    .cronometro-container {
        gap: 20px;
    }

    .historico-voltas {
        padding: 15px;
    }
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}