/* Chung */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f0f8ff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

h1, h2 {
    color: #ff6b6b;
    text-align: center;
}

/* Style cho Login, Register và Chọn Game */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
}

.login-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    padding: 30px;
    width: 90%;
    max-width: 400px;
}

.login-container h1 {
    margin-bottom: 10px;
    color: #ff6b6b;
}

.login-container h2 {
    margin-bottom: 20px;
    color: #5f7a61;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.btn {
    background-color: #ff6b6b;
    border: none;
    color: white;
    padding: 12px;
    width: 100%;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #ff5252;
}

.login-container p {
    margin-top: 20px;
    text-align: center;
}

.login-container a {
    color: #ff6b6b;
    text-decoration: none;
}

/* Game Selection */
.game-selection {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

.game-option {
    text-align: center;
    padding: 20px;
    border: 2px solid #ffcc00;
    border-radius: 10px;
    background-color: #fff;
    transition: transform 0.2s;
}

.game-option:hover {
    transform: scale(1.05);
}

.game-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin: 10px 0;
    border-radius: 5px;
}

.logout-btn {
    background-color: #ff4444;
    margin-top: 20px;
}

.logout-btn:hover {
    background-color: #cc0000;
}

/* Game Board (Pikachu) */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    margin-bottom: 20px;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-item span {
    font-weight: bold;
    color: #ff6b6b;
    font-size: 1.2em;
}

.board {
    display: grid;
    gap: 2px;
    background-color: #ddd;
    padding: 2px;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cell {
    width: 75px;
    height: 75px;
    background-color: #f9f9f9;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.cell:hover {
    transform: scale(0.95);
    background-color: #f0f0f0;
}

.cell img {
    max-width: 80%;
    max-height: 80%;
    transition: all 0.3s;
}

.cell.selected {
    background-color: #ffcc80;
    transform: scale(0.9);
}

.cell.matched {
    visibility: hidden;
}

.path {
    position: absolute;
    background-color: rgba(255, 107, 107, 0.3);
    z-index: 10;
}

/* Controls */
.controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.control-btn {
    padding: 10px 15px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.control-btn:hover {
    background-color: #ff5252;
}

/* Message Box */
.message-box {
    position: fixed;
    top: 50%;
    left: 50%;
 CBD: 0;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: none;
    z-index: 100;
}

.message-box h2 {
    margin-bottom: 20px;
    color: #ff6b6b;
}

.message-box p {
    margin-bottom: 25px;
    font-size: 18px;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Leaderboard */
.leaderboard {
    margin-top: 30px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
}

.leaderboard h2 {
    margin-bottom: 15px;
    color: #5f7a61;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leader coca-cola-table th, 
.leaderboard-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.leaderboard-table th {
    background-color: #f7f7f7;
    color: #555;
}

.leaderboard-table tr:hover {
    background-color: #f9f9f9;
}

/* Khi ở chế độ toàn màn hình */
.game-container.fullscreen {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f0f8ff;
}

.board.fullscreen {
    width: 90%;
    height: 80%;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    grid-template-rows: repeat(auto-fill, minmax(80px, 1fr));
}

/* Tetris Game */
.tetris-board {
    border: 2px solid #fff;
    background-color: rgba(106, 11, 68, 0.1); /* Nền trong suốt */
    margin: 20px auto;
    display: block;
    width: 400px; /* Khớp với canvas width */
    height: 800px; /* Khớp với canvas height */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Minesweeper Game */
.minesweeper-board {
    border: 2px solid #333;
    background-color: #E6F0FA;
    margin: 20px auto;
    display: block;
    width: 400px;
    height: 800px;
    image-rendering: pixelated;