/* Advanced StatusGuru.in - Premium Glassmorphism & Animations */

/* CSS Variables for Dynamic Theming */
:root {
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --glass-blur: blur(4px);
    --animation-speed: 0.6s;
}

.dark {
    --glass-bg: rgba(0, 0, 0, 0.25);
    --glass-border: rgba(255, 255, 255, 0.125);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color-scheme: dark;
}

/* Global Glassmorphism Base */
* {
    transition: all var(--animation-speed) cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow-x: hidden;
}

.dark body {
    background: linear-gradient(-45deg, #2d1b69, #11001b, #0f0c29, #24243e);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Particles Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 226, 0.3) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
}

/* Advanced Keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes glassShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes morphing {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 
            0 0 5px rgba(139, 92, 246, 0.3),
            0 0 10px rgba(139, 92, 246, 0.2),
            0 0 15px rgba(139, 92, 246, 0.1),
            0 0 20px rgba(139, 92, 246, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 10px rgba(139, 92, 246, 0.4),
            0 0 20px rgba(139, 92, 246, 0.3),
            0 0 30px rgba(139, 92, 246, 0.2),
            0 0 40px rgba(139, 92, 246, 0.1);
    }
}

@keyframes slideInFromLeft {
    0% { transform: translateX(-100%) rotate(-10deg); opacity: 0; }
    100% { transform: translateX(0) rotate(0); opacity: 1; }
}

@keyframes slideInFromRight {
    0% { transform: translateX(100%) rotate(10deg); opacity: 0; }
    100% { transform: translateX(0) rotate(0); opacity: 1; }
}

@keyframes bounceInScale {
    0% { transform: scale(0) rotate(-360deg); opacity: 0; }
    50% { transform: scale(1.1) rotate(-180deg); opacity: 0.8; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 5px rgba(139, 92, 246, 0.5); }
    50% { text-shadow: 0 0 20px rgba(139, 92, 246, 0.8), 0 0 30px rgba(236, 72, 153, 0.5); }
}

/* Glassmorphism Navigation */
nav {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: glassShimmer 3s ease-in-out infinite;
}

/* FIXED Quiz Cards - Ensure Icons and Content Visibility */
.quiz-card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15) !important;
    border-radius: 20px !important;
    position: relative !important;
    overflow: visible !important;
    transform-style: preserve-3d !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
    cursor: pointer !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;
}

.dark .quiz-card {
    background: rgba(31, 41, 55, 0.95) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

.quiz-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.25) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
}

/* Fixed Icon Container */
.quiz-card .w-16 {
    width: 64px !important;
    height: 64px !important;
    background: linear-gradient(135deg, #8b5cf6, #ec4899) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 16px !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    position: relative !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2 !important;
}

/* Fixed Icons */
.quiz-card .w-16 i {
    color: white !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 3 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Ensure FontAwesome icons load */
.fas, .far, .fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
}

/* Quiz Card Text */
.quiz-card h3 {
    color: #1f2937 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
    text-align: center !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.dark .quiz-card h3 {
    color: #f9fafb !important;
}

.quiz-card p {
    color: #6b7280 !important;
    font-size: 14px !important;
    text-align: center !important;
    margin-bottom: 16px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.dark .quiz-card p {
    color: #d1d5db !important;
}

/* EMERGENCY BUTTON FIXES - Ensure All Buttons Work */
button, .btn, .btn-glass, [type="button"], [type="submit"] {
    display: inline-block !important;
    padding: 12px 24px !important;
    margin: 4px !important;
    border: none !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #8b5cf6, #ec4899) !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
    position: relative !important;
    outline: none !important;
    box-sizing: border-box !important;
    min-height: 44px !important;
    min-width: 120px !important;
}

button:hover, .btn:hover, .btn-glass:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3) !important;
    background: linear-gradient(135deg, #7c3aed, #db2777) !important;
}

button:active, .btn:active, .btn-glass:active {
    transform: translateY(0) scale(0.98) !important;
}

/* Specific button types */
#startQuizBtn {
    background: white !important;
    color: #8b5cf6 !important;
    border: 2px solid #8b5cf6 !important;
    font-size: 18px !important;
    padding: 16px 32px !important;
}

#startQuizBtn:hover {
    background: #8b5cf6 !important;
    color: white !important;
}

