/* Shared styles across all pages */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    background-color: #111827;
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #db2777);
}

/* Feature card animations */
.feature-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

/* Floating animation for hero section elements */
@keyframes float {

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

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

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Pulse glow effect */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    }

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

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

/* Text gradient animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

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

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

.animated-gradient {
    background: linear-gradient(-45deg, #8b5cf6, #ec4899, #3b82f6, #10b981);
    background-size: 400% 400%;
    animation: gradient-shift 6s ease infinite;
}

/* Smooth fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Button hover effects */
.btn-magnetic {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-magnetic::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease, height 0.3s ease, top 0.3s ease, left 0.3s ease;
    transform: translate(-50%, -50%);
}

.btn-magnetic:hover::before {
    width: 300px;
    height: 300px;
}

/* Mobile menu styles */
#mobileMenu {
    display: none;
}

#mobileMenu:not(.hidden) {
    display: block;
}

/* Container utility */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hide mobile menu by default */
    #mobileMenu {
        display: none;
    }

    #mobileMenu:not(.hidden) {
        display: block;
    }

    /* Lobby specific styles */
    .countdown {
        animation: pulse 1s infinite;
    }

    @keyframes pulse {

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

        50% {
            transform: scale(1.2);
            opacity: 0.7;
        }
    }

    /* Player card animations */
    .player-card {
        transition: all 0.3s ease;
    }

    .player-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
    }

    /* Ready status animation */
    .ready-pulse {
        animation: ready-pulse 2s ease-in-out infinite;
    }

    @keyframes ready-pulse {

        0%,
        100% {
            box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
        }

        70% {
            box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
        }
    }

    /* Chat animations */
    .chat-message {
        animation: slideIn 0.3s ease-out;
    }

    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateX(-10px);
        }

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

    /* Game specific styles */
    .answer-option {
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .answer-option:disabled {
        cursor: not-allowed;
        opacity: 0.7;
    }

    /* Timer bar animation */
    .timer-bar {
        transition: width 1s linear;
    }

    /* Ping status animation */
    .ping-dot {
        animation: ping 1.5s ease-in-out infinite;
    }

    @keyframes ping {

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

        50% {
            transform: scale(1.2);
            opacity: 0.7;
        }
    }

    /* Question progress dots */
    .progress-dot {
        transition: all 0.3s ease;
    }

    .progress-dot.active {
        background-color: #8b5cf6;
        transform: scale(1.2);
    }
}