
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e6e6e6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 900px;
    width: 100%;
    background: rgba(30, 30, 46, 0.9);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    padding: 30px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #4cc9f0;
}

header h1 {
    font-size: 2.8rem;
    color: #4cc9f0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.2rem;
    color: #a9a9b8;
}

.game-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 40px;
    width: 100%;
    flex-wrap: wrap;
}

.score-item {
    background: rgba(76, 201, 240, 0.1);
    padding: 15px 25px;
    border-radius: 15px;
    text-align: center;
    min-width: 120px;
    border: 2px solid rgba(76, 201, 240, 0.3);
    transition: transform 0.3s, border-color 0.3s;
}

.score-item:hover {
    transform: translateY(-5px);
    border-color: #4cc9f0;
}

.score-label {
    display: block;
    font-size: 1rem;
    color: #a9a9b8;
    margin-bottom: 8px;
}

.score-value {
    font-size: 2.2rem;
    font-weight: bold;
    color: #4cc9f0;
}

.word-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px;
    background: rgba(20, 20, 35, 0.7);
    border-radius: 15px;
    min-height: 80px;
    width: 100%;
    border: 2px solid rgba(76, 201, 240, 0.2);
}

.letter {
    width: 50px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: bold;
    color: #4cc9f0;
    border-bottom: 4px solid #4cc9f0;
    text-transform: uppercase;
    transition: all 0.3s;
}

.letter.revealed {
    color: #72efdd;
    transform: scale(1.1);
}

.hangman-container {
    position: relative;
    width: 300px;
    height: 250px;
    margin: 0 auto;
}

.hangman {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallows {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 200px;
    background: #a9a9b8;
}

.gallows::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50px;
    width: 100px;
    height: 4px;
    background: #a9a9b8;
}

.gallows::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50px;
    width: 4px;
    height: 30px;
    background: #a9a9b8;
}

.head, .body, .left-arm, .right-arm, .left-leg, .right-leg {
    position: absolute;
    background: #72efdd;
    opacity: 0;
    transition: opacity 0.5s;
}

.head {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid #4cc9f0;
}

.body {
    width: 10px;
    height: 80px;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
}

.left-arm, .right-arm {
    width: 60px;
    height: 10px;
    top: 100px;
}

.left-arm {
    left: calc(50% - 70px);
    transform: rotate(45deg);
}

.right-arm {
    left: calc(50% + 10px);
    transform: rotate(-45deg);
}

.left-leg, .right-leg {
    width: 60px;
    height: 10px;
    top: 155px;
}

.left-leg {
    left: calc(50% - 70px);
    transform: rotate(45deg);
}

.right-leg {
    left: calc(50% + 10px);
    transform: rotate(-45deg);
}

.keyboard {
    background: rgba(20, 20, 35, 0.7);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border: 2px solid rgba(76, 201, 240, 0.2);
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.key {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    background: #2a2a3e;
    color: #e6e6e6;
    border: 2px solid #4cc9f0;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    text-transform: uppercase;
}

.key:hover {
    background: #3a3a4e;
    transform: scale(1.05);
}

.key:active {
    transform: scale(0.95);
}

.key.correct {
    background: #4ade80;
    border-color: #22c55e;
    color: #1a1a2e;
}

.key.incorrect {
    background: #f87171;
    border-color: #ef4444;
    color: #1a1a2e;
}

.key.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.hint-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.new-game-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.reset-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(-2px);
}

.message {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 40px;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    opacity: 0;
    transition: opacity 0.5s;
}

.message.show {
    opacity: 1;
}

.win {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 2px solid #22c55e;
}

.lose {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 2px solid #ef4444;
}

.hint {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 2px solid #f59e0b;
}

footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3a3a4e;
    color: #a9a9b8;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .score-board {
        gap: 15px;
    }
    
    .score-item {
        min-width: 100px;
        padding: 12px 20px;
    }
    
    .letter {
        width: 35px;
        height: 45px;
        font-size: 1.8rem;
    }
    
    .key {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 12px 18px;
        font-size: 1rem;
    }
    
    .hangman-container {
        width: 250px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .keyboard-row {
        gap: 5px;
    }
    
    .key {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .controls {
        gap: 10px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .letter {
        width: 25px;
        height: 35px;
        font-size: 1.5rem;
    }
}
