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

/* Hardcore 2 Dark Overlay */
.hardcore2-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: multiply;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
    color: #e0e0e0;
    min-height: 100vh;
    position: relative;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Page Transition Effects */
body.page-loaded {
    opacity: 1;
}

body.page-exit {
    opacity: 0;
}

.games-container {
    animation: fadeInUp 0.5s ease-out;
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

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

/* Cursor Trail */
.cursor-trail {
    position: fixed;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-size: 14px;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateX(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.games-header {
    text-align: center;
    margin-bottom: 40px;
}

.games-header h1 {
    font-size: 48px;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.games-subtitle {
    font-size: 18px;
    opacity: 0.8;
}

/* Game Menu */
.game-menu {
    display: flex;
    justify-content: center;
}

.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.game-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.game-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.game-card-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.game-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #fff;
}

.game-card p {
    font-size: 14px;
    opacity: 0.8;
}

/* Game Screen */
.game-screen {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.game-header h2 {
    font-size: 32px;
    color: #fff;
}

.game-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.game-stats div {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-to-menu-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-to-menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateX(-3px);
}

.game-controls {
    margin-top: 20px;
    text-align: center;
}

.game-controls p {
    margin-bottom: 15px;
    opacity: 0.8;
}

.game-button {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin: 0 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.game-button:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Snake Game */
#snakeCanvas {
    display: block;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Tetris Game */
.tetris-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

#tetrisCanvas {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.tetris-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 150px;
}

.next-piece {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.next-piece h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

#nextPieceCanvas {
    background: #000;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.tetris-controls-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 12px;
}

.tetris-controls-info p {
    margin: 5px 0;
}

/* Pong Game */
#pongCanvas {
    display: block;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Memory Game */
.memory-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 600px;
    width: 100%;
}

.memory-card {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.memory-card:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.memory-card.flipped {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.memory-card.matched {
    opacity: 0.5;
    cursor: default;
    border-color: #4caf50;
}

.memory-card .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 158, 255, 0.3);
    font-size: 32px;
}

.memory-card.flipped .card-back {
    display: none;
}

/* Reaction Test */
.reaction-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    margin: 20px 0;
}

.reaction-box {
    width: 400px;
    height: 400px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.reaction-box.waiting {
    background: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.5);
}

.reaction-box.ready {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

.reaction-box.too-early {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.5);
}

.reaction-box #reactionText {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .games-header h1 {
        font-size: 32px;
    }
    
    .game-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    #snakeCanvas,
    #pongCanvas {
        width: 100%;
        height: auto;
    }
    
    #tetrisCanvas {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    
    .tetris-container {
        flex-direction: column;
        align-items: center;
    }
    
    .memory-board {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .reaction-box {
        width: 90%;
        max-width: 400px;
        height: 300px;
    }
}

/* Breakout Game */
#breakoutCanvas {
    display: block;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* 2048 Game */
.game2048-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.game2048-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
}

.game2048-cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.game2048-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
    pointer-events: none;
}

.game2048-cell.has-value {
    background: rgba(255, 255, 255, 0.2);
}

