/* ========================================
   CTF PLATFORM - DESIGN SYSTEM & UI/UX
   ======================================== */

/* Line breaks and paragraph formatting */
.footer-content p,
.announcement-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.ctf-description p,
.challenge-description p {
    margin-bottom: 0; /* No spacing between paragraphs */
    line-height: 1.2;
}

.ctf-description p:first-child,
.challenge-description p:first-child {
    margin-top: 0;
}

.footer-content p:last-child,
.ctf-description p:last-child,
.announcement-text p:last-child,
.challenge-description p:last-child {
    margin-bottom: 0;
}

.footer-content,
.ctf-description,
.announcement-text,
.challenge-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Remove pre-wrap since linebreaks filter handles formatting */
.footer-content p,
.ctf-description p,
.announcement-text p,
.challenge-description p {
    white-space: normal;
}

:root {
    /* Enhanced Color Palette */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --success-50: #ecfdf5;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;
    
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-700: #b45309;
    
    --danger-50: #fef2f2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --danger-700: #b91c1c;
    
    /* Medal Colors */
    --gold-50: #fffbeb;
    --gold-100: #fef3c7;
    --gold-200: #fde68a;
    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --gold-700: #b45309;
    --gold-800: #92400e;
    --gold-900: #78350f;
    
    --bronze-400: #cd7f32;
    --bronze-500: #b8860b;
    --bronze-600: #9a6b00;
    
    --silver-400: #c0c0c0;
    --silver-500: #a8a8a8;
    --silver-600: #909090;
    
    /* Typography Scale */
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    --transition-bounce: 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    
    /* Legacy Variables (for compatibility) */
    --primary-color: var(--primary-500);
    --secondary-color: var(--gray-500);
    --success-color: var(--success-500);
    --danger-color: var(--danger-500);
    --warning-color: var(--warning-500);
    --info-color: var(--primary-400);
    --dark-color: var(--gray-900);
    --light-color: var(--gray-100);
    --text-primary: var(--gray-100);
    --text-secondary: var(--gray-400);
    --text-muted: var(--gray-500);
    --border-color: var(--gray-600);
    --card-bg: var(--gray-800);
    --body-bg: var(--gray-900);
}

/* ========================================
   GLOBAL STYLES & TYPOGRAPHY
   ======================================== */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-sans);
    font-size: var(--text-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--gray-100);
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 50%, var(--gray-700) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--gray-100);
    margin: 0 0 var(--space-4) 0;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin: 0 0 var(--space-4) 0;
    color: var(--gray-200);
}

a {
    color: var(--primary-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-300);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Focus Management */
*:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* ========================================
   LAYOUT & CONTAINERS
   ======================================== */

/* Main Content Wrapper */
main {
    flex: 1;
    padding: var(--space-8) 0;
    min-height: calc(100vh - 200px);
}

/* Container System */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
    width: 100%;
}

.container-fluid {
    padding: 0 var(--space-4);
    width: 100%;
}

.container-sm {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-lg {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-xl {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* Responsive Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(-1 * var(--space-3));
}

.col {
    flex: 1 0 0%;
    padding: 0 var(--space-3);
}

.col-auto {
    flex: 0 0 auto;
    width: auto;
    padding: 0 var(--space-3);
}

/* Responsive Breakpoints */
@media (min-width: 576px) {
    .container { max-width: 540px; }
    .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
    .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 768px) {
    .container { max-width: 720px; }
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 992px) {
    .container { max-width: 960px; }
    .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 1200px) {
    .container { max-width: 1140px; }
    .col-xl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
}

/* ========================================
   HEADER & ANNOUNCEMENT STYLING
   ======================================== */

/* Navigation */
.navbar {
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    margin-bottom: 2rem;
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.85) 0%, 
        rgba(30, 64, 175, 0.9) 50%, 
        rgba(37, 99, 235, 0.85) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.15) 0%, 
        rgba(37, 99, 235, 0.15) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar:hover::before {
    opacity: 1;
}

.navbar-brand {
    font-weight: var(--font-weight-bold);
    font-size: var(--text-2xl);
    color: white !important;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.navbar-brand i {
    font-size: var(--text-3xl);
    color: var(--warning-400);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.navbar-nav .nav-link {
    font-weight: var(--font-weight-medium);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.95) !important;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.navbar-nav .nav-link:hover::before {
    width: 80%;
}

.navbar-nav .nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.25);
    font-weight: var(--font-weight-semibold);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.navbar-nav .nav-link.active::before {
    width: 100%;
    background: linear-gradient(90deg, transparent, white, transparent);
}

/* Jumbotron/Hero Section */
.jumbotron {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 50%, var(--primary-800) 100%);
    border: 1px solid var(--primary-500);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    position: relative;
    overflow: hidden;
}

.jumbotron::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.jumbotron .display-4 {
    color: white;
    font-weight: var(--font-weight-extrabold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.jumbotron .lead {
    color: rgba(255, 255, 255, 0.9);
    font-weight: var(--font-weight-medium);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

/* Announcement Styling */
.jumbotron .alert-warning {
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
    border: 2px solid var(--warning-400);
    border-radius: var(--radius-lg);
    color: white !important;
    font-weight: var(--font-weight-semibold);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    margin-top: var(--space-4);
    margin-bottom: var(--space-4);
}

.jumbotron .alert-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--warning-400), var(--warning-300), var(--warning-400));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.jumbotron .alert-warning i {
    color: white;
    margin-right: var(--space-2);
    font-size: var(--text-lg);
}

/* Countdown Badge */
.jumbotron .badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: var(--font-weight-semibold);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

/* Jumbotron Buttons */
.jumbotron .btn-light {
    background: white;
    color: var(--primary-700);
    border: 2px solid white;
    font-weight: var(--font-weight-semibold);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
}

.jumbotron .btn-light:hover {
    background: var(--gray-100);
    color: var(--primary-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.jumbotron .btn-outline-light {
    background: transparent;
    color: white;
    border: 2px solid white;
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
}

.jumbotron .btn-outline-light:hover {
    background: white;
    color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Status Separator */
.jumbotron hr {
    border-color: rgba(255, 255, 255, 0.3);
    margin: var(--space-6) 0;
    position: relative;
    z-index: 1;
}

/* Responsive Header & Announcement */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: var(--text-xl);
    }
    
    .navbar-brand i {
        font-size: var(--text-2xl);
    }
    
    .jumbotron {
        padding: var(--space-6) !important;
        margin-bottom: var(--space-4);
    }
    
    .jumbotron .display-4 {
        font-size: var(--text-3xl);
    }
    
    .jumbotron .lead {
        font-size: var(--text-lg);
    }
    
    .jumbotron .alert-warning {
        font-size: var(--text-sm);
        padding: var(--space-3);
    }
    
    .jumbotron .btn {
        width: 100%;
        margin-bottom: var(--space-2);
    }
    
    .jumbotron .btn:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .jumbotron {
        padding: var(--space-4) !important;
    }
    
    .jumbotron .display-4 {
        font-size: var(--text-2xl);
    }
    
    .jumbotron .lead {
        font-size: var(--text-base);
    }
    
    .jumbotron .alert-warning {
        font-size: var(--text-xs);
        padding: var(--space-2);
    }
}

/* ========================================
   ENHANCED COMPONENT SYSTEM
   ======================================== */

/* Enhanced Cards */
.card {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.8) 0%, 
        rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--primary-500) 0%, 
        var(--primary-400) 50%, 
        var(--primary-500) 100%);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 
        0 25px 70px rgba(59, 130, 246, 0.2),
        0 0 0 1px rgba(59, 130, 246, 0.3) inset,
        0 1px 0 rgba(255, 255, 255, 0.1) inset;
    transform: translateY(-6px) scale(1.01);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.6) 0%, 
        rgba(15, 23, 42, 0.7) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    padding: var(--space-6);
    font-weight: var(--font-weight-semibold);
    color: var(--gray-100);
    position: relative;
}

.card-body {
    padding: var(--space-6);
    color: var(--gray-200);
    background: transparent;
}

.card-footer {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.6) 0%, 
        rgba(15, 23, 42, 0.7) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    padding: var(--space-4) var(--space-6);
    color: var(--gray-300);
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
    white-space: nowrap;
    min-height: 40px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-normal);
}

.btn:hover::before {
    left: 100%;
}

.btn:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button Variants */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    border: none;
    box-shadow: 
        0 4px 14px rgba(59, 130, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 100%);
    box-shadow: 
        0 8px 20px rgba(59, 130, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    transform: translateY(-2px);
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-secondary {
    background: var(--gray-600);
    color: var(--gray-100);
    border-color: var(--gray-600);
}

.btn-secondary:hover {
    background: var(--gray-500);
    border-color: var(--gray-500);
    color: white;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    color: white;
    border-color: var(--success-500);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-600) 0%, var(--success-700) 100%);
    border-color: var(--success-600);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-500) 0%, var(--danger-600) 100%);
    color: white;
    border-color: var(--danger-500);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-600) 0%, var(--danger-700) 100%);
    border-color: var(--danger-600);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
    color: white;
    border-color: var(--warning-500);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--warning-600) 0%, var(--warning-700) 100%);
    border-color: var(--warning-600);
    transform: translateY(-1px);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
    min-height: 32px;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
    min-height: 48px;
}

/* Enhanced Forms */
.form-control {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--gray-100);
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-clip: padding-box;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
    color: var(--gray-100);
    background: rgba(30, 41, 59, 0.7);
    border-color: var(--primary-500);
    outline: 0;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--gray-500);
    opacity: 1;
}

.form-control:disabled {
    background-color: var(--gray-700);
    opacity: 0.6;
    cursor: not-allowed;
}

.form-label {
    display: inline-block;
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-medium);
    color: var(--gray-200);
}

.form-text {
    margin-top: var(--space-1);
    font-size: var(--text-sm);
    color: var(--gray-400);
}

/* Enhanced Alerts */
.alert {
    position: relative;
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
    border: 1px solid transparent;
    border-radius: 16px;
    font-weight: var(--font-weight-medium);
    border-left: 4px solid;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-primary {
    color: var(--primary-100);
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.15) 0%, 
        rgba(37, 99, 235, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    border-left-color: var(--primary-500);
}

.alert-success {
    color: var(--success-100);
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.15) 0%, 
        rgba(5, 150, 105, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    border-left-color: var(--success-500);
}

.alert-danger {
    color: var(--danger-100);
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.15) 0%, 
        rgba(220, 38, 38, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.3);
    border-left-color: var(--danger-500);
}

.alert-warning {
    color: var(--warning-100);
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.15) 0%, 
        rgba(217, 119, 6, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.3);
    border-left-color: var(--warning-500);
}

/* Enhanced Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.badge-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-secondary {
    color: white;
    background: linear-gradient(135deg, var(--gray-600) 0%, var(--gray-700) 100%);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.badge-success {
    color: white;
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
    color: white;
    background: linear-gradient(135deg, var(--danger-500) 0%, var(--danger-600) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-warning {
    color: white;
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Enhanced Tables */
/* Legacy table styles - replaced by unified table styles below */
/* Kept for reference but overridden by unified styles */

/* ========================================
   RESPONSIVE DESIGN & ACCESSIBILITY
   ======================================== */

/* Responsive Typography */
@media (max-width: 768px) {
    :root {
        --text-xs: 0.7rem;
        --text-sm: 0.8rem;
        --text-base: 0.9rem;
        --text-lg: 1rem;
        --text-xl: 1.1rem;
        --text-2xl: 1.3rem;
        --text-3xl: 1.6rem;
        --text-4xl: 1.9rem;
    }
    
    .container {
        padding: 0 var(--space-3);
    }
    
    .card-body {
        padding: var(--space-4);
    }
    
    .btn {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-sm);
    }
    
    .table th,
    .table td {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-sm);
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 var(--space-2);
    }
    
    .card-header,
    .card-body {
        padding: var(--space-3);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: var(--radius-lg);
        border-right-width: 1px;
        margin-bottom: var(--space-2);
    }
    
    .btn-group .btn:last-child {
        margin-bottom: 0;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .btn::before {
        display: none;
    }
    
    .card:hover {
        transform: none;
    }
    
    .table-hover tbody tr:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --gray-100: #ffffff;
        --gray-200: #f0f0f0;
        --gray-300: #e0e0e0;
        --gray-400: #c0c0c0;
        --gray-500: #a0a0a0;
        --gray-600: #808080;
        --gray-700: #606060;
        --gray-800: #404040;
        --gray-900: #202020;
    }
    
    .card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
}