/* Dark mode buttons */
.dark button, .dark .btn, .dark .btn-glass {
    background: linear-gradient(135deg, #6d28d9, #be185d) !important;
}

/* Mobile menu button */
#mobileMenuToggle {
    background: transparent !important;
    color: inherit !important;
    border: 1px solid currentColor !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 8px !important;
}

/* Dark/Language toggle buttons */
#darkModeToggle, #languageToggle {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #374151 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(10px) !important;
}

.dark #darkModeToggle, .dark #languageToggle {
    background: rgba(31, 41, 55, 0.9) !important;
    color: #f9fafb !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Premium Glassmorphism Form Elements */
.form-input {
    width: 100%;
    padding: 1.5rem 2rem;
    border: 2px solid transparent;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    outline: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Glassmorphism Background */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
    
    /* Fixed positioning to prevent any movement */
    position: relative;
    background-clip: padding-box;
    border: 2px solid transparent;
    transform: none !important; /* Completely prevent transforms */
    will-change: auto; /* Remove transform optimization */
    left: 0 !important; /* Lock horizontal position */
    right: auto !important;
    margin: 0;
}

.form-input::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    margin: -2px;
    border-radius: inherit;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #f9ca24, #6c5ce7, #a29bfe);
    background-size: 300% 300%;
    animation: gradientBG 3s ease infinite;
}

.form-input:focus {
    /* Only allow vertical and scale changes, no horizontal movement */
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 
        0 15px 35px rgba(139, 92, 246, 0.2),
        0 8px 20px rgba(236, 72, 153, 0.15),
        var(--glass-shadow);
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(139, 92, 246, 0.5);
    /* Ensure no horizontal shift */
    left: 0 !important;
    right: auto !important;
}

.dark .form-input {
    background: rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

.dark .form-input:focus {
    background: rgba(0, 0, 0, 0.3);
}

/* Enhanced Input Container to prevent shifts */
.input-group {
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    /* Prevent any layout shifts */
    contain: layout;
}

/* ENHANCED LARGE AND ATTRACTIVE Input Styling */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea,
.form-input,
.form-select {
    /* Large, attractive styling */
    width: 100% !important;
    max-width: 450px !important; /* Increased size */
    padding: 18px 24px !important; /* Much larger padding */
    margin: 12px auto !important; /* Center with auto margins */
    border: 3px solid transparent !important;
    border-radius: 20px !important; /* More rounded */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95)) !important;
    color: #1f2937 !important;
    font-size: 18px !important; /* Larger font */
    font-weight: 600 !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    display: block !important;
    outline: none !important;
    
    /* Beautiful gradient border with animation */
    background-clip: padding-box !important;
    border: 3px solid transparent !important;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95)), 
                      linear-gradient(135deg, #8b5cf6, #ec4899, #06b6d4, #10b981) !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;
    background-size: 100% 100%, 300% 300% !important;
    
    /* Position locks */
    position: relative !important;
    left: 0 !important;
    right: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
    translate: none !important;
    float: none !important;
    
    /* Beautiful transitions with glow */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    
    /* Ensure visibility */
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 5 !important;
    
    /* Enhanced shadow with glow effect */
    box-shadow: 
        0 4px 16px rgba(139, 92, 246, 0.15),
        0 2px 8px rgba(236, 72, 153, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    
    /* Animated background */
    animation: subtleGlow 3s ease-in-out infinite alternate !important;
}

/* Beautiful glow animation for inputs */
@keyframes subtleGlow {
    0% { 
        box-shadow: 
            0 4px 16px rgba(139, 92, 246, 0.15),
            0 2px 8px rgba(236, 72, 153, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        background-position: 0% 50%;
    }
    100% { 
        box-shadow: 
            0 4px 20px rgba(139, 92, 246, 0.25),
            0 2px 12px rgba(236, 72, 153, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
        background-position: 100% 50%;
    }
}

/* Special styling for name inputs */
input[name*="q0"], input[name*="q1"], input[placeholder*="name"], input[placeholder*="Name"] {
    max-width: 250px !important; /* Even more compact for names */
    text-align: center !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, rgba(255, 192, 203, 0.1), rgba(221, 214, 254, 0.1)) !important;
}

/* Dark mode styling */
.dark input[type="text"],
.dark input[type="number"],
.dark input[type="date"],
.dark input[type="email"],
.dark input[type="tel"],
.dark input[type="password"],
.dark select,
.dark textarea,
.dark .form-input,
.dark .form-select {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.9)) !important;
    color: #f9fafb !important;
    background-image: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.9)), 
                      linear-gradient(135deg, #8b5cf6, #ec4899, #06b6d4) !important;
}

