:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --accent: #fd79a8;
    --dark: #2d3436;
    --light: #f7f9fa;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e17055;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.game-container {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin: 20px auto;
}

.header {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.header h1 {
    font-family: 'Roboto Slab', serif;
    font-size: 2.8rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.content {
    display: flex;
    flex-wrap: wrap;
    padding: 30px;
}

.game-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.hint-section {
    background: var(--light);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hint-section h3 {
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hint-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    background: white;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--accent);
}

.word-display {
    font-size: 2.5rem;
    letter-spacing: 12px;
    text-align: center;
    font-weight: 700;
    margin: 25px 0;
    font-family: 'Roboto Slab', serif;
    color: var(--dark);
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.input-section {
    display: flex;
    gap: 12px;
    margin: 25px 0;
    flex-wrap: wrap;
    justify-content: center;
}

#guess-input {
    flex: 1;
    min-width: 200px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

#guess-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #5a4bd4;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #e0e5e9;
}

.stats {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.stat-box {
    flex: 1;
    min-width: 200px;
    background: var(--light);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-box h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.stat-box p {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
}

#wrong-guesses {
    color: var(--danger);
    font-weight: 600;
    min-height: 30px;
}

.tries-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.tries-container h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

.div-tries {
    display: flex;
    gap: 8px;
}

.div-tries i {
    font-size: 1.8rem;
    color: var(--secondary);
}

.div-tries i.far {
    color: #e0e0e0;
}

.hanged-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hanged-container {
    width: 220px;
    height: 300px;
    position: relative;
    margin: 20px 0;
}

.hanged-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#message {
    text-align: center;
    padding: 15px;
    margin: 20px 0;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-success {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
    border: 2px solid var(--success);
}

.message-error {
    background: rgba(225, 112, 85, 0.15);
    color: var(--danger);
    border: 2px solid var(--danger);
}

.message-info {
    background: rgba(253, 203, 110, 0.15);
    color: #d35400;
    border: 2px solid #f39c12;
}

.keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 30px 0 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.key {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.key:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.key.used {
    background: #e0e0e0;
    color: #b0b0b0;
    cursor: not-allowed;
    transform: none;
}

.key.correct {
    background: rgba(0, 184, 148, 0.2);
    border-color: var(--success);
    color: var(--success);
}

.key.incorrect {
    background: rgba(225, 112, 85, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.category-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 25px;
    border-radius: 30px;
    background: white;
    border: 2px solid #e0e0e0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover, .category-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.instructions {
    background: var(--light);
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    max-width: 900px;
    margin: 20px auto;
}

.instructions h2 {
    color: var(--primary);
    margin-bottom: 15px;
    text-align: center;
}

.instructions ol {
    padding-left: 25px;
    line-height: 1.8;
}

.instructions li {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .content {
        flex-direction: column;
    }

    .header h1 {
        font-size: 2.2rem;
    }

    .word-display {
        font-size: 1.8rem;
        letter-spacing: 8px;
    }

    .key {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}