/* General Styles */
body {
    background: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 20px;
}

header img {
    width: auto;
    height: 60px;
    margin-bottom: 10px;
}

header h1 {
    margin: 0;
    color: #ffffff;
    font-size: 2em;
}

header button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #444;
    color: #e0e0e0;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 16px;
}

header button:hover {
    background: #555;
}

/* Game Container */
#game {
    background: #1e1e1e;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    width: 50vw;
    max-width: 90vw;
    min-height: 60vh;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

/* Board Styling – using #board as our typing area */
#board {
    margin-bottom: 20px;
    font-size: 1.5em;
    line-height: 1.5;
    padding: 10px;
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-height: 40vh;
    white-space: pre-wrap;
    cursor: text;
    color: #e0e0e0;
}

#board span {
    padding: 0 1px;
}

/* Underline current letter */
#board span.current {
    border-bottom: 2px solid #ffffff;
}

/* Correct letter (green) */
#board span.correct {
    background-color: #10b981;
    color: #121212;
}

/* Incorrect letter (red) */
#board span.incorrect {
    background-color: #ef4444;
    color: #121212;
}

/* Stats Styling */
#stats {
    display: flex;
    justify-content: space-around;
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #e0e0e0;
}

/* Button Container: center buttons on same line */
.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0;
}

.button-container button {
    padding: 12px 25px;
    font-size: 16px;
    background: #444;
    color: #e0e0e0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.button-container button:hover {
    background: #555;
    transform: translateY(-2px);
}

.button-container button:active {
    transform: translateY(0);
}

#reset-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#reset-btn:disabled:hover {
    transform: none;
    background: #444;
}

/* Unused elements from original layout */
#separator, #keypad, #submit-guess, #message {
    display: none;
}

/* Pop-up Overlay Styles */
#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#popup {
    background: #1e1e1e;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#popup p {
    margin-bottom: 20px;
    font-size: 1.2em;
    white-space: pre-wrap;
    color: #e0e0e0;
}

#popup button {
    padding: 12px 25px;
    font-size: 16px;
    background: #444;
    color: #e0e0e0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

#popup button:hover {
    background: #555;
    transform: translateY(-2px);
}

#popup button:active {
    transform: translateY(0);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    #game {
        width: 100%;
        max-width: 350px;
        padding: 10px;
    }
    
    header {
        margin-bottom: 10px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    #popup {
        max-width: 90%;
    }
    
    #stats {
        font-size: 1em;
        flex-direction: column;
        gap: 10px;
    }
    
    .button-container {
        flex-direction: column;
        gap: 10px;
    }
}