body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* The TETRIS text styling */
.tetris-text {
    font-size: 64px;
    font-weight: bold;
    display: flex;
    gap: 8px;
}

/* Individual letters */
.letter {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border: 3px solid;
    animation: glow 2s infinite alternate;
}

/* Tetris piece colors for each letter */
.letter:nth-child(1) { color: #ff0000; border-color: #ff0000; } /* T - Red */
.letter:nth-child(2) { color: #00ff00; border-color: #00ff00; } /* E - Green */
.letter:nth-child(3) { color: #0000ff; border-color: #0000ff; } /* T - Blue */
.letter:nth-child(4) { color: #ffff00; border-color: #ffff00; } /* R - Yellow */
.letter:nth-child(5) { color: #00ffff; border-color: #00ffff; } /* I - Cyan */
.letter:nth-child(6) { color: #ff00ff; border-color: #ff00ff; } /* S - Magenta */

/* Decorative tetromino shapes above the text */
.tetromino-row {
    display: flex;
    gap: 10px;
}

.block {
    width: 20px;
    height: 20px;
    border: 2px solid;
}

/* Different tetromino shapes */
.shape-i { color: #00ffff; border-color: #00ffff; }
.shape-t { color: #ff00ff; border-color: #ff00ff; }
.shape-l { color: #ff8000; border-color: #ff8000; }
.shape-z { color: #ff0000; border-color: #ff0000; }

/* Glowing animation for the letters */
@keyframes glow {
    from {
        text-shadow: 0 0 5px currentColor,
                   0 0 10px currentColor,
                   0 0 15px currentColor;
        box-shadow: 0 0 5px currentColor;
    }
    to {
        text-shadow: 0 0 10px currentColor,
                   0 0 20px currentColor,
                   0 0 30px currentColor;
        box-shadow: 0 0 10px currentColor;
    }
}

/* Subtitle styling */
.subtitle {
    color: white;
    font-size: 24px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.timer-container {
    margin-bottom: 0;
    background: linear-gradient(145deg, #2a2a2a, #222);
    padding: 15px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#timer {
    font-size: 2em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
}

#timer span {
    display: inline-block;
    padding: 0 5px;
    min-width: 40px;
    animation: glow 2s infinite;
}
.tetris-container {
    display: flex;
    gap: 20px;
    align-items: stretch;
    padding: 20px;
    background: #222;
    border: 2px solid #555;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#tetris-board {
    width: 300px;
    height: 600px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(20, 1fr);
    background-color: #111;
    border: 2px solid #555;
    gap: 1px;
}

#tetris-next {
    align-self: center;
    width: 120px;
    height: 120px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    background: linear-gradient(145deg, #222, #1a1a1a);
    border-radius: 12px;
    padding: 3px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.info-panel {
    display: flex;
    flex-direction: column;
    width: 200px;
    height: 600px;
    background: linear-gradient(145deg, #2a2a2a, #222);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: space-between;
}

.scoreboard {
    background: linear-gradient(to bottom right, #333, #222);
    border-radius: 12px;
    padding: 10px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.scoreboard h2 {
    margin: 5px 0;
    font-size: 1.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: transform 0.2s;
}

#lives {
    display: flex;
    gap: 5px;
    filter: drop-shadow(0 0 2px rgba(255, 0, 0, 0.5));
}

.controls {
    background: linear-gradient(145deg, #333, #222);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 1;
    overflow-y: auto;
}

.controls h3 {
    color: #fff;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 2px;
}

.controls p {
    margin: 5px 0;
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

button {
    background: linear-gradient(145deg, #444, #333);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: auto;
    flex-shrink: 0;
}

button:hover {
    background: linear-gradient(145deg, #555, #444);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.info-panel h3 {
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 2px;
    margin: 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cell {
    width: 100%;
    height: 100%;
    background-color: #000;
    border: 1px solid #333;
    box-sizing: border-box;
}

.cellnext {
    width: 100%;
    height: 100%;
    border: 1px solid #333;
    box-sizing: border-box;
}

/* Tetromino colors */
.cell.cyan {
    background-color: cyan;
}

.cell.blue {
    background-color: blue;
}

.cell.orange {
    background-color: orange;
}

.cell.yellow {
    background-color: yellow;
}

.cell.green {
    background-color: green;
}

.cell.purple {
    background-color: purple;
}

.cell.red {
    background-color: red;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    /* backdrop-filter: blur(5px); */
}

.modal-content {
    background: linear-gradient(145deg, #2a2a2a, #222);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    width : 550px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-content h2 {
    margin: 0 0 1.5rem 0;
    text-transform: uppercase;
    font-size: 1.5em;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: glow 2s infinite;
}
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.menu-buttons button {
    background: linear-gradient(145deg, #444, #333);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 0;
}

.menu-buttons button:hover {
    background: linear-gradient(145deg, #555, #444);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.menu-buttons button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hidden {
    display: none;
}

/* Add to tetris.css */
#scores .modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

#scores table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

#scores th,
#scores td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#scores th {
    background: linear-gradient(145deg, #444, #333);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

#scores tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

#scores tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Pagination specific to scores modal */
#scores .pages {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#scores #pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-grow: 1;
}

#scores #pagination button {
    min-width: 32px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#scores #pagination button:hover {
    background: rgba(255, 255, 255, 0.2);
}

#scores #previous,
#scores #next {
    background: linear-gradient(145deg, #444, #333);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
}

#scores #previous:hover,
#scores #next:hover {
    background: linear-gradient(145deg, #555, #444);
}

@keyframes glow {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
    100% { filter: brightness(1); }
}

.scoreboard span {
    animation: glow 2s infinite;
    font-weight: bold;
}