* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, #2c1810 0%, #3d2817 25%, #4a3520 50%, #5c4a35 75%, #6b5842 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 69, 19, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(160, 82, 45, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(205, 133, 63, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(90deg, rgba(101, 67, 33, 0.03) 0px, transparent 1px, transparent 40px, rgba(101, 67, 33, 0.03) 41px),
        repeating-linear-gradient(0deg, rgba(101, 67, 33, 0.03) 0px, transparent 1px, transparent 40px, rgba(101, 67, 33, 0.03) 41px);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.main-menu {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 60px 80px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.8), 
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    animation: fadeIn 0.8s ease;
    margin: 20px auto;
    position: relative;
    z-index: 1;
}

.main-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(90deg, rgba(101, 67, 33, 0.1) 0px, transparent 2px, transparent 8px, rgba(101, 67, 33, 0.1) 10px);
    border-radius: 25px;
    pointer-events: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.game-title h1 {
    font-size: 4.5rem;
    font-weight: 900;
    color: #f4e4c1;
    text-shadow: 
        3px 3px 0 #8b4513,
        6px 6px 0 #654321,
        9px 9px 20px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(244, 228, 193, 0.5);
    margin-bottom: 50px;
    letter-spacing: 12px;
    position: relative;
    font-family: 'Georgia', serif;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.menu-btn {
    padding: 20px 55px;
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(145deg, #d4a574, #b8935f, #a67c52);
    color: #2c1810;
    border: 4px solid #654321;
    border-top-color: #8b6f47;
    border-left-color: #8b6f47;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.6),
        inset 0 2px 0 rgba(244, 228, 193, 0.5),
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 0 rgba(244, 228, 193, 0.5);
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.menu-btn:hover::before {
    width: 300px;
    height: 300px;
}

.menu-btn:hover {
    background: linear-gradient(145deg, #e6b887, #d4a574, #c09560);
    border-color: #8b6f47;
    transform: translateY(-5px);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.7),
        inset 0 2px 0 rgba(244, 228, 193, 0.6),
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
}

.menu-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.game-selection {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 45px 55px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideIn 0.6s ease;
    margin: 20px auto;
    position: relative;
    z-index: 1;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.game-selection::-webkit-scrollbar {
    width: 8px;
}

.game-selection::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.game-selection::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, 0.6);
    border-radius: 10px;
}

.game-selection::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 139, 250, 0.8);
}

.games-grid {
    display: flex;
    flex-direction: column;
    gap: 35px;
    margin-bottom: 35px;
}

.game-category {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.game-category:nth-child(1) { animation-delay: 0.1s; }
.game-category:nth-child(2) { animation-delay: 0.2s; }
.game-category:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
    from { opacity: 0; transform: translateY(20px); }
}

.game-category h2 {
    color: #f4e4c1;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 18px;
    text-shadow: 2px 2px 0 #654321, 4px 4px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: 3px;
    font-family: 'Georgia', serif;
}

.games-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.game-btn {
    padding: 18px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(145deg, #c09560, #a67c52, #8b6f47);
    color: #2c1810;
    border: 3px solid #654321;
    border-top-color: #8b6f47;
    border-left-color: #8b6f47;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(212, 165, 116, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 0 rgba(244, 228, 193, 0.4);
}

.game-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
}

.game-btn:hover::after {
    left: 100%;
}