/* Focus Management for Keyboard Navigation */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-500);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .navbar,
    .btn,
    .alert {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .table {
        border-collapse: collapse !important;
    }
    
    .table th,
    .table td {
        border: 1px solid #000 !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gray-400);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.justify-content-start { justify-content: flex-start; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }

.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Cards - Duplicate styles updated to match modern design */
.card {
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.8) 0%, 
        rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--primary-500) 0%, 
        var(--primary-400) 50%, 
        var(--primary-500) 100%);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover {
    box-shadow: 
        0 25px 70px rgba(59, 130, 246, 0.2),
        0 0 0 1px rgba(59, 130, 246, 0.3) inset;
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(59, 130, 246, 0.4);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    font-weight: 600;
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.6) 0%, 
        rgba(15, 23, 42, 0.7) 100%);
    backdrop-filter: blur(10px);
    color: #f7fafc;
    padding: 1.25rem 1.5rem;
    border-radius: 20px 20px 0 0;
}

.card-body {
    color: #e2e8f0;
    padding: 1.5rem;
    background: transparent;
}

.card-footer {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.6) 0%, 
        rgba(15, 23, 42, 0.7) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 0 0 20px 20px;
    color: #e2e8f0;
}

/* Removed duplicate styles */

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #ffffff;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: #ffffff;
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: #ffffff;
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #000000;
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
    color: #000000;
}

/* Challenge Cards */
.challenge-card {
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.8) 0%, 
        rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.challenge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--primary-500) 0%, 
        var(--primary-400) 50%, 
        var(--primary-500) 100%);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: shimmer 3s ease-in-out infinite;
}

.challenge-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(59, 130, 246, 0.3) inset;
    border-color: rgba(59, 130, 246, 0.4);
}

.challenge-card:hover::before {
    opacity: 1;
}

.challenge-card.border-success {
    border-color: rgba(16, 185, 129, 0.3) !important;
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.1) 0%, 
        rgba(5, 150, 105, 0.05) 100%);
}

.challenge-card.border-success::before {
    background: linear-gradient(90deg, 
        var(--success-500) 0%, 
        var(--success-400) 50%, 
        var(--success-500) 100%);
}

.challenge-card.border-warning {
    border-color: rgba(245, 158, 11, 0.3) !important;
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.1) 0%, 
        rgba(217, 119, 6, 0.05) 100%);
}

.challenge-card.border-warning::before {
    background: linear-gradient(90deg, 
        var(--warning-500) 0%, 
        var(--warning-400) 50%, 
        var(--warning-500) 100%);
}

.challenge-card.border-danger {
    border-color: rgba(239, 68, 68, 0.3) !important;
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.1) 0%, 
        rgba(220, 38, 38, 0.05) 100%);
}

.challenge-card.border-danger::before {
    background: linear-gradient(90deg, 
        var(--danger-500) 0%, 
        var(--danger-400) 50%, 
        var(--danger-500) 100%);
}

/* Jumbotron Alternative */
.jumbotron {
    background: linear-gradient(135deg, var(--primary-color), #0b5ed7);
    border-radius: 15px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.jumbotron h1, .jumbotron h2, .jumbotron h3 {
    color: #ffffff;
}

.jumbotron p {
    color: rgba(255, 255, 255, 0.9);
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    background-color: #ffffff;
    color: var(--text-primary);
    outline: none;
}

.form-select {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    background-color: #ffffff;
    color: var(--text-primary);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    background-color: #ffffff;
    color: var(--text-primary);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--text-muted);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

.badge-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.badge-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.badge-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.3);
}

/* Scoreboard */
.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #f7fafc !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Scoreboard specific styling */
.table strong {
    color: #f7fafc !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.table small {
    color: #a0aec0 !important;
    font-weight: 500;
}

.table .text-muted {
    color: #9ca3af !important;
    font-weight: 500;
}

/* Crown and medal icons */
.fa-crown.text-warning {
    color: #fbbf24 !important;
    text-shadow: 0 2px 4px rgba(251, 191, 36, 0.5);
}

.fa-medal.text-warning {
    color: #f59e0b !important;
    text-shadow: 0 2px 4px rgba(245, 158, 11, 0.5);
}

.fa-medal.text-secondary {
    color: #9ca3af !important;
    text-shadow: 0 2px 4px rgba(156, 163, 175, 0.5);
}

/* Legacy table styles - replaced by unified table styles below */
/* Kept for reference but overridden by unified styles */

/* Dark Theme List Group Styling */
.list-group-item {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.6) 0%, 
        rgba(15, 23, 42, 0.7) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.3), 
        rgba(37, 99, 235, 0.2));
    transition: width 0.3s ease;
}

