@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&display=swap');

body {
    background: linear-gradient(135deg, #0c0c1e 0%, #1a0d2e 25%, #2d1b36 50%, #1a0d2e 75%, #0c0c1e 100%);
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 15px 25px, #fff, transparent),
        radial-gradient(1px 1px at 65px 45px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 35px 85px, #fff, transparent),
        radial-gradient(2px 2px at 95px 15px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 125px 75px, #fff, transparent),
        radial-gradient(1px 1px at 175px 35px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 45px 125px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 185px 95px, #fff, transparent),
        radial-gradient(1px 1px at 25px 165px, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 155px 145px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 180px;
    pointer-events: none;
    z-index: -3;
    animation: twinkle 3s ease-in-out infinite alternate;
    transition: transform 0.1s ease-out;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 55px 35px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 85px 85px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 135px 45px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 25px 115px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 165px 75px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 105px 135px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 195px 25px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 75px 165px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 15px 55px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 145px 105px, rgba(255,255,255,0.5), transparent);
    background-repeat: repeat;
    background-size: 220px 190px;
    pointer-events: none;
    z-index: -2;
    animation: drift 6s ease-in-out infinite alternate;
    transition: transform 0.15s ease-out;
    will-change: transform;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-10px, -10px) rotate(0.5deg); }
}

/* Mouse interaction variables */
:root {
  --mouse-x: 50%;
  --mouse-y: 50%;
  --parallax-x: 0px;
  --parallax-y: 0px;
}

/* Enhanced parallax effect */
body::before {
    transform: translate(calc(var(--parallax-x) * 0.3), calc(var(--parallax-y) * 0.3));
}

body::after {
    transform: translate(calc(var(--parallax-x) * 0.6), calc(var(--parallax-y) * 0.6));
}

/* Subtle glow effect that follows mouse */
body {
    background: 
        radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(100, 149, 237, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, #0c0c1e 0%, #1a0d2e 25%, #2d1b36 50%, #1a0d2e 75%, #0c0c1e 100%);
}

.star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -3;
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, transparent, #fff, transparent);
    border-radius: 50%;
    animation: shootingStar 3s linear infinite;
    opacity: 0;
}

@keyframes shootingStar {
    0% {
        transform: translateX(-100px) translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(calc(100vh + 100px));
        opacity: 0;
    }
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    backdrop-filter: blur(10px) saturate(200%) brightness(70%);
    color: #fff;
    display: flex;
    height: 7vw;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0 1%;
    z-index: 5;
    margin: auto;
}

nav img {
    height: 80%;
    width: auto;
    margin-right: 1%;
    border-radius: 1vw;
    cursor: pointer;
    user-select: none;
    box-shadow: 5px 5px 10px rgba(53, 53, 53, 0.459);
}

nav h1 {
    font-size: 4vw;
    font-weight: 800;
    margin-right: 1%;
    flex-grow: 1;
}

.com-text {
    font-size: 2.5vw;
    font-weight: 600;
    opacity: 0.8;
}

.content {
    flex-direction: column;
    align-items: left;
    padding: 7vw;
    padding-top: 2vw;
}

.search {
    display: flex;
    user-select: none;
    justify-content: flex-end;
    backdrop-filter: none;
    filter: none;
    position: relative;
    z-index: 10;
    margin-right: 3vw;
}
 
.search input {
    background-color: #222222;
    border: none;
    border-radius: 1.2vw 0 0 1.2vw;
    color: #fff;
    font-size: 1.8vw;
    font-weight: 600;
    padding: 1vw 2vw;
    font-family: 'Montserrat', sans-serif;
    z-index: 1;
    outline: none;
    width: 20vw;
}
 
.search input::placeholder {
    color: #fff;
    font-weight: 600;
    font-size: 1.8vw;
}
 
.search button {
    background-color: #fff;
    border: none;
    border-radius: 0 1.2vw 1.2vw 0;
    color:#222222;
    font-size: 1.8vw;
    font-weight: 600;
    padding: 1vw 1.5vw;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    z-index: 1;
}

.com-text {
    font-size: 2.5vw;
    font-weight: 600;
    opacity: 0.8;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0c0c1e 0%, #1a0d2e 25%, #2d1b36 50%, #1a0d2e 75%, #0c0c1e 100%);
    z-index: 100;
    display: none;
    overflow-y: auto;
}

.search-overlay.active {
    display: block;
}

.search-overlay-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 7vw;
    backdrop-filter: blur(10px) saturate(200%) brightness(70%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2vw;
    z-index: 101;
}

.search-overlay-header .logo {
    display: flex;
    align-items: center;
    color: #fff;
    height: 100%;
}

.search-overlay-header .logo img {
    height: 7vw;
    max-height: 90px;
    width: auto;
    margin-right: 1vw;
    border-radius: 1vw;
}

.search-overlay-header .logo h1 {
    font-size: 4.5vw;
    max-font-size: 54px;
    font-weight: 800;
    margin: 0;
    white-space: nowrap;
}

.search-overlay-header .close-search {
    background: none;
    border: none;
    color: #fff;
    font-size: 3vw;
    cursor: pointer;
    padding: 1vw;
    border-radius: 1vw;
    transition: background-color 0.3s;
}

.search-overlay-header .close-search:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-overlay-content {
    display: flex;
    margin-top: 7vw;
    min-height: calc(100vh - 7vw);
}

.search-sidebar {
    width: 15vw;
    padding: 2vw 1vw;
    display: flex;
    flex-direction: column;
    gap: 3vw;
}

.search-main {
    flex: 1;
    padding: 2vw;
    max-width: calc(100vw - 30vw);
}

.search-input-container {
    margin-bottom: 3vw;
    display: flex;
    justify-content: center;
}

.search-input-container input {
    background-color: #222222;
    border: none;
    border-radius: 1.2vw;
    color: #fff;
    font-size: 2vw;
    font-weight: 600;
    padding: 1.5vw 2vw;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    width: 60vw;
    max-width: 50vw;
}

.search-input-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.search-results {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1vw;
}

.search-results img {
    height: 12vw;
    width: 12vw;
    border-radius: 1vw;
    cursor: pointer;
    user-select: none;
    transition: transform .2s;
}

.search-results img:hover {
    transform: scale(1.05);
}

.search-ad {
    width: 100%;
    height: 25vw;
    background-color: rgba(42, 42, 42, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1vw;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2vw;
    font-weight: 600;
}

.no-results {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2vw;
    font-weight: 600;
    margin-top: 5vw;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    flex-direction: column;
}

.search-overlay.active {
    display: flex;
}

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

.search-overlay-header .logo {
    display: flex;
    align-items: center;
    gap: 1vw;
}

.search-overlay-header .logo img {
    height: 4vw;
}

.search-overlay-header .logo h1 {
    color: white;
    font-size: 2.5vw;
    margin: 0;
}

.search-overlay-header .logo .com-text {
    color: #0097FB;
}

.close-search {
    background: none;
    border: none;
    color: white;
    font-size: 2vw;
    cursor: pointer;
    padding: 1vw;
}

.search-overlay-content {
    display: flex;
    flex: 1;
    gap: 2vw;
    padding: 2vw;
}

.search-sidebar {
    width: 20vw;
    display: flex;
    flex-direction: column;
    gap: 2vw;
}

.search-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-input-container {
    margin-bottom: 3vw;
}
 
#games {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 3vw;
    padding-bottom: 5vw;
    transition: margin-top 0.4s ease-in-out;
}

#games.search-active {
    margin-top: -13vw;
    padding-top: 20vw;
}
 
#games img {    height: 15.6vw;
    width: 15.6vw;
    border-radius: 1vw;
    margin: .5vw;
    cursor: pointer;
    user-select: none;
    transition: transform .2s;
}
 
