body {
    font-family: 'Inter', sans-serif;
    background-color: #111827;
    color: #E5E7EB;
}
.game-card {
    background: linear-gradient(145deg, #1F2937, #374151);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,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.7);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #1F2937;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    text-align: center;
    max-width: 90%;
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* Custom styles for the game */
.game-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}
#guessInput, #mathAnswerInput, #hangmanInput {
    color: #1F2937;	
    text-align: center;
}
#clickButton {
    width: 200px;
    height: 200px;
    font-size: 2.5rem;
    border-radius: 50%;
    background-color: #6D28D9;
    transition: transform 0.1s ease-in-out;
}
#clickButton:active {
    transform: scale(0.95);
}
/* Sudoku game specific styles */
#sudoku-board {
    border-collapse: collapse;
}
#sudoku-board td {
    width: 40px;
    height: 40px;
    border: 1px solid #4B5563;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #D1D5DB;
    transition: background-color 0.2s;
}
#sudoku-board td.selected {
    background-color: #4B5563;
}
#sudoku-board td.highlighted {
    background-color: #6B7280;
}
#sudoku-board td.fixed {
    background-color: #1F2937;
    color: #9CA3AF;
}
#sudoku-board td.error {
    background-color: #EF4444;
    color: #FFFFFF;
}
#sudoku-board tr:nth-child(3n) td,
#sudoku-board tr:nth-child(6n) td {
    border-bottom: 3px solid #6B7280;
}
#sudoku-board tr td:nth-child(3n),
#sudoku-board tr td:nth-child(6n) {
    border-right: 3px solid #6B7280;
}
@media (max-width: 640px) {
    #sudoku-board td {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
}
/* Matching Game Styles */
#matching-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 400px;
}
.card {
    width: 80px;
    height: 80px;
    background-color: #4B5563;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    border-radius: 0.5rem;
    transition: transform 0.3s ease-in-out, background-color 0.3s;
    transform-style: preserve-3d;
    position: relative;
}
.card.flipped {
    transform: rotateY(180deg);
}
.card .front, .card .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: inherit;
    display: flex;
    justify-content: center;
    align-items: center;
}
.card .front {
    background-color: #6B7280;
}
.card .back {
    background-color: #3B82F6;
    transform: rotateY(180deg);
}
/* Maze Game Styles */
#mazeCanvas {
    border: 2px solid #3B82F6;
    background-color: #1F2937;
    touch-action: none; /* Prevents default touch behavior */
}
/* Sorting Game Styles */
#sorting-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 400px;
}
.sorting-number {
    width: 80px;
    height: 80px;
    background-color: #60A5FA;
    color: #111827;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
}
.sorting-number:active {
    cursor: grabbing;
}
/* Word Search Styles */
#word-search-grid {
    display: grid;
    border: 2px solid #4B5563;
}
#word-search-grid span {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    border: 1px solid #374151;
    cursor: pointer;
}
.found {
    background-color: #34D399;
    color: #111827;
}
.highlighted-letter {
    background-color: #93C5FD;
}
/* Hangman Styles */
#hangman-display {
    font-size: 3rem;
    letter-spacing: 0.5rem;
    color: #60A5FA;
}
#guessed-letters {
    font-size: 1.2rem;
    color: #9CA3AF;
}
#hangman-drawing {
    width: 150px;
    height: 200px;
}