/* Enhanced focus states for large attractive inputs */
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus,
.form-input:focus,
.form-select:focus {
    transform: translateY(-4px) scale(1.03) !important;
    box-shadow: 
        0 0 0 4px rgba(139, 92, 246, 0.3) !important,
        0 12px 32px rgba(139, 92, 246, 0.2) !important,
        0 6px 16px rgba(236, 72, 153, 0.15) !important,
        inset 0 2px 0 rgba(255, 255, 255, 0.4) !important;
    
    /* Lock position on focus */
    left: 0 !important;
    right: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 450px !important;
    
    /* Animate the gradient border */
    background-size: 100% 100%, 400% 400% !important;
    animation: borderGlow 2s ease-in-out infinite !important;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%, 0% 50%; }
    50% { background-position: 0% 50%, 100% 50%; }
}

.dark input:focus,
.dark select:focus,
.dark textarea:focus,
.dark .form-input:focus,
.dark .form-select:focus {
    box-shadow: 
        0 0 0 4px rgba(139, 92, 246, 0.4) !important,
        0 12px 32px rgba(139, 92, 246, 0.25) !important,
        0 6px 16px rgba(236, 72, 153, 0.2) !important;
}

/* Enhanced Large container styling */
.input-group,
.form-group,
.mb-4,
div:has(input),
div:has(select),
div:has(textarea) {
    position: relative !important;
    width: 100% !important;
    max-width: 500px !important; /* Larger container width */
    left: 0 !important;
    right: auto !important;
    margin: 0 auto 20px auto !important; /* Center containers with more spacing */
    transform: none !important;
    contain: layout !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Enhanced labels */
label {
    display: block !important;
    margin-bottom: 8px !important; /* More margin */
    font-weight: 700 !important;
    color: #374151 !important;
    font-size: 16px !important; /* Larger label text */
    text-align: center !important; /* Center labels */
}

.dark label {
    color: #f3f4f6 !important;
}

/* Enhanced Placeholder styling */
::placeholder {
    color: #9ca3af !important;
    opacity: 0.8 !important;
    font-size: 16px !important; /* Larger placeholder text */
    text-align: center !important;
    font-weight: 500 !important;
}

.dark ::placeholder {
    color: #d1d5db !important;
}

.floating-label {
    position: absolute;
    left: 2rem;
    top: 1.5rem;
    color: #9ca3af;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    transform-origin: left center;
    z-index: 10;
    /* Prevent any horizontal movement */
    will-change: auto;
    contain: layout;
}

.form-input:focus + .floating-label,
.form-input:not(:placeholder-shown) + .floating-label {
    top: -0.75rem;
    left: 1.5rem; /* Keep same horizontal position */
    font-size: 0.875rem;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(0.9) translateY(0) !important; /* Only scale, no movement */
}

.form-input::after {
    content: '✨';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    opacity: 0;
    transition: all 0.3s ease;
    animation: sparkle 2s ease-in-out infinite;
}

.form-input:focus::after {
    opacity: 1;
    animation: sparkleActive 1s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: translateY(-50%) scale(0.8) rotate(0deg); }
    50% { opacity: 0.8; transform: translateY(-50%) scale(1.2) rotate(180deg); }
}

