/* ============================================
           HIGHTECH FUTURISTIC ANIMATIONS
           ============================================ */

/* Cyber Grid Background */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gridPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

/* Scanlines Overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.05) 0px,
            rgba(0, 0, 0, 0.05) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 9998;
}

/* Matrix Rain Effect */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.matrix-drop {
    position: absolute;
    color: #3b82f6;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    opacity: 0.3;
    animation: matrixFall linear infinite;
    text-shadow: 0 0 10px currentColor;
}

@keyframes matrixFall {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Hologram Effect */
.hologram {
    position: relative;
    animation: hologramFlicker 0.1s infinite;
}

@keyframes hologramFlicker {

    0%,
    100% {
        opacity: 1;
    }

    92% {
        opacity: 0.8;
    }

    94% {
        opacity: 1;
    }

    97% {
        opacity: 0.9;
    }
}

.hologram::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 0%,
            rgba(59, 130, 246, 0.03) 50%,
            transparent 100%);
    animation: hologramScan 2s linear infinite;
    pointer-events: none;
}

@keyframes hologramScan {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

/* Electric Arc Animation */
@keyframes electricArc {

    0%,
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        filter: brightness(1);
    }

    25% {
        clip-path: polygon(0 0, 95% 5%, 100% 100%, 5% 95%);
        filter: brightness(1.2);
    }

    50% {
        clip-path: polygon(5% 5%, 100% 0, 95% 95%, 0 100%);
        filter: brightness(1);
    }

    75% {
        clip-path: polygon(0 5%, 95% 0, 100% 95%, 5% 100%);
        filter: brightness(1.3);
    }
}

.electric-border {
    animation: electricArc 0.5s ease-in-out infinite;
}

/* Neon Pulse */
@keyframes neonPulse {

    0%,
    100% {
        text-shadow:
            0 0 5px #3b82f6,
            0 0 10px #3b82f6,
            0 0 20px #3b82f6,
            0 0 40px #8b5cf6;
    }

    50% {
        text-shadow:
            0 0 10px #3b82f6,
            0 0 20px #3b82f6,
            0 0 40px #3b82f6,
            0 0 80px #8b5cf6,
            0 0 120px #ec4899;
    }
}

.neon-pulse {
    animation: neonPulse 2s ease-in-out infinite;
}

/* Glitch Effect */
@keyframes glitch {

    0%,
    100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }

    10% {
        transform: translate(-3px, 3px);
        filter: hue-rotate(90deg);
    }

    20% {
        transform: translate(3px, -3px);
        filter: hue-rotate(180deg);
    }

    30% {
        transform: translate(-2px, 0);
        filter: hue-rotate(270deg);
    }

    40% {
        transform: translate(0, 2px);
        filter: hue-rotate(0deg);
    }

    50%,
    100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
}

.glitch:hover {
    animation: glitch 0.4s ease infinite;
}

.glitch-always {
    animation: glitch 3s ease infinite;
}

/* Data Stream */
.data-stream {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, transparent, #3b82f6, transparent);
    opacity: 0.4;
    animation: dataFlow 3s linear infinite;
}

@keyframes dataFlow {
    0% {
        top: -200px;
    }

    100% {
        top: 100%;
    }
}

/* Hexagon Pattern */
.hex-pattern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.05'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Circuit Lines */
.circuit-lines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(90deg, transparent 49%, rgba(59, 130, 246, 0.1) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(59, 130, 246, 0.1) 50%, transparent 51%);
    background-size: 100px 100px;
    pointer-events: none;
}

/* Radar Sweep */
@keyframes radarSweep {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.radar-sweep {
    position: relative;
}

.radar-sweep::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(59, 130, 246, 0.3) 10%, transparent 20%);
    transform-origin: 0 0;
    animation: radarSweep 4s linear infinite;
}

/* Typing Cursor */
@keyframes cursorBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.typing-cursor::after {
    content: '|';
    color: #3b82f6;
    animation: cursorBlink 0.8s infinite;
    margin-left: 4px;
}

