/* CSS Variables for Theme Colors */
:root {
    --primary-blue: #0077cc;
    --accent-cyan: #00bcd4;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #2c3e50;
    --text-dark: #333333;
    --shadow: rgba(0, 0, 0, 0.1);
    --pixel-font: 'Press Start 2P', cursive;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--pixel-font);
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Improve touch targets for mobile */
button, .game-card, .nav-link, .category-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Improve scrolling on mobile */
.trending-grid, .featured-carousel {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Water Ripple Animation */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 188, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 119, 204, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 188, 212, 0.05) 0%, transparent 50%);
    animation: ripple 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes ripple {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

/* Header Styles */
.header {
    position: sticky;
    top: 0;
    background: var(--white);
    box-shadow: 0 2px 20px var(--shadow);
    z-index: 1000;
    padding: 1rem 0;
    position: relative;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.site-title {
    font-size: 1.5rem;
    color: var(--primary-blue);
    text-shadow: 2px 2px 0px var(--accent-cyan);
}

.navigation {
    display: flex;
    gap: 2rem;
    margin-left: 3rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.8rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

/* Music Controls */
.music-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.music-btn {
    background: rgba(0, 188, 212, 0.1);
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.6rem 0.8rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    font-family: var(--pixel-font);
}

.music-btn:hover {
    background: rgba(0, 188, 212, 0.2);
    transform: scale(1.05);
}

.music-btn.playing {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
    animation: musicPulse 2s infinite;
}

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

.music-selector {
    background: var(--white);
    border: 2px solid var(--accent-cyan);
    color: var(--text-dark);
    padding: 0.5rem 0.8rem;
    border-radius: var(--border-radius);
    font-family: var(--pixel-font);
    font-size: 0.6rem;
    cursor: pointer;
    transition: var(--transition);
}

.music-selector:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-icon {
    font-size: 1rem;
    color: var(--accent-cyan);
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(0, 188, 212, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    transition: var(--transition);
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--primary-blue);
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    border: none;
}

.search-section {
    position: relative;
}

.search-input {
    padding: 0.8rem 1rem;
    border: 2px solid var(--accent-cyan);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--text-dark);
    font-family: var(--pixel-font);
    font-size: 0.7rem;
    width: 250px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
    transform: scale(1.02);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 2rem;
    text-align: center;
    text-shadow: 1px 1px 0px var(--accent-cyan);
}

/* Featured Games Carousel */
.featured-section {
    margin-bottom: 4rem;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.carousel {
    display: flex;
    transition: transform 0.5s ease;
    gap: 1rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-cyan);
    color: var(--white);
    border: none;
    padding: 1rem;
    font-family: var(--pixel-font);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.carousel-btn:hover {
    background: var(--primary-blue);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* Game Cards */
.game-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.2);
}

.featured-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    height: 280px !important;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.2);
}

.game-card {
    height: 280px;
}

.game-thumbnail {
    width: 100%;
    height: 60%;
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    isolation: isolate;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: none;
    border-radius: 8px 8px 0 0;
    max-height: 100%;
    overflow: hidden;
}

.game-card:hover .game-overlay,
.featured-card:hover .game-overlay,
.game-card:active .game-overlay,
.featured-card:active .game-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Touch-friendly game cards on mobile */
@media (max-width: 768px) {
    .game-card .game-overlay,
    .featured-card .game-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

.game-info {
    padding: 1rem;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.3rem;
    position: relative;
    z-index: 1;
    background: var(--white);
    border-radius: 0 0 8px 8px;
    margin-top: 0;
    isolation: isolate;
}

.game-title {
    font-size: 0.8rem;
    color: var(--primary-blue);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-genre {
    font-size: 0.6rem;
    color: var(--accent-cyan);
    background: rgba(0, 188, 212, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin: 0;
    align-self: flex-start;
}

.game-description {
    font-size: 0.5rem;
    color: var(--text-dark);
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.play-btn {
    background: var(--accent-cyan);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    font-family: var(--pixel-font);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 5;
    max-width: 100px;
}

.play-btn:hover {
    background: var(--primary-blue);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.5);
}

/* Trending Grid */
.trending-section {
    margin-bottom: 4rem;
}

.trending-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-start;
    align-items: flex-start;
}

/* Categories Section */
.categories-section {
    margin-bottom: 4rem;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-btn {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--accent-cyan);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-family: var(--pixel-font);
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 188, 212, 0.2), transparent);
    transition: left 0.5s;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover {
    background: var(--accent-cyan);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.3);
}

.category-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(63, 81, 181, 0.3);
}