/* Dark Theme Statistics Cards */
.card.border-primary {
    border-color: #3b82f6 !important;
    background: linear-gradient(135deg, #2d3748 0%, #1e3a8a 0.1);
}

.card.border-success {
    border-color: #22c55e !important;
    background: linear-gradient(135deg, #2d3748 0%, #16a34a 0.1);
}

.card.border-warning {
    border-color: #f59e0b !important;
    background: linear-gradient(135deg, #2d3748 0%, #d97706 0.1);
}

.card.border-info {
    border-color: #06b6d4 !important;
    background: linear-gradient(135deg, #2d3748 0%, #0891b2 0.1);
}

.card.border-secondary {
    border-color: #6b7280 !important;
    background: linear-gradient(135deg, #2d3748 0%, #4b5563 0.1);
}

.card .text-muted {
    color: #a0aec0 !important;
}

.card h3 {
    color: #f7fafc;
    font-weight: 700;
}

.list-group-item:hover {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.15) 0%, 
        rgba(37, 99, 235, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    color: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.list-group-item:hover::before {
    width: 4px;
}

.list-group-item.active {
    background: linear-gradient(135deg, 
        var(--primary-500) 0%, 
        var(--primary-600) 100%);
    border-color: var(--primary-500);
    color: #ffffff;
    box-shadow: 
        0 4px 14px rgba(59, 130, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.list-group-item-action:hover {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.15) 0%, 
        rgba(37, 99, 235, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    color: #ffffff;
}

.table-bordered {
    border: 1px solid #4a5568;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #4a5568;
}

.table-hover tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-hover tbody tr:hover {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(37, 99, 235, 0.05) 100%) !important;
    color: #ffffff;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Dark theme table variants */
.table-dark {
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.8) 0%, 
        rgba(30, 41, 59, 0.9) 100%);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.table-dark th,
.table-dark td {
    border-color: rgba(59, 130, 246, 0.2);
}

.table-dark thead th {
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.6) 0%, 
        rgba(30, 64, 175, 0.5) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    padding: 1rem;
}

/* Dark Theme Submission Styling */
.submission-feed {
    background-color: #1a202c;
    border-radius: 8px;
    padding: 1rem;
}

.submission-feed .d-flex {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.submission-feed .d-flex:hover {
    background-color: #374151;
    border-color: #718096;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Success submissions (correct) */
.submission-feed .bg-success.bg-opacity-10 {
    background-color: rgba(34, 197, 94, 0.15) !important;
    border-left: 4px solid #22c55e;
}

.submission-feed .bg-success.bg-opacity-10:hover {
    background-color: rgba(34, 197, 94, 0.25) !important;
}

/* Danger submissions (incorrect) */
.submission-feed .bg-danger.bg-opacity-10 {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-left: 4px solid #ef4444;
}

.submission-feed .bg-danger.bg-opacity-10:hover {
    background-color: rgba(239, 68, 68, 0.25) !important;
}

/* Submission text styling */
.submission-feed strong {
    color: #f7fafc;
    font-weight: 600;
}

.submission-feed .text-muted {
    color: #a0aec0 !important;
}

.submission-feed .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.submission-feed .badge.bg-info {
    background-color: #3b82f6 !important;
    color: #ffffff;
}

.submission-feed .badge.bg-success {
    background-color: #22c55e !important;
    color: #ffffff;
    border: 1px solid #16a34a;
}

.submission-feed .badge.bg-danger {
    background-color: #ef4444 !important;
    color: #ffffff;
    border: 1px solid #dc2626;
}

/* Enhanced badge styling */
.badge.bg-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.badge.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Submission feed scrollbar */
.submission-feed::-webkit-scrollbar {
    width: 6px;
}

.submission-feed::-webkit-scrollbar-track {
    background: #1a202c;
    border-radius: 3px;
}

.submission-feed::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 3px;
}

.submission-feed::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Dark Theme Recent Registrations Styling */
.registration-feed {
    background-color: #1a202c;
    border-radius: 8px;
    padding: 1rem;
}

.registration-feed .d-flex {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    transition: all 0.3s ease;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.registration-feed .d-flex:hover {
    background-color: #374151;
    border-color: #718096;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.registration-feed .d-flex:last-child {
    margin-bottom: 0;
}

/* Registration text styling */
.registration-feed strong {
    color: #f7fafc;
    font-weight: 600;
    font-size: 1rem;
}

.registration-feed .text-muted {
    color: #a0aec0 !important;
    font-size: 0.875rem;
}

.registration-feed .text-end {
    text-align: right;
}

/* No Team button styling */
.btn-outline-secondary {
    background-color: transparent;
    border-color: #6b7280;
    color: #9ca3af;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: #6b7280;
    border-color: #6b7280;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

/* Registration feed scrollbar */
.registration-feed::-webkit-scrollbar {
    width: 6px;
}

.registration-feed::-webkit-scrollbar-track {
    background: #1a202c;
    border-radius: 3px;
}

.registration-feed::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 3px;
}

.registration-feed::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

.table-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-left: 4px solid var(--warning-color);
    color: #fef3c7;
}

.table-success {
    background-color: rgba(25, 135, 84, 0.15) !important;
    border-left: 4px solid var(--success-color);
    color: #bbf7d0;
}

.table-danger {
    background-color: rgba(220, 53, 69, 0.15) !important;
    border-left: 4px solid var(--danger-color);
    color: #fecaca;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Alert Styles */
.alert {
    border: 1px solid;
    border-radius: 10px;
    border-left: 4px solid;
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
}

.alert-success {
    border-color: rgba(25, 135, 84, 0.2);
    border-left-color: var(--success-color);
    background-color: rgba(25, 135, 84, 0.1);
    color: #0f5132;
}

.alert-danger {
    border-color: rgba(220, 53, 69, 0.2);
    border-left-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
}

.alert-warning {
    border-color: rgba(255, 193, 7, 0.2);
    border-left-color: var(--warning-color);
    background-color: rgba(255, 193, 7, 0.1);
    color: #664d03;
}

.alert-info {
    border-color: rgba(13, 202, 240, 0.2);
    border-left-color: var(--info-color);
    background-color: rgba(13, 202, 240, 0.1);
    color: #055160;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #0f1419 0%, #1a202c 100%);
    color: #ffffff;
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid #4a5568;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
}

footer h5 {
    color: #f7fafc;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

footer p {
    color: #cbd5e0;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

footer small {
    color: #a0aec0;
    font-size: 0.875rem;
}

footer a {
    color: #63b3ed;
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #90cdf4;
    text-decoration: underline;
}

footer .container {
    position: relative;
    z-index: 1;
}

/* Dark Theme Dashboard Enhancements */
.dashboard-stats .card {
    border: none;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dashboard-stats .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dashboard-stats .card-body {
    background: transparent;
    text-align: center;
}

.dashboard-stats .card-body i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.dashboard-stats .card-body h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-stats .card-body p {
    color: #a0aec0;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Actions Section */
.quick-actions .card {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border: 1px solid #4a5568;
}

.quick-actions .btn {
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.quick-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.quick-actions .btn-success,
.quick-action-btn {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%) !important;
    border-color: var(--primary-500) !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3) !important;
    color: white !important;
}

.quick-actions .btn-success:hover,
.quick-action-btn:hover {
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 100%) !important;
    border-color: var(--primary-400) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

/* Admin Navigation Section */
.admin-nav .list-group-item {
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #4a5568;
}

.admin-nav .list-group-item.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.admin-nav .list-group-item-action:hover {
    background: linear-gradient(135deg, #374151 0%, #4a5568 100%);
    border-color: #718096;
}

/* Dark Theme User List Styling */
.user-list {
    background-color: #1a202c;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #4a5568;
}

.user-list .list-group-item {
    background-color: #2d3748;
    border: none;
    border-bottom: 1px solid #4a5568;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-list .list-group-item:last-child {
    border-bottom: none;
}

.user-list .list-group-item:nth-child(odd) {
    background-color: #2d3748;
}

.user-list .list-group-item:nth-child(even) {
    background-color: #374151;
}

.user-list .list-group-item:hover {
    background-color: #4a5568;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* User information styling */
.user-info {
    flex: 1;
    text-align: left;
}

.user-info .username {
    color: #f7fafc;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    display: block;
}

.user-info .email {
    color: #a0aec0;
    font-size: 0.875rem;
    margin-bottom: 0;
    display: block;
}

/* User actions styling */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-actions .date-time {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: right;
    min-width: 80px;
}

/* Enhanced No Team button */
.btn-no-team {
    background-color: #6b7280;
    border: 1px solid #9ca3af;
    color: #ffffff;
    border-radius: 20px;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.btn-no-team:hover {
    background-color: #9ca3af;
    border-color: #d1d5db;
    color: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

/* User list header styling */
.user-list-header {
    background-color: #0f1419;
    color: #f7fafc;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #3b82f6;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-list-header i {
    color: #3b82f6;
    margin-right: 0.5rem;
}

/* User list container */
.user-list-container {
    max-height: 500px;
    overflow-y: auto;
}

/* User list scrollbar */
.user-list-container::-webkit-scrollbar {
    width: 8px;
}

.user-list-container::-webkit-scrollbar-track {
    background: #1a202c;
    border-radius: 4px;
}

.user-list-container::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.user-list-container::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* User list empty state */
.user-list-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #9ca3af;
    background-color: #2d3748;
}

.user-list-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.user-list-empty p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* User list footer */
.user-list-footer {
    background-color: #0f1419;
    padding: 1rem 1.5rem;
    border-top: 1px solid #4a5568;
    text-align: center;
}

.user-list-footer .btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.user-list-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* User list responsive design */
@media (max-width: 768px) {
    .user-list .list-group-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .user-actions {
        width: 100%;
        justify-content: space-between;
        align-items: flex-end;
    }
    
    .user-actions .date-time {
        text-align: left;
        min-width: auto;
    }
    
    .btn-no-team {
        min-width: auto;
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .user-list-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .user-list .list-group-item {
        padding: 0.75rem;
    }
    
    .user-info .username {
        font-size: 1rem;
    }
    
    .user-info .email {
        font-size: 0.8rem;
    }
    
    .user-actions {
        gap: 0.5rem;
    }
}

/* User list animations */
.user-list .list-group-item {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User list selection states */
.user-list .list-group-item.selected {
    background-color: #3b82f6;
    border-left: 4px solid #ffffff;
}

.user-list .list-group-item.selected .username {
    color: #ffffff;
}

.user-list .list-group-item.selected .email {
    color: #dbeafe;
}

/* User list loading state */
.user-list-loading {
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
    background-color: #2d3748;
}

.user-list-loading .spinner-border {
    color: #3b82f6;
    width: 2rem;
    height: 2rem;
}

/* User list search/filter styling */
.user-list-search {
    background-color: #1a202c;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #4a5568;
}

.user-list-search .form-control {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
    border-radius: 8px;
}

.user-list-search .form-control:focus {
    background-color: #374151;
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.user-list-search .form-control::placeholder {
    color: #9ca3af;
}

/* Dark Theme Form Styling */
.form-control, .form-select, .form-textarea {
    background-color: #374151 !important;
    border: 2px solid #4a5568 !important;
    color: #e2e8f0 !important;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus, .form-textarea:focus {
    background-color: #4a5568 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
    outline: none;
}

.form-control::placeholder, .form-select::placeholder, .form-textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1;
}

.form-control:disabled, .form-select:disabled, .form-textarea:disabled {
    background-color: #2d3748 !important;
    color: #6b7280 !important;
    cursor: not-allowed;
}

/* Form Labels */
.form-label, label {
    color: #f7fafc !important;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Form Text/Hint Text */
.form-text, .text-muted {
    color: #a0aec0 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

/* Form Validation States */
.form-control.is-valid {
    border-color: #22c55e !important;
    background-color: rgba(34, 197, 94, 0.1) !important;
}

.form-control.is-invalid {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
}

.valid-feedback {
    color: #22c55e !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.invalid-feedback {
    color: #ef4444 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Guidelines Box Styling */
.guidelines-box {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.guidelines-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
}

.guidelines-box h6 {
    color: #dbeafe !important;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guidelines-box ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.guidelines-box li {
    color: #bfdbfe !important;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.guidelines-box li:last-child {
    margin-bottom: 0;
}

/* Enhanced Form Container */
.form-container {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.form-container .card-header {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-bottom: 2px solid #3b82f6;
    color: #f7fafc;
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1.5rem 2rem;
}

/* Color Input Styling */
input[type="color"] {
    background-color: #374151 !important;
    border: 2px solid #4a5568 !important;
    border-radius: 8px;
    height: 50px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="color"]:hover {
    border-color: #3b82f6 !important;
    transform: scale(1.02);
}

input[type="color"]:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Textarea Styling */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Select Dropdown Styling */
.form-select {
    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='%23e2e8f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-select:focus {
    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='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Form Button Styling */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #4a5568;
}

.form-actions .btn {
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

.form-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Form Section Headers */
.form-section-header {
    color: #f7fafc;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Help Text */
.help-text {
    color: #9ca3af;
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 0.25rem;
    opacity: 0.8;
}

/* Additional Form Enhancements */
.form-floating {
    position: relative;
}

.form-floating .form-control {
    height: 60px;
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating .form-control:focus {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
    color: #9ca3af;
}

.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: #3b82f6;
}

/* Input Group Styling */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    background-color: #4a5568 !important;
    border: 2px solid #4a5568 !important;
    color: #e2e8f0 !important;
    border-radius: 8px 0 0 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
}

.input-group .form-control {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.input-group .form-control:focus {
    border-left: 2px solid #3b82f6;
}

/* Checkbox and Radio Styling */
.form-check-input {
    background-color: #374151 !important;
    border: 2px solid #4a5568 !important;
    border-radius: 4px;
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.25em;
    vertical-align: top;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.form-check-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-check-label {
    color: #e2e8f0 !important;
    font-weight: 500;
    margin-left: 0.5rem;
    cursor: pointer;
}

/* Range Input Styling */
input[type="range"] {
    background-color: #4a5568;
    border-radius: 8px;
    height: 8px;
    outline: none;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    height: 20px;
    width: 20px;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #60a5fa;
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    background: #3b82f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    height: 20px;
    width: 20px;
    transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #60a5fa;
    transform: scale(1.1);
}

/* File Input Styling - Legacy (overridden by unified styles below) */
/* These styles are kept for backward compatibility but are overridden by the unified file input styles */

/* Form Row Styling */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.form-row > .col,
.form-row > [class*="col-"] {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

/* Form Validation Icons */
.form-control.is-valid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%2322c55e' viewBox='0 0 8 8'%3e%3cpath d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23ef4444' viewBox='0 0 8 8'%3e%3cpath d='M5.25 1.354a.5.5 0 0 1 .708 0l1.5 1.5a.5.5 0 0 1 0 .708L6.354 5.5l1.5 1.5a.5.5 0 0 1 0 .708L5.25 8.354l-1.5-1.5a.5.5 0 0 1 0-.708L4.646 5.5l-1.5-1.5a.5.5 0 0 1 0-.708l1.5-1.5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Dark Theme Rules and Guidelines Boxes */
.rules-box, .guidelines-box, .warning-box, .info-box {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border: 2px solid #4a5568;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Rules Box - Red/Orange Theme */
.rules-box {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.rules-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #f97316, #f59e0b);
}

.rules-box h6, .rules-box h5, .rules-box h4 {
    color: #fef3c7 !important;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rules-box ul, .rules-box ol {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.rules-box li {
    color: #fde68a !important;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-weight: 500;
}

.rules-box li:last-child {
    margin-bottom: 0;
}

.rules-box li strong {
    color: #fbbf24 !important;
    font-weight: 700;
}

/* Guidelines Box - Blue Theme */
.guidelines-box {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.guidelines-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
}

.guidelines-box h6, .guidelines-box h5, .guidelines-box h4 {
    color: #dbeafe !important;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guidelines-box ul, .guidelines-box ol {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.guidelines-box li {
    color: #bfdbfe !important;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-weight: 500;
}

.guidelines-box li:last-child {
    margin-bottom: 0;
}

.guidelines-box li strong {
    color: #93c5fd !important;
    font-weight: 700;
}

/* Warning Box - Yellow Theme */
.warning-box {
    border-left: 4px solid #eab308;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.warning-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #eab308, #facc15, #eab308);
}

.warning-box h6, .warning-box h5, .warning-box h4 {
    color: #fefce8 !important;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.warning-box ul, .warning-box ol {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.warning-box li {
    color: #fef3c7 !important;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-weight: 500;
}

.warning-box li:last-child {
    margin-bottom: 0;
}

.warning-box li strong {
    color: #fde047 !important;
    font-weight: 700;
}

/* Info Box - Green Theme */
.info-box {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.info-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #34d399, #10b981);
}

.info-box h6, .info-box h5, .info-box h4 {
    color: #d1fae5 !important;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-box ul, .info-box ol {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.info-box li {
    color: #a7f3d0 !important;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-weight: 500;
}

.info-box li:last-child {
    margin-bottom: 0;
}

.info-box li strong {
    color: #6ee7b7 !important;
    font-weight: 700;
}

/* Enhanced Content Boxes */
.content-box {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border: 2px solid #4a5568;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.content-box h6, .content-box h5, .content-box h4 {
    color: #f7fafc !important;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.content-box p {
    color: #e2e8f0 !important;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.content-box p:last-child {
    margin-bottom: 0;
}

.content-box strong {
    color: #f7fafc !important;
    font-weight: 700;
}

/* Alert Boxes */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.alert-success {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-left: 4px solid #22c55e;
    color: #d1fae5 !important;
}

.alert-success::before {
    background: linear-gradient(90deg, #22c55e, #34d399, #22c55e);
}

.alert-danger {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-left: 4px solid #ef4444;
    color: #fecaca !important;
}

.alert-danger::before {
    background: linear-gradient(90deg, #ef4444, #f87171, #ef4444);
}

.alert-warning {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-left: 4px solid #f59e0b;
    color: #fef3c7 !important;
}

.alert-warning::before {
    content: '';
    background: linear-gradient(90deg, #f59e0b, #facc15, #f59e0b);
}

.alert-info {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-left: 4px solid #3b82f6;
    color: #dbeafe !important;
}

.alert-info::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
}

/* Alert Headings */
.alert h6, .alert h5, .alert h4 {
    color: #ffffff !important;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alert Links */
.alert a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.alert a:hover {
    opacity: 0.8;
}

/* Alert Dismiss Button */
.alert-dismissible .btn-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.alert-dismissible .btn-close:hover {
    opacity: 1;
}

/* Additional Text Readability Improvements */
.text-warning {
    color: #f59e0b !important;
    font-weight: 600;
}

.text-danger {
    color: #ef4444 !important;
    font-weight: 600;
}

.text-success {
    color: #22c55e !important;
    font-weight: 600;
}

.text-info {
    color: #3b82f6 !important;
    font-weight: 600;
}

.text-muted {
    color: #9ca3af !important;
}

.text-secondary {
    color: #6b7280 !important;
    font-weight: 600;
}

/* Enhanced List Styling */
.list-unstyled {
    list-style: none;
    padding-left: 0;
}

.list-unstyled li {
    color: #e2e8f0 !important;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.list-unstyled li::before {
    content: '•';
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Blockquote Styling */
blockquote {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    color: #e2e8f0;
    font-style: italic;
    position: relative;
}

blockquote::before {
    content: '"';
    color: #3b82f6;
    font-size: 3rem;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-family: serif;
}

blockquote p {
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Code Block Styling */
code {
    background-color: #374151;
    color: #fbbf24;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

pre {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 1.5rem;
    color: #e2e8f0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Definition List Styling */
dl {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

dt {
    color: #f7fafc;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

dd {
    color: #e2e8f0;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #4a5568;
}

dd:last-child {
    margin-bottom: 0;
}

/* Table of Contents Styling */
.toc {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border: 2px solid #4a5568;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: sticky;
    top: 2rem;
}

.toc h6 {
    color: #f7fafc;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 0.5rem;
}

.toc ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: #bfdbfe;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem;
    border-radius: 6px;
    border-left: 3px solid transparent;
}

.toc a:hover {
    color: #ffffff;
    background-color: rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
    transform: translateX(4px);
}

/* Responsive Text Adjustments */
@media (max-width: 768px) {
    .rules-box, .guidelines-box, .warning-box, .info-box, .content-box {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .rules-box h6, .guidelines-box h6, .warning-box h6, .info-box h6, .content-box h6 {
        font-size: 1rem;
    }
    
    .rules-box li, .guidelines-box li, .warning-box li, .info-box li, .content-box li {
        font-size: 0.9rem;
    }
}

/* File Upload Styling */
.border-dashed {
    border: 2px dashed #4a5568 !important;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    transition: all 0.3s ease;
}

.border-dashed:hover {
    border-color: #3b82f6 !important;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.challenge-files .list-group-item {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border: 1px solid #4a5568;
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.challenge-files .list-group-item:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-color: #3b82f6;
    color: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.challenge-files .list-group-item i {
    color: #3b82f6;
}

.challenge-files .list-group-item small {
    color: #9ca3af;
}

/* File Upload Input Styling - Legacy (overridden by unified styles below) */
/* These styles are kept for backward compatibility but are overridden by the unified file input styles */

/* File Upload Icon Styling */
.fa-cloud-upload-alt {
    color: #3b82f6;
    transition: all 0.3s ease;
}

.border-dashed:hover .fa-cloud-upload-alt {
    color: #60a5fa;
    transform: scale(1.1);
}

/* File Upload Text Styling */
.border-dashed h6 {
    color: #f7fafc;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.border-dashed p {
    color: #a0aec0;
    margin-bottom: 1rem;
}

.border-dashed .form-text {
    color: #9ca3af;
    font-size: 0.9rem;
}

.border-dashed .form-text strong {
    color: #dbeafe;
}

.border-dashed .form-text small {
    color: #718096;
    font-size: 0.85rem;
}

/* Top Performers Scoreboard Styling */
.top-performers {
    background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 50%, #45b7d1 100%);
    border: 4px solid #ffffff;
    border-radius: 25px;
    padding: 3rem;
    margin: 2.5rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Home Page Top Performers Preview Styling */
#leaderboard-preview .list-group-item {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-700) 100%);
    border: 2px solid var(--gray-600);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-3);
    padding: var(--space-4) var(--space-5);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

/* First place special styling */
#leaderboard-preview .list-group-item:first-child {
    background: linear-gradient(135deg, var(--gold-800) 0%, var(--gold-700) 100%);
    border: 3px solid var(--gold-400);
    box-shadow: var(--shadow-xl), 0 0 25px rgba(245, 158, 11, 0.4);
    position: relative;
}

#leaderboard-preview .list-group-item:first-child::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-300), var(--gold-200), var(--gold-300));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    animation: gold-shimmer 2s ease-in-out infinite;
}

@keyframes gold-shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

#leaderboard-preview .list-group-item:first-child:hover {
    background: linear-gradient(135deg, var(--gold-700) 0%, var(--gold-600) 100%);
    border-color: var(--gold-300);
    box-shadow: var(--shadow-2xl), 0 0 35px rgba(245, 158, 11, 0.6);
    transform: translateY(-4px) scale(1.03);
}

#leaderboard-preview .list-group-item:hover {
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-600) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: var(--gray-400);
}

#leaderboard-preview .list-group-item:last-child {
    margin-bottom: 0;
}

/* Crown icon styling for first place */
#leaderboard-preview .list-group-item .fa-crown {
    color: var(--warning-400) !important;
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.8);
    filter: drop-shadow(0 3px 6px rgba(245, 158, 11, 0.6));
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
}

/* Medal icons for 2nd and 3rd place */
#leaderboard-preview .list-group-item .fa-medal.text-warning {
    color: var(--silver-400) !important;
    text-shadow: 0 0 12px rgba(192, 192, 192, 0.7);
    filter: drop-shadow(0 3px 6px rgba(192, 192, 192, 0.5));
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
}

#leaderboard-preview .list-group-item .fa-medal.text-secondary {
    color: var(--bronze-400) !important;
    text-shadow: 0 0 12px rgba(205, 127, 50, 0.7);
    filter: drop-shadow(0 3px 6px rgba(205, 127, 50, 0.5));
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
}

/* Hash icon for other ranks */
#leaderboard-preview .list-group-item .fa-hashtag {
    color: var(--gray-500) !important;
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
}

/* Team name styling */
#leaderboard-preview .list-group-item strong {
    color: var(--gray-100) !important;
    font-weight: var(--font-weight-bold);
    font-size: var(--text-lg);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

/* First place team name with better contrast */
#leaderboard-preview .list-group-item:first-child strong {
    color: var(--gold-100) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: var(--font-weight-extrabold);
    letter-spacing: 0.5px;
}

/* Score badge styling */
#leaderboard-preview .list-group-item .badge {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%) !important;
    color: white !important;
    font-weight: var(--font-weight-bold);
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md), 0 0 15px rgba(59, 130, 246, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

#leaderboard-preview .list-group-item .badge::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 var(--transition-normal);
}

#leaderboard-preview .list-group-item:hover .badge {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%) !important;
    transform: scale(1.08);
    box-shadow: var(--shadow-xl), 0 0 25px rgba(59, 130, 246, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

#leaderboard-preview .list-group-item:hover .badge::before {
    left: 100%;
}

/* Special golden badge for first place */
#leaderboard-preview .list-group-item:first-child .badge {
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%) !important;
    border: 2px solid var(--gold-300);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(245, 158, 11, 0.6);
    color: var(--gold-900) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#leaderboard-preview .list-group-item:first-child:hover .badge {
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%) !important;
    transform: scale(1.1);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(245, 158, 11, 0.8);
    border-color: var(--gold-200);
}

/* Loading spinner styling */
#leaderboard-preview .spinner-border {
    color: var(--primary-500);
    width: 2rem;
    height: 2rem;
    border-width: 3px;
}

/* User names and additional text styling */
#leaderboard-preview .list-group-item .text-muted {
    color: var(--gray-200) !important;
    font-weight: var(--font-weight-medium);
    font-size: var(--text-sm);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.2);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Rank numbers styling */
#leaderboard-preview .list-group-item .rank-number {
    color: var(--gray-200) !important;
    font-weight: var(--font-weight-bold);
    font-size: var(--text-lg);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Challenge count styling */
#leaderboard-preview .list-group-item .challenge-count {
    color: var(--gray-200) !important;
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-base);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Container background for better contrast */
#leaderboard-preview {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-2xl);
    border: 2px solid var(--gray-700);
    position: relative;
    overflow: hidden;
}

#leaderboard-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--gold-500), var(--primary-500), var(--gold-500));
    background-size: 200% 100%;
    animation: header-shimmer 3s ease-in-out infinite;
}

@keyframes header-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Responsive Design for Leaderboard */
@media (max-width: 768px) {
    #leaderboard-preview {
        padding: var(--space-4);
        margin: var(--space-4) 0;
    }
    
    #leaderboard-preview .list-group-item {
        padding: var(--space-3) var(--space-4);
        margin-bottom: var(--space-2);
    }
    
    #leaderboard-preview .list-group-item strong {
        font-size: var(--text-base);
    }
    
    #leaderboard-preview .list-group-item .badge {
        font-size: var(--text-xs);
        padding: var(--space-1) var(--space-3);
    }
    
    #leaderboard-preview .list-group-item .text-muted {
        font-size: var(--text-xs);
    }
}

@media (max-width: 576px) {
    #leaderboard-preview {
        padding: var(--space-3);
    }
    
    #leaderboard-preview .list-group-item {
        padding: var(--space-3) var(--space-4);
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-2);
    }
    
    #leaderboard-preview .list-group-item .badge {
        font-size: var(--text-xs);
        padding: var(--space-1) var(--space-2);
    }
    
    #leaderboard-preview .list-group-item strong {
        font-size: var(--text-sm);
        flex: 1;
    }
    
    #leaderboard-preview .list-group-item .text-muted {
        font-size: var(--text-xs);
        padding: var(--space-1);
    }
}

/* Empty state styling */
#leaderboard-preview .text-muted {
    color: #9ca3af !important;
    font-style: italic;
}

/* Accessibility Improvements */
#leaderboard-preview .list-group-item:focus {
    outline: 3px solid var(--primary-500);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #leaderboard-preview .list-group-item {
        border-width: 3px;
    }
    
    #leaderboard-preview .list-group-item strong {
        color: white !important;
        font-weight: 900;
    }
    
    #leaderboard-preview .list-group-item:first-child {
        border-color: var(--gold-300);
    }
}