.game-btn:hover {
    background: linear-gradient(145deg, #d4a574, #b8935f, #9d7e4f);
    border-color: #8b6f47;
    transform: translateY(-5px);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(212, 165, 116, 0.6),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.back-btn {
    padding: 15px 40px;
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(145deg, #a0522d, #8b4513, #6b3410);
    color: #f4e4c1;
    border: 3px solid #4a2511;
    border-top-color: #6b3410;
    border-left-color: #6b3410;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4);
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.back-btn:hover {
    background: linear-gradient(145deg, #b8632f, #a0522d, #8b4513);
    border-color: #6b3410;
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(205, 133, 63, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4);
    z-index: 11;
}

.back-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.tictactoe-setup {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    border-radius: 25px;
    padding: 50px 60px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    animation: fadeIn 0.6s ease;
    margin: 20px auto;
}

.setup-content {
    margin-bottom: 40px;
}

.setup-section {
    margin-bottom: 35px;
}

.setup-section h2 {
    color: #f4e4c1;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #654321, 4px 4px 10px rgba(0, 0, 0, 0.8);
    font-family: 'Georgia', serif;
}

.mode-buttons, .difficulty-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.setup-btn {
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(145deg, #d4a574, #b8935f, #a67c52);
    color: #2c1810;
    border: 4px solid #654321;
    border-top-color: #8b6f47;
    border-left-color: #8b6f47;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 6px 18px rgba(0, 0, 0, 0.6),
        inset 0 2px 0 rgba(244, 228, 193, 0.5),
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 0 rgba(244, 228, 193, 0.5);
}

.setup-btn:hover {
    background: linear-gradient(145deg, #e6b887, #d4a574, #c09560);
    transform: translateY(-4px);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.7),
        inset 0 2px 0 rgba(244, 228, 193, 0.6),
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
}

.setup-btn.easy { 
    background: linear-gradient(145deg, #90c695, #6fa876, #5a8a5f);
    border-color: #3d5a3f;
    border-top-color: #5a8a5f;
    border-left-color: #5a8a5f;
}
.setup-btn.medium { 
    background: linear-gradient(145deg, #e6b84d, #d4a03a, #b88a2f);
    border-color: #8b6914;
    border-top-color: #b88a2f;
    border-left-color: #b88a2f;
}
.setup-btn.hard { 
    background: linear-gradient(145deg, #c96a6a, #b85555, #a04040);
    border-color: #7a2828;
    border-top-color: #a04040;
    border-left-color: #a04040;
}

.setup-btn.easy:hover { 
    background: linear-gradient(145deg, #a5d6aa, #90c695, #7ab080);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), inset 0 2px 0 rgba(200, 230, 200, 0.5);
}
.setup-btn.medium:hover { 
    background: linear-gradient(145deg, #f4c960, #e6b84d, #d4a03a);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), inset 0 2px 0 rgba(255, 235, 150, 0.5);
}
.setup-btn.hard:hover { 
    background: linear-gradient(145deg, #d97d7d, #c96a6a, #b85555);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), inset 0 2px 0 rgba(230, 150, 150, 0.5);
}

.tictactoe-game {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    border-radius: 25px;
    padding: 40px 50px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    animation: fadeIn 0.6s ease;
    margin: 20px auto;
}

.game-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #f4e4c1;
    text-shadow: 2px 2px 0 #8b4513, 4px 4px 0 #654321, 6px 6px 15px rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
    font-family: 'Georgia', serif;
    letter-spacing: 3px;
}

.game-info {
    margin-bottom: 30px;
}

.game-info p {
    color: #f4e4c1;
    font-size: 1.2rem;
    margin: 5px 0;
    text-shadow: 1px 1px 0 #654321, 2px 2px 8px rgba(0, 0, 0, 0.8);
    font-family: 'Georgia', serif;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 120px);
    grid-template-rows: repeat(3, 120px);
    gap: 10px;
    margin: 0 auto 30px;
    width: fit-content;
}

.cell {
    background: linear-gradient(145deg, #f5e6d3, #e8d4b0, #d4c4a8);
    border: 4px solid #8b6f47;
    border-top-color: #a67c52;
    border-left-color: #a67c52;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: #2c1810;
    transition: all 0.3s ease;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 245, 230, 0.6),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.cell:hover:not(.taken) {
    background: linear-gradient(145deg, #fff5e6, #f5e6d3, #e8d4b0);
    border-color: #a67c52;
    transform: scale(1.05);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.6),
        inset 0 2px 0 rgba(255, 250, 240, 0.8),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.cell.taken {
    cursor: not-allowed;
}

.cell.x {
    color: #c92a2a;
    text-shadow: 2px 2px 0 #7a1a1a, 4px 4px 8px rgba(0, 0, 0, 0.6);
}

.cell.o {
    color: #1e40af;
    text-shadow: 2px 2px 0 #0f2557, 4px 4px 8px rgba(0, 0, 0, 0.6);
}

.cell.winner {
    background: linear-gradient(145deg, #ffd700, #f4c430, #daa520);
    border-color: #b8860b;
    animation: pulse 0.5s ease infinite;
    box-shadow: 
        0 8px 25px rgba(218, 165, 32, 0.8),
        inset 0 2px 0 rgba(255, 250, 205, 0.8),
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.control-btn {
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(145deg, #90c695, #6fa876, #5a8a5f);
    color: #1a3a1a;
    border: 3px solid #3d5a3f;
    border-top-color: #5a8a5f;
    border-left-color: #5a8a5f;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    box-shadow: 
        0 6px 18px rgba(0, 0, 0, 0.6),
        inset 0 2px 0 rgba(200, 230, 200, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 0 rgba(200, 230, 200, 0.5);
}

.control-btn:hover {
    background: linear-gradient(145deg, #a5d6aa, #90c695, #7ab080);
    transform: translateY(-3px);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.7),
        inset 0 2px 0 rgba(200, 230, 200, 0.6),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    z-index: 11;
}

.chess-setup {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    border-radius: 25px;
    padding: 50px 60px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    animation: fadeIn 0.6s ease;
    margin: 20px auto;
}

.side-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.chess-game {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    border-radius: 25px;
    padding: 40px 50px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    animation: fadeIn 0.6s ease;
    position: relative;
    z-index: 1;
    margin: 20px auto;
    max-width: 95vw;
}

.chess-board {
    display: grid;
    grid-template-columns: repeat(8, 70px);
    grid-template-rows: repeat(8, 70px);
    gap: 0;
    margin: 0 auto 30px;
    width: fit-content;
    border: 6px solid rgba(139, 92, 246, 0.6);
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(139, 92, 246, 0.3);
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: transform 0.6s ease;
}

.chess-board.rotated {
    transform: rotate(180deg);
}

.chess-board.rotated .chess-piece {
    transform: rotate(180deg);
}

.chess-square {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.chess-square.light {
    background: linear-gradient(135deg, #f0d9b5 0%, #e8d4b0 100%);
}

.chess-square.dark {
    background: linear-gradient(135deg, #b58863 0%, #a67c52 100%);
}

.chess-square:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
    z-index: 10;
}

.chess-square.selected {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.6), rgba(22, 163, 74, 0.6)) !important;
    box-shadow: inset 0 0 20px rgba(34, 197, 94, 0.8);
}

.chess-square.valid-move {
    position: relative;
}

.chess-square.valid-move::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(34, 197, 94, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

.chess-square.valid-move.has-piece::after {
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: rgba(239, 68, 68, 0.4);
    border: 3px solid rgba(239, 68, 68, 0.8);
}

.chess-piece {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s ease;
}

.chess-piece.moving {
    animation: chessMove 0.4s ease;
    z-index: 100;
}

@keyframes chessMove {
    0% { transform: scale(1); }
    50% { transform: scale(1.3) translateY(-10px); }
    100% { transform: scale(1); }
}

.chess-square:hover .chess-piece {
    transform: scale(1.1);
}

.chess-square.in-check {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.7), rgba(220, 38, 38, 0.7)) !important;
    animation: checkPulse 1s ease infinite;
}

@keyframes checkPulse {
    0%, 100% { box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.8); }
    50% { box-shadow: inset 0 0 40px rgba(239, 68, 68, 1); }
}

.checkers-setup {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    border-radius: 25px;
    padding: 50px 60px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    animation: fadeIn 0.6s ease;
    margin: 20px auto;
}

.checkers-game {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    border-radius: 25px;
    padding: 40px 50px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    animation: fadeIn 0.6s ease;
    position: relative;
    z-index: 1;
    margin: 20px auto;
    max-width: 95vw;
}

.checkers-board {
    display: grid;
    grid-template-columns: repeat(8, 70px);
    grid-template-rows: repeat(8, 70px);
    gap: 0;
    margin: 0 auto 30px;
    width: fit-content;
    border: 5px solid rgba(239, 68, 68, 0.5);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: transform 0.6s ease;
}

.checkers-board.rotated {
    transform: rotate(180deg);
}

.checkers-board.rotated .checker-piece {
    transform: rotate(180deg);
}

.checkers-square {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.checkers-square.light {
    background: linear-gradient(135deg, #f5deb3 0%, #f0d9a8 100%);
}

.checkers-square.dark {
    background: linear-gradient(135deg, #8b4513 0%, #6b3410 100%);
}

.checkers-square:hover.playable {
    filter: brightness(1.3);
    transform: scale(1.05);
    z-index: 10;
}

.checkers-square.selected {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.7), rgba(22, 163, 74, 0.7)) !important;
    box-shadow: inset 0 0 25px rgba(34, 197, 94, 0.9);
    animation: selectPulse 1s ease infinite;
}

@keyframes selectPulse {
    0%, 100% { box-shadow: inset 0 0 25px rgba(34, 197, 94, 0.9); }
    50% { box-shadow: inset 0 0 35px rgba(34, 197, 94, 1); }
}

.checkers-square.valid-move {
    position: relative;
}

.checkers-square.valid-move::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    background: rgba(34, 197, 94, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.9);
    animation: movePulse 1s ease infinite;
}

@keyframes movePulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

.checker-piece {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5), inset 0 -3px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.checker-piece.red {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c92a2a);
    border: 3px solid #a61e1e;
}

.checker-piece.black {
    background: radial-gradient(circle at 30% 30%, #495057, #212529);
    border: 3px solid #000;
}

.checker-piece.king {
    font-size: 2.5rem;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.6), inset 0 -3px 8px rgba(0, 0, 0, 0.3);
}

.checker-piece.king::before {
    content: '👑';
}

.checkers-square:hover .checker-piece {
    transform: scale(1.1);
}

.checker-piece.selected {
    transform: scale(1.15);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.8), inset 0 -3px 8px rgba(0, 0, 0, 0.3);
}

.snakes-setup, .sudoku-setup, .connect4-setup, .scrabble-setup, .battleship-setup, .goose-setup, .monopoly-setup, .darts-setup, .memory-setup, .trivia-setup {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    border-radius: 25px;
    padding: 50px 60px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    animation: fadeIn 0.6s ease;
    margin: 20px auto;
}

.player-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.snakes-game, .sudoku-game, .connect4-game, .scrabble-game, .battleship-placement, .battleship-game, .goose-game, .monopoly-game, .darts-game, .memory-game, .trivia-game {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    border-radius: 25px;
    padding: 40px 50px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    animation: fadeIn 0.6s ease;
    margin: 20px auto;
    max-width: 95vw;
}

.dice-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.dice {
    width: 110px;
    height: 110px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0, #e0e0e0);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 255, 255, 0.3),
        inset 0 -6px 12px rgba(0, 0, 0, 0.15),
        inset 0 6px 12px rgba(255, 255, 255, 0.9);
    border: 4px solid rgba(255, 255, 255, 0.6);
    position: relative;
    transition: all 0.3s ease;
}

.dice::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: linear-gradient(145deg, rgba(255,255,255,0.5), transparent);
    border-radius: 10px;
    pointer-events: none;
}

.dice:hover {
    transform: scale(1.1);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 255, 255, 0.4),
        inset 0 -6px 12px rgba(0, 0, 0, 0.15),
        inset 0 6px 12px rgba(255, 255, 255, 0.9);
}

@keyframes diceSpin {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.dice.rolling {
    animation: diceRoll 0.5s ease-in-out;
}

@keyframes diceRoll {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(0) rotate(180deg); }
    75% { transform: translateY(-20px) rotate(270deg); }
}

.dice-btn {
    padding: 15px 40px;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(37, 99, 235, 0.4));
    color: #fff;
    border: 3px solid rgba(59, 130, 246, 0.6);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.dice-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.6), rgba(37, 99, 235, 0.6));
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
}

.dice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.players-status {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.player-card {
    background: linear-gradient(145deg, #d4a574, #b8935f, #a67c52);
    border: 3px solid #654321;
    border-top-color: #8b6f47;
    border-left-color: #8b6f47;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(244, 228, 193, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.player-card.active {
    background: linear-gradient(145deg, #ffd700, #f4c430, #daa520);
    border-color: #b8860b;
    border-top-color: #daa520;
    border-left-color: #daa520;
    box-shadow: 
        0 8px 25px rgba(218, 165, 32, 0.8),
        inset 0 2px 0 rgba(255, 250, 205, 0.6),
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.player-icon {
    font-size: 2.5rem;
}

.player-info {
    text-align: left;
}

.player-name {
    color: #2c1810;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 0 rgba(244, 228, 193, 0.5);
}

.player-pos {
    color: #4a3520;
    font-size: 0.9rem;
    font-family: 'Georgia', serif;
}

.snakes-board {
    display: grid;
    grid-template-columns: repeat(10, 60px);
    grid-template-rows: repeat(10, 60px);
    gap: 2px;
    margin: 0 auto 30px;
    width: fit-content;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.snake-cell {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.snake-cell:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.snake-cell.finish {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(22, 163, 74, 0.4));
    border-color: rgba(34, 197, 94, 0.8);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
}

.snake-cell.has-snake {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
}

.snake-cell.has-ladder {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.3));
}

.cell-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    position: absolute;
    top: 3px;
    left: 5px;
}

.snake-icon, .ladder-icon {
    font-size: 2rem;
    position: absolute;
}

.players-on-cell {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
    position: absolute;
    bottom: 5px;
}

.player-token {
    font-size: 1.2rem;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}



.sudoku-setup .setup-btn {
    min-width: 150px;
}

.sudoku-setup .setup-btn small {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 5px;
}

.sudoku-setup .setup-btn.expert {
    border-color: rgba(139, 92, 246, 0.6);
}

.sudoku-setup .setup-btn.expert:hover {
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}



.sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, 50px);
    grid-template-rows: repeat(9, 50px);
    gap: 0;
    margin: 30px auto;
    width: fit-content;
    background: #fff;
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.sudoku-cell {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #3b82f6;
}

.sudoku-cell.alt-box {
    background: #f3f4f6;
}

.sudoku-cell:hover {
    background: #e0f2fe;
}

.sudoku-cell.given {
    color: #1f2937;
    font-weight: 900;
    cursor: not-allowed;
    background: #e5e7eb;
}

.sudoku-cell.given:hover {
    background: #e5e7eb;
}

.sudoku-cell.selected {
    background: #3b82f6 !important;
    color: #fff !important;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.sudoku-cell.highlight {
    background: #dbeafe !important;
}

.sudoku-cell.wrong {
    color: #ef4444;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.sudoku-controls {
    margin: 30px 0 20px;
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    max-width: 500px;
    margin: 0 auto 20px;
}

.num-btn {
    padding: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.3));
    color: #fff;
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.num-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(37, 99, 235, 0.5));
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.num-btn.erase {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
    border-color: rgba(239, 68, 68, 0.5);
}

.num-btn.erase:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.5), rgba(220, 38, 38, 0.5));
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
}





.connect4-board-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.connect4-board {
    display: flex;
    gap: 10px;
    background: linear-gradient(135deg, #1e40af, #2563eb, #3b82f6);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(59, 130, 246, 0.3);
    border: 3px solid rgba(59, 130, 246, 0.5);
}

.connect4-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.connect4-column:hover {
    transform: translateY(-5px);
}

.connect4-cell {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.3);
}

.connect4-piece {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 -3px 6px rgba(0, 0, 0, 0.3);
}

.connect4-piece.dropping {
    animation: dropPiece 0.3s ease;
}

@keyframes dropPiece {
    0% { transform: translateY(-300px); }
    100% { transform: translateY(0); }
}

.connect4-piece.red {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c92a2a);
    border: 3px solid #a61e1e;
}

.connect4-piece.yellow {
    background: radial-gradient(circle at 30% 30%, #ffd93d, #f59e0b);
    border: 3px solid #d97706;
}





.scrabble-board {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(139, 92, 246, 0.5);
    border-radius: 20px;
    padding: 30px;
    margin: 30px auto;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: inset 0 5px 20px rgba(0, 0, 0, 0.3);
}

.scrabble-board::-webkit-scrollbar {
    width: 8px;
}

.scrabble-board::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.scrabble-board::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.6);
    border-radius: 10px;
}

.board-empty {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    font-style: italic;
    padding: 100px 20px;
}

.placed-word {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(22, 163, 74, 0.3));
    border: 2px solid rgba(34, 197, 94, 0.6);
    border-radius: 15px;
    padding: 15px 25px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInWord 0.5s ease;
    transition: all 0.3s ease;
}

