/* Professional Gaming Platform Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    background-attachment: fixed;
}

header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    border-bottom: 1px solid #333;
    position: relative;
    z-index: 10;
}

.site-banner {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    margin: 0;
    position: relative;
    z-index: -1;
}

.header-content {
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.visitor-counter, .active-users {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(9, 9, 121, 0.1) 100%);
    color: #00d4ff;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(0, 212, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.1);
}

.active-users.updating {
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.visitor-counter:hover, .active-users:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a, nav span {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

nav a:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    transform: translateY(-1px);
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
}

/* Mobile responsive main content */
@media (max-width: 768px) {
    main {
        padding: 2rem 1rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem 0.5rem;
    }
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(45, 45, 45, 0.9) 100%);
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    font-size: 70%;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff, #090979, #00d4ff);
    animation: shimmer 3s ease-in-out infinite;
}

.hero h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #00d4ff, #ffffff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 212, 255, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

.hero p {
    font-size: 1rem;
    color: #b0b0b0;
    max-width: 500px;
    margin: 0 auto;
    font-weight: 400;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

@keyframes glow {
    from { filter: brightness(1) drop-shadow(0 0 5px rgba(0, 212, 255, 0.3)); }
    to { filter: brightness(1.1) drop-shadow(0 0 15px rgba(0, 212, 255, 0.5)); }
}

/* Page Load Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category {
    margin-bottom: 4rem;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.category:nth-child(1) { animation-delay: 0.1s; }
.category:nth-child(2) { animation-delay: 0.2s; }
.category:nth-child(3) { animation-delay: 0.3s; }

.game-card {
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 212, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00d4ff, #090979, #ff6b00);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
    border-color: rgba(0, 212, 255, 0.4);
}

.game-card:hover::before {
    transform: scaleX(1);
}

.game-logo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    border: 3px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.game-card:hover .game-logo {
    transform: scale(1.1);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.game-card h4 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.game-card p {
    color: #b0b0b0;
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    flex-grow: 1;
}

.play-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #090979 50%, #ff6b00 100%);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.play-btn:hover::before {
    left: 100%;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
    background: linear-gradient(135deg, #00b8e6 0%, #070866 50%, #e65a00 100%);
}

/* Reorganized Game Card Layout */
.game-card.has-highscores {
    padding: 2rem;
    text-align: left;
}

.game-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.game-content.no-logo {
    justify-content: center;
    text-align: center;
}

.game-content .game-logo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    margin-bottom: 0;
}

.game-info {
    flex: 1;
}

.game-info h4 {
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

.game-info p {
    margin-bottom: 1.5rem;
    color: #b0b0b0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.game-highscores {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(9, 9, 121, 0.05) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.game-highscores h5 {
    color: #00d4ff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    text-align: center;
}

.highscores-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.highscore-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.highscore-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.highscore-item.gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 140, 0, 0.15) 100%);
    border-left: 3px solid #ffd700;
    border-color: rgba(255, 215, 0, 0.3);
}

.highscore-item.silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15) 0%, rgba(169, 169, 169, 0.15) 100%);
    border-left: 3px solid #c0c0c0;
    border-color: rgba(192, 192, 192, 0.3);
}

.highscore-item.bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15) 0%, rgba(184, 115, 51, 0.15) 100%);
    border-left: 3px solid #cd7f32;
    border-color: rgba(205, 127, 50, 0.3);
}

.highscore-item .rank {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 35px;
    color: #00d4ff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.highscore-item .player {
    flex: 1;
    font-weight: 600;
    color: #4ecdc4;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.highscore-item .score {
    font-weight: 700;
    font-size: 0.95rem;
    color: #ff6b6b;
    font-family: 'Courier New', monospace;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.view-all-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(9, 9, 121, 0.1) 100%);
    color: #00d4ff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.view-all-btn:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(9, 9, 121, 0.2) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