/* Performance Optimizations */
#leaderboard-preview .list-group-item {
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    #leaderboard-preview .list-group-item:hover {
        transform: none;
    }
    
    #leaderboard-preview::before {
        animation: none;
    }
    
    #leaderboard-preview .list-group-item:first-child::before {
        animation: none;
    }
    
    .gold-shimmer {
        animation: none;
    }
    
    .header-shimmer {
        animation: none;
    }
}

/* Footer Content Styling */
footer .container .row .col-12 {
    text-align: center;
}

footer .container .row .col-12 h5,
footer .container .row .col-12 h4,
footer .container .row .col-12 h3,
footer .container .row .col-12 h2,
footer .container .row .col-12 h1 {
    text-align: center;
    margin-bottom: 1rem;
}

footer .container .row .col-12 p {
    text-align: center;
    margin-bottom: 0.5rem;
}

footer .container .row .col-12 .row {
    justify-content: center;
}

footer .container .row .col-12 .text-center {
    text-align: center !important;
}

footer .container .row .col-12 .text-md-end {
    text-align: center !important;
}

footer .container .row .col-12 .text-start {
    text-align: center !important;
}

footer .container .row .col-12 .text-end {
    text-align: center !important;
}

/* Configuration Form Styling */
.config-form .form-control {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    color: #f7fafc;
    transition: all 0.3s ease;
}

.config-form .form-control:focus {
    background-color: #374151;
    border-color: #3b82f6;
    color: #f7fafc;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.config-form .form-control::placeholder {
    color: #9ca3af;
}

.config-form .form-label {
    color: #f7fafc;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.config-form .form-text {
    color: #a0aec0;
    font-size: 0.875rem;
}

/* Special styling for large text areas */
.config-form textarea.form-control {
    min-height: 120px;
    resize: vertical;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.5;
}

.config-form textarea.form-control[name="footer_content"] {
    min-height: 100px;
    background-color: #2d3748;
    border: 1px solid #4a5568;
}

.config-form textarea.form-control[name="rules_content"] {
    min-height: 200px;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    font-size: 0.9rem;
}

/* Configuration preview styling */
.config-preview {
    background-color: #1a202c;
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.config-preview h6 {
    color: #f7fafc;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.config-preview .border {
    border-color: #4a5568 !important;
}

.config-preview .bg-light {
    background-color: #2d3748 !important;
    color: #f7fafc;
}

/* Form validation styling */
.config-form .is-invalid {
    border-color: #e53e3e;
    box-shadow: 0 0 0 0.2rem rgba(229, 62, 62, 0.25);
}

.config-form .invalid-feedback {
    color: #fc8181;
    font-size: 0.875rem;
}

/* Card styling for configuration sections */
.config-card {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.config-card:hover {
    border-color: #6b7280;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.config-card .card-header {
    background-color: #374151;
    border-bottom: 1px solid #4a5568;
    color: #f7fafc;
}

.config-card .card-body {
    background-color: #2d3748;
    color: #f7fafc;
}

/* Button styling for configuration */
.config-form .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.config-form .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.config-form .btn-outline-secondary {
    color: #9ca3af;
    border-color: #6b7280;
    transition: all 0.3s ease;
}

.config-form .btn-outline-secondary:hover {
    background-color: #4a5568;
    border-color: #9ca3af;
    color: #f7fafc;
}

/* Text area character count indicator */
.textarea-container {
    position: relative;
}

.textarea-container .char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.75rem;
    color: #9ca3af;
    background-color: rgba(45, 55, 72, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
}

.textarea-container .char-count.warning {
    color: #f6ad55;
}

.textarea-container .char-count.danger {
    color: #fc8181;
}

.top-performers::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #4ecdc4, #45b7d1, #ffd700);
    background-size: 300% 100%;
    animation: rainbow-shimmer 3s ease-in-out infinite;
}

.top-performers::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rainbow-shimmer {
    0% { background-position: 300% 0; }
    100% { background-position: -300% 0; }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.top-performers-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.top-performers-header h5 {
    color: #ffffff;
    font-weight: 900;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.2);
    background: linear-gradient(45deg, #ffffff, #ffd700, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-shimmer 2s ease-in-out infinite;
}

.top-performers-header i {
    color: #ffd700;
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    text-shadow: 0 6px 20px rgba(255, 215, 0, 0.8);
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    animation: trophy-bounce 2s ease-in-out infinite;
}

.top-performers-header::after {
    content: '';
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 6px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #4ecdc4, #45b7d1, #ffd700);
    border-radius: 3px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.6);
    animation: line-pulse 2s ease-in-out infinite;
}

@keyframes text-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes line-pulse {
    0%, 100% { opacity: 1; transform: translateX(-50%) scaleX(1); }
    50% { opacity: 0.7; transform: translateX(-50%) scaleX(1.1); }
}

.top-performers-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
}

