/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #16213e 100%);
    background-attachment: fixed;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(231, 76, 60, 0.3);
}

h1 {
    font-size: 3rem;
    margin-bottom: 5px;
    font-weight: 700;
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 50%, #e74c3c 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine 3s linear infinite;
    text-shadow: 0 0 30px rgba(231, 76, 60, 0.5);
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.subtitle {
    color: #bbb;
    font-size: 1rem;
    letter-spacing: 1px;
}

/* Área do jogo */
#game-area {
    flex: 1;
}

/* Dicas */
#hints-container {
    margin-bottom: 30px;
}

.hint {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(22, 33, 62, 0.8) 100%);
    backdrop-filter: blur(10px);
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.hint:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.hint.revealed {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(243, 156, 18, 0.2) 100%);
    border-left: 4px solid #e74c3c;
    border-color: rgba(231, 76, 60, 0.5);
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3);
    animation: revealHint 0.5s ease;
}

@keyframes revealHint {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.hint-label {
    font-weight: 600;
    color: #bbb;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hint-value {
    font-weight: 600;
    color: #fff;
    font-size: 1.05rem;
}

/* Input de resposta */
#answer-section {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

#answer-input {
    width: 100%;
    padding: 18px;
    font-size: 1.05rem;
    border: 2px solid rgba(231, 76, 60, 0.3);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(22, 33, 62, 0.9) 100%);
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

#answer-input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.4);
    transform: translateY(-2px);
}

#answer-input::placeholder {
    color: #888;
}

/* Sugestões de autocomplete */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(22, 33, 62, 0.98) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(231, 76, 60, 0.3);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.suggestions.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.suggestion-item:hover {
    background: rgba(231, 76, 60, 0.2);
    border-left-color: #e74c3c;
    padding-left: 22px;
}

.suggestion-item.selected {
    background: rgba(231, 76, 60, 0.3);
    border-left-color: #e74c3c;
}

/* Botões */
.btn-primary,
.btn-secondary {
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #555 0%, #444 100%);
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: white;
    border: 2px solid rgba(231, 76, 60, 0.5);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.3) 0%, rgba(231, 76, 60, 0.2) 100%);
    border-color: #e74c3c;
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: #555;
    border-color: #444;
    cursor: not-allowed;
    transform: none;
}

/* Resultado */
.result {
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
    font-size: 1.15rem;
    animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    white-space: pre-line;
    line-height: 1.8;
}

.result.success {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(39, 174, 96, 0.3) 100%);
    border: 2px solid #2ecc71;
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
}

.result.error {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.3) 0%, rgba(192, 57, 43, 0.3) 100%);
    border: 2px solid #e74c3c;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Botões de ação */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid rgba(231, 76, 60, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    cursor: pointer;
    color: #888;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.2);
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Estatísticas */
#stats-content {
    margin: 20px 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(231, 76, 60, 0.2);
}

.stat-label {
    color: #bbb;
    font-size: 1.05rem;
}

.stat-value {
    font-weight: 700;
    font-size: 1.15rem;
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-bar {
    margin: 15px 0;
}

.bar-container {
    background: rgba(255, 255, 255, 0.1);
    height: 30px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 8px;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.bar-fill {
    background: linear-gradient(90deg, #e74c3c 0%, #f39c12 100%);
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Instruções */
.instructions p {
    margin: 12px 0;
    padding-left: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.85rem;
    margin-top: 30px;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animação de erro (shake) */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Responsivo */
@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 15px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .modal-content {
        padding: 25px;
    }
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #c0392b 0%, #e74c3c 100%);
}
