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

/* Prevent text selection and touch callouts on game elements */
canvas {
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Prevent pull-to-refresh on mobile */
html, body {
    overscroll-behavior: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e94560;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

header h1 {
    font-size: 2rem;
    color: #e94560;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Username System */
.username-box {
    display: flex;
    align-items: center;
}

.username-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

#username-input {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border: 2px solid rgba(233, 69, 96, 0.5);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
    width: 160px;
    transition: all 0.3s ease;
}

#username-input::placeholder {
    color: #888;
}

#username-input:focus {
    border-color: #e94560;
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.4);
    width: 180px;
}

#username-input.shake {
    animation: shakeInput 0.5s ease;
}

@keyframes shakeInput {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

#username-submit {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #e94560, #0f3460);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#username-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.username-error {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #e74c3c;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    display: none;
    white-space: nowrap;
}

.username-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(233, 69, 96, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(233, 69, 96, 0.4);
}

.username-icon {
    font-size: 1.1rem;
}

#current-username {
    font-weight: bold;
    color: #e94560;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.username-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.username-btn:hover {
    opacity: 1;
}

/* Game Lock Overlay */
.game-grid-wrapper {
    position: relative;
}

.games-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 15px;
}

.lock-content {
    text-align: center;
    padding: 2rem;
}

.lock-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    animation: lockPulse 2s ease infinite;
}

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

.lock-content p {
    font-size: 1.2rem;
    color: #aaa;
}

.game-card.locked {
    opacity: 0.5;
    pointer-events: none;
}

/* Leaderboard Styles */
.leaderboard-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-title {
    font-weight: bold;
    color: #FFD700;
    font-size: 1rem;
}

.leaderboard-refresh {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.leaderboard-refresh:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(180deg);
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 5px;
    margin-bottom: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.leaderboard-entry:hover {
    background: rgba(255, 255, 255, 0.1);
}

.leaderboard-entry.leaderboard-me {
    background: rgba(233, 69, 96, 0.2);
    border: 1px solid rgba(233, 69, 96, 0.4);
}

.leaderboard-rank {
    width: 35px;
    font-weight: bold;
    font-size: 0.9rem;
}

.leaderboard-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.leaderboard-score {
    font-weight: bold;
    color: #FFD700;
    font-size: 0.9rem;
}

.leaderboard-loading,
.leaderboard-empty {
    text-align: center;
    color: #888;
    padding: 1rem;
    font-size: 0.9rem;
}

.leaderboard-username-prompt {
    text-align: center;
    color: #f39c12;
    background: rgba(243, 156, 18, 0.15);
    border: 1px solid rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.global-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat span:last-child span {
    font-weight: bold;
    color: #FFD700;
}

.stat.online {
    background: rgba(0, 200, 255, 0.15);
    border: 1px solid rgba(0, 200, 255, 0.3);
}

.stat.online #online-count {
    font-weight: bold;
    color: #00c8ff;
}

.stat-icon {
    font-size: 1rem;
}

nav {
    display: flex;
    gap: 0.5rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
    background: #e94560;
}

.hidden {
    display: none !important;
}

/* Home Menu */
.home-menu {
    text-align: center;
    padding: 2rem;
}

.home-menu h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #e94560, #0f3460);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-container {
    max-width: 400px;
    margin: 0 auto 2rem;
}

#game-search {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

#game-search::placeholder {
    color: #888;
}

#game-search:focus {
    border-color: #e94560;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.3);
}

.game-card.hidden-search {
    display: none;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    font-size: 1.2rem;
    padding: 2rem;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(233, 69, 96, 0.3);
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: #e94560;
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.3);
    background: rgba(233, 69, 96, 0.1);
}

.game-card-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.game-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #e94560;
}

.game-card p {
    color: #aaa;
    font-size: 0.9rem;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.game-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-container h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #0f3460;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(90deg, #e94560, #0f3460);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-description {
    color: #aaa;
    margin-bottom: 1rem;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.game-info span {
    font-size: 1.1rem;
}

#slop-score, #slop-lives, #slop-highScore,
#flappy-score, #flappy-highScore {
    color: #e94560;
    font-weight: bold;
}

