/*
:root {
    --color-background: #0d0d1a;
    --color-surface: #1a1a2e;
    --color-primary: #00a8ff;
    --color-secondary: #9c27b0;
    --color-accent: #00f5d4;
    --color-text: #e0e0e0;
    --color-text-muted: #a0a0a0;
    --color-border: rgba(0, 168, 255, 0.2);
    --color-glass: rgba(26, 26, 46, 0.6);

    --font-family-base: 'Segoe UI', 'Roboto', sans-serif;
    --font-family-heading: 'Montserrat', 'Impact', sans-serif;

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;

    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    
    --transition-fast: 0.2s ease-in-out;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
   scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-family-base);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover, a:focus {
    color: var(--color-accent);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--spacing-md);
}

/* Main Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header & Navbar */
.main-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(13, 13, 26, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: background-color var(--transition-fast);
}

.main-header.scrolled {
    background: var(--color-surface);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--color-text);
    font-weight: 600;
    padding: var(--spacing-sm) 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: #fff;
    border-bottom-color: var(--color-accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 600;
}

.btn:hover, .btn:focus {
    background: var(--color-primary);
    color: var(--color-background);
    box-shadow: 0 0 15px var(--color-primary);
}

.btn-accent {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-background);
}

.btn-accent:hover, .btn-accent:focus {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px var(--color-accent);
}

/* Language Switcher */
.lang-switcher details {
    position: relative;
}

.lang-switcher summary {
    list-style: none;
    cursor: pointer;
}

.lang-switcher ul {
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    list-style: none;
    padding: var(--spacing-sm);
    z-index: 1001;
}

.lang-switcher button {
    background: none;
    border: none;
    color: var(--color-text);
    padding: var(--spacing-sm);
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.lang-switcher button:hover {
    background: var(--color-primary);
    color: var(--color-background);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl) 0;
    overflow: hidden;
}

#hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(13, 13, 26, 0.5) 0%, var(--color-background) 70%);
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    text-shadow: 0 0 20px var(--color-primary);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: var(--spacing-lg) auto;
    color: var(--color-text-muted);
}

.hero-ctas {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* General Section Styling */
.section {
    padding: var(--spacing-xl) 0;
}

.section-heading {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 2.5rem;
}

/* Who We Are Section */
.counters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    text-align: center;
}

.counter .count {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent);
}

/* Glass Card */
.glass-card {
    background: var(--color-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    transition: all var(--transition-fast);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--color-border);
}

/* Events Carousel */
.events-carousel {
    position: relative;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    scrollbar-width: none; /* Firefox */
}
.carousel-track::-webkit-scrollbar { display: none; }

.event-card {
    flex: 0 0 90%;
    max-width: 90%;
    scroll-snap-align: center;
}

@media (min-width: 768px) {
    .event-card {
        flex-basis: 40%;
        max-width: 40%;
    }
}

/* Login Modal */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 450px;
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Menu Animations & Transitions */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 100vh;
    opacity: 1;
}

/* Mobile Responsive Improvements */
@media (max-width: 767px) {
    /* Improve touch targets for mobile */
    .nav-link, .btn, button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Ensure proper spacing for mobile menu items */
    #mobile-menu a, #mobile-menu button {
        padding: 12px 16px;
        font-size: 16px;
        width: 100%;
        text-align: left;
    }

    /* Mobile menu specific styles */
    #mobile-menu {
        background: var(--color-surface);
        border-top: 1px solid var(--color-border);
    }

    /* Prevent text scaling issues on mobile */
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    /* Improve hero section for mobile */
    .hero {
        min-height: 80vh;
        padding: var(--spacing-lg) 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    /* Stack counters on small screens */
    .counters {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--spacing-md);
    }

    /* Improve glass card spacing on mobile */
    .glass-card {
        padding: var(--spacing-md);
    }

    /* Mobile modal adjustments */
    .modal-content {
        width: 95%;
        max-width: 400px;
    }

    /* Navbar adjustments */
    .navbar {
        height: 60px;
    }

    /* Improve dropdown menu on mobile */
    .lang-switcher ul {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .hero-content h1 {
        font-size: 1.75rem;
    }

    .counter .count {
        font-size: 2rem;
    }

    .section-heading {
        font-size: 1.75rem;
    }

    /* Adjust container padding for very small screens */
    .container {
        width: 95%;
        padding: 0 var(--spacing-sm);
    }

    /* Reduce button padding on very small screens */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.875rem;
    }
}