.category-btn.active:hover {
    background: var(--primary-blue);
    transform: translateY(-1px);
}

.games-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-start;
    align-items: flex-start;
}

/* About Section */
.about-section {
    text-align: center;
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px var(--shadow);
    margin-bottom: 2rem;
}

.about-text {
    font-size: 0.8rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-dark);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 95vw;
    max-height: 95vh;
    width: 1200px;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.modal-content.fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    background: #000;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--primary-blue);
    color: var(--white);
}

.modal-game-title {
    font-size: 1rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    font-family: var(--pixel-font);
    transition: var(--transition);
}

.close-btn:hover {
    transform: scale(1.1);
    color: var(--accent-cyan);
}

.modal-body {
    padding: 1rem 2rem 2rem;
}

.game-container {
    width: 100%;
    height: 600px;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--light-gray);
}

.modal-content.fullscreen .game-container {
    height: 100vh;
    margin: 0;
    border-radius: 0;
}

.modal-content.fullscreen .modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content.fullscreen .modal-body {
    padding: 0;
    height: 100vh;
}

#game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
}

.game-description {
    font-size: 0.7rem;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Loading Indicator */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3000;
    color: var(--primary-blue);
}

.pixel-fish {
    width: 64px;
    height: 64px;
    background: url('fish-logo.svg') no-repeat center;
    background-size: contain;
    margin: 0 auto 1rem;
    animation: swim 2s ease-in-out infinite;
}