.placed-word:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
}

@keyframes slideInWord {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.word-text {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.word-score {
    color: #fbbf24;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.word-player {
    background: rgba(59, 130, 246, 0.5);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

.scrabble-rack-container {
    margin: 30px 0;
}

.scrabble-rack-container h3 {
    color: #f4e4c1;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 #654321, 4px 4px 10px rgba(0, 0, 0, 0.8);
    font-family: 'Georgia', serif;
}

.scrabble-rack {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px;
    background: rgba(139, 92, 246, 0.2);
    border: 3px solid rgba(139, 92, 246, 0.5);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.scrabble-tile {
    width: 75px;
    height: 75px;
    background: linear-gradient(145deg, #f5e6d3, #ead5b8, #e8d4b0);
    border: 4px solid #8b6f47;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 
                0 0 15px rgba(139, 111, 71, 0.3),
                inset 0 3px 8px rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: tileAppear 0.5s ease;
}

@keyframes tileAppear {
    from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.scrabble-tile:hover {
    transform: translateY(-12px) rotate(5deg) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(139, 111, 71, 0.5);
}

.tile-letter {
    font-size: 2rem;
    font-weight: 900;
    color: #1f2937;
}

.tile-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b7280;
    position: absolute;
    bottom: 5px;
    right: 8px;
}

.scrabble-word-input {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.scrabble-word-input input {
    padding: 15px 25px;
    font-size: 1.3rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 2px;
    width: 300px;
    transition: all 0.3s ease;
}

.scrabble-word-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.scrabble-word-input input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    transform: scale(1.05);
}







.battleship-boards-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.board-section {
    text-align: center;
}

.board-section h3 {
    color: #f4e4c1;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 #654321, 4px 4px 10px rgba(0, 0, 0, 0.8);
    font-family: 'Georgia', serif;
}

.battleship-board {
    display: grid;
    grid-template-columns: repeat(10, 40px);
    grid-template-rows: repeat(10, 40px);
    gap: 2px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
}

.battleship-cell {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.3));
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
}

.battleship-cell:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(37, 99, 235, 0.5));
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.5);
}