.player-count {
    background: linear-gradient(135deg, #e94560, #0f3460);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.player-count span {
    font-weight: bold;
    color: #FFD700;
}
#slopCanvas, #flappyCanvas, #snakeCanvas, #blocksCanvas, #pacmanCanvas, #dinoCanvas, #breakerCanvas {
    border: 3px solid #e94560;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

#slopCanvas, #flappyCanvas {
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 100%);
}

#snakeCanvas, #blocksCanvas, #pacmanCanvas {
    background: #000;
}

/* Fullscreen canvas styling */
#slopCanvas:fullscreen,
#flappyCanvas:fullscreen,
#snakeCanvas:fullscreen,
#blocksCanvas:fullscreen,
#pacmanCanvas:fullscreen,
#dinoCanvas:fullscreen,
#breakerCanvas:fullscreen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background: #000;
}

.controls {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Difficulty selector */
.difficulty-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.chess-difficulty {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chess-difficulty:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #e94560;
}

.chess-difficulty.active {
    background: linear-gradient(135deg, #e94560, #0f3460);
    border-color: #e94560;
}

button {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
}

#startBtn {
    background: linear-gradient(135deg, #e94560, #0f3460);
    color: #fff;
}

#startBtn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

#pauseBtn {
    background: linear-gradient(135deg, #0f3460, #16213e);
    color: #fff;
}

#pauseBtn:hover:not(:disabled) {
    transform: scale(1.05);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.instructions {
    margin-top: 1rem;
    color: #888;
    font-size: 0.9rem;
}

.instructions strong {
    color: #e94560;
}

footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    color: #666;
    font-size: 0.9rem;
}

/* Tic-Tac-Toe */
.ttt-status {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: inline-block;
}

.ttt-board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 8px;
    margin: 1rem auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    width: fit-content;
}

.ttt-cell {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ttt-cell:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ttt-cell.x {
    color: #e94560;
}

.ttt-cell.o {
    color: #3498db;
}

.ttt-cell.winner {
    background: rgba(115, 191, 46, 0.3);
    animation: pulse 0.5s ease infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

#ttt-difficulty {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    outline: none;
}

#ttt-difficulty option {
    background: #1a1a2e;
    color: #fff;
}

/* Credits System */
.stat.credits {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.credits-amount {
    color: #FFD700 !important;
    font-weight: bold;
}

.credits-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.credits-notification.show {
    transform: translateX(0);
}

/* Slots Game */
.game-card.casino {
    border-color: rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(74, 25, 66, 0.3), rgba(26, 26, 46, 0.5));
}

.game-card.casino:hover {
    border-color: #FFD700;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.game-card.casino h3 {
    color: #FFD700;
}

#slotsCanvas {
    border: 3px solid #FFD700;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.slots-message {
    font-size: 1.2rem;
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: inline-block;
    min-width: 300px;
}

#slots-spinBtn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a2e;
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
}

#slots-spinBtn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

.bet-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.75rem 1.5rem;
}

.bet-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.quick-bets {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.quick-bet {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #FFD700;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-weight: bold;
}

.quick-bet:hover {
    background: rgba(255, 215, 0, 0.3);
    transform: scale(1.05);
}

.quick-bet:active {
    transform: scale(0.95);
}

/* Slots difficulty */
.slots-diff {
    margin-bottom: 0.5rem;
}

.slots-difficulty {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slots-difficulty:hover {
    background: rgba(255, 255, 255, 0.2);
}

#slots-easy.active {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: #2ecc71;
}

#slots-normal.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-color: #3498db;
}

#slots-hard.active {
    background: linear-gradient(135deg, #e67e22, #d35400);
    border-color: #e67e22;
}

#slots-insane.active {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #e74c3c;
    animation: insanePulse 0.5s ease infinite alternate;
}

@keyframes insanePulse {
    from { box-shadow: 0 0 10px rgba(231, 76, 60, 0.5); }
    to { box-shadow: 0 0 20px rgba(231, 76, 60, 0.8); }
}

/* Coin Flip Game */
.coin-container {
    perspective: 1000px;
    margin: 2rem auto;
}

.coin {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    position: relative;
    transform-style: preserve-3d;
}

.coin-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
}

.coin.flipping .coin-inner {
    animation: coinFlip 1.5s ease-out;
}

@keyframes coinFlip {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(1800deg); }
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    backface-visibility: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.coin-heads {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #8B4513;
}