.top-performers-list li {
    background: rgba(255, 255, 255, 0.98);
    border: none;
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.top-performers-list li:last-child {
    margin-bottom: 0;
}

.top-performers-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    transition: all 0.4s ease;
}

/* First Place - Gold */
.top-performers-list li:first-child {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.98) 0%, rgba(255, 237, 78, 0.98) 100%);
    border: 4px solid #ffd700;
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.top-performers-list li:first-child::before {
    background: linear-gradient(180deg, #ffd700, #ffed4e);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.9);
    width: 8px;
}

.top-performers-list li:first-child:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 25px 60px rgba(255, 215, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: #ffed4e;
}

.top-performers-list li:first-child .top-performer-name {
    color: #8b4513;
    text-shadow: 0 2px 4px rgba(139, 69, 19, 0.3);
    font-weight: 900;
}

/* Second Place - Silver */
.top-performers-list li:nth-child(2) {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.98) 0%, rgba(211, 211, 211, 0.98) 100%);
    border: 4px solid #c0c0c0;
    box-shadow: 0 15px 40px rgba(192, 192, 192, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.top-performers-list li:nth-child(2)::before {
    background: linear-gradient(180deg, #c0c0c0, #d3d3d3);
    box-shadow: 0 0 30px rgba(192, 192, 192, 0.9);
    width: 8px;
}

.top-performers-list li:nth-child(2):hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 25px 60px rgba(192, 192, 192, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: #d3d3d3;
}

.top-performers-list li:nth-child(2) .top-performer-name {
    color: #696969;
    text-shadow: 0 2px 4px rgba(105, 105, 105, 0.3);
    font-weight: 900;
}

/* Third Place - Bronze */
.top-performers-list li:nth-child(3) {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.98) 0%, rgba(210, 180, 140, 0.98) 100%);
    border: 4px solid #cd7f32;
    box-shadow: 0 15px 40px rgba(205, 127, 50, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.top-performers-list li:nth-child(3)::before {
    background: linear-gradient(180deg, #cd7f32, #d2b48c);
    box-shadow: 0 0 30px rgba(205, 127, 50, 0.9);
    width: 8px;
}

.top-performers-list li:nth-child(3):hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 25px 60px rgba(205, 127, 50, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: #d2b48c;
}

.top-performers-list li:nth-child(3) .top-performer-name {
    color: #8b4513;
    text-shadow: 0 2px 4px rgba(139, 69, 19, 0.3);
    font-weight: 900;
}

.top-performers-list li:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.top-performer-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-performer-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-weight: 900;
    font-size: 1.4rem;
    color: #ffffff;
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.top-performers-list li:first-child .top-performer-rank {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.top-performers-list li:nth-child(2) .top-performer-rank {
    background: linear-gradient(135deg, #c0c0c0, #d3d3d3);
    box-shadow: 0 6px 20px rgba(192, 192, 192, 0.5);
}

.top-performers-list li:nth-child(3) .top-performer-rank {
    background: linear-gradient(135deg, #cd7f32, #d2b48c);
    box-shadow: 0 6px 20px rgba(205, 127, 50, 0.5);
}

.top-performer-rank i {
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.top-performer-name {
    font-weight: 800;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-performer-score {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 35px;
    font-weight: 900;
    font-size: 1.5rem;
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.5);
    border: 4px solid #ffffff;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.top-performer-score::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.top-performer-score:hover::before {
    left: 100%;
}

.top-performer-score:hover {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 20px 50px rgba(255, 107, 107, 0.7);
    background: linear-gradient(135deg, #45b7d1, #4ecdc4, #ff6b6b);
}

.top-performers-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 3px solid rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 2;
}

.top-performers-footer .btn {
    background: linear-gradient(135deg, #ffd700, #ff6b6b, #4ecdc4);
    border: none;
    color: #ffffff;
    padding: 1.25rem 3rem;
    border-radius: 35px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.5);
    border: 4px solid #ffffff;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.top-performers-footer .btn::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;
}

.top-performers-footer .btn:hover::before {
    left: 100%;
}

.top-performers-footer .btn:hover {
    transform: translateY(-6px) scale(1.08);
    box-shadow: 0 20px 50px rgba(255, 215, 0, 0.7);
    background: linear-gradient(135deg, #4ecdc4, #ff6b6b, #ffd700);
    color: #ffffff;
}

.top-performers-footer .btn i {
    margin-right: 1rem;
    color: #ffffff;
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Responsive Design for Top Performers */
@media (max-width: 768px) {
    .top-performers {
        padding: 1.5rem;
        margin: 1.5rem 0;
        border-radius: 16px;
    }
    
    .top-performers-header h5 {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .top-performers-header i {
        font-size: 2rem;
    }
    
    .top-performers-list li {
        padding: 1.25rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        border-radius: 12px;
    }
    
    .top-performer-info {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .top-performer-rank {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .top-performer-name {
        font-size: 1.1rem;
    }
    
    .top-performer-score {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
        border-radius: 25px;
    }
    
    .top-performers-footer .btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .top-performers {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .top-performers-header h5 {
        font-size: 1.3rem;
    }
    
    .top-performers-header i {
        font-size: 1.8rem;
    }
    
    .top-performers-list li {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .top-performer-rank {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .top-performer-name {
        font-size: 1rem;
    }
    
    .top-performer-score {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

/* Challenge name styling for submissions */
.user-info .challenge-name {
    color: #9ca3af;
    font-size: 0.8rem;
    font-style: italic;
    display: block;
    margin-top: 0.25rem;
}

/* Enhanced badge styling for submissions */
.user-actions .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    text-align: center;
}

/* Scoreboard table enhancements */
.table-striped tbody tr:nth-child(odd) {
    background-color: #2d3748 !important;
}

.table-striped tbody tr:nth-child(even) {
    background-color: #374151 !important;
}

.table-striped tbody tr:hover {
    background-color: #4a5568 !important;
    color: #ffffff !important;
}

.table-striped tbody tr:hover strong {
    color: #ffffff !important;
}

.table-striped tbody tr:hover small {
    color: #d1d5db !important;
}

.table-striped tbody tr:hover .text-muted {
    color: #d1d5db !important;
}

/* Ensure all text in scoreboard is visible */
.table tbody tr td {
    color: #f7fafc !important;
}

.table tbody tr td strong {
    color: #f7fafc !important;
    font-weight: 700;
}

.table tbody tr td small {
    color: #a0aec0 !important;
    font-weight: 500;
}

/* Member names styling for better readability */
.table tbody tr td .members-list {
    color: var(--gray-100) !important;
    font-weight: var(--font-weight-medium);
    font-size: var(--text-sm);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    margin: var(--space-1) 0;
    transition: all var(--transition-fast);
}

.table tbody tr:hover .members-list {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Target the actual member names in the scoreboard table */
.table tbody tr td small {
    color: var(--gray-100) !important;
    font-weight: var(--font-weight-medium);
    font-size: var(--text-sm);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    margin: var(--space-1) 0;
    transition: all var(--transition-fast);
    line-height: 1.4;
}

.table tbody tr:hover td small {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Individual member names */
.table tbody tr td .member-name {
    color: var(--gray-100) !important;
    font-weight: var(--font-weight-medium);
    font-size: var(--text-sm);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background: rgba(59, 130, 246, 0.2);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-block;
    margin: var(--space-1) var(--space-1) var(--space-1) 0;
    transition: all var(--transition-fast);
}

.table tbody tr:hover .member-name {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Member names with commas */
.table tbody tr td .member-name:not(:last-child)::after {
    content: ',';
    color: var(--gray-300);
    margin-left: var(--space-1);
}

/* First place member names special styling */
.table tbody tr:first-child .member-name {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--gold-100) !important;
}

.table tbody tr:first-child:hover .member-name {
    background: rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.5);
}

/* Second place member names */
.table tbody tr:nth-child(2) .member-name {
    background: rgba(192, 192, 192, 0.2);
    border-color: rgba(192, 192, 192, 0.3);
    color: var(--silver-400) !important;
}

.table tbody tr:nth-child(2):hover .member-name {
    background: rgba(192, 192, 192, 0.3);
    border-color: rgba(192, 192, 192, 0.5);
}

/* Third place member names */
.table tbody tr:nth-child(3) .member-name {
    background: rgba(205, 127, 50, 0.2);
    border-color: rgba(205, 127, 50, 0.3);
    color: var(--bronze-400) !important;
}

.table tbody tr:nth-child(3):hover .member-name {
    background: rgba(205, 127, 50, 0.3);
    border-color: rgba(205, 127, 50, 0.5);
}

/* First place member names in scoreboard */
.table tbody tr:first-child td small {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: var(--gold-100) !important;
    font-weight: var(--font-weight-semibold);
}

.table tbody tr:first-child:hover td small {
    background: rgba(245, 158, 11, 0.3) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
}

/* Second place member names in scoreboard */
.table tbody tr:nth-child(2) td small {
    background: rgba(192, 192, 192, 0.2) !important;
    border-color: rgba(192, 192, 192, 0.3) !important;
    color: var(--silver-400) !important;
    font-weight: var(--font-weight-semibold);
}

.table tbody tr:nth-child(2):hover td small {
    background: rgba(192, 192, 192, 0.3) !important;
    border-color: rgba(192, 192, 192, 0.5) !important;
}

/* Third place member names in scoreboard */
.table tbody tr:nth-child(3) td small {
    background: rgba(205, 127, 50, 0.2) !important;
    border-color: rgba(205, 127, 50, 0.3) !important;
    color: var(--bronze-400) !important;
    font-weight: var(--font-weight-semibold);
}

.table tbody tr:nth-child(3):hover td small {
    background: rgba(205, 127, 50, 0.3) !important;
    border-color: rgba(205, 127, 50, 0.5) !important;
}

/* General member names fallback styling */
.table tbody tr td {
    color: var(--gray-100) !important;
}

.table tbody tr td span,
.table tbody tr td div,
.table tbody tr td p {
    color: var(--gray-100) !important;
    font-weight: var(--font-weight-medium);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Team Name Styling - Rank-based colors */
.table tbody tr td:nth-child(2) {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.8));
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    margin: var(--space-2);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
    position: relative;
    overflow: hidden;
}

.table tbody tr td:nth-child(2) strong {
    color: #f8fafc;
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    display: block;
    text-align: center;
}

/* Consistent dark theme for all team names */

/* Challenges Solved Count Styling - Dark theme */
.table tbody tr td:nth-child(4) {
    text-align: center;
    vertical-align: middle;
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    color: #f8fafc;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.8));
    border: 2px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    margin: var(--space-2);
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 80px;
}

.table tbody tr td:nth-child(4)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.table tbody tr:hover td:nth-child(4)::before {
    left: 100%;
}

/* Score Badge Styling - Dark theme */
.table tbody tr td:nth-child(3) {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.8));
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    margin: var(--space-2);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.table tbody tr td:nth-child(3) .badge {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.9)) !important;
    border: 1px solid rgba(59, 130, 246, 0.6) !important;
    color: #f8fafc !important;
    font-size: var(--text-lg) !important;
    font-weight: var(--font-weight-bold) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3) !important;
    padding: var(--space-2) var(--space-3) !important;
    border-radius: var(--radius-md) !important;
}

/* Consistent dark theme for all challenges solved count */

/* Rank Badge Styling - Dark theme */
.table tbody tr td:first-child {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.8));
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    margin: var(--space-2);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.table tbody tr td:first-child .rank-badge {
    color: #f8fafc;
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    display: block;
}

/* Enhanced hover effects for all elements - Consistent dark theme */
.table tbody tr:hover td:first-child {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.4);
    transform: translateY(-2px);
}

.table tbody tr:hover td:nth-child(2) {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.4);
    transform: translateY(-2px);
}

.table tbody tr:hover td:nth-child(3) {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.4);
    transform: translateY(-2px);
}

.table tbody tr:hover td:nth-child(4) {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.4);
    transform: translateY(-2px);
}

.table tbody tr:hover td:last-child {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.4);
    transform: translateY(-2px);
}

.table tbody tr:hover td .member-name {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.7)) !important;
    border-color: rgba(99, 102, 241, 0.9) !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3) !important;
    transform: scale(1.05);
}

/* Member names in any format */
.table tbody tr td .text-muted {
    color: var(--gray-200) !important;
    font-weight: var(--font-weight-medium);
    background: rgba(0, 0, 0, 0.2);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
    margin: var(--space-1) 0;
}

/* Member Names Container - Rank-based colors */
.table tbody tr td:last-child {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.8));
    border: 2px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    margin: var(--space-2);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
    position: relative;
    overflow: hidden;
}

/* Consistent dark theme for all member names containers */

/* Force visibility for all member names - Rank-based colors */
.table tbody tr td small,
.table tbody tr td .members-list,
.table tbody tr td .member-name,
#scoreboard-table .table tbody tr td small,
#scoreboard-table .table tbody tr td .members-list,
#scoreboard-table .table tbody tr td .member-name {
    color: #f8fafc !important;
    font-weight: var(--font-weight-semibold) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.6), rgba(139, 92, 246, 0.5)) !important;
    padding: var(--space-2) var(--space-3) !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid rgba(99, 102, 241, 0.7) !important;
    display: inline-block !important;
    margin: var(--space-1) var(--space-1) var(--space-1) 0 !important;
    transition: all var(--transition-fast) !important;
    line-height: 1.4 !important;
    font-size: var(--text-base) !important;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2) !important;
}