#games img:hover {
    transform: scale(1.01);
}

.long-ad-banner {
    width: 100%;
    max-width: 100%;
    margin: 2vw 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(42, 42, 42, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1vw;
    height: 12vw;
    padding: 1vw;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 2;
}

.long-ad {
    width: 100%;
    max-width: 100%;
    height: 10vw;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.5vw;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.5vw;
    font-weight: 600;
}

/* Featured ad banner - same size as regular ads */
.featured + .long-ad-banner {
    height: 12vw;
    margin: 2vw 0;
    transition: all 0.4s ease-in-out;
}

.featured + .long-ad-banner .long-ad {
    height: 10vw;
    font-size: 1.5vw;
}

/* Position featured ad at top when searching */
#games.search-active ~ .featured + .long-ad-banner,
.search-active-featured-ad {
    position: fixed;
    top: 7vw;
    left: 0;
    right: 0;
    margin: 0;
    z-index: 4;
    width: calc(100% - 4vw);
    margin-left: 2vw;
    margin-right: 2vw;
}

.featured {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1vw;
    margin:1%;
    margin-top: 8vw;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

.featured h1 {
    font-size: 3.5vw;
    font-weight: 700;
    margin: 1vw 1vw .4vw 1vw;
    width: 83.8%;
    text-align: left;
    color: #fff;
}

.featured.hidden {
    opacity: 0;
    transform: translateY(-50px);
    pointer-events: none;
}

.featured .column {
    display: flex;
    flex-direction: column;
}

.featured img {
    height: 12.5vw;
    width: 12.5vw;
    border-radius: 1vw;
    margin: .5vw;
    cursor: pointer;
    user-select: none;
    transition: all .2s;
}

.featured img:hover {
    transform: scale(1.02);
    filter: brightness(50%);
}


.featured .row img {
    height: 26vw;
    width: 26vw;
}

.featured a {
    display: inline-block;
    position: relative;
    color: #2c7ffc;
    text-decoration: none;
}
    
    .featured .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s;
    }
    
    .featured a:hover .play-button {
    opacity: 1;
    pointer-events: none;
    }
    
    .featured .play-button i {
    font-size: 5vw;
    text-shadow: 0 0 100px #2c7ffc;
    }