======= Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #05091f;
}

::-webkit-scrollbar-thumb {
    background: #b8e2ed;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c08429;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: rgba(192, 132, 41, 0.3);
    color: white;
}

/* Custom animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(245, 158, 11, 0.8);
    }
}

/* Glass morphism utilities */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient text utilities */
.text-gradient {
    background: linear-gradient(to right, #c08429, #ebbf81);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hover card effect */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Timeline connector line */
.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #059669, #f59e0b);
}

/* Responsive text balance */
h1, h2, h3 {
    text-wrap: balance;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Image loading placeholder */
img {
    background: linear-gradient(110deg, #1e293b 8%, #334155 18%, #1e293b 33%);
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
}

/* Remove gradient from navigation logo */
.nav-logo {
    background: transparent !important;
    animation: none !important;
}

@keyframes shine {
    to {
        background-position-x: -200%;
    }
}

/* Hide animation when loaded */
img.loaded {
    animation: none;
    background: transparent;
}

/* Content z-index management */
nav, 
section, 
footer,
main,
header {
    position: relative;
    z-index: 1;
}

/* Enhanced parallax scroll effect for sections */
@media (prefers-reduced-motion: no-preference) {
    section {
        transform: translateZ(0);
    }
    
    section > * {
        transform: translateZ(0);
    }
}

/* Wave glow animation for Audience Award */
@keyframes glowWave {
    0%, 100% {
        box-shadow: 
            0 0 10px rgba(244, 63, 94, 0.5),
            0 0 20px rgba(249, 115, 22, 0.4),
            0 0 30px rgba(251, 146, 60, 0.3),
            inset 0 0 15px rgba(244, 63, 94, 0.15);
    }
    25% {
        box-shadow: 
            0 0 15px rgba(244, 63, 94, 0.7),
            0 0 30px rgba(249, 115, 22, 0.5),
            0 0 45px rgba(251, 146, 60, 0.4),
            inset 0 0 20px rgba(249, 115, 22, 0.2);
    }
    50% {
        box-shadow: 
            0 0 20px rgba(244, 63, 94, 0.9),
            0 0 40px rgba(249, 115, 22, 0.6),
            0 0 60px rgba(251, 146, 60, 0.5),
            inset 0 0 25px rgba(251, 146, 60, 0.25);
    }
    75% {
        box-shadow: 
            0 0 15px rgba(244, 63, 94, 0.7),
            0 0 30px rgba(249, 115, 22, 0.5),
            0 0 45px rgba(251, 146, 60, 0.4),
            inset 0 0 20px rgba(244, 63, 94, 0.2);
    }
}

.glow-wave {
    animation: glowWave 3s ease-in-out infinite;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

#mobile-menu.active {
    max-height: 500px;
    opacity: 1;
}

/* Navigation blur effect on scroll */
.nav-scrolled {
    background: rgba(15, 23, 42, 0.95) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Button hover effects */
.btn-glow {
    position: relative;
    overflow: hidden;
}

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

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

/* Custom checkbox for forms */
.custom-checkbox {
    appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.25rem;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.custom-checkbox:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 0.8rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Scroll animation classes */
.scroll-animate-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* Scroll margin for sections to account for fixed navbar */
#about,
#timeline,
#prizes,
#criteria,
#agenda,
#register {
    scroll-margin-top: 60px;
}

/* Tagline Animation Styles */
.tagline-container {
    perspective: 1000px;
}

.tagline-container-zh {
    perspective: 1000px;
}

/* Shimmer effect for English tagline - Cool cyan/silver tech theme */
.tagline-shimmer {
    background: linear-gradient(
        90deg,
        #b8e2ed 0%,
        #e8ebf5 25%,
        #b8e2ed 50%,
        #95cad0 75%,
        #b8e2ed 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
    display: inline-block;
    text-shadow: 0 0 30px rgba(184, 226, 237, 0.4);
    filter: drop-shadow(0 0 10px rgba(95, 154, 150, 0.5));
}

@keyframes shimmer {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

/* Rose-Orange shimmer effect for Chinese tagline - Warm, energetic, distinct from gold */
.tagline-glow {
    background: linear-gradient(
        90deg,
        #f472b6 0%,
        #fb923c 25%,
        #f472b6 50%,
        #fbbf24 75%,
        #f472b6 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
    display: inline-block;
    position: relative;
    filter: drop-shadow(0 0 15px rgba(244, 114, 182, 0.5)) 
            drop-shadow(0 0 30px rgba(251, 146, 60, 0.3));
}

@keyframes glowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(244, 114, 182, 0.4)) 
                drop-shadow(0 0 30px rgba(251, 146, 60, 0.2));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(244, 114, 182, 0.7)) 
                drop-shadow(0 0 50px rgba(251, 146, 60, 0.4))
                drop-shadow(0 0 70px rgba(251, 191, 36, 0.3));
        transform: scale(1.02);
    }
}

/* Individual letter animation */
.tagline-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(50px) rotateX(90deg);
    animation: letterReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

/* Chinese character animation */
.tagline-char {
    display: inline-block;
    opacity: 0;
    transform: scale(0.5) translateY(-30px);
    animation: charReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes charReveal {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Floating animation for the whole tagline */
.tagline-float {
    animation: taglineFloat 6s ease-in-out infinite;
}

@keyframes taglineFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Cursor blink effect for typewriter */
.tagline-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: linear-gradient(to bottom, #ffd58a, #c08429);
    margin-left: 5px;
    animation: cursorBlink 1s infinite;
    vertical-align: middle;
}

@keyframes cursorBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}



/* Responsive adjustments */
@media (max-width: 768px) {
    .tagline-shimmer {
        font-size: 2.2rem !important; /* Adjusted size for better fit and hierarchy */
        line-height: 1.2;
        letter-spacing: -0.02em;
    }
    .tagline-glow {
        font-size: 1.6rem !important; /* Proportional size for alignment with English tagline */
        line-height: 1.4;
        letter-spacing: 0.05em;
    }
}

/* Ensure WebGL canvas is behind text */
#tagline-canvas {
    z-index: 0 !important;
}

#tagline-canvas + div,
#tagline-canvas ~ div {
    position: relative;
    z-index: 10;
}

/* Particle burst animation on click */
.particle-burst {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,213,138,1) 0%, rgba(192,132,41,0) 70%);
    animation: burstExpand 0.6s ease-out forwards;
}