/* Energy Wave */
@keyframes energyWave {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.energy-wave::before {
    content: '';
    position: absolute;
    inset: -20px;
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: inherit;
    animation: energyWave 2s ease-out infinite;
}

/* Particle Burst */
@keyframes particleBurst {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

/* Loading Bar */
@keyframes loadingBar {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

.loading-progress {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    animation: loadingBar 2s ease-out forwards;
}

/* Rotate 3D */
@keyframes rotate3D {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }

    100% {
        transform: perspective(1000px) rotateY(360deg);
    }
}

.rotate-3d {
    animation: rotate3D 10s linear infinite;
}

/* Scale Pulse */
@keyframes scalePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.scale-pulse {
    animation: scalePulse 2s ease-in-out infinite;
}

/* Gradient Shift */
@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.gradient-animated {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #8b5cf6, #3b82f6);
    background-size: 400% 100%;
    animation: gradientShift 4s ease infinite;
}

/* Base Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }

    50% {
        box-shadow: 0 0 60px rgba(59, 130, 246, 0.8), 0 0 100px rgba(139, 92, 246, 0.4);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes starTwinkle {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end);
}

.cursor-blink {
    animation: blink 1s infinite;
}

.glassmorphism {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ad containers — each slot gets its own iframe via script.js */
.ad-container {
    min-height: 90px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.ad-container iframe {
    display: block;
    width: 100%;
    min-height: 90px;
    border: none;
    overflow: hidden;
}


.nav-underline {
    position: relative;
}

.nav-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

.nav-underline:hover::after,
.nav-underline.active::after {
    width: 100%;
}

/* Notification Badge */
.notif-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 0 5px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    border: 1.5px solid #0f172a;
    z-index: 10;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}

.notif-badge.active {
    display: flex;
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}


.chat-bubble-user {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 20px 20px 0 20px;
}

.chat-bubble-ai {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0 24px 24px 24px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 20px rgba(139, 92, 246, 0.1);
    color: #f3f4f6;
    transition: all 0.3s ease;
}

.chat-bubble-ai:hover {
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        0 0 30px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.game-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

.game-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.play-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-dots {
    display: flex;
    gap: 10px;
}

.loading-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    animation: float 1s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: starTwinkle 3s infinite;
}

.page-transition {
    animation: fadeInUp 0.5s ease forwards;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8b5cf6;
    animation: float 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.cat-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s;
}

.cat-btn:hover,
.cat-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
}

.room-btn {
    padding: 10px 20px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.room-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: white;
}

.room-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
}

.image-message {
    max-width: 300px;
    max-height: 400px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.image-message:hover {
    transform: scale(1.05);
}

.feedback-card {
    transition: all 0.3s ease;
}

.feedback-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.feedback-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

@keyframes particleMove {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-1000px) translateX(100px);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    animation: particleMove 20s linear infinite;
    pointer-events: none;
}

.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.1;
    pointer-events: none;
}

/* ========== MEGA COOL ANIMATIONS ========== */
:root {
    --glow-primary: rgba(59, 130, 246, 0.5);
    --glow-secondary: rgba(139, 92, 246, 0.5);
}



/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Gradient Border Animation */
@keyframes gradientBorder {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.gradient-border {
    position: relative;
    background: linear-gradient(90deg, #0f172a, #0f172a) padding-box,
        linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6) border-box;
    border: 2px solid transparent;
    background-size: 100% 100%, 300% 100%;
    animation: gradientBorder 3s ease infinite;
}

/* Glow Effects */
@keyframes glowPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8));
    }
}

@keyframes textGlow {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.3);
    }

    50% {
        text-shadow: 0 0 20px rgba(139, 92, 246, 0.8), 0 0 40px rgba(139, 92, 246, 0.5);
    }
}

.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

.text-glow {
    animation: textGlow 2s ease-in-out infinite;
}

/* Morphing Blob */
@keyframes morphBlob {

    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    50% {
        border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
    }

    75% {
        border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%;
    }
}

.morph-blob {
    animation: morphBlob 8s ease-in-out infinite;
}

/* Bounce and Scale Effects */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Ripple Button Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: scale(0);
    pointer-events: none;
}

.btn-ripple:active::after {
    animation: ripple 0.6s ease-out;
}

/* Glitch Text */
@keyframes glitchText {

    0%,
    100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }

    20% {
        clip-path: inset(20% 0 60% 0);
        transform: translate(-2px, 2px);
    }

    40% {
        clip-path: inset(40% 0 40% 0);
        transform: translate(2px, -2px);
    }

    60% {
        clip-path: inset(60% 0 20% 0);
        transform: translate(-1px, 1px);
    }

    80% {
        clip-path: inset(80% 0 0 0);
        transform: translate(1px, -1px);
    }
}

.glitch-text:hover {
    animation: glitchText 0.3s ease infinite;
}

/* Aurora Background */
@keyframes aurora {

    0%,
    100% {
        background-position: 50% 50%;
    }

    25% {
        background-position: 0% 100%;
    }

    50% {
        background-position: 100% 50%;
    }

    75% {
        background-position: 50% 0%;
    }
}

.aurora-bg {
    background: linear-gradient(135deg,
            rgba(59, 130, 246, 0.1) 0%,
            rgba(139, 92, 246, 0.1) 25%,
            rgba(236, 72, 153, 0.1) 50%,
            rgba(139, 92, 246, 0.1) 75%,
            rgba(59, 130, 246, 0.1) 100%);
    background-size: 400% 400%;
    animation: aurora 15s ease infinite;
}

/* Card Shine Effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-25deg);
    transition: left 0.5s ease;
}

.card-shine:hover::before {
    left: 125%;
}

/* Neon Glow */
.neon-glow {
    box-shadow:
        0 0 5px rgba(59, 130, 246, 0.5),
        0 0 10px rgba(59, 130, 246, 0.3),
        0 0 20px rgba(59, 130, 246, 0.2),
        0 0 40px rgba(59, 130, 246, 0.1);
}