@keyframes sparkleActive {
    0%, 100% { opacity: 1; transform: translateY(-50%) scale(1) rotate(0deg); }
    25% { transform: translateY(-50%) scale(1.1) rotate(90deg); }
    50% { transform: translateY(-50%) scale(1.2) rotate(180deg); }
    75% { transform: translateY(-50%) scale(1.1) rotate(270deg); }
}

/* Glassmorphism Select Elements */
.form-select {
    width: 100%;
    padding: 1.25rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 16px;
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.4s ease;
    
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
    
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.form-select:focus {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 
        0 12px 25px rgba(59, 130, 246, 0.2),
        var(--glass-shadow);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Enhanced Labels with Gradient Text */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: textGlow 3s ease-in-out infinite;
}

.form-label::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.5rem;
    height: 0.5rem;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

/* Progress bar */
.progress-bar { 
    height: 4px; 
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%); 
    border-radius: 2px; 
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Result animations */
.result-enter { opacity: 0; transform: scale(0.8) translateY(20px); }
.result-enter-active { opacity: 1; transform: scale(1) translateY(0); transition: all 0.5s ease; }

/* Celebration particles */
.particle {
    position: absolute;
    font-size: 2rem;
    animation: float-particles 3s ease-in-out infinite;
    pointer-events: none;
}

.particle-1 { top: 10%; left: 10%; animation-delay: 0s; }
.particle-2 { top: 20%; right: 15%; animation-delay: 0.5s; }
.particle-3 { top: 60%; left: 5%; animation-delay: 1s; }
.particle-4 { top: 70%; right: 10%; animation-delay: 1.5s; }
.particle-5 { top: 30%; left: 80%; animation-delay: 2s; }
.particle-6 { top: 80%; left: 85%; animation-delay: 2.5s; }

@keyframes float-particles {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    25% { transform: translateY(-10px) rotate(90deg); opacity: 1; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.8; }
    75% { transform: translateY(-10px) rotate(270deg); opacity: 1; }
}

/* Name bubbles animation */
.name-bubble {
    animation: name-pulse 2s ease-in-out infinite alternate;
    position: relative;
    overflow: hidden;
}

.name-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer-names 2s infinite;
}

@keyframes name-pulse {
    0% { box-shadow: 0 0 20px rgba(236, 72, 153, 0.5); }
    100% { box-shadow: 0 0 30px rgba(236, 72, 153, 0.8), 0 0 40px rgba(147, 51, 234, 0.3); }
}

@keyframes shimmer-names {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Heart connector animation */
.heart-connector {
    animation: heartbeat-strong 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.6));
}

@keyframes heartbeat-strong {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* Score animation */
#scoreNumber {
    animation: count-up 2s ease-out;
}

@keyframes count-up {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Achievement badge */
#achievementBadge {
    animation: badge-bounce 0.6s ease-out;
}

@keyframes badge-bounce {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.1) rotate(-90deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Enhanced button hover effects */
.share-button {
    position: relative;
    overflow: hidden;
}

.share-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.share-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Star rating */
.star-rating.active { color: #fbbf24 !important; text-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }
.star-rating:hover { transform: scale(1.2); transition: transform 0.2s ease; }

/* Loading animations */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Meme container */
.meme-container {
    max-width: 300px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
.meme-container:hover {
    transform: scale(1.05);
}
.meme-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Button enhancements */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Question item animations */
.question-item {
    animation: slide-up 0.5s ease forwards;
}
.question-item:nth-child(1) { animation-delay: 0.1s; }
.question-item:nth-child(2) { animation-delay: 0.2s; }
.question-item:nth-child(3) { animation-delay: 0.3s; }
.question-item:nth-child(4) { animation-delay: 0.4s; }
.question-item:nth-child(5) { animation-delay: 0.5s; }

/* Notification styles */
.notification {
    backdrop-filter: blur(10px);
    border-left: 4px solid currentColor;
}

/* Advanced Glassmorphism Components */

/* Glassmorphism Button Styles */
.btn-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    padding: 1rem 2rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn-glass:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.3), var(--glass-shadow);
}

.btn-glass:hover::before {
    left: 100%;
}

/* Glassmorphism Sections */
.glass-section {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.glass-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    pointer-events: none;
}

/* Enhanced Name Display with Glassmorphism */
.name-bubble {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
    animation: bounceInScale 0.8s ease-out, name-pulse 2s ease-in-out infinite alternate;
}

.name-bubble::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(255,255,255,0.1), transparent);
    animation: rotate 4s linear infinite;
}

