/* =========================================
   Global Styles & Typography
   ========================================= */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

html {
    scroll-padding-top: 100px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #FFFFFF;
}

h1, h2, h3, .sport-font {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* =========================================
   Components: Navigation & Hamburger
   ========================================= */
.glass-nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Modern Hamburger */
#mobile-menu-btn {
    position: relative;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    z-index: 100;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #0F172A;
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    transform-origin: center;
}

#mobile-menu-btn.active .line-1 {
    transform: translateY(8px) rotate(45deg);
    background-color: #F97316 !important;
}

#mobile-menu-btn.active .line-2 {
    opacity: 0 !important;
    transform: translateX(-20px);
}

#mobile-menu-btn.active .line-3 {
    transform: translateY(-8px) rotate(-45deg);
    background-color: #F97316 !important;
}

/* Mobile Menu Overlay */
#mobile-menu {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    z-index: 60 !important;
    display: flex !important;
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.active {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
}

#mobile-menu::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
    opacity: 0.05;
    pointer-events: none;
}

/* Staggered Link Animation */
.mobile-link-container {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

#mobile-menu.active .mobile-link-container {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.active .mobile-link-container:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.active .mobile-link-container:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.active .mobile-link-container:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.active .mobile-link-container:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.active .mobile-link-container:nth-child(5) { transition-delay: 0.3s; }
#mobile-menu.active .mobile-link-container:nth-child(6) { transition-delay: 0.35s; }

.mobile-link {
    position: relative;
    display: inline-block;
}

.mobile-link::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #F97316;
    transition: width 0.3s ease;
}

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

/* =========================================
   Components: Buttons & Interactives
   ========================================= */
.btn-shadow {
    box-shadow: 0 4px 0px 0px rgba(234, 88, 12, 0.2);
    transition: all 0.2s ease;
}

.btn-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(234, 88, 12, 0.4);
}

.bento-card {
    background: white;
    border: 1px solid #F3F4F6;
    transition: transform 0.3s ease;
}

.bento-card:hover {
    transform: scale(1.02);
}

/* =========================================
   Decorative & Backgrounds
   ========================================= */
/* Tactical Board Pattern */
.bg-tactical {
    background-color: #ffffff;
    background-image: radial-gradient(#1e293b 0.5px, transparent 0.5px), radial-gradient(#1e293b 0.5px, #ffffff 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0.03;
}

/* Abstract Pitch Lines */
.pitch-line {
    position: absolute;
    border: 2px solid rgba(15, 23, 42, 0.05);
    pointer-events: none;
}

/* =========================================
   Animations: Infinite Marquee
   ========================================= */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll {
    animation: scroll 30s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* Gradient Masks for Marquee */
.marquee-mask {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* =========================================
   Animations: Heartbeat
   ========================================= */
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite both;
}

/* =========================================
   Animations: Confetti
   ========================================= */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    animation: fall linear infinite;
}

@keyframes fall {
    0% { top: -10%; transform: rotate(0deg) translateX(0); opacity: 1; }
    100% { top: 110%; transform: rotate(720deg) translateX(20px); opacity: 0; }
}

.confetti:nth-child(1) { left: 10%; background-color: #F97316; animation-duration: 3s; animation-delay: 0s; }
.confetti:nth-child(2) { left: 20%; background-color: #0F172A; animation-duration: 4s; animation-delay: 1s; }
.confetti:nth-child(3) { left: 30%; background-color: #FFD700; animation-duration: 2.5s; animation-delay: 2s; }
.confetti:nth-child(4) { left: 40%; background-color: #F97316; animation-duration: 3.5s; animation-delay: 0.5s; }
.confetti:nth-child(5) { left: 50%; background-color: #0F172A; animation-duration: 2.8; animation-delay: 1.5s; }
.confetti:nth-child(6) { left: 60%; background-color: #FFD700; animation-duration: 4.2s; animation-delay: 0.2s; }
.confetti:nth-child(7) { left: 70%; background-color: #F97316; animation-duration: 3.1s; animation-delay: 2.5s; }
.confetti:nth-child(8) { left: 80%; background-color: #0F172A; animation-duration: 3.7s; animation-delay: 1.2s; }
.confetti:nth-child(9) { left: 90%; background-color: #FFD700; animation-duration: 2.9s; animation-delay: 0.8s; }
.confetti:nth-child(10) { left: 5%; background-color: #F97316; animation-duration: 4.5s; animation-delay: 1.8s; }
.confetti:nth-child(11) { left: 95%; background-color: #0F172A; animation-duration: 3.3s; animation-delay: 0.3s; }
.confetti:nth-child(12) { left: 55%; background-color: #FFD700; animation-duration: 3.9s; animation-delay: 2.2s; }

/* =========================================
   Mobile UX Improvements
   ========================================= */

/* Podium Mobile Compact Layout */
.podium-compact {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0.25rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

@media (max-width: 767px) {
    .podium-compact .medal-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    .podium-compact h3 {
        font-size: 0.6rem !important;
        line-height: 1.1 !important;
    }
    .podium-compact .place-number {
        font-size: 1.2rem !important;
    }
    .podium-compact .podium-pillar-1 { height: 9rem !important; }
    .podium-compact .podium-pillar-2 { height: 7rem !important; }
    .podium-compact .podium-pillar-3 { height: 5.5rem !important; }
    
    /* Ensure the order is 2-1-3 on mobile as well */
    .podium-compact > div:nth-child(1) { order: 1; } /* 2nd place */
    .podium-compact > div:nth-child(2) { order: 2; } /* 1st place */
    .podium-compact > div:nth-child(3) { order: 3; } /* 3rd place */
}

/* Prevent score wrapping in tables */
.score-cell {
    white-space: nowrap !important;
    min-width: 60px;
}

/* Table Scroll Hint */
.table-scroll-container {
    position: relative;
    width: 100%;
}

.table-scroll-container::after {
    content: '↔ PRZEWIŃ TABELĘ';
    position: absolute;
    bottom: -20px;
    right: 0;
    font-size: 9px;
    font-weight: 900;
    color: #F97316;
    letter-spacing: 0.1em;
    opacity: 0.6;
    animation: pulse-hint 2s infinite;
}

@media (min-width: 1024px) {
    .table-scroll-container::after {
        display: none;
    }
}

@keyframes pulse-hint {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50% { opacity: 0.8; transform: translateX(-5px); }
}

/* Custom Scrollbar for Wall of Gratitude */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #F97316;
    border-radius: 10px;
}