/* Consistent dark theme for all member name badges */

/* Additional targeting for dynamically loaded content */
#scoreboard-table .table tbody tr td small {
    color: var(--gray-100) !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: var(--space-1) var(--space-2) !important;
    border-radius: var(--radius-sm) !important;
    font-weight: var(--font-weight-medium) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Ensure member names in dynamically loaded tables are styled */
#scoreboard-table .table tbody tr td .member-name {
    color: var(--gray-100) !important;
    background: rgba(59, 130, 246, 0.2) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    padding: var(--space-1) var(--space-2) !important;
    border-radius: var(--radius-sm) !important;
    font-weight: var(--font-weight-medium) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    display: inline-block !important;
    margin: var(--space-1) var(--space-1) var(--space-1) 0 !important;
}

/* Override any conflicting styles */
.table tbody tr td small.text-muted {
    color: var(--gray-100) !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Responsive member names */
@media (max-width: 768px) {
    .table tbody tr td .member-name {
        font-size: var(--text-xs);
        padding: var(--space-1);
        margin: var(--space-1) var(--space-1) var(--space-1) 0;
    }
    
    .table tbody tr td .members-list {
        font-size: var(--text-xs);
        padding: var(--space-1) var(--space-2);
    }
}

@media (max-width: 576px) {
    .table tbody tr td .member-name {
        display: block;
        margin: var(--space-1) 0;
        width: 100%;
        text-align: center;
    }
    
    .table tbody tr td .member-name:not(:last-child)::after {
        content: '';
        margin-left: 0;
    }
}

/* Scoreboard card styling */
.card-header h5 {
    color: #f7fafc !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.card-header .card-title {
    color: #f7fafc !important;
    font-weight: 700;
}

/* Statistics cards text */
.card-body h4 {
    color: #f7fafc !important;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.card-body p {
    color: #a0aec0 !important;
    font-weight: 500;
}

/* Ensure all text in cards is visible */
.card-body {
    color: #f7fafc !important;
}

.card-body .text-muted {
    color: #9ca3af !important;
}

.user-actions .badge.bg-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
    border: 1px solid #16a34a;
}

.user-actions .badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    border: 1px solid #dc2626;
}

.user-actions .badge.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    border: 1px solid #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 1.5rem;
    }
    
    .jumbotron h1 {
        font-size: 2rem;
    }
    
    .challenge-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .container {
        padding: 0 10px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .btn-group .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .btn-group .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Responsive challenges solved count */
    .table tbody tr td:nth-child(4) {
        font-size: var(--text-base);
        padding: var(--space-2) var(--space-3);
        margin: var(--space-1);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

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

/* Code Styling */
code {
    background-color: #f8f9fa;
    color: #d63384;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875em;
    border: 1px solid var(--border-color);
}

pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    border: none;
}

pre {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    color: var(--text-primary);
}

/* Flag Input */
.flag-input {
    font-family: 'Courier New', monospace;
    background-color: #ffffff;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.flag-input:focus {
    border-color: var(--primary-color);
    background-color: #ffffff;
    color: var(--text-primary);
}

/* Success Animation */
.success-pulse {
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Category Colors */
.category-web { 
    background-color: var(--primary-color); 
    color: #ffffff;
}
.category-crypto { 
    background-color: var(--success-color); 
    color: #ffffff;
}
.category-pwn { 
    background-color: var(--danger-color); 
    color: #ffffff;
}
.category-reverse { 
    background-color: #6f42c1; 
    color: #ffffff;
}
.category-forensics { 
    background-color: #fd7e14; 
    color: #ffffff;
}
.category-misc { 
    background-color: var(--secondary-color); 
    color: #ffffff;
}

/* Modal Styles */
.modal-header {
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--border-color);
}

.modal-title {
    color: var(--text-primary);
    font-weight: 600;
}

/* Admin Modal Close Buttons - White Icons */
.modal-header .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 1 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    background-size: 1em;
    background-repeat: no-repeat;
    background-position: center;
    width: 1em;
    height: 1em;
    padding: 0.5em;
    border: 0;
    border-radius: 0.375rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
}

.modal-header .btn-close-white:hover {
    opacity: 0.75 !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-header .btn-close-white:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
    opacity: 1 !important;
}

.modal-header .btn-close-white:active {
    opacity: 1 !important;
}

/* Alert Close Buttons - White Icons for Admin Pages */
.alert-dismissible .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 1 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    background-size: 1em;
    background-repeat: no-repeat;
    background-position: center;
    width: 1em;
    height: 1em;
    padding: 0.5em;
    border: 0;
    border-radius: 0.375rem;
}

.alert-dismissible .btn-close:hover {
    opacity: 0.75 !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.alert-dismissible .btn-close:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
    opacity: 1 !important;
}

.alert-dismissible .btn-close:active {
    opacity: 1 !important;
}

/* File Input Styling - Unified */
input[type="file"] {
    display: block !important;
    width: 100% !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: var(--text-primary, #212529) !important;
    background-color: var(--card-bg, #fff) !important;
    background-clip: padding-box !important;
    border: 1px solid var(--border-color, #dee2e6) !important;
    border-radius: 0.375rem !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    cursor: pointer !important;
}

/* Style the "Choose File" button part */
input[type="file"]::file-selector-button {
    padding: 0.375rem 0.75rem !important;
    margin: -0.375rem -0.75rem !important;
    margin-inline-end: 0.75rem !important;
    color: #fff !important;
    background-color: #0d6efd !important;
    border: 0 !important;
    border-radius: 0.375rem 0 0 0.375rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out !important;
}

input[type="file"]::file-selector-button:hover {
    background-color: #0b5ed7 !important;
}

input[type="file"]::file-selector-button:active {
    background-color: #0a58ca !important;
}

input[type="file"]:hover {
    border-color: #86b7fe !important;
}

input[type="file"]:focus {
    color: var(--text-primary, #212529) !important;
    background-color: var(--card-bg, #fff) !important;
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

input[type="file"]:disabled {
    background-color: #e9ecef !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
}

input[type="file"]:disabled::file-selector-button {
    background-color: #6c757d !important;
    cursor: not-allowed !important;
}

/* Configuration Table - Code Styling for Key and Value columns */
/* Targets code elements in tables, specifically for config values */
.table tbody td code,
.table tbody code {
    background-color: transparent !important;
    color: #fff !important;
    padding: 0 !important;
    border: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
}

/* ========================================
   UNIFIED TABLE STYLING - ENHANCED
   ======================================== */

/* Base Table Styles - Unified and Improved (APPLIES TO ALL TABLES) */
.table {
    width: 100% !important;
    margin-bottom: 1.5rem !important;
    color: #f7fafc !important;
    background-color: #2d3748 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 0.5rem !important;
    overflow: hidden !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

/* Table Header - Enhanced (APPLIES TO ALL TABLES) */
.table thead th {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 1rem 1.25rem !important;
    border-bottom: 2px solid #4a5568 !important;
    vertical-align: middle !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    text-align: left !important;
}

/* Table Body Cells - Improved Spacing and Readability (APPLIES TO ALL TABLES) */
.table tbody td {
    padding: 1rem 1.25rem !important;
    vertical-align: middle !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #e2e8f0 !important;
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
    background-color: transparent !important;
}

/* Table header and body cell padding consistency */
.table th,
.table td {
    padding: 1rem 1.25rem !important;
    vertical-align: middle !important;
}

/* Striped Rows - Subtle Alternating Colors (Only when .table-striped class is used) */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #2d3748 !important;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #374151 !important;
}

/* Hover Effect - Smooth and Enhanced (APPLIES TO ALL TABLES) */
.table-hover tbody tr {
    transition: all 0.2s ease-in-out !important;
    cursor: pointer !important;
}

.table-hover tbody tr:hover {
    background-color: #4a5568 !important;
    transform: translateX(2px) !important;
    box-shadow: inset 3px 0 0 #3b82f6 !important;
}

/* Ensure hover overrides striped pattern when both classes are used */
.table-hover.table-striped tbody tr:nth-of-type(odd):hover,
.table-hover.table-striped tbody tr:nth-of-type(even):hover {
    background-color: #4a5568 !important;
}

/* Ensure all tables without hover class still respect base styles */
.table tbody tr {
    transition: background-color 0.2s ease-in-out !important;
}

/* Table Borders - Refined */
.table-bordered {
    border: 1px solid #4a5568;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-bordered thead th {
    border-bottom-width: 2px;
}

/* Badge Styling in Tables */
.table .badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    font-size: 0.8125em;
    border-radius: 0.25rem;
}

/* Action Buttons in Tables */
.table .btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

/* Checkboxes in Tables */
.table .form-check-input {
    margin-top: 0.25rem;
    cursor: pointer;
}

/* Responsive Table Improvements */
.table-responsive {
    border-radius: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Empty State Styling */
.table tbody tr.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

.table tbody tr.empty-state td {
    border: none;
    padding: 3rem 1rem;
}

/* Small Text in Tables */
.table small,
.table .text-muted {
    color: #9ca3af !important;
    font-size: 0.875em;
}

/* Strong/Bold Text in Tables */
.table strong {
    color: #ffffff;
    font-weight: 600;
}

/* First and Last Column Styling */
.table tbody td:first-child {
    padding-left: 1.5rem;
}

.table tbody td:last-child {
    padding-right: 1.5rem;
}

.table thead th:first-child {
    padding-left: 1.5rem;
}

.table thead th:last-child {
    padding-right: 1.5rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .table {
        font-size: 0.875rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .table thead th:first-child,
    .table tbody td:first-child {
        padding-left: 0.75rem;
    }
    
    .table thead th:last-child,
    .table tbody td:last-child {
        padding-right: 0.75rem;
    }
    
    .table .btn-group-sm {
        flex-direction: column;
    }
    
    .table .btn-group-sm .btn {
        margin: 0.125rem 0;
    }
}

/* Dark Theme Table Variant */
.table-dark {
    background-color: #1a202c;
    color: #f7fafc;
}

.table-dark thead th {
    background: linear-gradient(135deg, #0f1419 0%, #1a202c 100%);
    border-bottom-color: #374151;
}

.table-dark tbody td {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.table-dark.table-striped tbody tr:nth-of-type(odd) {
    background-color: #1a202c;
}

.table-dark.table-striped tbody tr:nth-of-type(even) {
    background-color: #252b36;
}

.table-dark.table-hover tbody tr:hover {
    background-color: #2d3748 !important;
}

/* User Management - All Users Table - Colorful Broader Column Borders */
#usersTable th,
#usersTable td {
    border-left: 3px solid transparent !important;
    border-right: 3px solid transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: relative;
}

/* Colorful left border for each column */
#usersTable th:nth-child(1),
#usersTable td:nth-child(1) {
    border-left: 4px solid #3b82f6 !important; /* Blue */
}

#usersTable th:nth-child(2),
#usersTable td:nth-child(2) {
    border-left: 4px solid #10b981 !important; /* Green */
}

#usersTable th:nth-child(3),
#usersTable td:nth-child(3) {
    border-left: 4px solid #f59e0b !important; /* Amber */
}

#usersTable th:nth-child(4),
#usersTable td:nth-child(4) {
    border-left: 4px solid #ef4444 !important; /* Red */
}

#usersTable th:nth-child(5),
#usersTable td:nth-child(5) {
    border-left: 4px solid #8b5cf6 !important; /* Purple */
}

#usersTable th:nth-child(6),
#usersTable td:nth-child(6) {
    border-left: 4px solid #06b6d4 !important; /* Cyan */
}

#usersTable th:nth-child(7),
#usersTable td:nth-child(7) {
    border-left: 4px solid #ec4899 !important; /* Pink */
}

#usersTable th:nth-child(8),
#usersTable td:nth-child(8) {
    border-left: 4px solid #14b8a6 !important; /* Teal */
}