.battleship-cell.ship {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.5), rgba(75, 85, 99, 0.5));
    border-color: rgba(156, 163, 175, 0.8);
}

.battleship-cell.highlight-valid {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.5), rgba(22, 163, 74, 0.5));
    border-color: rgba(34, 197, 94, 0.8);
    animation: pulse 0.5s ease infinite;
}

.battleship-cell.highlight-invalid {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.5), rgba(220, 38, 38, 0.5));
    border-color: rgba(239, 68, 68, 0.8);
}

.battleship-cell.miss {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.4), rgba(107, 114, 128, 0.4));
    color: #9ca3af;
    cursor: not-allowed;
}

.battleship-cell.hit {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.6), rgba(220, 38, 38, 0.6));
    border-color: rgba(239, 68, 68, 0.9);
    animation: hitExplosion 0.5s ease;
    cursor: not-allowed;
}

@keyframes hitExplosion {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}





.goose-board {
    display: grid;
    grid-template-columns: repeat(9, 60px);
    gap: 3px;
    margin: 30px auto;
    width: fit-content;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.goose-cell {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.goose-cell:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.goose-cell.finish {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.5), rgba(245, 158, 11, 0.5));
    border-color: rgba(251, 191, 36, 0.9);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.7);
    animation: pulse 1.5s ease infinite;
}

.goose-cell.goose {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(22, 163, 74, 0.3));
    border-color: rgba(34, 197, 94, 0.6);
}

.goose-cell.bridge {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.3));
    border-color: rgba(59, 130, 246, 0.6);
}

.goose-cell.inn {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(147, 51, 234, 0.3));
    border-color: rgba(168, 85, 247, 0.6);
}

.goose-cell.well {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(2, 132, 199, 0.3));
    border-color: rgba(14, 165, 233, 0.6);
}

.goose-cell.maze {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.3), rgba(249, 115, 22, 0.3));
    border-color: rgba(251, 146, 60, 0.6);
}

.goose-cell.prison {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.3), rgba(75, 85, 99, 0.3));
    border-color: rgba(107, 114, 128, 0.6);
}

.goose-cell.death {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.4), rgba(220, 38, 38, 0.4));
    border-color: rgba(239, 68, 68, 0.8);
}

.goose-cell .cell-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    position: absolute;
    top: 3px;
    left: 5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.goose-cell .special-icon {
    font-size: 1.8rem;
    position: absolute;
}

.goose-cell .players-on-cell {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
    position: absolute;
    bottom: 3px;
}

.goose-cell .player-token {
    font-size: 1rem;
    animation: bounce 0.5s ease;
}





.monopoly-board {
    display: grid;
    grid-template-columns: repeat(4, 140px);
    grid-template-rows: repeat(3, 100px);
    gap: 5px;
    margin: 30px auto;
    width: fit-content;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.monopoly-cell {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.monopoly-cell:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.monopoly-cell.go {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(22, 163, 74, 0.4));
    border-color: rgba(34, 197, 94, 0.8);
    font-weight: 900;
}

.monopoly-cell.jail {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.4), rgba(75, 85, 99, 0.4));
    border-color: rgba(107, 114, 128, 0.8);
}

.monopoly-cell.property.brown {
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.3), rgba(92, 40, 11, 0.3));
}

.monopoly-cell.property.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.3));
}

.monopoly-cell.property.pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(219, 39, 119, 0.3));
}

.monopoly-cell.property.orange {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.3), rgba(249, 115, 22, 0.3));
}

.monopoly-cell.property.red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
}

.monopoly-cell .property-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.monopoly-cell .property-price {
    font-size: 0.75rem;
    color: #fbbf24;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.monopoly-cell .players-on-cell {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
    position: absolute;
    bottom: 5px;
}

.monopoly-cell .player-token {
    font-size: 1.2rem;
    animation: bounce 0.5s ease;
}





.dartboard {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    gap: 8px;
    margin: 30px auto;
    width: fit-content;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.dart-section {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
    border: 3px solid rgba(239, 68, 68, 0.6);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.dart-section:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.6);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.5), rgba(220, 38, 38, 0.5));
}

.dart-section:active {
    transform: scale(0.95);
    animation: dartHit 0.3s ease;
}

@keyframes dartHit {
    0%, 100% { transform: scale(0.95); }
    50% { transform: scale(1.15); }
}

.dart-section.bullseye {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.5), rgba(245, 158, 11, 0.5));
    border-color: rgba(251, 191, 36, 0.9);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
    font-size: 2.5rem;
}

.dart-section.bullseye:hover {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.8);
}

.dart-section.bull {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(22, 163, 74, 0.4));
    border-color: rgba(34, 197, 94, 0.8);
}

.dart-section.miss {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.3), rgba(75, 85, 99, 0.3));
    border-color: rgba(107, 114, 128, 0.6);
    font-size: 1.2rem;
}




.memory-setup .setup-btn small {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 5px;
}



.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 120px);
    gap: 15px;
    margin: 30px auto;
    width: fit-content;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    box-shadow: inset 0 5px 20px rgba(0, 0, 0, 0.3);
}

.memory-card {
    width: 130px;
    height: 130px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(167, 139, 250, 0.4));
    border: 4px solid rgba(167, 139, 250, 0.7);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    transform-style: preserve-3d;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.3);
}

.memory-card:hover:not(.flipped) {
    transform: translateY(-15px) scale(1.08);
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.7), 0 0 35px rgba(167, 139, 250, 0.5);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6), rgba(167, 139, 250, 0.6));
}

.memory-card .card-back {
    color: #fff;
    font-size: 5rem;
    font-weight: 900;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.memory-card.flipped {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.9));
    border-color: rgba(255, 255, 255, 0.9);
    animation: flipCard 0.5s ease;
    cursor: default;
}

@keyframes flipCard {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(90deg) scale(1.1); }
    100% { transform: rotateY(0deg) scale(1); }
}

.memory-card.flipped .card-front {
    animation: cardAppear 0.5s ease;
}

@keyframes cardAppear {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

.memory-card.matched {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.6), rgba(22, 163, 74, 0.6));
    border-color: rgba(34, 197, 94, 0.9);
    animation: matchPulse 0.6s ease;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.8);
}

@keyframes matchPulse {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2) rotate(5deg); }
    50% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.2) rotate(5deg); }
}

.memory-card.matched .card-front {
    filter: brightness(1.2);
}




.trivia-setup .setup-btn small {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 5px;
}

.category-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    justify-content: center;
}



.trivia-question-container {
    margin: 30px auto;
    max-width: 800px;
}

.trivia-question {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(167, 139, 250, 0.3));
    border: 3px solid rgba(167, 139, 250, 0.6);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    animation: questionAppear 0.6s ease;
}

@keyframes questionAppear {
    0% { opacity: 0; transform: translateY(-30px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.question-difficulty {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-difficulty.easy {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.5), rgba(22, 163, 74, 0.5));
    border: 2px solid rgba(34, 197, 94, 0.8);
    color: #fff;
}

.question-difficulty.medium {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.5), rgba(245, 158, 11, 0.5));
    border: 2px solid rgba(251, 191, 36, 0.8);
    color: #fff;
}

.question-difficulty.hard {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.5), rgba(220, 38, 38, 0.5));
    border: 2px solid rgba(239, 68, 68, 0.8);
    color: #fff;
}

.question-text {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.5;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.trivia-answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.trivia-answer-btn {
    padding: 25px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.3));
    color: #fff;
    border: 3px solid rgba(59, 130, 246, 0.6);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: answerAppear 0.5s ease forwards;
    opacity: 0;
}

.trivia-answer-btn:nth-child(1) { animation-delay: 0.1s; }
.trivia-answer-btn:nth-child(2) { animation-delay: 0.2s; }
.trivia-answer-btn:nth-child(3) { animation-delay: 0.3s; }
.trivia-answer-btn:nth-child(4) { animation-delay: 0.4s; }

@keyframes answerAppear {
    0% { opacity: 0; transform: translateX(-50px); }
    100% { opacity: 1; transform: translateX(0); }
}

.trivia-answer-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(37, 99, 235, 0.5));
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.6);
}

.trivia-answer-btn:active:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
}

.trivia-answer-btn.correct {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.6), rgba(22, 163, 74, 0.6));
    border-color: rgba(34, 197, 94, 0.9);
    animation: correctPulse 0.6s ease;
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.9);
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15) rotate(2deg); }
    50% { transform: scale(1.1) rotate(-2deg); }
    75% { transform: scale(1.15) rotate(2deg); }
}

.trivia-answer-btn.wrong {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.6), rgba(220, 38, 38, 0.6));
    border-color: rgba(239, 68, 68, 0.9);
    animation: wrongShake 0.5s ease;
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-15px); }
    50% { transform: translateX(15px); }
    75% { transform: translateX(-15px); }
}

.trivia-answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}


.settings-screen, .credits-screen {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    border-radius: 25px;
    padding: 50px 60px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    animation: fadeIn 0.6s ease;
    margin: 20px auto;
    max-width: 700px;
}

