/* Global Styles & Variables */
:root {
    --bg-main: #050511;
    --bg-secondary: #0f1020;
    --primary: #0d6efd;
    --primary-glow: #0d6dfda9;
    --secondary: #939ca4;
    --secondary-glow: #b3bbc26b;
    --accent: #ff0055;
    --text-main: #ffffff;
    --text-muted: #b0b0cc;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-orbitron: 'Orbitron', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Roboto', system-ui, -apple-system, sans-serif;
    --card-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(188, 19, 254, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 243, 255, 0.08), transparent 25%);
    min-height: 100vh;

    /* Anti-flicker initial state */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

body.fonts-loaded {
    visibility: visible;
    opacity: 1;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-font {
    font-family: var(--font-orbitron);
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.text-muted {
    color: var(--text-muted) !important;
}
/* Navbar */
.navbar {
    background: rgba(5, 5, 17, 0.85) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent;
    /* text-shadow: 0 0 6px var(--secondary); */
}

.nav-link {
    font-family: var(--font-orbitron);
    font-size: 0.9rem;
    color: var(--text-muted) !important;
    position: relative;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary) !important;
    text-shadow: 0 0 8px var(--secondary-glow);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--secondary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.search-container {
    position: relative;
}

.search-input {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #fff;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    color: #fff;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn-neon {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-family: var(--font-orbitron);
    padding: 10px 25px;
    border-radius: 50px;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.2);
    z-index: 1;
}

.btn-neon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--primary);
    z-index: -1;
    transition: var(--transition);
}

.btn-neon:hover {
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
    border-color: var(--primary);
}

.btn-neon:hover::before {
    width: 100%;
}

.btn-neon-secondary {
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.btn-neon-secondary::before {
    background: var(--secondary);
}

.btn-neon-secondary:hover {
    color: #000;
    box-shadow: 0 0 20px var(--secondary-glow);
}

/* Hero Section */
/* ============================= */
/* HERO SECTION ANIMATED BG */
/* ============================= */

.hero-section {
    position: relative;
    padding: 6rem 0;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    background: radial-gradient(circle at 20% 30%, rgba(0, 243, 255, 0.15), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(241, 196, 15, 0.15), transparent 40%),
        linear-gradient(135deg, #0a0a14, #121225);
    animation: gradientShift 8s ease infinite alternate;
}

/* Animated moving gradient glow */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* ============================= */
/* GRID OVERLAY (MOVING) */
/* ============================= */

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: moveGrid 20s linear infinite;
}

@keyframes moveGrid {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 40px 40px;
    }
}

/* ============================= */
/* FLOATING LIGHT PARTICLES */
/* ============================= */

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='2' fill='%2300f3ff'/%3E%3Ccircle cx='150' cy='80' r='1.5' fill='%23f1c40f'/%3E%3Ccircle cx='100' cy='150' r='1.5' fill='%2300f3ff'/%3E%3C/svg%3E");
    opacity: 0.3;
    animation: floatParticles 25s linear infinite;
    z-index: 0;
}

@keyframes floatParticles {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-200px);
    }
}

/* ============================= */
/* HERO TITLE ANIMATION */
/* ============================= */

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(0, 243, 255, 0.6));
    animation: glowPulse 2s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from {
        filter: drop-shadow(0 0 5px rgba(0, 243, 255, 0.4));
    }

    to {
        filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.9));
    }
}

/* ============================= */
/* BADGE ANIMATION */
/* ============================= */

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-orbitron);
    font-size: 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.6);
    animation: badgeGlow 1.8s ease-in-out infinite alternate;
}

@keyframes badgeGlow {
    from {
        box-shadow: 0 0 10px rgba(241, 196, 15, 0.4);
    }

    to {
        box-shadow: 0 0 25px rgba(241, 196, 15, 0.9);
    }
}


/* Section Headers */
.section-title {
    font-size: 1.8rem;
    color: #fff;
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    border-radius: 2px;
}

/* Filters */
.filter-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-family: var(--font-orbitron);
    margin: 0 5px;
    border-radius: 8px;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(188, 19, 254, 0.1);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.3);
}

/* Game Cards */
.game-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--secondary);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 0 1px var(--secondary-glow);
    z-index: 10;
}

.game-thumbnail-wrapper {
    position: relative;
    padding-top: 60%;
    /* Aspect Ratio */
    overflow: hidden;
    background: #000;
}

.game-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-thumbnail {
    transform: scale(1.1);
    opacity: 0.6;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: var(--transition);
}

.game-card:hover .play-overlay {
    opacity: 1;
}

.play-btn-icon {
    font-size: 3rem;
    color: var(--secondary);
    filter: drop-shadow(0 0 10px var(--secondary));
    transform: scale(0.5);
    transition: cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.4s;
}

