* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5rem;
    color: #e74c3c;
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
}

.game-header .subtitle {
    color: #ecf0f1;
    font-size: 1rem;
    margin-top: 5px;
    letter-spacing: 3px;
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.info-box {
    text-align: center;
}

.info-label {
    display: block;
    color: #95a5a6;
    font-size: 0.8rem;
    font-weight: bold;
}

.info-value {
    display: block;
    color: #ecf0f1;
    font-size: 1.5rem;
    font-weight: bold;
}

.hangman-area {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.hangman-svg {
    width: 150px;
    height: 180px;
}

.hangman-svg .hidden {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hangman-svg .show {
    opacity: 1;
}

.word-display {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #ecf0f1;
    letter-spacing: 10px;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
}

.wrong-letters {
    text-align: center;
    min-height: 30px;
    margin-bottom: 20px;
    color: #e74c3c;
    font-size: 1.2rem;
    letter-spacing: 5px;
}

.keyboard {
    margin-bottom: 20px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 5px;
}

.key {
    width: 38px;
    height: 45px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.key:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.key:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.key.correct {
    background: rgba(46, 204, 113, 0.5);
    color: #2ecc71;
}

.key.wrong {
    background: rgba(231, 76, 60, 0.5);
    color: #e74c3c;
}

.restart-btn {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.overlay-content h2 {
    color: #e74c3c;
    font-size: 2rem;
    margin-bottom: 20px;
}

.overlay-content h2.win {
    color: #2ecc71;
}

.overlay-content p {
    color: #ecf0f1;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.overlay-content span {
    color: #f1c40f;
    font-weight: bold;
}

.overlay-content button {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.overlay-content button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.5);
}

@media (max-width: 500px) {
    .game-container {
        padding: 15px;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .word-display {
        font-size: 1.8rem;
        letter-spacing: 8px;
    }

    .key {
        width: 32px;
        height: 40px;
        font-size: 0.9rem;
    }

    .hangman-svg {
        width: 120px;
        height: 150px;
    }
}