@keyframes swim {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 0.8rem;
        background: linear-gradient(135deg, #e8f4fd 0%, #b3d9ff 100%) !important;
    }
    
    /* Add visible mobile indicator */
    body::before {
        content: "📱 MOBILE MODE ACTIVE";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: #ff6b35;
        color: white;
        text-align: center;
        padding: 5px;
        font-size: 12px;
        z-index: 9999;
        font-family: Arial, sans-serif;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
        text-align: center;
        background: rgba(255, 107, 53, 0.1) !important;
        border: 2px solid #ff6b35 !important;
        margin: 5px !important;
        border-radius: 10px !important;
    }

    .header-controls {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .music-controls {
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .music-selector {
        font-size: 0.5rem;
        padding: 0.4rem 0.6rem;
        min-width: 120px;
    }

    .volume-control {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .volume-slider {
        width: 80px;
    }

    .navigation {
        order: 3;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .search-input {
        width: 250px;
        font-size: 0.6rem;
        padding: 0.8rem 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .featured-card {
        width: 200px !important;
        min-width: 200px !important;
        max-width: 200px !important;
        height: 280px !important;
    }

    .game-card {
        width: calc(50% - 0.75rem);
        min-width: 160px;
        max-width: 200px;
    }

    .games-grid {
        gap: 1rem;
        justify-content: space-between;
    }

    .trending-grid {
        gap: 1rem;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .trending-card {
        min-width: 180px;
        flex-shrink: 0;
    }

    .category-filters {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .category-btn {
        font-size: 0.6rem;
        padding: 0.6rem 1rem;
        min-width: 70px;
    }

    .about-section {
        padding: 2rem 1rem;
    }

    .about-text {
        font-size: 0.7rem;
        line-height: 1.6;
    }

    .trending-grid,
    .games-grid {
        justify-content: flex-start;
        gap: 1rem;
    }
    
    .game-card {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
    }

    .category-filters {
        gap: 0.5rem;
    }

    .category-btn {
        font-size: 0.6rem;
        padding: 0.4rem 0.8rem;
    }

    .modal-content {
        width: 95vw;
        height: 95vh;
    }

    .game-container {
        height: 300px;
    }

    .modal-header {
        padding: 0.8rem 1rem;
    }

    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 32px;
        height: 32px;
    }

    .site-title {
        font-size: 0.9rem;
    }

    .search-input {
        width: 200px;
        font-size: 0.6rem;
        padding: 0.7rem 0.8rem;
    }

    .nav-link {
        font-size: 0.6rem;
        padding: 0.5rem 0.8rem;
    }

    .navigation {
        gap: 0.5rem;
    }

    .games-grid {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .trending-grid {
        justify-content: flex-start;
        gap: 0.8rem;
    }
    
    .game-card {
        width: calc(100% - 1rem);
        min-width: 280px;
        max-width: 320px;
        margin: 0 auto;
    }

    .trending-card {
        min-width: 160px;
        width: 160px;
    }

    .featured-card {
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
        height: 250px !important;
    }

    .category-btn {
        font-size: 0.5rem;
        padding: 0.5rem 0.8rem;
        min-width: 60px;
    }

    .music-controls {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .music-selector {
        font-size: 0.5rem;
        padding: 0.5rem;
        width: 140px;
    }

    .volume-control {
        width: 100%;
        justify-content: center;
        max-width: 200px;
    }

    .about-text {
        font-size: 0.6rem;
        line-height: 1.5;
        padding: 0 0.5rem;
    }

    .section-title {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .main-content {
        padding: 0.8rem;
    }

    .header {
        padding: 0.5rem 0;
    }

    /* Make buttons more touch-friendly */
    .play-btn, .close-btn, .music-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.8rem;
    }

    /* Improve modal for mobile */
    .modal-content {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }

    .modal-header {
        padding: 0.8rem 1rem;
    }

    .modal-game-title {
        font-size: 0.8rem;
    }

    /* Hide decorative elements on very small screens */
    .floating-fish,
    .floating-bubble {
        display: none;
    }

    /* Mobile game controls overlay */
    .mobile-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 120px;
        background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        padding: 1rem;
        z-index: 1000;
        pointer-events: none;
    }

    .mobile-dpad, .mobile-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        pointer-events: auto;
    }

    .mobile-dpad {
        position: relative;
        width: 80px;
        height: 80px;
    }

    .mobile-btn {
        background: rgba(255,255,255,0.2);
        border: 2px solid rgba(255,255,255,0.4);
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        color: white;
        font-weight: bold;
        touch-action: manipulation;
        user-select: none;
        transition: all 0.1s ease;
    }

    .mobile-btn:active {
        background: rgba(255,255,255,0.4);
        transform: scale(0.9);
    }

    .dpad-up, .dpad-down {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .dpad-up { top: 0; }
    .dpad-down { bottom: 0; }

    .dpad-left, .dpad-right {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .dpad-left { left: 0; }
    .dpad-right { right: 0; }

    .mobile-buttons {
        flex-direction: row;
        gap: 1rem;
    }

    .action-btn {
        width: 60px;
        height: 60px;
        font-size: 0.9rem;
    }
}

/* Hide loading after page loads */
.loaded .loading {
    display: none;
}

/* Floating Fish Decorations */
.floating-fish {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
}

.floating-fish-1 {
    top: 15%;
    left: -120px;
    animation: swimAcross 8s linear infinite;
}

.floating-fish-2 {
    top: 65%;
    right: -120px;
    animation: swimAcrossReverse 10s linear infinite;
    transform: scaleX(-1);
}

.floating-fish-3 {
    top: 35%;
    left: -140px;
    animation: swimAcross 12s linear infinite 3s;
}

.floating-fish-4 {
    top: 85%;
    right: -140px;
    animation: swimAcrossReverse 9s linear infinite 4s;
    transform: scaleX(-1);
}

.floating-fish-5 {
    top: 25%;
    left: -100px;
    animation: swimAcross 7s linear infinite 6s;
}

.floating-fish-6 {
    top: 75%;
    right: -100px;
    animation: swimAcrossReverse 11s linear infinite 2s;
    transform: scaleX(-1);
}

.floating-fish-7 {
    top: 50%;
    left: -80px;
    animation: swimAcross 6s linear infinite 8s;
}

.floating-fish-8 {
    top: 95%;
    right: -80px;
    animation: swimAcrossReverse 8s linear infinite 1s;
    transform: scaleX(-1);
}

/* Small fish variant */
.small-fish {
    width: 30px !important;
    height: 20px !important;
    animation: fishSwim 1.5s ease-in-out infinite alternate !important;
}

.small-fish::before {
    left: -12px !important;
    border-top: 10px solid transparent !important;
    border-bottom: 10px solid transparent !important;
    border-right: 12px solid var(--accent-cyan) !important;
}

.small-fish::after {
    right: -8px !important;
    border-top: 8px solid transparent !important;
    border-bottom: 8px solid transparent !important;
    border-left: 8px solid var(--primary-blue) !important;
}

.mini-fish {
    width: 50px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #0088aa 50%, var(--primary-blue) 100%);
    position: relative;
    border-radius: 25px 8px 8px 25px;
    box-shadow: 
        inset 2px 2px 4px rgba(255,255,255,0.3),
        inset -2px -2px 4px rgba(0,0,0,0.2);
    animation: fishSwim 2s ease-in-out infinite alternate;
}

/* Fish head/nose */
.mini-fish::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-right: 18px solid var(--accent-cyan);
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2));
}

/* Fish tail */
.mini-fish::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 14px solid var(--primary-blue);
    animation: tailWag 1.5s ease-in-out infinite;
}

/* Fish eye and body details */
.mini-fish {
    background-image: 
        linear-gradient(135deg, var(--accent-cyan) 0%, #0088aa 50%, var(--primary-blue) 100%),
        radial-gradient(circle at 15px 12px, white 4px, transparent 5px),
        radial-gradient(circle at 16px 11px, black 2px, transparent 3px),
        linear-gradient(90deg, transparent 20px, rgba(255,255,255,0.2) 22px, transparent 24px);
}

@keyframes fishSwim {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-3px) rotate(1deg); }
}

@keyframes tailWag {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    50% { transform: translateY(-50%) rotate(5deg); }
}

@keyframes swimAcross {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 200px)); }
}

