/* Hangman Game Styles - Classic Black & White */

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #ffffff;
    color: #000000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

/* Header */
.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h1 {
    font-size: 2.5rem;
    margin: 0 0 5px 0;
    color: #000000;
    font-weight: bold;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    background: #000000;
    border: 2px solid #000000;
    padding: 10px 20px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn:hover {
    background: #333333;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Main Game Area */
.game-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* SVG Hangman */
.hangman-display {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    padding: 20px;
    min-height: 400px;
}

#hangmanSvg {
    width: 100%;
    max-width: 300px;
}

.hangman-svg {
    width: 100%;
    max-width: 300px;
    height: auto;
}

/* Stick figure parts - smooth transitions for hanging animation */
#figureHead,
#figureBody,
#figureLeftArm,
#figureRightArm,
#figureLeftLeg,
#figureRightLeg {
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.gallows-part {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Word Display and Hints */
.word-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-hint {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
    border: 2px solid #000;
}

.category-hint h3 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: #000;
    font-weight: bold;
}

.category-hint p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.word-display {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    min-height: 80px;
}

.letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 60px;
    font-size: 2.5rem;
    font-weight: bold;
    border-bottom: 4px solid #000;
    color: #000;
}

.letter-space {
    width: 20px;
}

.hint-panel {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hint-btn {
    background: #666666;
    border-color: #666666;
}

.hint-btn:hover {
    background: #888888;
}

/* Keyboard */
.keyboard {
    margin-top: 30px;
}

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

.key {
    min-width: 45px;
    padding: 15px 10px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #000;
    border-radius: 8px;
    background: #ffffff;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
}

.key:hover:not(:disabled) {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.key:active:not(:disabled) {
    transform: translateY(0);
}

.key.correct {
    background: #90EE90;
    border-color: #000;
    color: #000;
}

.key.incorrect {
    background: #D3D3D3;
    border-color: #000;
    color: #666;
}

.key.revealed {
    background: #FFD700;
    border-color: #000;
    color: #000;
}

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

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 3px solid #000;
    animation: modalSlideIn 0.3s ease;
}

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

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

.modal-header h2 {
    margin: 0;
    font-size: 2.5rem;
    color: #000;
    font-weight: bold;
}

.modal-body {
    margin-bottom: 30px;
}

.modal-info {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

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

.info-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

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

.defeat-word {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: #000;
    margin: 20px 0;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.close-btn {
    background: #ffffff;
    border: 2px solid #000;
    color: #000;
}

.close-btn:hover {
    background: #f0f0f0;
}

/* Stats */
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 1.1rem;
    color: #333;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #000;
}

/* How to Play */
.instructions {
    line-height: 1.8;
}

.instructions h3 {
    color: #000;
    font-weight: bold;
    margin-top: 20px;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin: 10px 0;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #e0e0e0;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 20px;
    font-size: 1.2rem;
    color: #000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-header h1 {
        font-size: 1.8rem;
    }

    .game-header p {
        font-size: 0.8rem !important;
    }

    .game-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .letter {
        width: 35px;
        height: 45px;
        font-size: 1.8rem;
    }

    .letter-space {
        width: 15px;
    }

    .key {
        min-width: 35px;
        padding: 12px 8px;
        font-size: 1rem;
    }

    .modal-content {
        padding: 25px;
    }

    .modal-header h2 {
        font-size: 2rem;
    }

    .info-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 1.3rem;
    }

    .game-header p {
        font-size: 0.7rem !important;
        padding: 0 10px;
    }

    .letter {
        width: 28px;
        height: 38px;
        font-size: 1.4rem;
        gap: 4px;
    }

    .key {
        min-width: 28px;
        padding: 10px 5px;
        font-size: 0.9rem;
    }

    .keyboard-row {
        gap: 3px;
        margin-bottom: 5px;
    }

    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}