.coin-tails {
    background: linear-gradient(135deg, #C0C0C0, #808080);
    color: #333;
    transform: rotateY(180deg);
}

.choice-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.choice-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.choice-btn.selected {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a2e;
    border-color: #FFD700;
}

#coinflip-flipBtn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a2e;
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
}

#coinflip-flipBtn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

.coinflip-message {
    font-size: 1.2rem;
    padding: 0.75rem 1.5rem;
    margin: 1rem 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: inline-block;
    min-width: 250px;
}

/* Alchemy Game */
.alchemy-progress-bar {
    width: 100%;
    max-width: 400px;
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    margin: 0.5rem auto 1rem;
    overflow: hidden;
}

.alchemy-progress {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 5px;
    transition: width 0.3s ease;
    width: 0%;
}

.alchemy-result {
    font-size: 1.2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 1rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alchemy-result.flash {
    animation: resultFlash 0.3s ease;
}

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

.alchemy-workspace {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 1rem;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.alchemy-inventory {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.alchemy-element {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.alchemy-element:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #e94560;
    transform: translateY(-2px);
}

.alchemy-element.selected {
    background: rgba(233, 69, 96, 0.3);
    border-color: #e94560;
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.4);
}

.elem-emoji {
    font-size: 1.8rem;
}

.elem-name {
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 0.2rem;
}

#alchemy-resetBtn {
    background: rgba(255, 255, 255, 0.1);
    color: #e94560;
    border: 1px solid #e94560;
}

#alchemy-resetBtn:hover {
    background: rgba(233, 69, 96, 0.2);
}

/* Slots Credits Display */
.slots-credits-display {
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    padding: 1rem 2rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(243, 156, 18, 0.4);
}

.slots-credits-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.25rem;
}

.slots-credits-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slots-timer {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

#slots-countdown {
    font-weight: bold;
    font-family: monospace;
    font-size: 1rem;
}

/* Tunnel Rush Game */
#tunnelCanvas {
    border: 3px solid #e74c3c;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
    background: #0a0a0a;
}

/* Mini Golf */
.minigolf-message {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4CAF50;
    min-height: 1.5rem;
    margin: 0.5rem 0;
}

#minigolfCanvas {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Bottle Flip */
.bottle-message {
    font-size: 1.3rem;
    font-weight: bold;
    min-height: 1.5rem;
    margin: 0.5rem 0;
    transition: color 0.2s;
}

#bottleCanvas {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Crossy Road */
#crossyCanvas {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Banana Clicker */
.banana-stats {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 1rem 2rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    text-align: center;
}

.banana-count-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.banana-big-icon {
    font-size: 2.5rem;
}

.banana-count {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
}

.banana-rates {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 0.5rem;
    color: #555;
    font-size: 0.9rem;
}

.banana-game-area {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

#bananaCanvas {
    border-radius: 15px;
    cursor: pointer;
}

.banana-upgrades {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    width: 280px;
}

.upgrade-title {
    font-weight: bold;
    padding: 0.5rem;
    color: #FFD700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.5rem;
}

.upgrade-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.3rem;
    background: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    transition: all 0.2s;
    opacity: 0.4;
    border: 2px solid transparent;
}

.upgrade-item.affordable {
    opacity: 1;
    background: rgba(255, 215, 0, 0.25);
    border: 2px solid #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5), inset 0 0 10px rgba(255, 215, 0, 0.1);
    cursor: pointer;
    animation: upgradeGlow 1.5s ease-in-out infinite;
}

@keyframes upgradeGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.5), inset 0 0 10px rgba(255, 215, 0, 0.1); }
    50% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.8), inset 0 0 15px rgba(255, 215, 0, 0.2); }
}

.upgrade-item.affordable:hover {
    background: rgba(255, 215, 0, 0.4);
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

.upgrade-icon {
    font-size: 1.5rem;
}

.upgrade-info {
    flex: 1;
    text-align: left;
}

.upgrade-name {
    display: block;
    font-weight: bold;
    font-size: 0.85rem;
}

.upgrade-stats {
    display: block;
    font-size: 0.7rem;
    color: #aaa;
}

.upgrade-cost {
    font-weight: bold;
    font-size: 0.8rem;
    color: #FFD700;
}

#banana-resetBtn {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
}

#banana-resetBtn:hover {
    background: rgba(255, 100, 100, 0.4);
}

/* Box Tower */
#boxtowerCanvas {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Word Search */
.wordsearch-layout {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

#wordsearchCanvas {
    border-radius: 10px;
    cursor: crosshair;
}

