/* style.css - Modern and clean design for the random number generator */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* Main card container */
main {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(2px);
    border-radius: 2rem;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2.5rem 2rem;
    text-align: center;
    width: 100%;
    max-width: 550px;
    transition: transform 0.2s ease;
}

/* Result display area */
.output {
    background: #f8f9fc;
    border-radius: 1.5rem;
    font-size: 5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: #2d3748;
    padding: 1.5rem 0.75rem;
    margin-bottom: 2.2rem;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    letter-spacing: 2px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
    transition: all 0.2s;
}

/* Formulário */
form ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
}

li {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

label {
    font-weight: 600;
    color: #1a202c;
    font-size: 1rem;
}

input {
    padding: 0.6rem 1rem;
    font-size: 1rem;
    border: 1px solid #cbd5e0;
    border-radius: 2rem;
    width: 140px;
    text-align: center;
    font-family: monospace;
    font-weight: 500;
    transition: all 0.2s;
    background: white;
}

input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Botão principal */
#sortearBtn {
    background: linear-gradient(95deg, #5a67d8, #7c3aed);
    border: none;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 3rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 8px 18px rgba(90, 103, 216, 0.3);
    width: 80%;
    max-width: 280px;
    letter-spacing: 0.5px;
}

#sortearBtn:hover {
    transform: translateY(-3px);
    background: linear-gradient(95deg, #434190, #6d28d9);
    box-shadow: 0 15px 25px -8px rgba(90, 103, 216, 0.5);
}

#sortearBtn:active {
    transform: translateY(2px);
    transition: 0.05s linear;
    box-shadow: 0 5px 12px rgba(90, 103, 216, 0.4);
}

#sortearBtn:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 3px;
}

/* Mensagem de erro */
.error-message {
    color: #e53e3e;
    font-size: 0.8rem;
    margin-top: 0.2rem;
    font-weight: 500;
}

/* Responsividade */
@media (max-width: 550px) {
    main {
        padding: 1.8rem 1.2rem;
        border-radius: 1.5rem;
    }
    .output {
        font-size: 3.2rem;
        padding: 1rem 0.5rem;
        min-height: 120px;
    }
    #sortearBtn {
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
        width: 90%;
    }
    input {
        width: 120px;
    }
}

@media (max-width: 420px) {
    .output {
        font-size: 2.5rem;
        min-height: 100px;
    }
    main {
        padding: 1.5rem 1rem;
    }
}

/* Efeito sutil ao atualizar o número */
.output:active {
    transform: scale(0.98);
}