.neon-text {
    text-shadow:
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 20px currentColor;
}

/* Animated Gradient Text */
.gradient-text-animated {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientBorder 3s ease infinite;
}

/* Hover Glow */
.hover-glow:hover {
    box-shadow:
        0 0 20px rgba(59, 130, 246, 0.6),
        0 0 40px rgba(139, 92, 246, 0.4),
        0 0 60px rgba(59, 130, 246, 0.2);
    transition: box-shadow 0.3s ease;
}

/* Floating Elements */
.floating-icon {
    animation: float 3s ease-in-out infinite;
}

.floating-icon:nth-child(2) {
    animation-delay: 0.5s;
}

.floating-icon:nth-child(3) {
    animation-delay: 1s;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
}

/* Hover Lift */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.05);
}

/* Enhanced Game Card */
.game-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.game-card:hover {
    box-shadow: 0 0 30px var(--glow-primary);
    border-color: #3b82f6;
}

/* Glassmorphism Enhancement */
.glassmorphism::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.05) 50%, transparent 55%);
    transition: all 0.6s;
    pointer-events: none;
}

.glassmorphism:hover::after {
    top: 100%;
    left: 100%;
}

/* Rotating Border */
@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.rotating-border {
    position: relative;
    overflow: hidden;
}

.rotating-border::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, transparent, transparent, #3b82f6);
    animation: rotate 4s linear infinite;
    z-index: -1;
}

/* Pulse Ring */
@keyframes pulseRing {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: inherit;
    animation: pulseRing 1.5s ease-out infinite;
}

/* Stagger Animation */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

/* Global Announcement styles */
#globalAnnouncement {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    z-index: 10001;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#globalAnnouncement.active {
    top: 30px;
}

.announcement-card {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid #8b5cf6;
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.4), inset 0 0 20px rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
}

.announcement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.announcement-title {
    font-family: 'Orbitron', sans-serif;
    color: #8b5cf6;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.announcement-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    line-height: 1.6;
    font-weight: 500;
}

.announcement-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.announcement-close:hover {
    background: rgba(239, 68, 68, 0.4);
    transform: rotate(90deg);
}

/* ============================================
           AD SYSTEM STYLES (Max CPM & Visibility)
           ============================================ */
.ad-slot-wrapper,
.ad-container {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 250px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.ad-container script {
    display: none;
}

/* ============================================
   MOBILE LAYOUT FIXES (Nav & Tabs)
   ============================================ */
@media (max-width: 640px) {

    /* Shrink logo text on small phones */
    span.text-2xl.font-orbitron {
        font-size: 1.1rem !important;
        white-space: nowrap;
    }

    /* Adjust the "Launch AI" button on mobile */
    #tryAI {
        padding: 5px 12px !important;
        font-size: 0.7rem !important;
        letter-spacing: 0.05em !important;
    }

    /* Reduce horizontal padding to fit and prevent overlap */
    nav .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Ensure hamburger menu has enough space */
    #mobileMenuBtn {
        padding: 5px !important;
    }

    /* Clean up the mobile dropdown menu */
    #mobileMenu {
        background: rgba(15, 23, 42, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        margin-top: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    #mobileMenu a {
        font-size: 0.9rem !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    #mobileMenu a:last-child {
        border-bottom: none;
    }

    /* Category & Room Button Mobile Fixes */
    .cat-btn {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }

    .room-btn {
        padding: 8px 15px !important;
        font-size: 0.85rem !important;
    }
}

/* Admin Controls */
.admin-only {
    display: none !important;
}

body.admin-mode .admin-only {
    display: inline-block !important;
}

button.admin-only-btn {
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 5px;
}

button.admin-only-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Chat Role Badges */
.role-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
}

.admin-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.dev-badge {
    background: rgba(34, 211, 238, 0.2);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.4);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}

@keyframes gradient-xy {

    0%,
    100% {
        background-size: 400% 400%;
        background-position: 0% 0%;
    }

    50% {
        background-size: 200% 200%;
        background-position: 100% 100%;
    }
}

.animate-gradient-xy {
    animation: gradient-xy 15s ease infinite;
}

@keyframes bounce-x {

    0%,
    100% {
        transform: translateX(0);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }

    50% {
        transform: translateX(25%);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-bounce-x {
    animation: bounce-x 1s infinite;
}

/* ============================================
   ADBLOCK DETECTOR UI
   ============================================ */
.adblock-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: white;
    font-family: 'Orbitron', sans-serif;
}

.adblock-overlay.active {
    display: flex;
    animation: fadeInModal 0.5s ease forwards;
}

.adblock-card {
    max-width: 500px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.adblock-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.adblock-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #3b82f6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: scalePulse 2s ease-in-out infinite;
}

.adblock-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.adblock-message {
    font-family: 'Inter', sans-serif;
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.adblock-btn {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.adblock-btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.5);
}

.no-scroll {
    overflow: hidden !important;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}