.wordsearch-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 200px;
}

.wordsearch-wordlist {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
}

.word-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.word-item.found {
    background: rgba(76, 175, 80, 0.4);
    text-decoration: line-through;
    opacity: 0.7;
}

.wordsearch-levels {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.level-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.level-btn.unlocked {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
}

.level-btn.unlocked:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.level-btn.locked {
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    cursor: not-allowed;
}

.level-num {
    font-weight: bold;
    font-size: 1rem;
}

.level-name {
    font-size: 0.7rem;
    opacity: 0.9;
}

/* Water Drop */
#waterdropCanvas {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* ========== MOBILE RESPONSIVE STYLES ========== */

/* Tablet and smaller */
@media (max-width: 900px) {
    .game-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .game-card {
        padding: 1rem;
    }
    
    .game-card-icon {
        font-size: 2.5rem;
    }
    
    .game-card h3 {
        font-size: 1.1rem;
    }
    
    .wordsearch-layout {
        flex-direction: column;
        align-items: center;
    }
    
    .wordsearch-sidebar {
        width: 100%;
        max-width: 400px;
    }
}

/* Mobile phones */
@media (max-width: 650px) {
    /* Header */
    header {
        flex-direction: column;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .header-left {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    header h1 {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    
    .username-box {
        width: 100%;
    }
    
    .username-login {
        width: 100%;
        flex-wrap: wrap;
    }
    
    #username-input {
        flex: 1;
        min-width: 120px;
        width: auto;
    }
    
    #username-input:focus {
        width: auto;
    }
    
    .global-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
    }
    
    .stat {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    nav {
        width: 100%;
        justify-content: center;
    }
    
    /* Main content */
    main {
        padding: 1rem;
        align-items: flex-start;
    }
    
    .home-menu {
        padding: 1rem;
    }
    
    .home-menu h2 {
        font-size: 1.8rem;
    }
    
    .search-container {
        margin-bottom: 1rem;
    }
    
    #game-search {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Game grid */
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .game-card {
        padding: 0.75rem;
    }
    
    .game-card-icon {
        font-size: 2rem;
    }
    
    .game-card h3 {
        font-size: 1rem;
    }
    
    .game-card p {
        font-size: 0.75rem;
    }
    
    /* Game containers */
    .game-container {
        padding: 1rem;
        width: 100%;
        max-width: 100%;
        border-radius: 10px;
    }
    
    .game-container h2 {
        font-size: 1.5rem;
    }
    
    .game-description {
        font-size: 0.9rem;
    }
    
    .game-info {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .game-info span {
        font-size: 0.85rem;
    }
    
    /* Canvas scaling for mobile */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    
    #slopCanvas, #flappyCanvas, #snakeCanvas, #blocksCanvas, 
    #pacmanCanvas, #dinoCanvas, #breakerCanvas, #invadersCanvas,
    #slotsCanvas, #rouletteCanvas, #blackjackCanvas, #pokerCanvas, #scratchCanvas, #tunnelCanvas, #moleCanvas, #game2048Canvas,
    #minigolfCanvas, #bottleCanvas, #crossyCanvas, #bananaCanvas,
    #boxtowerCanvas, #wordsearchCanvas, #waterdropCanvas,
    #fourinarowCanvas, #slashmasterCanvas, #chessCanvas {
        max-width: 100%;
        height: auto;
    }
    
    /* Controls */
    .controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .fullscreen-btn {
        display: none; /* Hide fullscreen on mobile - not well supported */
    }
    
    .instructions {
        font-size: 0.8rem;
    }
    
    /* Difficulty selector */
    .difficulty-selector {
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    
    .chess-difficulty,
    .slots-difficulty {
        padding: 0.4rem 0.7rem;
        font-size: 0.75rem;
    }
    
    /* Slots specific */
    .slots-credits-display {
        padding: 0.5rem;
    }
    
    .slots-message {
        font-size: 1rem;
        min-width: auto;
        padding: 0.5rem 1rem;
    }
    
    .quick-bets {
        gap: 0.4rem;
    }
    
    .quick-bet {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    #slots-spinBtn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .bet-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Leaderboard */
    .leaderboard-container {
        max-width: 100%;
        padding: 0.75rem;
    }
    
    .leaderboard-title {
        font-size: 0.9rem;
    }
    
    .leaderboard-entry {
        padding: 0.4rem;
    }
    
    .leaderboard-rank,
    .leaderboard-name,
    .leaderboard-score {
        font-size: 0.8rem;
    }
    
    .leaderboard-username-prompt {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
    
    /* Lock overlay */
    .lock-icon {
        font-size: 3rem;
    }
    
    .lock-content p {
        font-size: 1rem;
    }
    
    /* Coin flip */
    .coin {
        width: 100px;
        height: 100px;
    }
    
    .choice-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Alchemy */
    .alchemy-workspace {
        min-height: 200px;
    }
    
    .alchemy-inventory {
        gap: 0.4rem;
    }
    
    .element {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    /* 2048 */
    .game-2048-board {
        width: 280px;
        height: 280px;
        gap: 8px;
        padding: 8px;
    }
    
    .tile-2048 {
        font-size: 1.2rem;
    }
    
    /* Chess */
    .chess-board {
        width: 280px !important;
        height: 280px !important;
    }
    
    /* Credits notification */
    .credits-notification {
        top: 60px;
        right: 10px;
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    header h1 {
        font-size: 1.3rem;
    }
    
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .game-card {
        padding: 0.5rem;
    }
    
    .game-card-icon {
        font-size: 1.5rem;
    }
    
    .game-card h3 {
        font-size: 0.9rem;
    }
    
    .game-card p {
        display: none;
    }
    
    .game-container h2 {
        font-size: 1.3rem;
    }
    
    .game-info span {
        font-size: 0.75rem;
    }
    
    button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .stat {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets on touch devices */
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .game-card {
        min-height: 80px;
    }
    
    .quick-bet {
        min-height: 36px;
        min-width: 44px;
    }
    
    .leaderboard-entry {
        min-height: 40px;
    }
    
    /* Remove hover effects that don't work on touch */
    .game-card:hover {
        transform: none;
    }
    
    .game-card:active {
        transform: scale(0.98);
        border-color: #e94560;
    }
    
    button:active {
        transform: scale(0.95);
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        padding: 0.5rem 1rem;
    }
    
    main {
        padding: 0.5rem;
    }
    
    .game-container {
        padding: 0.75rem;
    }
    
    .game-container h2 {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }
    
    .game-description {
        display: none;
    }
    
    .game-info {
        margin-bottom: 0.5rem;
        padding: 0.4rem;
    }
    
    canvas {
        max-height: 50vh;
    }
}

/* ========== SHOP STYLES ========== */

/* Shop button in header */
.shop-btn {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2)) !important;
    border: 1px solid rgba(255, 215, 0, 0.4) !important;
    transition: all 0.3s ease;
}

.shop-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Shop Modal */
.shop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.shop-modal.open {
    opacity: 1;
    visibility: visible;
}

.shop-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 1.5rem;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--accent-color, #e94560);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.shop-modal.open .shop-content {
    transform: scale(1);
}

.shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-header h2 {
    font-size: 1.8rem;
    color: #ffd700;
    margin: 0;
}

.shop-credits {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 215, 0, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.shop-credits-amount {
    color: #ffd700;
    font-weight: bold;
}

.shop-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.shop-close:hover {
    background: #e94560;
    transform: rotate(90deg);
}

/* Shop Tabs */
.shop-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.shop-tab {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.shop-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color, #e94560);
}

.shop-tab.active {
    background: linear-gradient(135deg, var(--accent-color, #e94560), #0f3460);
    border-color: var(--accent-color, #e94560);
}

/* Shop Items Grid */
.shop-items {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1rem;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.shop-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.shop-item.owned {
    border-color: rgba(46, 204, 113, 0.5);
}

.shop-item.equipped {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.shop-item.cant-afford {
    opacity: 0.5;
}

/* Preview styles */
.shop-preview-bg {
    width: 100%;
    height: 60px;
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.shop-preview-border {
    width: 60px;
    height: 60px;
    border: 4px solid #fff;
    border-radius: 10px;
    margin: 0 auto 0.75rem;
    background: rgba(0, 0, 0, 0.3);
}

.shop-preview-border.rainbow-border {
    border-image: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff) 1;
    animation: rainbowBorder 2s linear infinite;
}

@keyframes rainbowBorder {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.shop-preview-title {
    font-size: 1.1rem;
    padding: 1rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-item-name {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.shop-item-price {
    color: #ffd700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.shop-item.owned .shop-item-price {
    color: #2ecc71;
}

.shop-item.equipped .shop-item-price {
    color: #ffd700;
}

.shop-item-btn {
    width: 100%;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent-color, #e94560), #0f3460);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.shop-item-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.shop-item-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
}

.shop-item.owned .shop-item-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.shop-item.equipped .shop-item-btn {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #1a1a2e;
}

/* Shop message */
.shop-message {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: bold;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
}

.shop-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.shop-message.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
}

.shop-message.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}

/* Rainbow accent effect */
.rainbow-accent header {
    border-bottom-color: transparent;
    border-image: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff) 1;
    animation: rainbowBorder 2s linear infinite;
}

.rainbow-accent .game-card:hover {
    border-color: transparent;
    border-image: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff) 1;
}

/* Universe accent effect */
.universe-border {
    background: linear-gradient(45deg, #000033, #4b0082, #000033) !important;
    border: 4px solid transparent !important;
    border-image: linear-gradient(45deg, #ffd700, #ffffff, #00ffff, #ff00ff, #ffd700) 1 !important;
    animation: universeBorder 3s ease infinite;
}

@keyframes universeBorder {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(180deg) brightness(1.3); }
}

.universe-accent header {
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #ffd700, #ffffff, #00ffff, #ff00ff, #ffd700) 1;
    animation: universeBorder 3s ease infinite;
}

.universe-accent .game-card:hover {
    border-color: transparent;
    border-image: linear-gradient(45deg, #ffd700, #ffffff, #00ffff, #ff00ff, #ffd700) 1;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), 0 0 60px rgba(0, 255, 255, 0.3);
}

.universe-accent .shop-content {
    border: 2px solid transparent;
    border-image: linear-gradient(45deg, #ffd700, #ffffff, #00ffff, #ff00ff, #ffd700) 1;
}

/* CSS Variable for accent color */
:root {
    --accent-color: #e94560;
}

/* Banana Clicker Win Screen */
.banana-win-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.banana-win-overlay.show {
    opacity: 1;
    visibility: visible;
}

.banana-win-content {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 50%, #ffd700 100%);
    border-radius: 30px;
    padding: 3rem;
    text-align: center;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 0 100px rgba(255, 215, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.5s ease;
}

.banana-win-overlay.show .banana-win-content {
    transform: scale(1);
}

.banana-win-title {
    font-size: 3rem;
    font-weight: bold;
    color: #1a1a2e;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 0.5rem;
    animation: bananaWinPulse 1s ease infinite alternate;
}

@keyframes bananaWinPulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.banana-win-subtitle {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.banana-win-stats {
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #1a1a2e;
    font-size: 1.1rem;
}

.banana-win-stats div {
    margin: 0.5rem 0;
}

.banana-win-message {
    font-size: 1.1rem;
    color: #1a1a2e;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.banana-win-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.banana-win-buttons button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.banana-win-buttons button:first-child {
    background: #1a1a2e;
    color: #ffd700;
}

.banana-win-buttons button:last-child {
    background: rgba(0,0,0,0.3);
    color: #1a1a2e;
}

.banana-win-buttons button:hover {
    transform: scale(1.05);
}

@media (max-width: 650px) {
    .banana-win-content {
        padding: 1.5rem;
    }
    
    .banana-win-title {
        font-size: 2rem;
    }
    
    .banana-win-subtitle {
        font-size: 1.1rem;
    }
    
    .banana-win-message {
        font-size: 0.95rem;
    }
    
    .banana-win-buttons button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Mobile shop styles */
@media (max-width: 650px) {
    .shop-content {
        width: 95%;
        padding: 1rem;
        max-height: 90vh;
    }
    
    .shop-header h2 {
        font-size: 1.3rem;
    }
    
    .shop-credits {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .shop-tabs {
        gap: 0.3rem;
    }
    
    .shop-tab {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .shop-item {
        padding: 0.75rem;
    }
    
    .shop-preview-bg {
        height: 50px;
    }
    
    .shop-preview-border {
        width: 50px;
        height: 50px;
    }
    
    .shop-item-name {
        font-size: 0.9rem;
    }
    
    .shop-item-price {
        font-size: 0.8rem;
    }
    
    .shop-item-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}
