:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6584;
    --accent-color: #43D9AD;
    --background-color: #2F2E41;
    --surface-color: #3F3D56;
    --text-color: #FFFFFF;
    --text-secondary: #B0B0B0;
    --success-color: #4CAF50;
    --error-color: #F44336;
    --warning-color: #FFC107;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #2F2E41 0%, #1F1D36 100%);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.main-container {
    width: 95%;
    max-width: 900px;
    background-color: rgba(63, 61, 86, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: 0 4px 10px rgba(108, 99, 255, 0.5);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-color);
}

.game-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.word-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 15px 0;
    min-height: 65px;
}

.letra {
    width: 55px;
    height: 65px;
    border-bottom: 4px solid var(--text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--text-color);
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.letra.espacio {
    border-bottom: none;
    width: 25px;
}

.letra.pintar {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.letra.pintarError {
    color: var(--error-color);
    border-bottom-color: var(--error-color);
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.hint-container {
    background: rgba(108, 99, 255, 0.1);
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid rgba(108, 99, 255, 0.3);
    text-align: center;
    max-width: 90%;
}

.hint-label {
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.1rem;
}

.hint-text {
    font-style: italic;
    color: var(--text-color);
    font-size: 1.1rem;
}

.status-container {
    font-size: 1.2rem;
}

.lives-value {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.4rem;
}

.keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 800px;
    margin: 15px 0;
}

.key-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 48px;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.key-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(108, 99, 255, 0.4);
}

.key-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.key-btn.correct {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.key-btn.wrong {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.controls {
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.action-button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 15px 35px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.6);
}

.action-button.secondary {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    box-shadow: none;
}

.action-button.secondary:hover {
    background-color: rgba(67, 217, 173, 0.1);
    box-shadow: 0 0 15px rgba(67, 217, 173, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 14, 23, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: linear-gradient(135deg, var(--surface-color), #2F2E41);
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 40px rgba(108, 99, 255, 0.5);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal h2 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 2.2rem;
}

.modal p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

#modal-word {
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.4rem;
    display: block;
    margin-top: 10px;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8rem;
    }

    .letra {
        width: 40px;
        height: 50px;
        font-size: 1.8rem;
    }

    .key-btn {
        padding: 10px 12px;
        font-size: 1rem;
        min-width: 40px;
    }

    .action-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
}