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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 15px;
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1.2rem;
    color: white;
    font-weight: bold;
}

.game-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.hangman-drawing {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

#hangmanCanvas {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.word-display {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

#wordContainer {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 3px;
}

.letter {
    width: 50px;
    height: 50px;
    border: 3px solid #007bff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #007bff;
    font-weight: bold;
    transition: all 0.3s ease;
}

.letter.revealed {
    background: #28a745;
    color: white;
    border-color: #28a745;
    transform: scale(1.1);
}

.game-status {
    text-align: center;
    padding: 20px;
    background: #e3f2fd;
    border-radius: 15px;
    border-left: 5px solid #2196f3;
}

.game-status p {
    margin: 10px 0;
    font-size: 1.1rem;
}

#message {
    font-weight: bold;
    color: #1976d2;
}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.key {
    width: 45px;
    height: 45px;
    border: 2px solid #6c757d;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key:hover:not(:disabled) {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.key.correct {
    background: #28a745;
    color: white;
    border-color: #28a745;
    cursor: not-allowed;
}

.key.incorrect {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    cursor: not-allowed;
}

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

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108,117,125,0.3);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-content h2 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.modal-content p {
    margin: 15px 0;
    font-size: 1.1rem;
}

#correctWord {
    color: #007bff;
    font-size: 1.3rem;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.modal-buttons .btn {
    min-width: 120px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-area {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .score-board {
        flex-direction: column;
        gap: 10px;
    }
    
    #wordContainer {
        font-size: 1.5rem;
    }
    
    .letter {
        width: 40px;
        height: 40px;
    }
    
    .key {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-buttons .btn {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .game-area {
        padding: 15px;
    }
    
    #hangmanCanvas {
        width: 250px;
        height: 250px;
    }
    
    .keyboard-row {
        gap: 5px;
    }
    
    .key {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
} 