/* Reset and base styles */
.hangman-container {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.game-section {
    width: 100%;
    margin-bottom: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* Top game controls bar */
.game-controls-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.primary-controls {
    display: flex;
    gap: 10px;
}

/* Hangman figure */
.hangman-figure {
    width: 100%;
    height: 300px; /* Increased height for better visibility */
    margin-bottom: 20px;
    border: 1px dashed #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

@media (max-width: 480px) {
    .hangman-figure {
        height: 250px; /* Slightly smaller on mobile */
    }
}
/* Game status notification */
.game-status {
    text-align: center;
    font-size: 20px;
    margin: 15px 0;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    display: none;
}

.win {
    background-color: #d4edda;
    color: #155724;
}

.lose {
    background-color: #f8d7da;
    color: #721c24;
}

/* Word display */
.word-display {
    display: flex;
    justify-content: center;
    margin: 25px 0;
    gap: 8px;
}

.letter-box {
    width: 40px;
    height: 50px;
    border-bottom: 3px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Keyboard container */
.keyboard-container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    user-select: none;
    padding: 10px 5px;
}

/* Keyboard rows */
.keyboard-row {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    width: 100%;
}

/* Indent middle row (ASDFGHJKL) slightly */
.keyboard-row-indent {
    padding-left: 20px;
}

/* Add extra space to balance last row */
.keyboard-row-last {
    padding-left: 50px;
    padding-right: 50px;
}

/* Individual keys */
.key {
    flex: 1;
    min-width: 40px;
    height: 55px;
    margin: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e8f4fc;
    border: 1px solid #3498db;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 #bde0f5;
    touch-action: manipulation;
}

    .key:hover {
        background-color: #d0e7f7;
    }

    .key:active, .key.key-pressed {
        background-color: #3498db;
        color: white;
        transform: translateY(3px);
        box-shadow: 0 1px 0 #bde0f5;
    }

    .key.correct {
        background-color: #2ecc71;
        color: white;
        box-shadow: 0 4px 0 #27ae60;
    }

    .key.incorrect {
        background-color: #e74c3c;
        color: white;
        box-shadow: 0 4px 0 #c0392b;
    }

/* Media queries for responsive design */
@media (max-width: 600px) {
    .keyboard-container {
        max-width: 100%;
        padding: 5px 2px;
    }

    .key {
        min-width: 8%;
        height: 50px;
        margin: 3px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .key {
        min-width: 8%;
        height: 45px;
        margin: 2px;
        font-size: 16px;
    }

    .keyboard-row-indent {
        padding-left: 15px;
    }

    .keyboard-row-last {
        padding-left: 25px;
        padding-right: 25px;
    }
}

/* For very small screens */
@media (max-width: 360px) {
    .key {
        min-width: 7%;
        height: 40px;
        margin: 1px;
        font-size: 14px;
    }
}/* Buttons */
.btn {
    padding: 10px 15px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

    .btn-primary:hover {
        background-color: #2980b9;
    }

.btn-secondary {
    background-color: #e8f4fc;
    color: #3498db;
    border: 1px solid #3498db;
}

    .btn-secondary:hover {
        background-color: #d0e7f7;
    }

/* Icon button (gear) */
.icon-button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f7fa;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

    .icon-button:hover {
        background-color: #e8f4fc;
    }

    .icon-button svg {
        width: 20px;
        height: 20px;
    }

/* Settings and Custom Word panels */
.settings-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-top: 20px;
    display: none;
}

    .settings-container.visible {
        display: block;
    }

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

    .panel-header h3 {
        font-size: 1.4rem;
        color: #2c3e50;
        margin: 0;
    }

/* Tabs for settings */
.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-button {
    padding: 8px 15px;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: #666;
}

    .tab-button.active {
        color: #3498db;
        border-bottom-color: #3498db;
    }

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

/* Setting groups */
.setting-group {
    margin-bottom: 20px;
}

    .setting-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #444;
    }

select, input[type="text"] {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 100%;
    max-width: 300px;
    font-size: 16px;
}

    select:focus, input:focus {
        outline: none;
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    }

/* Shareable link */
.shareable-link {
    margin-top: 20px;
    padding: 15px;
    background-color: #e8f4fc;
    border-radius: 6px;
}

    .shareable-link input {
        width: 100%;
        padding: 10px;
        margin: 10px 0;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

/* Instructions and content */
.game-instructions {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 30px;
}

    .game-instructions h2 {
        margin-top: 0;
        color: #2c3e50;
    }

    .game-instructions ol {
        padding-left: 20px;
    }

    .game-instructions li {
        margin-bottom: 8px;
    }