@keyframes burstExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

/* ============================================
   Custom Scrollbar for Event Rules Modal
   ============================================ */
.rules-content::-webkit-scrollbar {
    width: 6px;
}

.rules-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.rules-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #c08429, #ebbf81);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rules-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #ebbf81, #ffd58a);
}

/* Slide from right animation */
.slide-from-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s ease-out;
}

.slide-from-right.scroll-animate-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from left animation */
.slide-from-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s ease-out;
}

.slide-from-left.scroll-animate-visible {
    opacity: 1;
    transform: translateX(0);
}

/* =====================================================
   Outstanding Button Styles
   For key CTA buttons that need maximum attention
   ===================================================== */

.btn-outstanding {
    /* Core Layout */
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible; /* Changed to visible to ensure box-shadow isn't clipped unexpectedly */
    
    /* iOS/OS Reset - Critical for Safari */
    -webkit-appearance: none;
    appearance: none;
    border: none;
    outline: none;
    cursor: pointer;
    
    /* Background with Fallback for Desktop/Mobile reliability */
    background-color: #c08429; /* Solid fallback color */
    background-image: linear-gradient(135deg, #ffd700 0%, #c08429 50%, #8B5A2B 100%);
    background-size: 200% 200%;
    
    /* Text & Spacing */
    color: #ffffff;
    text-decoration: none;
    
    /* Animation */
    animation: gradientShift 6s ease infinite;
    
    /* Shadow/Glow Effect */
    box-shadow: 
        0 4px 15px rgba(192, 132, 41, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    
    /* Transitions */
    transition: all 0.3s ease;
}

.btn-outstanding:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(192, 132, 41, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    background-position: 100% 50%;
}

.btn-outstanding:active {
    transform: translateY(0) scale(0.98);
}



/* Ripple effect on click */
.btn-outstanding::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s, opacity 0.6s;
}

.btn-outstanding:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* Icon bounce animation */
.btn-outstanding .btn-icon {
    animation: iconBounce 2s ease-in-out infinite;
}

/* Gradient shift animation */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}



/* Float up animation */
@keyframes floatUp {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Icon bounce animation */
@keyframes iconBounce {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

/* Pulse ring effect (optional) */
.btn-outstanding-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: inherit;
    border: 1px solid rgba(255, 213, 138, 0.15);
    animation: pulseRing 2s ease-out infinite;
    z-index: -1;
}

@keyframes pulseRing {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }
    100% {
        width: 150%;
        height: 150%;
        opacity: 0;
    }
}

/* Alternative: Rose/Orange gradient for voting-related buttons */
.btn-outstanding-rose {
    position: relative;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    border: none;
    background: linear-gradient(135deg, #f472b6 0%, #fb923c 50%, #f97316 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    box-shadow: 
        0 2px 8px rgba(244, 114, 182, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-outstanding-rose:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 4px 12px rgba(244, 114, 182, 0.3);
}