#usersTable th:nth-child(9),
#usersTable td:nth-child(9) {
    border-left: 4px solid #f97316 !important; /* Orange */
}

/* Remove left border from first column (checkbox column) if needed */
#usersTable th:first-child,
#usersTable td:first-child {
    border-left: 4px solid #3b82f6 !important;
}

/* Header row bottom border */
#usersTable thead th {
    border-bottom: 3px solid rgba(255, 255, 255, 0.2) !important;
}

/* Enhanced hover effect with border highlight */
#usersTable tbody tr:hover td {
    border-left-width: 5px !important;
    box-shadow: 2px 0 8px rgba(59, 130, 246, 0.3) !important;
}

/* Configuration Values Table - Colorful Broader Column Borders */
#configTable th,
#configTable td {
    border-left: 3px solid transparent !important;
    border-right: 3px solid transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: relative;
}

/* Colorful left border for each column */
#configTable th:nth-child(1),
#configTable td:nth-child(1) {
    border-left: 4px solid #3b82f6 !important; /* Blue */
}

#configTable th:nth-child(2),
#configTable td:nth-child(2) {
    border-left: 4px solid #10b981 !important; /* Green */
}

#configTable th:nth-child(3),
#configTable td:nth-child(3) {
    border-left: 4px solid #f59e0b !important; /* Amber */
}

#configTable th:nth-child(4),
#configTable td:nth-child(4) {
    border-left: 4px solid #ef4444 !important; /* Red */
}

/* Header row bottom border */
#configTable thead th {
    border-bottom: 3px solid rgba(255, 255, 255, 0.2) !important;
}

/* Enhanced hover effect with border highlight */
#configTable tbody tr:hover td {
    border-left-width: 5px !important;
    box-shadow: 2px 0 8px rgba(59, 130, 246, 0.3) !important;
}

/* Teams Table - Colorful Broader Column Borders */
#teamsTable th,
#teamsTable td {
    border-left: 3px solid transparent !important;
    border-right: 3px solid transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#teamsTable th:nth-child(1), #teamsTable td:nth-child(1) { border-left: 4px solid #3b82f6 !important; } /* Blue */
#teamsTable th:nth-child(2), #teamsTable td:nth-child(2) { border-left: 4px solid #10b981 !important; } /* Green */
#teamsTable th:nth-child(3), #teamsTable td:nth-child(3) { border-left: 4px solid #f59e0b !important; } /* Amber */
#teamsTable th:nth-child(4), #teamsTable td:nth-child(4) { border-left: 4px solid #ef4444 !important; } /* Red */
#teamsTable th:nth-child(5), #teamsTable td:nth-child(5) { border-left: 4px solid #8b5cf6 !important; } /* Purple */
#teamsTable th:nth-child(6), #teamsTable td:nth-child(6) { border-left: 4px solid #06b6d4 !important; } /* Cyan */
#teamsTable th:nth-child(7), #teamsTable td:nth-child(7) { border-left: 4px solid #ec4899 !important; } /* Pink */
#teamsTable th:nth-child(8), #teamsTable td:nth-child(8) { border-left: 4px solid #14b8a6 !important; } /* Teal */
#teamsTable th:nth-child(9), #teamsTable td:nth-child(9) { border-left: 4px solid #f97316 !important; } /* Orange */

#teamsTable thead th { border-bottom: 3px solid rgba(255, 255, 255, 0.2) !important; }
#teamsTable tbody tr:hover td { border-left-width: 5px !important; box-shadow: 2px 0 8px rgba(59, 130, 246, 0.3) !important; }

/* Submissions Table - Colorful Broader Column Borders */
#submissionsTable th,
#submissionsTable td {
    border-left: 3px solid transparent !important;
    border-right: 3px solid transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#submissionsTable th:nth-child(1), #submissionsTable td:nth-child(1) { border-left: 4px solid #3b82f6 !important; } /* Blue */
#submissionsTable th:nth-child(2), #submissionsTable td:nth-child(2) { border-left: 4px solid #10b981 !important; } /* Green */
#submissionsTable th:nth-child(3), #submissionsTable td:nth-child(3) { border-left: 4px solid #f59e0b !important; } /* Amber */
#submissionsTable th:nth-child(4), #submissionsTable td:nth-child(4) { border-left: 4px solid #ef4444 !important; } /* Red */
#submissionsTable th:nth-child(5), #submissionsTable td:nth-child(5) { border-left: 4px solid #8b5cf6 !important; } /* Purple */
#submissionsTable th:nth-child(6), #submissionsTable td:nth-child(6) { border-left: 4px solid #06b6d4 !important; } /* Cyan */
#submissionsTable th:nth-child(7), #submissionsTable td:nth-child(7) { border-left: 4px solid #ec4899 !important; } /* Pink */
#submissionsTable th:nth-child(8), #submissionsTable td:nth-child(8) { border-left: 4px solid #14b8a6 !important; } /* Teal */

#submissionsTable thead th { border-bottom: 3px solid rgba(255, 255, 255, 0.2) !important; }
#submissionsTable tbody tr:hover td { border-left-width: 5px !important; box-shadow: 2px 0 8px rgba(59, 130, 246, 0.3) !important; }

/* Challenges Table - Colorful Broader Column Borders */
#challengesTable th,
#challengesTable td {
    border-left: 3px solid transparent !important;
    border-right: 3px solid transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#challengesTable th:nth-child(1), #challengesTable td:nth-child(1) { border-left: 4px solid #3b82f6 !important; } /* Blue */
#challengesTable th:nth-child(2), #challengesTable td:nth-child(2) { border-left: 4px solid #10b981 !important; } /* Green */
#challengesTable th:nth-child(3), #challengesTable td:nth-child(3) { border-left: 4px solid #f59e0b !important; } /* Amber */
#challengesTable th:nth-child(4), #challengesTable td:nth-child(4) { border-left: 4px solid #ef4444 !important; } /* Red */
#challengesTable th:nth-child(5), #challengesTable td:nth-child(5) { border-left: 4px solid #8b5cf6 !important; } /* Purple */
#challengesTable th:nth-child(6), #challengesTable td:nth-child(6) { border-left: 4px solid #06b6d4 !important; } /* Cyan */
#challengesTable th:nth-child(7), #challengesTable td:nth-child(7) { border-left: 4px solid #ec4899 !important; } /* Pink */
#challengesTable th:nth-child(8), #challengesTable td:nth-child(8) { border-left: 4px solid #f97316 !important; } /* Orange */

#challengesTable thead th { border-bottom: 3px solid rgba(255, 255, 255, 0.2) !important; }
#challengesTable tbody tr:hover td { border-left-width: 5px !important; box-shadow: 2px 0 8px rgba(59, 130, 246, 0.3) !important; }

/* Scoreboard Table - Colorful Broader Column Borders */
#scoreboardTable th,
#scoreboardTable td {
    border-left: 3px solid transparent !important;
    border-right: 3px solid transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#scoreboardTable th:nth-child(1), #scoreboardTable td:nth-child(1) { border-left: 4px solid #fbbf24 !important; } /* Gold (Rank) */
#scoreboardTable th:nth-child(2), #scoreboardTable td:nth-child(2) { border-left: 4px solid #3b82f6 !important; } /* Blue */
#scoreboardTable th:nth-child(3), #scoreboardTable td:nth-child(3) { border-left: 4px solid #10b981 !important; } /* Green */
#scoreboardTable th:nth-child(4), #scoreboardTable td:nth-child(4) { border-left: 4px solid #f59e0b !important; } /* Amber */
#scoreboardTable th:nth-child(5), #scoreboardTable td:nth-child(5) { border-left: 4px solid #8b5cf6 !important; } /* Purple */

#scoreboardTable thead th { border-bottom: 3px solid rgba(255, 255, 255, 0.2) !important; }
#scoreboardTable tbody tr:hover td { border-left-width: 5px !important; box-shadow: 2px 0 8px rgba(59, 130, 246, 0.3) !important; }

/* Stats Table - Colorful Broader Column Borders */
#statsTable th,
#statsTable td {
    border-left: 3px solid transparent !important;
    border-right: 3px solid transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#statsTable th:nth-child(1), #statsTable td:nth-child(1) { border-left: 4px solid #3b82f6 !important; } /* Blue */
#statsTable th:nth-child(2), #statsTable td:nth-child(2) { border-left: 4px solid #10b981 !important; } /* Green */
#statsTable th:nth-child(3), #statsTable td:nth-child(3) { border-left: 4px solid #f59e0b !important; } /* Amber */
#statsTable th:nth-child(4), #statsTable td:nth-child(4) { border-left: 4px solid #ef4444 !important; } /* Red */

#statsTable thead th { border-bottom: 3px solid rgba(255, 255, 255, 0.2) !important; }
#statsTable tbody tr:hover td { border-left-width: 5px !important; box-shadow: 2px 0 8px rgba(59, 130, 246, 0.3) !important; }

/* Generic colorful borders for any other admin tables */
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) th,
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) td {
    border-left: 3px solid transparent !important;
    border-right: 3px solid transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Apply colorful borders to first 9 columns of any other tables */
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) th:nth-child(1),
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) td:nth-child(1) { border-left: 4px solid #3b82f6 !important; }
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) th:nth-child(2),
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) td:nth-child(2) { border-left: 4px solid #10b981 !important; }
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) th:nth-child(3),
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) td:nth-child(3) { border-left: 4px solid #f59e0b !important; }
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) th:nth-child(4),
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) td:nth-child(4) { border-left: 4px solid #ef4444 !important; }
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) th:nth-child(5),
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) td:nth-child(5) { border-left: 4px solid #8b5cf6 !important; }
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) th:nth-child(6),
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) td:nth-child(6) { border-left: 4px solid #06b6d4 !important; }
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) th:nth-child(7),
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) td:nth-child(7) { border-left: 4px solid #ec4899 !important; }
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) th:nth-child(8),
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) td:nth-child(8) { border-left: 4px solid #14b8a6 !important; }
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) th:nth-child(9),
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) td:nth-child(9) { border-left: 4px solid #f97316 !important; }

.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) thead th { border-bottom: 3px solid rgba(255, 255, 255, 0.2) !important; }
.table:not(#usersTable):not(#configTable):not(#teamsTable):not(#submissionsTable):not(#challengesTable):not(#scoreboardTable):not(#statsTable) tbody tr:hover td { border-left-width: 5px !important; box-shadow: 2px 0 8px rgba(59, 130, 246, 0.3) !important; }

/* Fallback for browsers that don't support ::file-selector-button */
@supports not selector(input[type="file"]::file-selector-button) {
    input[type="file"] {
        position: relative;
        padding-left: 100px;
    }
    
    input[type="file"]::before {
        content: "Choose File";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        padding: 0.375rem 0.75rem;
        background-color: var(--primary-color, #0d6efd);
        color: #fff;
        border-radius: 0.375rem 0 0 0.375rem;
        display: flex;
        align-items: center;
        font-weight: 500;
        pointer-events: none;
    }
}

/* List Group */
.list-group-item {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.list-group-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Pagination */
.page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
    background-color: var(--card-bg);
}

.page-link:hover {
    color: #0a58ca;
    background-color: rgba(0, 0, 0, 0.02);
    border-color: var(--border-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Dropdown */
.dropdown-menu {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: var(--z-dropdown);
}

/* Navbar Dropdown - Ensure it appears on top layer */
.navbar .dropdown {
    position: relative;
}

.navbar .dropdown-menu {
    z-index: 9999 !important;
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.95) 0%, 
        rgba(15, 23, 42, 0.98) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    border-radius: 16px !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset !important;
    min-width: 200px;
    padding: 0.5rem;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar .dropdown-item {
    color: var(--gray-100);
    padding: var(--space-3) var(--space-4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    margin: 0.25rem 0;
    position: relative;
    overflow: hidden;
}

.navbar .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.3), 
        rgba(37, 99, 235, 0.2));
    transition: width 0.3s ease;
}

.navbar .dropdown-item:hover {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.2) 0%, 
        rgba(37, 99, 235, 0.15) 100%);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.navbar .dropdown-item:hover::before {
    width: 4px;
}

.navbar .dropdown-item:active {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.3) 0%, 
        rgba(37, 99, 235, 0.25) 100%);
    color: white;
}

