:root {
    /* Paleta mais sofisticada e moderna */
    --bg: #09090b;
    --surface: #141417;
    --card: #1c1c21;

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    --primary: #0195ff;
    --primary-light: #4ab7ff;
    --primary-dark: #006edc;
    --primary-glow: rgba(1, 149, 255, 0.25);

    --text: #f4f4f5;
    --text-muted: #a1a1aa;

    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background: radial-gradient(circle at top, #18181b 0%, var(--bg) 80%);
    color: var(--text);
    font-family: "Outfit", sans-serif;
}

.container {
    width: 100%;
    max-width: 680px; /* Levemente mais estreito para melhor leitura */
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================
   HEADER
========================== */
header {
    text-align: center;
    margin-bottom: 16px;
}

header h1 {
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.1;
    /* Efeito de texto metálico suave */
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 400;
}

.btn-outline {
    margin-top: 20px;
    height: 40px;
    padding: 0 20px;
    border-radius: 20px; /* Mais arredondado */
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    border-color: var(--primary-light);
    background: rgba(1, 149, 255, 0.1);
    transform: translateY(-1px);
}

/* ==========================
   MAIN & FORM
========================== */
main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#form-chute {
    display: flex;
    gap: 12px;
}

#input-palavra {
    flex: 1;
    height: 58px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    
    /* ADICIONE ESTAS DUAS LINHAS: */
    -webkit-appearance: none;
    appearance: none;
}

#input-palavra::placeholder {
    color: #52525b;
    font-weight: 400;
}

#input-palavra:focus {
    border-color: var(--primary);
    background: #18181b;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

#btn-enviar {
    height: 58px;
    padding: 0 28px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px var(--primary-glow);
}

#btn-enviar:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--primary-glow);
    filter: brightness(1.1);
}

#btn-enviar:active:not(:disabled) {
    transform: scale(0.96);
}

#btn-enviar:disabled {
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    box-shadow: none;
    cursor: not-allowed;
}

/* ==========================
   AÇÕES EXTRAS
========================== */
.acoes-extras {
    display: flex;
    gap: 12px;
}

.btn-acao {
    flex: 1;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-acao:hover:not(:disabled) {
    border-color: var(--border-hover);
    background: var(--card);
    transform: translateY(-1px);
}

.btn-acao:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================
   STATUS
========================== */
#mensagem-status {
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ==========================
   HISTÓRICO
========================== */
.historico-container {
    background: rgba(20, 20, 23, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
}

.historico-header {
    margin-bottom: 16px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.historico-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

#lista-chutes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==========================
   CHUTES (CARDS)
========================== */
.chute-item {
    position: relative;
    overflow: hidden;
    height: 60px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.2s, border-color 0.2s;
}

.chute-item:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.chute-fundo-cor {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 1;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.chute-palavra,
.chute-valor {
    position: relative;
    z-index: 2;
}

.chute-palavra {
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: capitalize;
}

.chute-valor {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* ==========================
   PROXIMIDADE (CORES)
========================== */
.perto .chute-fundo-cor {
    background: linear-gradient(90deg, rgba(1, 149, 255, 0.15), rgba(1, 149, 255, 0.5));
    border-right: 2px solid var(--primary);
}

.medio .chute-fundo-cor {
    background: linear-gradient(90deg, rgba(161, 161, 170, 0.1), rgba(161, 161, 170, 0.25));
    border-right: 2px solid #52525b;
}

.longe .chute-fundo-cor {
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================
   ACERTOU
========================== */
.acertou {
    border-color: var(--success);
    box-shadow: 0 0 24px var(--success-glow);
}

.acertou .chute-fundo-cor {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.6), rgba(16, 185, 129, 0.9));
}

.acertou .chute-palavra,
.acertou .chute-valor {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================
   ANIMAÇÕES
========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================
   MOBILE & RESPONSIVIDADE
========================== */
@media (max-width: 600px) {
    .container {
        padding: 24px 16px 40px;
    }

    header h1 {
        font-size: 2.4rem;
    }

    /* O formulário vira coluna, mas o botão fica bem acessível e largo */
    #form-chute {
        flex-direction: column;
        gap: 10px;
    }

    #input-palavra {
        height: 54px;
        font-size: 1rem;
    }

    #btn-enviar {
        height: 54px;
        width: 100%;
        font-size: 1rem;
    }

    /* Botões Extras lado a lado no mobile para economizar tela vertical */
    .acoes-extras {
        flex-direction: row; 
    }

    .btn-acao {
        height: 44px;
        font-size: 0.85rem;
    }

    .historico-container {
        padding: 16px;
    }

    .chute-item {
        height: 54px;
        padding: 0 14px;
    }

    .chute-item:hover {
        transform: none; /* Desativa o hover lateral no touch */
    }
}