/* Mobile responsive game cards */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .game-card.has-highscores {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }

    .game-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 1rem;
    }

    .game-content.no-logo {
        justify-content: center;
    }

    .game-content .game-logo {
        width: 80px;
        height: 80px;
        align-self: center;
        margin-bottom: 0.5rem;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .game-info {
        text-align: center;
    }

    .game-info h4 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        color: #ffffff;
    }

    .game-info p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.4;
        color: #cccccc;
    }

    .play-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
        border-radius: 8px;
        display: inline-block;
        width: auto;
        min-width: 120px;
    }

    .game-highscores {
        background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(9, 9, 121, 0.08) 100%);
        border: 1px solid rgba(0, 212, 255, 0.15);
        border-radius: 10px;
        padding: 1rem;
        margin-top: 1rem;
    }

    .game-highscores h5 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        text-align: center;
        color: #00d4ff;
    }

    .highscores-list {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .highscore-item {
        padding: 0.6rem 0.8rem;
        border-radius: 6px;
        font-size: 0.85rem;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .highscore-item .rank {
        min-width: 25px;
        font-size: 0.8rem;
        font-weight: 700;
        color: #00d4ff;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    }

    .highscore-item .player {
        font-size: 0.85rem;
        flex: 1;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        color: #4ecdc4;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        font-weight: 600;
    }

    .highscore-item .score {
        font-size: 0.9rem;
        font-weight: 700;
        font-family: 'Courier New', monospace;
        color: #ff6b6b;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        background: rgba(0, 0, 0, 0.3);
        padding: 0.2rem 0.4rem;
        border-radius: 4px;
        border: 1px solid rgba(255, 107, 107, 0.3);
    }

    .view-all-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        margin-top: 0.5rem;
        border-radius: 6px;
        display: block;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Tablet responsive layout */
@media (min-width: 769px) and (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .game-card.has-highscores {
        padding: 1.5rem;
    }

    .game-content {
        gap: 1.5rem;
    }

    .game-content.no-logo {
        justify-content: center;
        text-align: center;
    }

    .game-content .game-logo {
        width: 100px;
        height: 100px;
    }

    .game-info h4 {
        font-size: 1.2rem;
    }

    .game-highscores {
        padding: 1.2rem;
    }

    .highscore-item {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .game-card.has-highscores {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .game-content .game-logo {
        width: 70px;
        height: 70px;
    }

    .game-info h4 {
        font-size: 1.1rem;
    }

    .game-info p {
        font-size: 0.85rem;
    }

    .play-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .game-highscores {
        padding: 0.8rem;
        margin-top: 0.8rem;
    }

    .game-highscores h5 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .highscores-list {
        gap: 0.4rem;
        margin-bottom: 0.8rem;
    }

    .highscore-item {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .highscore-item .rank {
        min-width: 22px;
        font-size: 0.75rem;
        color: #00d4ff;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        font-weight: 700;
    }

    .highscore-item .player {
        font-size: 0.8rem;
        flex: 1;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        color: #4ecdc4;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        font-weight: 600;
    }

    .highscore-item .score {
        font-size: 0.85rem;
        font-weight: 700;
        font-family: 'Courier New', monospace;
        color: #ff6b6b;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        background: rgba(0, 0, 0, 0.3);
        padding: 0.2rem 0.4rem;
        border-radius: 4px;
        border: 1px solid rgba(255, 107, 107, 0.3);
    }

    .view-all-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .game-card.has-highscores {
        padding: 0.8rem;
    }

    .game-content .game-logo {
        width: 60px;
        height: 60px;
    }

    .game-content.no-logo {
        justify-content: center;
        text-align: center;
    }

    .game-info h4 {
        font-size: 1rem;
    }

    .game-info p {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .play-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .game-highscores {
        padding: 0.6rem;
    }

    .highscore-item {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }

    .highscore-item .player {
        font-size: 0.75rem;
        flex: 1;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        color: #4ecdc4;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        font-weight: 600;
    }

    .highscore-item .score {
        font-size: 0.8rem;
        font-weight: 700;
        font-family: 'Courier New', monospace;
        color: #ff6b6b;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        background: rgba(0, 0, 0, 0.3);
        padding: 0.2rem 0.4rem;
        border-radius: 4px;
        border: 1px solid rgba(255, 107, 107, 0.3);
    }
}
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    background: linear-gradient(135deg, #00b4e6 0%, #070979 100%);
}

footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: #888;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 6rem;
    border-top: 2px solid rgba(0, 212, 255, 0.2);
    font-size: 0.95rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
}

footer p {
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Enhanced Navigation */
nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

nav a, nav span {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s;
}

nav a:hover::before {
    left: 100%;
}

nav a:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(9, 9, 121, 0.1) 100%);
    color: #00d4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #333;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

canvas {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border: 2px solid #333;
}

#scoreDisplay {
    font-size: 1.5rem;
    font-weight: 600;
    color: #00d4ff;
    margin: 1rem 0;
    text-align: center;
}

button {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

button:hover {
    background: #00d4ff;
    color: #000;
    border-color: #00d4ff;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem 1rem; /* Reduced padding on mobile */
    }

    .site-banner {
        height: 120px; /* Smaller banner on tablets */
    }

    header h1 {
        font-size: 1.8rem;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .theme-switcher {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .theme-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .theme-dropdown {
        min-width: 100px;
        right: 0;
        left: auto;
    }

    .theme-option {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    /* Cache button now uses inline styles */

    .cache-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }

    .hero h2 {
        font-size: 2rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .game-card {
        padding: 1.5rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .hero {
        padding: 1.5rem 1rem; /* Reduced hero padding on mobile */
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .site-banner {
        height: 80px; /* Much smaller banner on phones */
    }

    .header-content {
        padding: 0.75rem 0.5rem; /* Even smaller padding on phones */
    }

    header h1 {
        font-size: 1.5rem;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .game-card h4 {
        font-size: 1.2rem;
    }

    nav {
        gap: 0.5rem;
    }

    nav a, nav span {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .visitor-counter, .active-users {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}
    margin: 20px auto;
    padding: 20px;
}

.hero {
    text-align: center;
    background: rgba(255,255,255,0.8);
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.hero h2 {
    color: #ff6b6b;
    font-size: 2em;
}

.category {
    margin-bottom: 40px;
}

.category h3 {
    color: #4ecdc4;
    font-size: 1.8em;
    border-bottom: 3px solid #4ecdc4;
    padding-bottom: 10px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.game-logo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.game-card:hover {
    transform: translateY(-5px);
}

.game-card h4 {
    color: #45b7d1;
    margin-top: 0;
}

.play-btn {
    background: #f093fb;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

.play-btn:hover {
    background: #f5576c;
}

.login-form, .register-form {
    max-width: 500px;
    margin: 40px auto;
    background: rgba(255,255,255,0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    text-align: center;
}

.login-form h2, .register-form h2 {
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.login-form p, .register-form p {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9em;
    line-height: 1.4;
}

.login-form form, .register-form form {
    /* display: flex; */
    /* flex-direction: column; */
    /* gap: 20px; */
}

.login-form label, .register-form label {
    display: block;
    text-align: left;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.login-form input, .register-form input, .login-form select, .register-form select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s;
    margin-bottom: 15px;
    background: white;
    color: #333;
}

/* Ensure select options are visible */
.login-form select, .register-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.login-form select option, .register-form select option {
    background: white;
    color: #333;
    padding: 8px;
}

.login-form input:focus, .register-form input:focus, .login-form select:focus, .register-form select:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 5px rgba(78, 205, 196, 0.5);
}

.login-form button, .register-form button {
    background: linear-gradient(135deg, #4ecdc4, #45b7d1);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 10px;
}

.login-form button:hover, .register-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.message {
    color: #e74c3c;
    margin-top: 20px;
    font-weight: bold;
}

.success-message {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    padding: 1rem 2rem;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 800px;
    border: 1px solid rgba(46, 204, 113, 0.3);
    text-align: center;
    font-weight: 500;
}

.error-message {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    padding: 1rem 2rem;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 800px;
    border: 1px solid rgba(231, 76, 60, 0.3);
    text-align: center;
    font-weight: 500;
}

.highscore-section {
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 212, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.highscore-section h3 {
    color: #00d4ff;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

table th {
    background: linear-gradient(135deg, #ff6b6b 0%, #f093fb 100%);
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

table td {
    color: #e0e0e0;
    font-weight: 500;
}

table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

table tr:hover {
    background: rgba(0, 212, 255, 0.1);
    transition: background-color 0.3s ease;
}

table td:first-child {
    color: #00d4ff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

table td:nth-child(3) {
    color: #4ecdc4;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.game-section {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#gameCanvas {
    border: 2px solid #4ecdc4;
    background: #f0f0f0;
}

#scoreDisplay {
    font-size: 1.5em;
    margin: 10px 0;
    color: #ff6b6b;
}

button {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin: 5px;
}

button:hover {
    background: #764ba2;
}

footer {
    text-align: center;
    padding: 20px;
    background: #333;
    color: white;
    margin-top: 40px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    nav {
        flex-direction: column;
        align-items: center;
    }

    nav a, nav span {
        margin: 5px 10px;
    }

    main {
        padding: 10px;
    }

    .hero h2 {
        font-size: 1.5em;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-card {
        padding: 15px;
    }

    .login-form, .register-form {
        padding: 20px;
        margin: 20px 10px;
    }

    .login-form form, .register-form form {
        gap: 15px;
    }

    .login-form label, .register-form label {
        font-size: 0.9em;
    }

    .login-form input, .register-form input, .login-form select, .register-form select {
        padding: 10px;
    }

    .login-form select, .register-form select {
        background-position: right 10px center;
        padding-right: 35px;
    }

    .highscore-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    table {
        font-size: 0.9em;
    }

    table th, table td {
        padding: 0.8rem 0.6rem;
    }

    .game-section {
        padding: 20px;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
        max-width: 400px;
    }

    button {
        width: 100%;
        margin: 5px 0;
    }
}

/* Shiny Login Button */
.shiny-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    text-decoration: none;
    display: inline-block;
}

.shiny-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    background: linear-gradient(45deg, #ff5252, #45b7aa);
}

/* Login Dropdown Container */
.header-content {
    position: relative;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-forms {
    position: absolute;
    top: 100%;
    right: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    z-index: 1000;
    min-width: 320px;
    display: none;
    margin-top: 10px;
    animation: slideDown 0.3s ease-out;
}
}

.auth-form h3 {
    color: #00d4ff;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
}

.auth-form form {
    display: flex;
    flex-direction: column;
}

.auth-form label {
    margin-bottom: 0.5rem;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.9rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form select {
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #333;
    border-radius: 8px;
    background: #2d2d2d;
    color: #e0e0e0;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus,
.auth-form select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.auth-form input[type="checkbox"] {
    margin-right: 0.5rem;
}

.auth-form button {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.auth-form p {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0;
}

.auth-form a {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

/* Theme Switcher */
.theme-switcher {
    position: relative;
    display: inline-block;
    margin-right: 15px;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid #333;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #555;
}

.theme-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    min-width: 120px;
    display: none;
    margin-top: 5px;
    animation: slideDown 0.2s ease-out;
    backdrop-filter: blur(10px);
}

.theme-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
    font-weight: 500;
}

.theme-option:last-child {
    border-bottom: none;
}

.theme-option:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

.theme-option.active {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    font-weight: 600;
}

/* Color Themes */
body.theme-light {
    background: #f8f9fa;
    color: #212529;
}

body.theme-light header {
    background: linear-gradient(135deg, #ffffff 0%, #e9ecef 100%);
    color: #212529;
    border-bottom: 1px solid #dee2e6;
}

body.theme-light .header-content h1 {
    background: linear-gradient(45deg, #007bff, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.theme-light .visitor-counter {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.3);
}

body.theme-light nav a {
    color: #007bff;
}

body.theme-light nav a:hover {
    background: rgba(0, 123, 255, 0.1);
}

body.theme-light .auth-forms,
body.theme-light .auth-container {
    background: #ffffff;
    border-color: #dee2e6;
}

body.theme-light .auth-form input,
body.theme-light .auth-form select {
    background: #f8f9fa;
    border-color: #ced4da;
    color: #212529;
}

body.theme-light .theme-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.15);
}

body.theme-light .theme-option {
    color: #212529;
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

/* Blue Theme */
body.theme-blue {
    background: #0a1929;
    color: #e0e0e0;
}

body.theme-blue header {
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 100%);
}

body.theme-blue .header-content h1 {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.theme-blue .visitor-counter {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* Green Theme */
body.theme-green {
    background: #0a1f0a;
    color: #e0e0e0;
}

body.theme-green header {
    background: linear-gradient(135deg, #0f1f0f 0%, #1a321a 100%);
}

body.theme-green .header-content h1 {
    background: linear-gradient(45deg, #00ff88, #00cc66);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.theme-green .visitor-counter {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* Purple Theme */
body.theme-purple {
    background: #1a0a2e;
    color: #e0e0e0;
}

body.theme-purple header {
    background: linear-gradient(135deg, #1f0f3a 0%, #321a5c 100%);
}

body.theme-purple .header-content h1 {
    background: linear-gradient(45deg, #9c27b0, #673ab7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.theme-purple .visitor-counter {
    background: rgba(156, 39, 176, 0.1);
    color: #9c27b0;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

/* Red Theme */
body.theme-red {
    background: #2a0a0a;
    color: #e0e0e0;
}

body.theme-red header {
    background: linear-gradient(135deg, #3a0f0f 0%, #5c1a1a 100%);
}

body.theme-red .header-content h1 {
    background: linear-gradient(45deg, #ff4444, #cc3333);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.theme-light .close-btn {
    color: #666;
}

body.theme-light .close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

body.theme-blue .close-btn {
    color: #00d4ff;
}

body.theme-blue .close-btn:hover {
    background: rgba(0, 212, 255, 0.1);
}

body.theme-green .close-btn {
    color: #00ff88;
}

body.theme-green .close-btn:hover {
    background: rgba(0, 255, 136, 0.1);
}

body.theme-purple .close-btn {
    color: #9c27b0;
}

body.theme-purple .close-btn:hover {
    background: rgba(156, 39, 176, 0.1);
}

body.theme-red .close-btn {
    color: #ff4444;
}

body.theme-red .close-btn:hover {
    background: rgba(255, 68, 68, 0.1);
}
    .auth-forms {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        right: auto;
        min-width: 90vw;
        max-width: 400px;
        margin-top: 0;
        z-index: 1001;
    }

    .auth-forms::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: -1;
    }

    .auth-container {
        padding: 1rem;
    }

    .auth-form h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .auth-form input[type="text"],
    .auth-form input[type="email"],
    .auth-form input[type="password"],
    .auth-form select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .auth-form button {
        font-size: 1rem;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .auth-forms {
        min-width: 95vw;
        top: 45%;
    }

    .auth-container {
        padding: 0.75rem;
    }

    .auth-form h3 {
        font-size: 1.1rem;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .site-banner {
        height: 120px;
    }

    .header-content {
        padding: 0.75rem 1rem;
    }

    .hero {
        margin-bottom: 2rem;
        padding: 1.5rem 1rem;
        font-size: 70%;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
        max-width: 100%;
    }