.navbar .dropdown-divider {
    border-color: var(--gray-600);
    margin: var(--space-2) 0;
}

/* Ensure dropdown is visible when Bootstrap shows it */
.navbar .dropdown-menu[data-bs-popper] {
    z-index: 9999 !important;
}

/* Ensure dropdown is properly styled and visible when shown */
.navbar .dropdown-menu.show,
.navbar .dropdown-menu[data-bs-popper] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 9999 !important;
}

/* Hint Cards Styling */
.hint-card {
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.hint-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--warning-400), var(--warning-500));
}

.hint-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--warning-400);
}

.hint-card .card-title {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
}

.hint-card .card-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.hint-card .view-hint-btn {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border: none;
    color: white;
    transition: all var(--transition-fast);
}

.hint-card .view-hint-btn:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.hint-card .hide-hint-btn {
    background: linear-gradient(135deg, var(--gray-500), var(--gray-600));
    border: none;
    color: white;
    transition: all var(--transition-fast);
}

.hint-card .hide-hint-btn:hover {
    background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
    transform: translateY(-1px);
}

.hint-card .hint-content {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-top: var(--space-2);
}

.hint-card .hint-error {
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.hint-card .badge {
    font-size: var(--text-xs);
    font-weight: var(--font-weight-semibold);
}

.hint-card .badge.bg-warning {
    background: linear-gradient(135deg, var(--warning-500), var(--warning-600)) !important;
    color: white !important;
}

.hint-card .badge.bg-success {
    background: linear-gradient(135deg, var(--success-500), var(--success-600)) !important;
    color: white !important;
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.dropdown-divider {
    border-color: var(--border-color);
}

/* Tooltip */
.tooltip-inner {
    background-color: var(--dark-color);
    color: #ffffff;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--dark-color);
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: var(--dark-color);
}

.tooltip.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: var(--dark-color);
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: var(--dark-color);
}

/* Progress Bars */
.progress {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}

.progress-bar {
    color: #ffffff;
    font-weight: 500;
}

/* Breadcrumb */
.breadcrumb {
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* Text Colors */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Background Colors */
.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-light { background-color: var(--light-color) !important; }
.bg-dark { background-color: var(--dark-color) !important; }

/* Border Colors */
.border-primary { border-color: var(--primary-color) !important; }
.border-secondary { border-color: var(--secondary-color) !important; }
.border-success { border-color: var(--success-color) !important; }
.border-danger { border-color: var(--danger-color) !important; }
.border-warning { border-color: var(--warning-color) !important; }
.border-info { border-color: var(--info-color) !important; }

/* Utility Classes for Better Alignment */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }

.justify-content-center { justify-content: center !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }

.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

/* Spacing Utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pb-5 { padding-bottom: 3rem !important; }

/* Rounded Corners */
.rounded { border-radius: 0.375rem !important; }
.rounded-sm { border-radius: 0.25rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-2xl { border-radius: 1rem !important; }
.rounded-full { border-radius: 9999px !important; }

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important; }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important; }

/* ========================================
   LANDING PAGE ENHANCEMENTS
   ======================================== */

/* Animated Statistics Cards */
.stat-card {
    transition: all var(--transition-normal);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    transition: transform var(--transition-normal);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-number {
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--primary-500);
    transition: all var(--transition-normal);
}

/* Scroll Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Features Section */
.features-section .feature-card {
    transition: all var(--transition-normal);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.features-section .feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.feature-icon {
    transition: transform var(--transition-bounce);
}

.features-section .feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
}

.features-section .feature-card h4 {
    font-weight: var(--font-weight-bold);
    color: var(--gray-100);
}

/* Challenge Categories Preview */
.categories-preview-section .category-card {
    transition: all var(--transition-normal);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.categories-preview-section .category-card:hover {
    transform: translateX(5px) translateY(-3px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-left-width: 6px;
}

.category-icon {
    transition: transform var(--transition-normal);
}

.categories-preview-section .category-card:hover .category-icon {
    transform: scale(1.2);
}

/* Enhanced Hero Section */
.landing-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 50%, var(--primary-800) 100%);
    animation: gradientShift 10s ease infinite;
    background-size: 200% 200%;
}

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

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    animation: patternMove 20s ease infinite;
}

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

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    animation: fadeInDown 0.8s ease;
}

.hero-description {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    animation: fadeInUp 0.8s ease 0.4s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-btn-primary,
.hero-btn-secondary {
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.hero-btn-primary::before,
.hero-btn-secondary::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;
}

.hero-btn-primary:hover::before,
.hero-btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

.hero-btn-primary:hover,
.hero-btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Competition Info Card */
.competition-info-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* Countdown Badge */
.countdown-badge {
    display: inline-block;
    padding: var(--space-3) var(--space-5);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-lg);
}

.countdown-value {
    font-weight: var(--font-weight-bold);
    font-family: var(--font-family-mono);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .stat-card,
    .feature-card,
    .category-card {
        margin-bottom: var(--space-4);
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-description {
        font-size: var(--text-base);
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: var(--space-2);
    }
    
    .features-section .row,
    .categories-preview-section .row {
        margin: 0;
    }
    
    .category-card {
        margin-bottom: var(--space-3);
    }
}

@media (max-width: 576px) {
    .stat-number {
        font-size: var(--text-3xl);
    }
    
    .feature-icon i,
    .stat-icon i {
        font-size: var(--text-2xl) !important;
    }
    
    .countdown-badge {
        font-size: var(--text-base);
        padding: var(--space-2) var(--space-4);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #e9ecef;
        --text-secondary: #adb5bd;
        --text-muted: #6c757d;
        --border-color: #495057;
        --card-bg: #2d2d2d;
        --body-bg: #1a1a1a;
    }
    
    body {
        background-color: var(--body-bg);
        color: var(--text-primary);
    }
    
    .card {
        background-color: var(--card-bg);
        color: var(--text-primary);
        border-color: var(--border-color);
    }
    
    .form-control {
        background-color: var(--card-bg);
        border-color: var(--border-color);
        color: var(--text-primary);
    }
    
    .form-control:focus {
        background-color: var(--card-bg);
        border-color: var(--primary-color);
        color: var(--text-primary);
    }
    
    .table th {
        background-color: rgba(255, 255, 255, 0.05);
        color: var(--text-primary);
        border-color: var(--border-color);
    }
    
    .table td {
        border-color: var(--border-color);
        color: var(--text-primary);
    }
    
    .modal-content {
        background-color: var(--card-bg);
        color: var(--text-primary);
        border-color: var(--border-color);
    }
    
    .dropdown-menu {
        background-color: var(--card-bg);
        border-color: var(--border-color);
    }
    
    .dropdown-item {
        color: var(--text-primary);
    }
    
    .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--text-primary);
    }
}

/* ========================================
   MODERN AUTH PAGES (LOGIN & REGISTER)
   ======================================== */

/* Auth Card Container */
.auth-card {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1) 0%, rgba(30, 64, 175, 0.15) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 1px 0 rgba(255, 255, 255, 0.1) inset;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--primary-500) 0%, 
        var(--primary-400) 50%, 
        var(--primary-500) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 25px 70px rgba(59, 130, 246, 0.2),
        0 0 0 1px rgba(59, 130, 246, 0.3) inset,
        0 1px 0 rgba(255, 255, 255, 0.15) inset;
    border-color: rgba(59, 130, 246, 0.4);
}

/* Auth Card Header */
.auth-card .card-header {
    background: transparent;
    border: none;
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
}

.auth-card .card-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-100);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-card .text-muted {
    color: var(--gray-400);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Auth Icon */
.auth-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 10px 30px rgba(59, 130, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.auth-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    animation: iconShine 3s ease-in-out infinite;
}

@keyframes iconShine {
    0%, 100% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.auth-icon i {
    font-size: 2rem;
    color: white;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.auth-card:hover .auth-icon {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 
        0 15px 40px rgba(59, 130, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.auth-card:hover .auth-icon i {
    transform: scale(1.1);
}

/* Auth Card Body */
.auth-card .card-body {
    padding: 1.5rem 2rem 2rem;
    background: transparent;
}

/* Modern Input Group */
.input-group-modern {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.input-group-modern .input-icon {
    position: absolute;
    left: 1rem;
    z-index: 2;
    color: var(--gray-400);
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-group-modern .form-control {
    padding-left: 3rem;
    padding-right: 1rem;
    height: 56px;
    background: rgba(30, 41, 59, 0.5);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    color: var(--gray-100);
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.input-group-modern .form-control::placeholder {
    color: var(--gray-500);
    font-weight: 400;
}

.input-group-modern .form-control:focus {
    background: rgba(30, 41, 59, 0.7);
    border-color: var(--primary-500);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 4px 12px rgba(59, 130, 246, 0.15);
    outline: none;
    transform: translateY(-1px);
}

.input-group-modern .form-control:focus + .input-icon,
.input-group-modern:focus-within .input-icon {
    color: var(--primary-400);
    transform: scale(1.1);
}

.input-group-modern .form-control.is-invalid {
    border-color: var(--danger-500);
    background: rgba(239, 68, 68, 0.1);
}

.input-group-modern .form-control.is-invalid:focus {
    box-shadow: 
        0 0 0 4px rgba(239, 68, 68, 0.1),
        0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Form Label */
.auth-form .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-300);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Form Text Helper */
.auth-form .form-text {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form .form-text i {
    font-size: 0.75rem;
    color: var(--primary-400);
}

/* Invalid Feedback */
.invalid-feedback {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--danger-400);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.invalid-feedback i {
    font-size: 0.875rem;
}

/* Form Check (Remember Me) */
.auth-form .form-check {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
}

.auth-form .form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0;
    margin-right: 0.75rem;
    background-color: rgba(30, 41, 59, 0.5);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.auth-form .form-check-input:checked {
    background-color: var(--primary-500);
    border-color: var(--primary-500);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.auth-form .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    border-color: var(--primary-500);
}

.auth-form .form-check-label {
    color: var(--gray-300);
    font-size: 0.9375rem;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
}

/* Submit Button */
.auth-form .btn-primary {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 14px rgba(59, 130, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.auth-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(59, 130, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 100%);
}

.auth-form .btn-primary:hover::before {
    left: 100%;
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

.auth-form .btn-primary i {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.auth-form .btn-primary:hover i {
    transform: translateX(2px);
}

/* Auth Card Footer */
.auth-card .card-footer {
    background: transparent;
    border: none;
    padding: 1.5rem 2rem 2rem;
    text-align: center;
}

.auth-link {
    color: var(--primary-400);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-500));
    transition: width 0.3s ease;
}

.auth-link:hover {
    color: var(--primary-300);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        border-radius: 20px;
        margin: 1rem;
    }
    
    .auth-card .card-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    .auth-card .card-body {
        padding: 1.5rem 1.5rem 1.5rem;
    }
    
    .auth-card .card-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .auth-icon {
        width: 70px;
        height: 70px;
    }
    
    .auth-icon i {
        font-size: 1.75rem;
    }
    
    .auth-card .card-title {
        font-size: 1.75rem;
    }
    
    .input-group-modern .form-control {
        height: 52px;
        font-size: 0.9375rem;
    }
    
    .auth-form .btn-primary {
        height: 52px;
        font-size: 0.9375rem;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.9) 100%);
    }
    
    .input-group-modern .form-control {
        background: rgba(15, 23, 42, 0.6);
    }
    
    .input-group-modern .form-control:focus {
        background: rgba(15, 23, 42, 0.8);
    }
}