.game2048-cell[data-value="2"] { background: #eee4da; color: #776e65; }
.game2048-cell[data-value="4"] { background: #ede0c8; color: #776e65; }
.game2048-cell[data-value="8"] { background: #f2b179; color: #f9f6f2; }
.game2048-cell[data-value="16"] { background: #f59563; color: #f9f6f2; }
.game2048-cell[data-value="32"] { background: #f67c5f; color: #f9f6f2; }
.game2048-cell[data-value="64"] { background: #f65e3b; color: #f9f6f2; }
.game2048-cell[data-value="128"] { background: #edcf72; color: #f9f6f2; font-size: 28px; }
.game2048-cell[data-value="256"] { background: #edcc61; color: #f9f6f2; font-size: 28px; }
.game2048-cell[data-value="512"] { background: #edc850; color: #f9f6f2; font-size: 28px; }
.game2048-cell[data-value="1024"] { background: #edc53f; color: #f9f6f2; font-size: 24px; }
.game2048-cell[data-value="2048"] { background: #edc22e; color: #f9f6f2; font-size: 24px; }

/* Flappy Bird Game */
#flappyCanvas {
    display: block;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: #87ceeb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Tic-Tac-Toe Game */
.tictactoe-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.tictactoe-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 8px;
    max-width: 400px;
    width: 100%;
}

.tictactoe-cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

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

.tictactoe-cell.occupied {
    cursor: default;
}

.tictactoe-cell.x {
    color: #ff6b6b;
}

.tictactoe-cell.o {
    color: #4a9eff;
}

/* Simon Says Game */
.simon-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.simon-board {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.simon-button {
    position: absolute;
    width: 50%;
    height: 50%;
    cursor: pointer;
    transition: opacity 0.2s ease;
    border: 3px solid rgba(0, 0, 0, 0.3);
}

.simon-button:hover {
    opacity: 0.8;
}

.simon-button.active {
    opacity: 1;
    filter: brightness(1.3);
}

#simonRed {
    top: 0;
    left: 0;
    background: #ff4444;
    border-top-left-radius: 100%;
}

#simonGreen {
    top: 0;
    right: 0;
    background: #44ff44;
    border-top-right-radius: 100%;
}

#simonBlue {
    bottom: 0;
    left: 0;
    background: #4444ff;
    border-bottom-left-radius: 100%;
}

#simonYellow {
    bottom: 0;
    right: 0;
    background: #ffff44;
    border-bottom-right-radius: 100%;
}

.simon-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 5px solid rgba(255, 255, 255, 0.3);
}

.simon-start-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.simon-start-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.simon-start-btn:active {
    transform: scale(0.95);
}

/* Responsive updates */
@media (max-width: 768px) {
    #breakoutCanvas {
        width: 100%;
        height: auto;
    }
    
    .game2048-board {
        max-width: 90%;
    }
    
    #flappyCanvas {
        width: 100%;
        max-width: 400px;
        height: auto;
    }
    
    .tictactoe-board {
        max-width: 90%;
    }
    
    .simon-board {
        width: 90%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 1;
    }
}

/* Calculator Clicker Game */
.calculator-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.calculator-display {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.calc-screen {
    background: #1a1a2e;
    color: #4caf50;
    font-family: 'Courier New', monospace;
    font-size: 48px;
    font-weight: bold;
    padding: 20px;
    border-radius: 8px;
    text-align: right;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(76, 175, 80, 0.3);
    overflow: hidden;
    text-overflow: ellipsis;
}

.calculator-click-area {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.calc-click-btn {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: 4px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.1s ease;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    position: relative;
    overflow: hidden;
}

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

.calc-click-btn:active {
    transform: scale(0.95);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.6);
}

.calc-click-btn:active::before {
    width: 300px;
    height: 300px;
}

.calc-click-icon {
    font-size: 48px;
    z-index: 1;
}

.calc-click-text {
    z-index: 1;
}

.calculator-upgrades,
.calculator-auto-clickers {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calculator-upgrades h3,
.calculator-auto-clickers h3 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 20px;
}

.upgrades-grid,
.auto-clickers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.upgrade-item,
.auto-clicker-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.upgrade-item:hover,
.auto-clicker-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.upgrade-item:active,
.auto-clicker-item:active {
    transform: translateY(0);
}

.upgrade-item.disabled,
.auto-clicker-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.upgrade-item.owned {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
}

.upgrade-name {
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    font-size: 16px;
}

.upgrade-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.upgrade-cost {
    font-size: 14px;
    color: #4caf50;
    font-weight: bold;
}

.upgrade-level {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.click-animation {
    position: fixed;
    pointer-events: none;
    font-size: 24px;
    font-weight: bold;
    color: #4caf50;
    z-index: 10000;
    animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1.5);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .calc-click-btn {
        width: 150px;
        height: 150px;
        font-size: 18px;
    }
    
    .calc-click-icon {
        font-size: 36px;
    }
    
    .calc-screen {
        font-size: 32px;
        padding: 15px;
    }
    
    .upgrades-grid,
    .auto-clickers-grid {
        grid-template-columns: 1fr;
    }
}

/* Space Invaders Game */
#invadersCanvas {
    display: block;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Wordle Game */
.wordle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
}

.wordle-board {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wordle-row {
    display: flex;
    gap: 8px;
}

.wordle-cell {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.wordle-cell.typing {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.wordle-cell.correct {
    background: #4caf50;
    border-color: #4caf50;
    animation: flip 0.5s ease;
}

.wordle-cell.present {
    background: #ffa500;
    border-color: #ffa500;
    animation: flip 0.5s ease;
}

.wordle-cell.absent {
    background: #555;
    border-color: #555;
    animation: flip 0.5s ease;
}

@keyframes flip {
    0% { transform: rotateX(0deg); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0deg); }
}

.wordle-keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
    width: 100%;
}

.wordle-keyboard-row {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.wordle-key {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    min-width: 40px;
}

.wordle-key:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.wordle-key:active {
    transform: translateY(0);
}

.wordle-key-special {
    background: rgba(74, 158, 255, 0.3);
    border-color: rgba(74, 158, 255, 0.5);
    min-width: 80px;
}

.wordle-key.correct {
    background: #4caf50;
    border-color: #4caf50;
}

.wordle-key.present {
    background: #ffa500;
    border-color: #ffa500;
}

.wordle-key.absent {
    background: #555;
    border-color: #555;
    opacity: 0.5;
}

/* Whack-a-Mole Game */
.whackamole-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.mole-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 500px;
    width: 100%;
}

.mole-hole {
    aspect-ratio: 1;
    background: rgba(101, 67, 33, 0.8);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 4px solid rgba(139, 115, 85, 0.8);
    box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.5);
}

.mole {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle at 30% 30%, #8b4513, #654321);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    cursor: pointer;
    transition: transform 0.2s ease, bottom 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.mole::before {
    content: '';
    position: absolute;
    top: 25%;
    left: 30%;
    width: 12px;
    height: 12px;
    background: #000;
    border-radius: 50%;
    box-shadow: 20px 0 0 #000;
}

.mole::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 15px;
    background: #ff6b6b;
    border-radius: 0 0 50% 50%;
}

.mole.mole-up {
    bottom: 20%;
    transform: translateX(-50%) scale(1.1);
}

.mole.mole-hit {
    transform: translateX(-50%) scale(0.8);
    opacity: 0.7;
}

.mole:hover.mole-up {
    transform: translateX(-50%) scale(1.15);
}

/* Platformer Game */
#platformerCanvas {
    display: block;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: #87ceeb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Racing Game */
#racingCanvas {
    display: block;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Responsive updates for new games */
@media (max-width: 768px) {
    #invadersCanvas,
    #platformerCanvas {
        width: 100%;
        height: auto;
    }
    
    #racingCanvas {
        width: 100%;
        max-width: 600px;
        height: auto;
    }
    
    .wordle-cell {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .wordle-key {
        padding: 10px 12px;
        font-size: 12px;
        min-width: 30px;
    }
    
    .wordle-key-special {
        min-width: 60px;
    }
    
    .mole-board {
        gap: 15px;
    }
}

/* Fallback if animated background doesn't load */
body:not(:has(#animatedBackground)) {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
}