.name-bubble::after {
    content: '✨';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 1rem;
    animation: sparkleActive 2s ease-in-out infinite;
}

/* Celebration Particles Enhanced */
.particle {
    position: absolute;
    font-size: 1.5rem;
    animation: particleFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) scale(1.5) rotate(360deg); opacity: 0; }
}

/* Progress Bar Glassmorphism */
.progress-bar {
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c) !important;
    background-size: 200% 100%;
    animation: gradientBG 2s ease infinite;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: glassShimmer 2s ease-in-out infinite;
}

/* Heart Connector Animation Enhanced */
.heart-connector {
    animation: heartbeat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 192, 203, 0.8));
    transform-origin: center;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { transform: scale(1.2); }
    75% { transform: scale(1.1) rotate(5deg); }
}

/* Mobile Menu Glassmorphism */
#mobileMenu {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Floating Elements */
.floating {
    animation: float 6s ease-in-out infinite;
}

.floating:nth-child(2) {
    animation-delay: -2s;
}

.floating:nth-child(3) {
    animation-delay: -4s;
}

/* Text Animations */
.animate-text {
    animation: slideInFromLeft 1s ease-out;
}

.animate-text:nth-child(even) {
    animation: slideInFromRight 1s ease-out;
}

/* Advanced Micro-interactions */
.micro-bounce:hover {
    animation: microBounce 0.3s ease;
}

@keyframes microBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Glassmorphism Footer */
footer {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* FIXED Mobile Navigation - No conflicts */
@media (max-width: 768px) {
    :root {
        --glass-blur: blur(2px);
    }
    
    /* Mobile: Show hamburger button */
    nav .md\:hidden {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobile: Hide desktop navigation */
    nav .hidden.md\:flex,
    nav .md\:flex {
        display: none !important;
    }
    
    /* Mobile menu toggle button always visible */
    #mobileMenuToggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
        border: none;
        background: transparent;
        color: inherit;
        cursor: pointer;
    }
    
    /* Mobile menu container */
    #mobileMenu {
        display: block !important;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        border-top: 1px solid var(--glass-border);
        transition: all 0.3s ease;
    }
    
    /* Hidden state for mobile menu */
    #mobileMenu.hidden {
        display: none !important;
        opacity: 0;
        transform: translateY(-10px);
    }
    
    /* Visible state for mobile menu */
    #mobileMenu:not(.hidden) {
        display: block !important;
        opacity: 1;
        transform: translateY(0);
    }
}

/* FIXED Desktop Navigation */
@media (min-width: 769px) {
    /* Desktop: Show navigation menu */
    nav .md\:flex {
        display: flex !important;
        align-items: center;
        space-x: 2rem;
    }
    
    /* Desktop: Hide mobile hamburger button */
    nav .md\:hidden,
    #mobileMenuToggle {
        display: none !important;
    }
    
    /* Desktop: Always hide mobile menu */
    #mobileMenu {
        display: none !important;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .quiz-card { margin-bottom: 1rem; }
    .meme-container { max-width: 250px; }
}

/* PWA specific styles */
@media (display-mode: standalone) {
    body {
        user-select: none;
        -webkit-user-select: none;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for better accessibility */
.focus-visible:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}