/* Tablet specific styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .counters {
        grid-template-columns: repeat(2, 1fr);
    }

    .event-card {
        flex-basis: 45%;
        max-width: 45%;
    }
}

/* Smooth scroll behavior for all devices */
html {
    scroll-padding-top: 80px; /* Account for fixed header */
}

/* Prevent horizontal scroll on mobile */
body {
    overflow-x: hidden;
    position: relative;
}

/* Improve tap highlight color for touch devices */
* {
    -webkit-tap-highlight-color: rgba(0, 168, 255, 0.2);
}

/* RTL Support */
[dir="rtl"] .nav-menu {
    margin-right: auto;
    margin-left: 0;
}

[dir="rtl"] .lang-switcher ul {
    left: 0;
    right: auto;
}

[dir="rtl"] .modal-close {
    right: auto;
    left: var(--spacing-md);
}

[dir="rtl"] #mobile-menu a,
[dir="rtl"] #mobile-menu button {
    text-align: right;
}

/* ============================================ */
/* Modern Sporty Scrollbar Styles */
/* Cross Browser Support */
/* ============================================ */

/* Firefox Scrollbar Styling */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 168, 255, 0.6) rgba(26, 26, 46, 0.4);
}

/* Webkit Browsers (Chrome, Safari, Edge, Opera) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(13, 13, 26, 0.8) 0%, rgba(26, 26, 46, 0.6) 100%);
    border-radius: 10px;
    border: 1px solid rgba(0, 168, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 168, 255, 0.8) 0%, rgba(156, 39, 176, 0.8) 100%);
    border-radius: 10px;
    border: 2px solid rgba(26, 26, 46, 0.3);
    box-shadow: 0 0 10px rgba(0, 168, 255, 0.3);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(0, 168, 255, 1) 0%, rgba(156, 39, 176, 1) 100%);
    box-shadow: 0 0 15px rgba(0, 168, 255, 0.5), 0 0 20px rgba(156, 39, 176, 0.3);
    border-color: rgba(0, 245, 212, 0.3);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, rgba(0, 245, 212, 0.9) 0%, rgba(0, 168, 255, 0.9) 100%);
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.6);
}

/* Scrollbar Corner (when both scrollbars are present) */
::-webkit-scrollbar-corner {
    background: rgba(13, 13, 26, 0.8);
}

/* Horizontal Scrollbar Styling */
::-webkit-scrollbar:horizontal {
    height: 10px;
}

/* Thin Scrollbar Variant for Small Elements */
.thin-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 168, 255, 0.5) transparent;
}

.thin-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.thin-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.thin-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, rgba(0, 168, 255, 0.7) 0%, rgba(156, 39, 176, 0.7) 100%);
    border-radius: 6px;
    border: none;
}

/* Glowing Scrollbar Variant (for special sections) */
.glow-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 245, 212, 0.9) 0%, rgba(0, 168, 255, 0.9) 100%);
    box-shadow: 0 0 15px rgba(0, 245, 212, 0.6), 0 0 25px rgba(0, 168, 255, 0.4);
    animation: scrollbar-glow 3s ease-in-out infinite;
}

@keyframes scrollbar-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 245, 212, 0.6), 0 0 25px rgba(0, 168, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 245, 212, 0.8), 0 0 35px rgba(0, 168, 255, 0.6);
    }
}

/* Hide scrollbar for carousel elements (preserve existing behavior) */
.carousel-track::-webkit-scrollbar {
    display: none;
}

/* ============================================ */
/* Table Responsive Fixes for Admin/Approvals */
/* ============================================ */

/* Large screens - No horizontal scroll needed */
@media (min-width: 1024px) {
    /* Remove horizontal overflow from container on large screens */
    .overflow-x-auto {
        overflow-x: visible !important;
    }

    /* Allow table to fit naturally on large screens */
    table.min-w-full {
        min-width: auto;
        width: 100%;
        table-layout: auto;
    }

    /* Allow table cells to wrap content when needed */
    table.min-w-full th,
    table.min-w-full td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
        white-space: normal;
        word-break: break-word;
        vertical-align: top;
    }

    /* Optimize specific column widths for better layout */
    table.min-w-full th:first-child,
    table.min-w-full td:first-child {
        width: 40px; /* Checkbox column */
    }

    table.min-w-full th:nth-child(2),
    table.min-w-full td:nth-child(2) {
        width: 60px; /* Serial number column */
    }

    table.min-w-full th:last-child,
    table.min-w-full td:last-child {
        width: 180px; /* Actions column */
        white-space: nowrap;
    }
}

