body.loading {
    overflow: hidden;
    height: 100vh;
}

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

body {
    background-color: #05000f;
    color: white;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
}

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

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

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

@keyframes fadeOut {
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.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;
}

@keyframes fadeIn {
    100% {
        opacity: 1;
    }
}

header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-left: 40px;
}

.header-logo {
    height: 65px;
    cursor: default;
}

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

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

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%;
}

.page-title {
    margin-top: 110px;
    font-size: 32px;
    font-weight: bold;
}

.subtitle {
    font-size: 18px;
    color: #d1d1d1;
    margin-bottom: 20px;
}

#games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    width: 100%;
    margin: auto;
    justify-items: center;
}

.game-card {
    position: relative;
    width: 100%;
    max-width: 350px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.game-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease-in-out;
}

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

.game-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: center;
    justify-content: flex-end;
    text-align: center;
}

.game-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    align-items: center;
}

.game-stats img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.play-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: #00C84E;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease-in-out;
}

.play-button img {
    width: 22px;
    height: 22px;
    display: block;
}

.play-button:hover {
    background: #009F3F;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hamburger,
    .mobile-nav {
        display: none !important;
    }
}

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

#menu-toggle {
    display: none;
}

.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-toggle:checked + .hamburger svg {
    transform: rotate(-45deg);
}

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

.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;
}

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

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    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;
}

@media (max-width: 768px) {
    header {
        padding: 10px;
        justify-content: space-between;
    }

    .header-left {
        padding-left: 20px;
        gap: 20px;
    }

    .header-logo {
        height: 50px;
    }

    #games-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .game-card {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 10px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        transition: background 0.3s;
    }

    .game-card:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .game-thumbnail {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 5px;
    }

    .game-overlay {
        flex-grow: 1;
        text-align: left;
        padding: 0;
    }

    .game-name {
        font-size: 18px;
    }

    .game-stats {
        justify-content: flex-start;
        gap: 8px;
    }
    .play-button {
        position: absolute;
        bottom: -90px;
        right: -130px;
        width: 40px;
        height: 40px;
        background: #00C84E;
        border-radius: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s ease-in-out;
    }
    
    .page-title {
        font-size: 24px;
        margin-top: 90px;
    }

    .subtitle {
        font-size: 16px;
    }
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #130a26;
}

.footer-divider {
    border: none;
    border-top: 1px solid #2d2a3a;
    width: 100%;
    margin: 40px 0 24px 0;
    background: none;
    height: 0;
    opacity: 1;
    display: block;
}

#footer-text {
    margin-top: 18px;
    font-size: 15px;
    color: #ffffff6a;
    opacity: 0.92;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.7px;
}