/* Prevent scrolling when loading */
body.loading {
    overflow: hidden;
    height: 100vh;
}

/* Import Tailwind-Like Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* General Page Styles */
body {
    background-color: #05000f;
    color: white;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    position: relative;
    text-align: center;
}

/* Loading Screen */
.loading-screen {
    background-color: #05000f;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeOut 2s ease-in-out 2s forwards;
    z-index: 9999;
}

/* Loading Logo */
.loading-logo {
    width: 200px;
    animation: pulse 2s infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Fade Out Animation for Loading Screen */
@keyframes fadeOut {
    100% {
        opacity: 0;
        visibility: hidden;
    }
}


/* Main Content (Hidden Until Loading Ends) */
.main-content {
    background-color: #130a26;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: fadeIn 1s ease-in-out 3s forwards;
}

/* Fade In Animation for Main Content */
@keyframes fadeIn {
    100% {
        opacity: 1;
    }
}

/* Background Wrapper*/
.background-wrapper {
    position: relative;
    width: 100%;
    height: auto;
}

/* Background Image */
.background-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 500px;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.4); 
}


/* Info Section */
.info-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 50px 20px;
    margin-top: 530px;
}

.info-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
}

.info-box:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.2);
}

.info-box h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.info-box p {
    font-size: 16px;
    color: #d1d1d1;
}

/* Header with Blur */
header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px); /* Blurs the background */
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000; /* Ensures it stays above other elements */
}

/* Header Left Section */
.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-left: 40px;
}

/* Logo */
.header-logo {
    height: 65px;
    cursor: pointer;
}

/* Navigation Menu */
nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline;
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

/* Underline Effect */
nav ul li a::after {
    content: "";
    display: block;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease-in-out;
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Games Title */
.games-title {
    text-align: center;
    margin-bottom: 40px;
}

.games-title h2 {
    font-size: 16px;
    margin-top: 60px;
}

/* Game Cards Grid Layout */
.games-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Always 3 cards per row */
    gap: 20px; /* Gap between cards */
    padding: 20px;
    justify-items: center; /* Center cards horizontally */
    max-width: 1200px; /* Max container width */
    margin: auto; /* Center the grid on the page */
}

/* Game Card */
.game-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
    width: 100%; /* Makes sure the grid handles the width */
    max-width: 350px; /* Card size */
}

.game-card:hover {
    transform: scale(1.05);
}

/* Game Thumbnail */
.game-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

/* Play Button - Roblox Green */
.play-button {
    display: inline-block;
    background: #00C84E; /* Roblox Play Button Green */
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px;
    font-weight: bold;
    transition: background 0.2s;
}

.play-button:hover {
    background: #009F3F; /* Darker Green */
}

/* Game Stats Section */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 50px 0;
}

/* Parallelogram-shaped stat boxes */
.stat-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    text-align: center;
    width: 200px;
    font-size: 35px; /* Bigger numbers */
    font-weight: bold;
    color: white;
    border-radius: 8px;
    transform: skew(-10deg); /* Makes it a parallelogram */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Undo skew for text inside */
.stat-box div {
    transform: skew(10deg);
}

/* Titles BELOW numbers */
.stat-box span {
    display: block;
    font-size: 14px; /* Smaller title */
    margin-top: 5px;
    font-weight: normal;
    opacity: 0.8;
}

/* Hover Animation */
.stat-box:hover {
    transform: skew(-10deg) scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Game Stats Icons */
.game-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.game-stats img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1); /* Make icons white */
}

/* Want to Work With Us Section */
.work-with-us {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 12px;
    max-width: 1200px;
    margin: 80px auto;
    text-align: left;
}

.work-text {
    flex: 1;
}

.work-text h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.work-text p {
    font-size: 18px;
    color: #d1d1d1;
}

/* Discord Button */
.discord-button {
    display: inline-block;
    background-color: #5865F2;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s;
}

.discord-button:hover {
    transform: scale(1.1);
}

/* Social Media Grid */
.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid white;
    border-radius: 10px;
    transition: background-color 0.3s, transform 0.2s;
}

.social-icon img {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
}

.social-icon:hover {
    background-color: #007bff;
    transform: scale(1.1);
}

/* Rotating Thumbnails Section */
.thumbnail-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 140px; /* Adjusted to fit one row */
    display: flex;
    align-items: center;
    padding: 15px 0;
    white-space: nowrap;
}

.thumbnail-line {
    display: flex;
    gap: 25px;
    align-items: center;
    animation: scroll-left 20s linear infinite; /* Continuous movement */
}

/* Wrapper for Each Thumbnail */
.thumbnail-wrapper {
    position: relative;
    width: 250px;
    height: 140px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0; /* Prevents resizing */
    transition: transform 0.3s ease-in-out; /* Smooth zoom effect */
}

/* Thumbnails */
.rotating-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.3s ease-in-out; /* Smooth zoom effect */
}

/* Hover Effect: Zoom In */
.thumbnail-wrapper:hover .rotating-thumbnail {
    transform: scale(1.1); /* Zoom in effect */
}


/* Text Overlay */
.thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
}

/* Game Name */
.game-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 2px;
    color: white;
}

/* Creator Name */
.creator-name {
    font-size: 12px;
    font-weight: bold;
    margin: 0;
    opacity: 0.9;
    transform: translateY(3px);
    color: white;
}

/* "By" Part in Gray */
.creator-name::before {
    content: "By ";
    color: gray;
    opacity: 0.75;
}

/* Smooth Infinite Scroll */
@keyframes scroll-left {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.see-all-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease-out 1.2s forwards;
}

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

.see-all-button {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    color: white;
    background: linear-gradient(90deg, #0022ff, #00aeff);
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px 130a26;
    position: relative;
    overflow: hidden;
}

.see-all-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
}

.see-all-button:hover::before {
    left: 100%;
}

.see-all-button i {
    margin-left: 10px;
    transition: transform 0.3s ease-in-out;
}

.see-all-button:hover i {
    animation: arrowWiggle 0.6s infinite alternate;
}

@keyframes arrowWiggle {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(5px);
    }
}


/* Hide desktop navigation on mobile */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }
}

/* Hide mobile navigation on desktop */
@media (min-width: 769px) {
    .hamburger,
    .mobile-nav {
        display: none !important;
    }
}

/* Hamburger Menu */
.hamburger {
    position: fixed;
    top: 20px;
    right: 40px;
    z-index: 101;
    cursor: pointer;
}

/* Hide the checkbox completely */
#menu-toggle {
    display: none;
}

/* Hamburger Icon */
.hamburger svg {
    height: 3em;
    transition: transform 0.4s ease-in-out;
}

.line {
    fill: none;
    stroke: white;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    transition: stroke-dasharray 0.4s ease-in-out, stroke-dashoffset 0.4s ease-in-out;
}

.line-top-bottom {
    stroke-dasharray: 12 63;
}

/* Menu Open State */
#menu-toggle:checked + .hamburger svg {
    transform: rotate(-45deg);
}

#menu-toggle:checked + .hamburger svg .line-top-bottom {
    stroke-dasharray: 20 300;
    stroke-dashoffset: -32.42;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    transition: transform 0.4s ease-in-out;
    z-index: 100;
}

/* Show menu when checked */
#menu-toggle:checked ~ .mobile-nav {
    transform: translateY(0);
}

/* Mobile Navigation List */
.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column; /* Stack links */
    align-items: center;
}

.mobile-nav ul li {
    width: 100%;
    text-align: center;
    margin: 10px 0;
}

.mobile-nav ul li a {
    display: block;
    padding: 15px;
    font-size: 1.8rem;
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.mobile-nav ul li a:hover {
    color: #ffcc00;
}