.settings-content, .credits-content {
    margin: 40px 0;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(145deg, #d4a574, #b8935f, #a67c52);
    border: 3px solid #654321;
    border-top-color: #8b6f47;
    border-left-color: #8b6f47;
    border-radius: 12px;
    padding: 20px 25px;
    margin: 15px 0;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(244, 228, 193, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 15px;
}

.setting-icon {
    font-size: 2rem;
}

.setting-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c1810;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 0 rgba(244, 228, 193, 0.5);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, #6b3410, #4a2511);
    border-radius: 30px;
    transition: 0.3s;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background: linear-gradient(145deg, #f5e6d3, #e8d4b0);
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

input:checked + .toggle-slider {
    background: linear-gradient(145deg, #90c695, #6fa876);
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
    background: linear-gradient(145deg, #ffd700, #f4c430);
}

.theme-select {
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(145deg, #f5e6d3, #e8d4b0);
    color: #2c1810;
    border: 3px solid #8b6f47;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Georgia', serif;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 245, 230, 0.5);
    transition: all 0.3s ease;
}

.theme-select:hover {
    background: linear-gradient(145deg, #fff5e6, #f5e6d3);
    transform: translateY(-2px);
}

.theme-select:focus {
    outline: none;
    border-color: #daa520;
}

.credit-section {
    background: linear-gradient(145deg, #d4a574, #b8935f, #a67c52);
    border: 3px solid #654321;
    border-top-color: #8b6f47;
    border-left-color: #8b6f47;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(244, 228, 193, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.credit-section h2 {
    color: #2c1810;
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 0 rgba(244, 228, 193, 0.6);
}

.credit-section p {
    color: #4a3520;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 8px 0;
    font-family: 'Georgia', serif;
}

.credit-detail {
    color: #654321;
    font-size: 1rem;
    font-weight: 600;
    font-style: italic;
}

.games-list-credits {
    line-height: 1.8;
    font-size: 1.1rem;
}


.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(145deg, #d4a574, #b8935f, #a67c52);
    color: #2c1810;
    padding: 15px 25px;
    border-radius: 12px;
    border: 3px solid #654321;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Georgia', serif;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

body.no-animations * {
    animation: none !important;
    transition: none !important;
}

body.theme-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 75%, #64748b 100%);
}

body.theme-dark .main-menu,
body.theme-dark .game-selection,
body.theme-dark .tictactoe-setup,
body.theme-dark .chess-setup,
body.theme-dark .checkers-setup,
body.theme-dark .snakes-setup,
body.theme-dark .sudoku-setup,
body.theme-dark .connect4-setup,
body.theme-dark .scrabble-setup,
body.theme-dark .battleship-setup,
body.theme-dark .goose-setup,
body.theme-dark .monopoly-setup,
body.theme-dark .darts-setup,
body.theme-dark .memory-setup,
body.theme-dark .trivia-setup,
body.theme-dark .settings-screen,
body.theme-dark .credits-screen,
body.theme-dark .tictactoe-game,
body.theme-dark .chess-game,
body.theme-dark .checkers-game,
body.theme-dark .snakes-game,
body.theme-dark .sudoku-game,
body.theme-dark .connect4-game,
body.theme-dark .scrabble-game,
body.theme-dark .battleship-placement,
body.theme-dark .battleship-game,
body.theme-dark .goose-game,
body.theme-dark .monopoly-game,
body.theme-dark .darts-game,
body.theme-dark .memory-game,
body.theme-dark .trivia-game {
    background: linear-gradient(145deg, #1e293b, #334155, #475569);
    border-color: #0f172a;
}

body.theme-dark .game-title h1,
body.theme-dark .setup-section h2,
body.theme-dark .game-category h2,
body.theme-dark .game-info p,
body.theme-dark .setting-name,
body.theme-dark .credit-section h2 {
    color: #e2e8f0;
}

body.theme-light {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 50%, #94a3b8 75%, #64748b 100%);
}

body.theme-light .main-menu,
body.theme-light .game-selection,
body.theme-light .tictactoe-setup,
body.theme-light .chess-setup,
body.theme-light .checkers-setup,
body.theme-light .snakes-setup,
body.theme-light .sudoku-setup,
body.theme-light .connect4-setup,
body.theme-light .scrabble-setup,
body.theme-light .battleship-setup,
body.theme-light .goose-setup,
body.theme-light .monopoly-setup,
body.theme-light .darts-setup,
body.theme-light .memory-setup,
body.theme-light .trivia-setup,
body.theme-light .settings-screen,
body.theme-light .credits-screen,
body.theme-light .tictactoe-game,
body.theme-light .chess-game,
body.theme-light .checkers-game,
body.theme-light .snakes-game,
body.theme-light .sudoku-game,
body.theme-light .connect4-game,
body.theme-light .scrabble-game,
body.theme-light .battleship-placement,
body.theme-light .battleship-game,
body.theme-light .goose-game,
body.theme-light .monopoly-game,
body.theme-light .darts-game,
body.theme-light .memory-game,
body.theme-light .trivia-game {
    background: linear-gradient(145deg, #ffffff, #f1f5f9, #e2e8f0);
    border-color: #cbd5e1;
}

body.theme-light .game-title h1,
body.theme-light .setup-section h2,
body.theme-light .game-category h2 {
    color: #1e293b;
    text-shadow: 2px 2px 0 #cbd5e1, 4px 4px 10px rgba(0, 0, 0, 0.3);
}

body.theme-light .game-info p,
body.theme-light .setting-name,
body.theme-light .credit-section h2,
body.theme-light .credit-section p {
    color: #334155;
}

body.theme-light .menu-btn,
body.theme-light .game-btn,
body.theme-light .setup-btn,
body.theme-light .control-btn,
body.theme-light .back-btn {
    color: #1e293b;
}


.help-btn {
    padding: 15px 40px;
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(145deg, #d4a574, #b8935f, #a67c52);
    color: #2c1810;
    border: 3px solid #654321;
    border-top-color: #8b6f47;
    border-left-color: #8b6f47;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(244, 228, 193, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4);
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 0 rgba(244, 228, 193, 0.5);
}

.help-btn:hover {
    background: linear-gradient(145deg, #e6b887, #d4a574, #c09560);
    border-color: #8b6f47;
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(244, 228, 193, 0.6),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4);
}

.help-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.help-content {
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    border-radius: 25px;
    padding: 40px 50px;
    max-width: 600px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.9),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.4s ease;
}

.help-content h2 {
    color: #f4e4c1;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #654321, 4px 4px 10px rgba(0, 0, 0, 0.8);
    font-family: 'Georgia', serif;
    text-align: center;
}

.help-content p {
    color: #f4e4c1;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    font-family: 'Georgia', serif;
}

.help-content strong {
    color: #fbbf24;
    font-size: 1.2rem;
}

.help-content .control-btn {
    margin-top: 20px;
    width: 100%;
}


.by-line {
    color: #f4e4c1;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 4px;
    margin-top: -20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 0 #654321, 2px 2px 8px rgba(0, 0, 0, 0.8);
    font-family: 'Georgia', serif;
    opacity: 0.8;
}


/* Mobile Responsive Design */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-menu, .game-selection, .tictactoe-setup, .chess-setup, .checkers-setup, 
    .snakes-setup, .sudoku-setup, .connect4-setup, .scrabble-setup, .battleship-setup,
    .goose-setup, .monopoly-setup, .darts-setup, .memory-setup, .trivia-setup,
    .settings-screen, .credits-screen {
        padding: 30px 20px;
        max-width: 100%;
    }

    .game-title h1 {
        font-size: 2.5rem;
        letter-spacing: 6px;
    }

    .by-line {
        font-size: 0.8rem;
        letter-spacing: 3px;
    }

    .menu-btn, .game-btn, .setup-btn, .control-btn, .back-btn, .help-btn {
        padding: 15px 25px;
        font-size: 1rem;
    }

    .games-list {
        grid-template-columns: 1fr;
    }

    .game-board {
        grid-template-columns: repeat(3, 80px);
        grid-template-rows: repeat(3, 80px);
        gap: 8px;
    }

    .cell {
        font-size: 2.5rem;
    }

    .chess-board {
        grid-template-columns: repeat(8, 45px);
        grid-template-rows: repeat(8, 45px);
    }

    .chess-square {
        font-size: 2rem;
    }

    .checkers-board {
        grid-template-columns: repeat(8, 45px);
        grid-template-rows: repeat(8, 45px);
    }

    .checker-piece {
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
    }

    .snakes-board {
        grid-template-columns: repeat(10, 40px);
        grid-template-rows: repeat(10, 40px);
    }

    .sudoku-board {
        grid-template-columns: repeat(9, 35px);
        grid-template-rows: repeat(9, 35px);
    }

    .sudoku-cell {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .number-pad {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .num-btn {
        padding: 12px;
        font-size: 1.1rem;
    }

    .connect4-board {
        gap: 8px;
        padding: 15px;
    }

    .connect4-cell {
        width: 45px;
        height: 45px;
    }

    .connect4-piece {
        width: 38px;
        height: 38px;
    }

    .battleship-board {
        grid-template-columns: repeat(10, 30px);
        grid-template-rows: repeat(10, 30px);
    }

    .battleship-cell {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }

    .battleship-boards-container {
        flex-direction: column;
        gap: 20px;
    }

    .goose-board {
        grid-template-columns: repeat(9, 45px);
    }

    .goose-cell {
        width: 45px;
        height: 45px;
    }

    .monopoly-board {
        grid-template-columns: repeat(4, 100px);
        grid-template-rows: repeat(3, 80px);
    }

    .memory-board {
        grid-template-columns: repeat(4, 80px);
        gap: 10px;
    }

    .memory-card {
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }

    .trivia-answers {
        grid-template-columns: 1fr;
    }

    .dice {
        width: 80px;
        height: 80px;
        font-size: 3.5rem;
    }

    .dice-btn {
        padding: 12px 30px;
        font-size: 1.1rem;
    }

    .game-controls {
        flex-wrap: wrap;
        gap: 10px;
    }

    .help-modal .help-content {
        padding: 30px 25px;
        max-width: 90%;
    }

    .scrabble-tile {
        width: 60px;
        height: 60px;
    }

    .tile-letter {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .game-title h1 {
        font-size: 2rem;
        letter-spacing: 4px;
    }

    .by-line {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .menu-btn, .game-btn, .setup-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .game-board {
        grid-template-columns: repeat(3, 70px);
        grid-template-rows: repeat(3, 70px);
    }

    .cell {
        font-size: 2rem;
    }

    .chess-board, .checkers-board {
        grid-template-columns: repeat(8, 38px);
        grid-template-rows: repeat(8, 38px);
    }

    .chess-square {
        font-size: 1.8rem;
    }

    .checker-piece {
        width: 32px;
        height: 32px;
    }

    .snakes-board {
        grid-template-columns: repeat(10, 32px);
        grid-template-rows: repeat(10, 32px);
    }

    .sudoku-board {
        grid-template-columns: repeat(9, 30px);
        grid-template-rows: repeat(9, 30px);
    }

    .sudoku-cell {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .battleship-board {
        grid-template-columns: repeat(10, 25px);
        grid-template-rows: repeat(10, 25px);
    }

    .battleship-cell {
        width: 25px;
        height: 25px;
        font-size: 1rem;
    }

    .memory-board {
        grid-template-columns: repeat(4, 70px);
    }

    .memory-card {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }
}


.statistics-screen {
    text-align: center;
    background: linear-gradient(145deg, #8b5a3c, #6d4c3a, #5c3d2e);
    border-radius: 25px;
    padding: 50px 60px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 0 rgba(205, 133, 63, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.5);
    border: 6px solid #4a3520;
    border-top-color: #6d4c3a;
    border-left-color: #5c3d2e;
    animation: fadeIn 0.6s ease;
    margin: 20px auto;
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
}

.stats-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(145deg, #d4a574, #b8935f, #a67c52);
    border: 3px solid #654321;
    border-top-color: #8b6f47;
    border-left-color: #8b6f47;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(244, 228, 193, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(244, 228, 193, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.stat-card h3 {
    color: #2c1810;
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 15px;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 0 rgba(244, 228, 193, 0.6);
}

.stat-card p {
    color: #4a3520;
    font-size: 1rem;
    font-weight: 600;
    margin: 8px 0;
    font-family: 'Georgia', serif;
}

.stats-actions {
    margin: 30px 0 20px;
}

@media screen and (max-width: 768px) {
    .statistics-screen {
        padding: 30px 20px;
    }

    .stats-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card h3 {
        font-size: 1.1rem;
    }

    .stat-card p {
        font-size: 0.9rem;
    }
}


/* Additional Responsive Adjustments */
@media screen and (max-width: 1024px) {
    .main-menu {
        padding: 40px 50px;
    }

    .game-title h1 {
        font-size: 3.5rem;
        letter-spacing: 8px;
    }

    .chess-board, .checkers-board {
        grid-template-columns: repeat(8, 55px);
        grid-template-rows: repeat(8, 55px);
    }

    .dartboard {
        grid-template-columns: repeat(4, 80px);
    }

    .dart-section {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }
}

@media screen and (max-width: 768px) {
    .mode-buttons, .difficulty-buttons, .side-buttons, .player-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .setup-btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .category-buttons {
        grid-template-columns: 1fr;
    }

    .scrabble-word-input {
        flex-direction: column;
    }

    .scrabble-word-input input {
        width: 100%;
        max-width: 300px;
    }

    .dartboard {
        grid-template-columns: repeat(3, 80px);
    }

    .players-status {
        flex-direction: column;
        align-items: stretch;
    }

    .player-card {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 480px) {
    .main-menu, .game-selection, .tictactoe-setup, .chess-setup, .checkers-setup,
    .snakes-setup, .sudoku-setup, .connect4-setup, .scrabble-setup, .battleship-setup,
    .goose-setup, .monopoly-setup, .darts-setup, .memory-setup, .trivia-setup,
    .settings-screen, .credits-screen, .statistics-screen {
        padding: 20px 15px;
    }

    .game-header h1 {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .game-info p {
        font-size: 1rem;
    }

    .control-btn, .back-btn, .help-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .dice-container {
        flex-direction: column;
        gap: 15px;
    }

    .goose-board {
        grid-template-columns: repeat(9, 35px);
    }

    .goose-cell {
        width: 35px;
        height: 35px;
    }

    .goose-cell .cell-number {
        font-size: 0.6rem;
    }

    .goose-cell .special-icon {
        font-size: 1.3rem;
    }

    .monopoly-board {
        grid-template-columns: repeat(4, 80px);
        grid-template-rows: repeat(3, 65px);
    }

    .monopoly-cell .property-name {
        font-size: 0.7rem;
    }

    .monopoly-cell .property-price {
        font-size: 0.65rem;
    }

    .dartboard {
        grid-template-columns: repeat(2, 90px);
        gap: 6px;
    }

    .dart-section {
        width: 90px;
        height: 90px;
        font-size: 1.5rem;
    }

    .trivia-question-container {
        padding: 0 10px;
    }

    .question-text {
        font-size: 1.3rem;
    }

    .trivia-answer-btn {
        padding: 18px 20px;
        font-size: 1rem;
    }

    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        font-size: 0.9rem;
        padding: 12px 18px;
    }
}

/* Landscape Mobile */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .main-menu, .game-selection, .tictactoe-setup, .chess-setup, .checkers-setup,
    .snakes-setup, .sudoku-setup, .connect4-setup, .scrabble-setup, .battleship-setup,
    .goose-setup, .monopoly-setup, .darts-setup, .memory-setup, .trivia-setup,
    .settings-screen, .credits-screen {
        padding: 20px 30px;
        max-height: 90vh;
    }

    .game-title h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .game-header h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .game-info {
        margin-bottom: 15px;
    }

    .dice {
        width: 70px;
        height: 70px;
        font-size: 3rem;
    }
}

/* Very Small Screens */
@media screen and (max-width: 360px) {
    .game-board {
        grid-template-columns: repeat(3, 60px);
        grid-template-rows: repeat(3, 60px);
        gap: 6px;
    }

    .cell {
        font-size: 1.8rem;
    }

    .chess-board, .checkers-board {
        grid-template-columns: repeat(8, 32px);
        grid-template-rows: repeat(8, 32px);
    }

    .chess-square {
        font-size: 1.5rem;
    }

    .checker-piece {
        width: 28px;
        height: 28px;
        font-size: 1.2rem;
    }

    .snakes-board {
        grid-template-columns: repeat(10, 28px);
        grid-template-rows: repeat(10, 28px);
    }

    .sudoku-board {
        grid-template-columns: repeat(9, 26px);
        grid-template-rows: repeat(9, 26px);
    }

    .sudoku-cell {
        width: 26px;
        height: 26px;
        font-size: 0.9rem;
    }

    .connect4-board {
        gap: 6px;
        padding: 12px;
    }

    .connect4-cell {
        width: 38px;
        height: 38px;
    }

    .connect4-piece {
        width: 32px;
        height: 32px;
    }

    .memory-board {
        grid-template-columns: repeat(4, 60px);
        gap: 8px;
    }

    .memory-card {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .scrabble-tile {
        width: 50px;
        height: 50px;
    }

    .tile-letter {
        font-size: 1.3rem;
    }

    .tile-value {
        font-size: 0.7rem;
    }
}
/* Center all game boards */
.game-board,
.chess-board,
.checkers-board,
.snakes-board,
.sudoku-board,
.connect4-board,
.scrabble-board,
.battleship-board,
.battleship-boards-container,
.goose-board,
.monopoly-board,
.dartboard,
.memory-board,
.trivia-question-container {
    margin-left: auto !important;
    margin-right: auto !important;
}

.tictactoe-game,
.chess-game,
.checkers-game,
.snakes-game,
.sudoku-game,
.connect4-game,
.scrabble-game,
.battleship-game,
.goose-game,
.monopoly-game,
.darts-game,
.memory-game,
.trivia-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-header,
.game-info,
.game-controls,
.players-status,
.dice-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
/* Auto-adjusting title for all screen sizes */
.game-title h1 {
    font-size: clamp(2rem, 8vw, 4.5rem);
    letter-spacing: clamp(4px, 2vw, 12px);
    word-wrap: break-word;
    max-width: 100%;
}

.by-line {
    font-size: clamp(0.7rem, 2vw, 1rem);
    letter-spacing: clamp(2px, 1vw, 4px);
}

.game-header h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    letter-spacing: clamp(2px, 1vw, 3px);
}
/* Auto-adjust game sizes and center everything */

/* Tic Tac Toe */
.game-board {
    grid-template-columns: repeat(3, minmax(60px, 120px));
    grid-template-rows: repeat(3, minmax(60px, 120px));
    gap: clamp(6px, 2vw, 10px);
    width: fit-content;
    margin: 0 auto !important;
}

.cell {
    font-size: clamp(2rem, 8vw, 3rem);
}

/* Chess & Checkers */
.chess-board,
.checkers-board {
    grid-template-columns: repeat(8, minmax(32px, 70px));
    grid-template-rows: repeat(8, minmax(32px, 70px));
    width: fit-content;
    margin: 0 auto !important;
}

.chess-square,
.checkers-square {
    font-size: clamp(1.5rem, 5vw, 3rem);
}

.checker-piece {
    width: clamp(28px, 8vw, 55px);
    height: clamp(28px, 8vw, 55px);
    font-size: clamp(1.2rem, 4vw, 2rem);
}

/* Snakes & Ladders */
.snakes-board {
    grid-template-columns: repeat(10, minmax(28px, 60px));
    grid-template-rows: repeat(10, minmax(28px, 60px));
    gap: clamp(1px, 0.5vw, 2px);
    width: fit-content;
    margin: 0 auto !important;
}

.cell-number {
    font-size: clamp(0.6rem, 2vw, 0.8rem);
}

.snake-icon,
.ladder-icon {
    font-size: clamp(1.3rem, 4vw, 2rem);
}

/* Sudoku */
.sudoku-board {
    grid-template-columns: repeat(9, minmax(26px, 50px));
    grid-template-rows: repeat(9, minmax(26px, 50px));
    width: fit-content;
    margin: 30px auto !important;
}

.sudoku-cell {
    width: clamp(26px, 6vw, 50px);
    height: clamp(26px, 6vw, 50px);
    font-size: clamp(0.9rem, 3vw, 1.5rem);
}

/* Connect Four */
.connect4-board {
    gap: clamp(6px, 2vw, 10px);
    padding: clamp(12px, 4vw, 25px);
    margin: 0 auto !important;
}

.connect4-cell {
    width: clamp(38px, 10vw, 60px);
    height: clamp(38px, 10vw, 60px);
}

.connect4-piece {
    width: clamp(32px, 8vw, 50px);
    height: clamp(32px, 8vw, 50px);
}

/* Battleship */
.battleship-board {
    grid-template-columns: repeat(10, minmax(25px, 40px));
    grid-template-rows: repeat(10, minmax(25px, 40px));
    width: fit-content;
    margin: 0 auto !important;
}

.battleship-cell {
    width: clamp(25px, 6vw, 40px);
    height: clamp(25px, 6vw, 40px);
    font-size: clamp(1rem, 3vw, 1.5rem);
}

.battleship-boards-container {
    flex-direction: column;
    align-items: center;
    gap: clamp(15px, 4vw, 30px);
    margin: 0 auto !important;
}

/* Goose */
.goose-board {
    grid-template-columns: repeat(9, minmax(35px, 60px));
    gap: clamp(2px, 1vw, 3px);
    width: fit-content;
    margin: 30px auto !important;
}

.goose-cell {
    width: clamp(35px, 8vw, 60px);
    height: clamp(35px, 8vw, 60px);
}

.goose-cell .special-icon {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
}

/* Monopoly */
.monopoly-board {
    grid-template-columns: repeat(4, minmax(80px, 140px));
    grid-template-rows: repeat(3, minmax(65px, 100px));
    gap: clamp(3px, 1vw, 5px);
    width: fit-content;
    margin: 30px auto !important;
}

.monopoly-cell .property-name {
    font-size: clamp(0.7rem, 2vw, 0.85rem);
}

/* Darts */
.dartboard {
    grid-template-columns: repeat(4, minmax(70px, 100px));
    gap: clamp(6px, 2vw, 8px);
    width: fit-content;
    margin: 30px auto !important;
}

.dart-section {
    width: clamp(70px, 15vw, 100px);
    height: clamp(70px, 15vw, 100px);
    font-size: clamp(1.5rem, 4vw, 2rem);
}

/* Memory */
.memory-board {
    grid-template-columns: repeat(4, minmax(60px, 130px));
    gap: clamp(8px, 2vw, 15px);
    width: fit-content;
    margin: 30px auto !important;
}

.memory-card {
    width: clamp(60px, 15vw, 130px);
    height: clamp(60px, 15vw, 130px);
    font-size: clamp(2rem, 6vw, 4.5rem);
}

/* Scrabble */
.scrabble-tile {
    width: clamp(50px, 12vw, 75px);
    height: clamp(50px, 12vw, 75px);
}

.tile-letter {
    font-size: clamp(1.3rem, 4vw, 2rem);
}

/* Dice */
.dice {
    width: clamp(70px, 15vw, 110px);
    height: clamp(70px, 15vw, 110px);
    font-size: clamp(3rem, 8vw, 4.5rem);
}

/* Center all game containers */
.tictactoe-game,
.chess-game,
.checkers-game,
.snakes-game,
.sudoku-game,
.connect4-game,
.scrabble-game,
.battleship-game,
.battleship-placement,
.goose-game,
.monopoly-game,
.darts-game,
.memory-game,
.trivia-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Center game info and controls */
.game-header,
.game-info,
.game-controls,
.players-status,
.dice-container,
.sudoku-controls,
.scrabble-word-input,
.trivia-question-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Responsive buttons */
.control-btn,
.back-btn,
.help-btn {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    padding: clamp(12px, 3vw, 15px) clamp(20px, 5vw, 35px);
}

/* Responsive game info text */
.game-info p {
    font-size: clamp(1rem, 3vw, 1.2rem);
}

/* Player cards responsive */
.player-card {
    padding: clamp(12px, 3vw, 15px) clamp(15px, 4vw, 20px);
}

.player-icon {
    font-size: clamp(2rem, 5vw, 2.5rem);
}

/* Trivia responsive */
.question-text {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
}

.trivia-answer-btn {
    padding: clamp(18px, 4vw, 25px) clamp(20px, 5vw, 30px);
    font-size: clamp(1rem, 3vw, 1.2rem);
}
/* Perfect centering without stretching - auto-adjust sizes */

/* All game boards - maintain aspect ratio, no stretch */
.game-board,
.chess-board,
.checkers-board,
.snakes-board,
.sudoku-board,
.connect4-board,
.battleship-board,
.goose-board,
.monopoly-board,
.dartboard,
.memory-board {
    margin: 20px auto !important;
    width: fit-content !important;
    max-width: 95vw !important;
}

/* Scale boards based on viewport - LARGER for phone view */
@media (max-width: 768px) {
    .game-board { transform: scale(1); }
    .chess-board, .checkers-board { transform: scale(0.95); }
    .snakes-board { transform: scale(0.9); }
    .sudoku-board { transform: scale(0.95); }
    .goose-board { transform: scale(0.9); }
    .monopoly-board { transform: scale(0.85); }
    .dartboard { transform: scale(1); }
    .memory-board { transform: scale(0.95); }
}

@media (max-width: 480px) {
    .game-board { transform: scale(0.95); }
    .chess-board, .checkers-board { transform: scale(0.85); }
    .snakes-board { transform: scale(0.8); }
    .sudoku-board { transform: scale(0.85); }
    .goose-board { transform: scale(0.8); }
    .monopoly-board { transform: scale(0.75); }
    .dartboard { transform: scale(0.9); }
    .memory-board { transform: scale(0.85); }
}

@media (max-width: 360px) {
    .game-board { transform: scale(0.85); }
    .chess-board, .checkers-board { transform: scale(0.75); }
    .snakes-board { transform: scale(0.7); }
    .sudoku-board { transform: scale(0.75); }
    .goose-board { transform: scale(0.7); }
    .monopoly-board { transform: scale(0.65); }
    .dartboard { transform: scale(0.8); }
    .memory-board { transform: scale(0.75); }
}

/* Center all game containers */
.tictactoe-game,
.chess-game,
.checkers-game,
.snakes-game,
.sudoku-game,
.connect4-game,
.scrabble-game,
.battleship-game,
.battleship-placement,
.goose-game,
.monopoly-game,
.darts-game,
.memory-game,
.trivia-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    overflow-x: hidden;
    padding: 20px 10px;
}

/* Battleship boards side by side on desktop, stacked on mobile */
.battleship-boards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 20px auto !important;
}

@media (max-width: 768px) {
    .battleship-boards-container {
        flex-direction: column;
    }
    .battleship-board {
        transform: scale(0.9);
    }
}

/* Connect Four - special handling */
.connect4-board {
    transform-origin: center;
}

@media (max-width: 768px) {
    .connect4-board { transform: scale(0.95); }
}

@media (max-width: 480px) {
    .connect4-board { transform: scale(0.85); }
}

/* Scrabble tiles - responsive without stretch */
.scrabble-rack {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 95vw;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .scrabble-tile {
        width: 60px;
        height: 60px;
    }
    .tile-letter { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .scrabble-tile {
        width: 50px;
        height: 50px;
    }
    .tile-letter { font-size: 1.3rem; }
}

/* Trivia - responsive text */
.trivia-question-container {
    max-width: 95vw;
    margin: 0 auto;
}

.trivia-answers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .trivia-answers {
        grid-template-columns: 1fr;
    }
}

/* Dice - scale properly */
@media (max-width: 768px) {
    .dice {
        width: 80px;
        height: 80px;
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .dice {
        width: 70px;
        height: 70px;
        font-size: 3rem;
    }
}

/* Player status cards - responsive */
.players-status {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 95vw;
    margin: 0 auto 20px;
}

/* Game controls - always centered */
.game-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px auto;
    max-width: 95vw;
}

/* Responsive buttons */
@media (max-width: 768px) {
    .control-btn, .back-btn, .help-btn {
        font-size: 1rem;
        padding: 12px 25px;
    }
}

@media (max-width: 480px) {
    .control-btn, .back-btn, .help-btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

/* Game headers - responsive */
.game-header {
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.game-info p {
    font-size: clamp(1rem, 3vw, 1.2rem);
}

/* Ensure no horizontal overflow */
body {
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}