/* Medium and small screens - Horizontal scroll within table container only */
@media (max-width: 1023px) {
    /* Enable horizontal scroll only on the table container */
    .overflow-x-auto {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100vw;
    }

    /* Ensure table requires scrolling on smaller screens */
    table.min-w-full {
        min-width: 900px;
    }

    /* Prevent body from scrolling horizontally */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* ============================================ */
/* Custom Sporty Alert & Confirm Dialogs */
/* ============================================ */

#customAlertOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease-out;
}

#customAlertOverlay.active {
    display: flex;
}

.custom-alert-box {
    position: relative;
    width: 90%;
    max-width: 450px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(13, 13, 26, 0.98) 100%);
    border: 2px solid rgba(0, 168, 255, 0.4);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 0 40px rgba(0, 168, 255, 0.3), 0 0 80px rgba(156, 39, 176, 0.2);
    animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.custom-alert-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(0, 168, 255, 0.8) 0%, rgba(156, 39, 176, 0.8) 50%, rgba(0, 245, 212, 0.8) 100%);
    animation: shimmer 2s ease-in-out infinite;
}

.custom-alert-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 168, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.custom-alert-icon.info {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.2) 0%, rgba(0, 168, 255, 0.1) 100%);
    color: #00a8ff;
    box-shadow: 0 0 20px rgba(0, 168, 255, 0.3);
}

.custom-alert-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.custom-alert-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
    color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.custom-alert-icon.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.custom-alert-icon.confirm {
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.2) 0%, rgba(0, 168, 255, 0.2) 100%);
    color: #00f5d4;
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.3);
}

.custom-alert-title {
    font-family: 'Orbitron', 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 168, 255, 0.5);
    letter-spacing: 0.5px;
}

.custom-alert-body {
    padding: 24px;
}

.custom-alert-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #e0e0e0;
    margin: 0;
}

.custom-alert-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 168, 255, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.custom-alert-btn {
    font-family: 'Orbitron', 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.custom-alert-btn::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.5s ease, height 0.5s ease;
}

.custom-alert-btn:hover::before {
    width: 300px;
    height: 300px;
}

.custom-alert-btn-primary {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.9) 0%, rgba(0, 245, 212, 0.9) 100%);
    border-color: rgba(0, 168, 255, 0.6);
    color: #000000;
    box-shadow: 0 0 15px rgba(0, 168, 255, 0.4);
}

.custom-alert-btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 245, 212, 1) 0%, rgba(0, 168, 255, 1) 100%);
    box-shadow: 0 0 25px rgba(0, 245, 212, 0.6), 0 0 35px rgba(0, 168, 255, 0.4);
    transform: translateY(-2px);
}

.custom-alert-btn-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.9) 100%);
    border-color: rgba(16, 185, 129, 0.6);
    color: #000000;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.custom-alert-btn-success:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 1) 0%, rgba(5, 150, 105, 1) 100%);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
    transform: translateY(-2px);
}

.custom-alert-btn-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%);
    border-color: rgba(239, 68, 68, 0.6);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.custom-alert-btn-danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 1) 0%, rgba(220, 38, 38, 1) 100%);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
    transform: translateY(-2px);
}

.custom-alert-btn-secondary {
    background: transparent;
    border-color: rgba(156, 163, 175, 0.4);
    color: #9ca3af;
}

.custom-alert-btn-secondary:hover {
    border-color: rgba(156, 163, 175, 0.8);
    background: rgba(156, 163, 175, 0.1);
    color: #ffffff;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .custom-alert-box {
        width: 95%;
        max-width: none;
    }

    .custom-alert-header {
        padding: 16px 20px;
    }

    .custom-alert-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .custom-alert-title {
        font-size: 1.1rem;
    }

    .custom-alert-body {
        padding: 20px;
    }

    .custom-alert-message {
        font-size: 0.9rem;
    }

    .custom-alert-footer {
        padding: 16px 20px;
        flex-direction: column;
    }

    .custom-alert-btn {
        width: 100%;
        text-align: center;
    }
}