@keyframes swimAcrossReverse {
    0% { transform: scaleX(-1) translateX(0); }
    100% { transform: scaleX(-1) translateX(calc(100vw + 200px)); }
}

/* Fish bubbles animation */
.fish-bubbles {
    position: fixed;
    bottom: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -20px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(0, 188, 212, 0.6));
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    animation: bubbleFloat 8s ease-in-out infinite;
    box-shadow: 
        inset 2px 2px 4px rgba(255,255,255,0.4),
        0 2px 8px rgba(0, 188, 212, 0.3);
}

.bubble:nth-child(1) { left: 5%; width: 10px; height: 10px; animation-delay: 0s; animation-duration: 7s; }
.bubble:nth-child(2) { left: 15%; width: 14px; height: 14px; animation-delay: 1.5s; animation-duration: 9s; }
.bubble:nth-child(3) { left: 25%; width: 8px; height: 8px; animation-delay: 3s; animation-duration: 6s; }
.bubble:nth-child(4) { left: 40%; width: 12px; height: 12px; animation-delay: 2s; animation-duration: 8s; }
.bubble:nth-child(5) { left: 55%; width: 16px; height: 16px; animation-delay: 0.5s; animation-duration: 10s; }
.bubble:nth-child(6) { left: 70%; width: 9px; height: 9px; animation-delay: 4s; animation-duration: 7s; }
.bubble:nth-child(7) { left: 80%; width: 11px; height: 11px; animation-delay: 1s; animation-duration: 8.5s; }
.bubble:nth-child(8) { left: 90%; width: 7px; height: 7px; animation-delay: 2.5s; animation-duration: 6.5s; }

@keyframes bubbleFloat {
    0% { 
        transform: translateY(0) scale(0.5) translateX(0);
        opacity: 0.7;
    }
    10% {
        opacity: 1;
        transform: translateY(-10vh) scale(0.8) translateX(5px);
    }
    50% {
        transform: translateY(-50vh) scale(1) translateX(-10px);
        opacity: 0.8;
    }
    80% {
        transform: translateY(-80vh) scale(1.1) translateX(8px);
        opacity: 0.5;
    }
    100% { 
        transform: translateY(-110vh) scale(0.3) translateX(-5px);
        opacity: 0;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Recommendations Section */
.recommendations-section {
    margin-bottom: 4rem;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.05) 0%, rgba(0, 119, 204, 0.05) 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 2px solid rgba(0, 188, 212, 0.1);
}

.recommendations-section .section-title {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    text-align: center;
}

.game-card.recommended {
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.2);
    transform: scale(1);
    transition: all 0.3s ease;
}

.game-card.recommended:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 188, 212, 0.3);
}

.game-card.recommended::before {
    content: '★';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-cyan);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 10;
}

/* User Stats Panel */
.user-stats-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    z-index: 1000;
    min-width: 200px;
    transform: translateX(220px);
    transition: transform 0.3s ease;
}

.user-stats-panel.show {
    transform: translateX(0);
}

.user-stats-panel h4 {
    margin: 0 0 10px 0;
    color: var(--accent-cyan);
    font-size: 0.9rem;
}

.user-stats-panel .stat-item {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
}

.user-stats-panel .stat-label {
    color: #ccc;
}

.user-stats-panel .stat-value {
    color: var(--accent-cyan);
    font-weight: bold;
}

.stats-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 18px;
    z-index: 1001;
    transition: all 0.3s ease;
}

.stats-toggle:hover {
    background: var(--accent-cyan);
    transform: scale(1.1);
}

/* Search Results Page Styles */
.search-results-section {
    margin-bottom: 4rem;
}

.search-header {
    text-align: center;
    margin-bottom: 3rem;
}

.search-info {
    font-size: 0.8rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.back-link {
    display: inline-block;
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.7rem;
    margin-top: 1rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-blue);
    transform: translateX(-3px);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px var(--shadow);
}

.no-results h3 {
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.no-results p {
    font-size: 0.8rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
.game-card:focus {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}