.game-card:hover .play-btn-icon {
    transform: scale(1);
}

.card-body {
    padding: 1.2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 2;
}

.game-title {
    font-family: var(--font-orbitron);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.game-card:hover .game-title {
    color: var(--secondary);
}

.game-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

/* Footer */
footer {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--glass-border) !important;
}

.footer-link {
    color: var(--text-muted);
    transition: var(--transition);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    margin-right: 0.5rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 0 15px var(--primary-glow);
}


/* Animations */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 5px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 20px var(--primary-glow);
    }

    100% {
        box-shadow: 0 0 5px var(--primary-glow);
    }
}

/* Game Play Page */
/* Fullscreen icon button */
.btn-fs-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: rgba(147, 156, 164, 0.12);
    color: var(--secondary);
    border: 1px solid var(--secondary);
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(147, 156, 164, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-fs-icon:hover {
    background: var(--secondary);
    color: #000;
    transform: scale(1.12);
    box-shadow: 0 0 20px var(--secondary-glow);
}

.game-iframe-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.game-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Privacy Policy Page */
.policy-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 16px;
    backdrop-filter: blur(5px);
}

.policy-container h2 {
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.policy-container p,
.policy-container li {
    color: var(--text-muted);
    line-height: 1.8;
}

/* Contact Page */
.contact-form-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    transition: var(--transition);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    color: #fff;
}

.contact-info-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 16px;
    height: 100%;
    transition: var(--transition);
}

.contact-info-card:hover {
    border-color: var(--secondary);
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}


/* Floating Category Menu */
.category-floating-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: rgba(15, 16, 32, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(188, 19, 254, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
}

.category-floating-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    text-align: left;
    padding: 8px 15px;
    border-radius: 6px;
    font-family: var(--font-orbitron);
    font-size: 0.85rem;
    transition: var(--transition);
    width: 100%;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-item:hover {
    background: rgba(188, 19, 254, 0.1);
    color: var(--secondary);
    padding-left: 20px;
}

.category-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
}

@media (max-width: 768px) {
    .category-floating-menu {
        right: auto;
        left: 0;
    }

    .hero-title {
        font-size: 2rem;
    }


    .nav-item {
        padding-top: 10px;
    }
}

/* Pseudo Fullscreen Fallback for iOS/iPhone */
.pseudo-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
    background: #000 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding-bottom: 0 !important;
    /* Override aspect ratio padding */
}

.pseudo-fullscreen iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

#exit-fs-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100000;
    display: none;
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 85, 0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.6);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#exit-fs-btn:hover {
    background: #ff0055;
    transform: scale(1.15);
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.9);
}

body.is-pseudo-fs #exit-fs-btn {
    display: block;
}

body.is-pseudo-fs {
    overflow: hidden !important;
    /* Prevent scrolling behind fullscreen */
}

/* ============================= */
/* TAP TO PLAY OVERLAY (iOS Audio Fix) */
/* ============================= */

#tap-to-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #050511;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border-radius: 8px;
    transition: opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

#tap-to-play-overlay.tap-overlay-hiding {
    opacity: 0;
    pointer-events: none;
}

.tap-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
}



.tap-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 243, 255, 0.1);
    border: 2px solid var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--secondary);
    filter: drop-shadow(0 0 12px var(--secondary));
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.25), inset 0 0 20px rgba(0, 243, 255, 0.05);
    transition: transform 0.15s ease;
    animation: tapIconBreathe 2.5s ease-in-out infinite;
}

@keyframes tapIconBreathe {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(0, 243, 255, 0.25), inset 0 0 20px rgba(0, 243, 255, 0.05);
    }

    50% {
        box-shadow: 0 0 35px rgba(0, 243, 255, 0.55), inset 0 0 30px rgba(0, 243, 255, 0.1);
    }
}

#tap-to-play-overlay:active .tap-icon {
    transform: scale(0.9);
}

.tap-label {
    font-family: var(--font-orbitron);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 3px;
    text-shadow: 0 0 12px var(--secondary);
    margin-top: 8px;
}

.tap-sub {
    font-family: var(--font-orbitron);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    max-width: 200px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .tap-label {
        font-size: 0.95rem;
    }

    .tap-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }


    .policy-container {
        padding: 1rem;
    }
}

/* ============================= */
/* GAME DETAILS / SEO SECTION */
/* ============================= */

.game-details-section {
    position: relative;
    z-index: 1;
}

.details-card {
    background: rgba(15, 16, 32, 0.4);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
}

.details-card:hover {
    border-color: var(--primary-glow);
    background: rgba(15, 16, 32, 0.6);
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.1);
}

.details-title {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.details-subtitle {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.details-content {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.details-content p {
    margin-bottom: 1rem;
}

.details-content ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.details-content li {
    margin-bottom: 0.5rem;
}
