@import url('https://fonts.googleapis.com/css2?family=Itim&family=Mali:wght@300;400;500;600;700&display=swap');

/* Base style mappings & ambient background glow */
body {
    background-color: #070913;
    background-image:
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.02) 0%, transparent 60%);
    background-attachment: fixed;
}

/* Ensure select dropdown options are visible in dark mode */
select option {
    background-color: #0f172a;
    color: #f1f5f9;
}

/* Live indicators pulsing */
.live-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f43f5e;
    margin-right: 0.5rem;
    box-shadow: 0 0 10px #f43f5e;
    animation: liveIndicator 1.5s infinite;
}

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

    50% {
        transform: scale(1.3);
        opacity: 1;
        box-shadow: 0 0 15px rgba(244, 63, 94, 0.8);
    }

    100% {
        transform: scale(0.9);
        opacity: 0.8;
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(100%) translateX(0) scale(0.6);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    50% {
        transform: translateY(-50vh) translateX(25px) scale(1);
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-110vh) translateX(-20px) scale(0.4);
        opacity: 0;
    }
}

@keyframes shine {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

@keyframes shimmer {
    100% {
        transform: translateX(200%);
    }
}

.animate-spin-slow {
    animation: spin 6s linear infinite;
}

/* Modal overlay styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(7, 9, 19, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    /* Controlled by JS flex/none */
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 1rem;
    animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal Content Card styling */
.modal-content {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    position: relative;
    animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScaleUp {
    from {
        transform: scale(0.9) translateY(10px);
        opacity: 0;
    }

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

/* Close button inside modal */
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.close-btn:hover {
    color: #ffffff;
    transform: scale(1.15);
}

/* Autocomplete list item styling */
.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background-color: rgba(99, 102, 241, 0.08);
}


/* Tab Pane Hiding and Showing */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeInTab 0.35s ease-out;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

/* Certificate Print configurations */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        background-image: none !important;
        font-family: 'Itim', sans-serif !important;
    }

    .no-print,
    .no-print-bar {
        display: none !important;
    }

    .certificate-container {
        border: 18px double #c5a02b !important;
        padding: 4rem !important;
        background-color: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        aspect-ratio: 1.414 / 1 !important;
        page-break-after: avoid;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .cert-name {
        color: #000 !important;
        border-bottom-color: #c5a02b !important;
    }

    .cert-logo {
        color: #725d19 !important;
    }

    .cert-title {
        color: #1e293b !important;
        border-bottom-color: rgba(197, 160, 43, 0.4) !important;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   PREMIUM SPORTDAY DESIGN ADDITIONS (UI/UX PRO MAX)
   ────────────────────────────────────────────────────────────────────────── */

/* Smooth custom easing transition variables */
:root {
    --transition-premium: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-smooth: all 0.2s ease-in-out;
}

/* Glassmorphism upgrade classes */
.glass-card {
    background: rgba(13, 17, 33, 0.45);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-premium);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.4);
}

/* Dynamic theme glow for house color variables */
.glass-glow-house:hover {
    box-shadow: 0 16px 36px -8px rgba(var(--house-color-rgb, 99, 102, 241), 0.18);
    border-color: rgba(var(--house-color-rgb, 255, 255, 255), 0.3);
}

/* Header hover underline animation */
.nav-link-glow {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link-glow::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 9999px;
}

.nav-link-glow:hover::after {
    width: 100%;
}

.nav-link-glow:hover {
    color: #ffffff;
}

/* First Rank Animated Crown */
@keyframes crownGlow {
    0%, 100% {
        filter: drop-shadow(0 0 4px rgba(234, 179, 8, 0.4)) rotate(-4deg);
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(234, 179, 8, 0.8)) rotate(4deg) scale(1.1);
    }
}

.animate-crown {
    display: inline-block;
    animation: crownGlow 2.5s ease-in-out infinite;
}

/* Advanced Ambient Orbs Keyframes & Classes */
@keyframes orbMovePrimary {
    0%, 100% {
        transform: scale(1) translate(0px, 0px);
        opacity: 0.55;
    }
    33% {
        transform: scale(1.12) translate(30px, -40px);
        opacity: 0.75;
    }
    66% {
        transform: scale(0.92) translate(-20px, 30px);
        opacity: 0.45;
    }
}

@keyframes orbMoveSecondary {
    0%, 100% {
        transform: scale(1.05) translate(0px, 0px);
        opacity: 0.7;
    }
    50% {
        transform: scale(0.9) translate(-30px, 30px);
        opacity: 0.45;
    }
}

.animate-orb-primary {
    animation: orbMovePrimary 15s ease-in-out infinite;
}

.animate-orb-secondary {
    animation: orbMoveSecondary 18s ease-in-out infinite;
}

/* Floating effects for decorative elements */
@keyframes floatBadge {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.animate-float-badge {
    animation: floatBadge 4s ease-in-out infinite;
}

/* Enhanced live pulse indicator */
.live-pulse-glow {
    position: relative;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background-color: #ef4444;
}

.live-pulse-glow::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 9999px;
    background-color: #ef4444;
    opacity: 0.4;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Custom premium scrollbar for cards and grid elements */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Hero Section Animations */
@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroPulseGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        filter: blur(100px) brightness(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
        filter: blur(130px) brightness(1.25);
    }
}

.hero-gradient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    border-radius: 9999px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.2) 40%, rgba(236, 72, 153, 0.1) 70%, transparent 100%);
    pointer-events: none;
    z-index: -10;
    animation: heroPulseGlow 12s ease-in-out infinite;
}

.animate-hero-fade-in-up {
    opacity: 0;
    animation: heroFadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggered delay helpers */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }