/* =========================================================
DREX ESPORTS – Optimized CSS Version: 3.1 - All Fixes Applied
========================================================= */

/* ==================== 1. CSS VARIABLES ==================== */
:root {
    /* Primary Colors - Fixed contrast */
    --orange: #ff8a00;
    --orange-light: #ffedd5;
    --orange-dark: #ea580c;
    --orange-text: #ffffff;
    
    /* Secondary Colors */
    --yellow: #ffd54a;
    --teal: #14b8a6;
    --pink: #ec4899;
    --purple: #6366f1;
    
    /* Neutral Colors - Enhanced contrast */
    --text: #0f172a;
    --text-muted: #6b7280;
    --bg: #fffbeb;
    --bg-soft: #fefce8;
    --surface: #ffffff;
    --border: #e5e7eb;
    
    /* Layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.16);
    --container: 1200px;
    --padding: 16px;
}

[data-theme="dark"] {
    --orange: #f97316;
    --orange-light: #7c2d12;
    --orange-dark: #fdba74;
    --orange-text: #ffffff;
    --yellow: #ffd54a;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --bg: #0f172a;
    --bg-soft: #1e293b;
    --surface: #1e293b;
    --border: #334155;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

/* RGB variables for backdrop filter */
:root {
    --surface-rgb: 255, 255, 255;
    --border-rgb: 229, 231, 235;
}
[data-theme="dark"] {
    --surface-rgb: 30, 41, 59;
    --border-rgb: 51, 65, 85;
}

/* ==================== 2. RESET & BASE ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Mobile drag se side-scroll ko rokne ke liye */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}


img {
    max-width: 100%;
    display: block;
}

button, input, select, textarea {
    font: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* ==================== 3. UTILITY CLASSES ==================== */
.container {
    width: min(100% - 2 * var(--padding), var(--container));
    margin-inline: auto;
}

.section {
    padding: 64px 0;
}

.section-alt {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* FIXED: Section Headings - More Compact */
.section-header {
    max-width: 700px;
    margin: 0 auto 40px;
    text-align: center;
}


.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--orange);
    margin-bottom: 12px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--orange-light);
    border: 1px solid rgba(255, 138, 0, 0.2);
}

.section-title {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 36px;
    }
}

.section-sub {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==================== 4. UPDATED NAVIGATION ==================== */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(var(--surface-rgb, 255, 255, 255), 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(var(--border-rgb, 229, 231, 235), 0.5);
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-theme="dark"] .site-header {
    background: rgba(var(--surface-rgb, 30, 41, 59), 0.95);
    border-bottom: 1px solid rgba(var(--border-rgb, 51, 65, 85), 0.5);
}

.site-header.scrolled {
    background: rgba(var(--surface-rgb, 255, 255, 255), 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .site-header.scrolled {
    background: rgba(var(--surface-rgb, 30, 41, 59), 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 24px;
    position: relative;
}

/* Logo Section - FIXED: Removed orange background */
.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: translateY(-2px);
}

.logo-img-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border);
}

.logo-img-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    padding: 2px;
}

.logo-text-block {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text-main {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--text);
}

.logo-text-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
}

/* Navigation Links */
.nav-links {
    display: none;
    gap: 4px;
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

.nav-link {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--orange), var(--yellow));
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--text);
    background: var(--orange-light);
}

.nav-link:hover::before {
    transform: scaleX(1);
}

.nav-link.active {
    color: var(--text);
    background: var(--orange-light);
}

.nav-link.active::before {
    transform: scaleX(1);
}

.nav-link-icon {
    font-size: 16px;
}

/* Right Section */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Status Chip */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--orange-light), rgba(255, 138, 0, 0.1));
    color: var(--orange-dark);
    border: 1px solid rgba(255, 138, 0, 0.2);
    transition: all 0.3s ease;
}

.chip .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.2);
}

/* Theme Toggle */
.theme-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: var(--orange-light);
    border-color: var(--orange);
    transform: rotate(15deg);
}

.sun-icon, .moon-icon {
    position: absolute;
    font-size: 18px;
    transition: all 0.3s ease;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: rotate(-45deg);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(45deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Register Button - FIXED: Better contrast */
.nav-btn {
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: 2px solid transparent;
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    color: var(--orange-text);
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.3);
}

.nav-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 138, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-btn .btn-icon {
    transition: transform 0.3s ease;
}

.nav-btn.primary:hover .btn-icon {
    transform: translateX(4px);
}

/* Mobile Register Button */
.mobile-register-btn {
    display: inline-flex;
}

@media (min-width: 1024px) {
    .mobile-register-btn {
        display: none;
    }
}

/* Mobile Menu Button */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.nav-burger span {
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 1023px) {
    .nav-burger {
        display: flex;
    }
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-inner {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: var(--orange-light);
    border-color: var(--orange);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.mobile-menu-link {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    background: var(--orange-light);
    color: var(--orange);
    border-color: var(--orange);
    transform: translateX(4px);
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Responsive adjustments */
@media (max-width: 1023px) {
    .nav-links { display: none; }
    .hidden-mobile { display: none !important; }
}

@media (max-width: 640px) {
    .logo-text-block { display: none; }
    .nav-burger { width: 40px; height: 40px; padding: 8px; }
    .theme-toggle-btn { width: 40px; height: 40px; }
    .mobile-register-btn { padding: 10px 16px; font-size: 13px; }
}

/* ==================== 5. BUTTONS - FIXED CONTRAST ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--orange), var(--yellow));
    color: var(--orange-text);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 138, 0, 0.4);
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--orange);
    background: var(--orange-light);
}

.btn-ghost {
    border: 1px solid var(--border);
    background: var(--surface);
}

.btn-ghost:hover {
    border-color: var(--orange);
    background: var(--orange-light);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-icon {
    font-size: 16px;
    transition: transform 0.2s;
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

/* ==================== 6. HERO SECTION ==================== */
.hero-minimal {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(255, 138, 0, 0.05) 0%, rgba(255, 213, 74, 0.03) 100%);
    position: relative;
}

.hero-minimal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 138, 0, 0.3), transparent);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 64px;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 138, 0, 0.1);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--orange);
    margin-bottom: 24px;
}

.hero-title {
    font-size: 36px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 42px;
    }
}

.title-highlight {
    background: linear-gradient(90deg, var(--orange), var(--yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.hero-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 500px;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 17px;
    }
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
    max-width: 400px;
}

.stat {
    text-align: center;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stat-value {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(45deg, var(--orange), var(--yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-link {
    color: var(--orange);
    background: none;
    padding: 12px 0;
}

.btn-link:hover {
    color: var(--orange-dark);
}

.visual-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.progress-card {
    margin-bottom: 24px;
}

.progress-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--orange), var(--yellow));
    border-radius: 3px;
    transition: width 1s ease;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.progress-count {
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-soft);
    border-radius: 8px;
}

.info-icon {
    font-size: 20px;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-content {
    display: flex;
    flex-direction: column;
}

.info-content strong {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 2px;
}

.info-content small {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-prompt {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-prompt p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.status-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--orange);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-link:hover {
    color: var(--orange-dark);
}

.status-link span {
    font-size: 16px;
    transition: transform 0.2s;
}

.status-link:hover span {
    transform: translateX(4px);
}

/* Dark Mode Hero */
[data-theme="dark"] .hero-minimal {
    background: linear-gradient(135deg, rgba(255, 138, 0, 0.08) 0%, rgba(255, 213, 74, 0.04) 100%);
}

[data-theme="dark"] .visual-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 138, 0, 0.1);
}

[data-theme="dark"] .info-item {
    background: rgba(30, 41, 59, 0.5);
}

/* Mobile Responsive Hero */
@media (max-width: 767px) {
    .hero-minimal { padding: 60px 0; }
    .hero-stats { grid-template-columns: 1fr; max-width: 100%; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .status-prompt { flex-direction: column; gap: 12px; text-align: center; }
}

/* ==================== 7. TOURNAMENT SECTION ==================== */
.tournament-section {
    background: var(--bg-soft);
    position: relative;
    overflow: hidden;
}

.tournament-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--orange), transparent);
}

.tournament-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    .tournament-layout {
        grid-template-columns: 1fr 400px;
        gap: 48px;
    }
}

.tournament-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Timeline Container */
.timeline-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.timeline-header {
    margin-bottom: 24px;
}

.timeline-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
}

.timeline-icon {
    font-size: 24px;
}

.progress-indicator {
    margin-top: 20px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stage-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stage-card.active {
    border-color: var(--orange);
    background: linear-gradient(135deg, rgba(255, 138, 0, 0.05), transparent);
}
.stage-card.completed {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.12);
    opacity: 0.95;
}

.stage-status.completed {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.stage-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.stage-number {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--orange);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    flex-shrink: 0;
}

.stage-title {
    flex: 1;
}

.stage-title h4 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.stage-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 20px;
}

.stage-status.active {
    background: rgba(255, 138, 0, 0.1);
    color: var(--orange);
    border: 1px solid rgba(255, 138, 0, 0.3);
}

.stage-status.upcoming {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.stage-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.stage-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.feature-tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    background: rgba(255, 138, 0, 0.1);
    color: var(--orange);
    border: 1px solid rgba(255, 138, 0, 0.2);
}

.stage-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.stage-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 213, 74, 0.1);
    border: 1px solid rgba(255, 213, 74, 0.2);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
}

.note-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* Prize Container */
.prize-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.prize-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 20px;
}

.prize-icon {
    font-size: 24px;
}

.prize-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.prize-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.prize-card.champion {
    border-color: var(--orange);
    background: linear-gradient(135deg, rgba(255, 138, 0, 0.1), transparent);
}

.prize-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.prize-rank {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--text);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    flex-shrink: 0;
}

.prize-card.champion .prize-rank {
    background: linear-gradient(45deg, var(--orange), var(--yellow));
}

.prize-content {
    flex: 1;
}

.prize-content h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.prize-amount {
    font-size: 20px;
    font-weight: 900;
    color: var(--orange);
}

.prize-card.champion .prize-amount {
    background: linear-gradient(45deg, var(--orange), var(--yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prize-badge {
    font-size: 24px;
    flex-shrink: 0;
}

.prize-total {
    text-align: center;
    padding: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 20px 0;
}

.total-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.total-amount {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(45deg, var(--orange), var(--yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prize-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 213, 74, 0.1);
    border: 1px solid rgba(255, 213, 74, 0.2);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
}

/* Sidebar */
.tournament-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-card, .rules-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    flex: 1;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 138, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.info-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.feature-highlight {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 138, 0, 0.1);
    border: 1px solid rgba(255, 138, 0, 0.2);
    border-radius: 8px;
}

.feature-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.feature-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.feature-highlight p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* Rules Card */
.rules-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.rules-section {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.section-header h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    flex: 1;
}

.section-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text);
}

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

.rule-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.rules-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
    .rules-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.warning-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--orange);
}

.warning-icon {
    font-size: 16px;
}

/* Dark Mode Tournament */
[data-theme="dark"] .tournament-section {
    background: rgba(30, 41, 59, 0.5);
}

[data-theme="dark"] .stage-card,
[data-theme="dark"] .timeline-container,
[data-theme="dark"] .prize-container,
[data-theme="dark"] .info-card,
[data-theme="dark"] .rules-card {
    background: rgba(30, 41, 59, 0.8);
}

[data-theme="dark"] .stage-stats,
[data-theme="dark"] .prize-total,
[data-theme="dark"] .info-item,
[data-theme="dark"] .rules-section {
    background: rgba(30, 41, 59, 0.6);
}

[data-theme="dark"] .prize-card {
    background: rgba(30, 41, 59, 0.6);
}

[data-theme="dark"] .prize-card.champion {
    background: linear-gradient(135deg, rgba(255, 138, 0, 0.15), rgba(30, 41, 59, 0.6));
}

/* Mobile Responsive Tournament */
@media (max-width: 768px) {
    .tournament-section { padding: 48px 0; }
    .timeline-container, .prize-container, .info-card, .rules-card { padding: 20px; }
    .stage-stats { grid-template-columns: repeat(3, 1fr); }
    .feature-tag { font-size: 11px; padding: 5px 10px; }
}

@media (max-width: 480px) {
    .stage-stats { grid-template-columns: 1fr; gap: 8px; }
    .stage-features { flex-direction: column; }
    .prize-cards { gap: 8px; }
    .prize-card { padding: 12px; }
    .total-amount { font-size: 28px; }
}

/* ==================== 8. FORMS & PANELS ==================== */
.panel {
    padding: 32px;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.panel:hover {
    box-shadow: var(--shadow-lg);
}

.panel-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
    position: relative;
    display: inline-block;
}

.panel-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--orange);
    border-radius: var(--radius-full);
}

.panel-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-label .text-soft {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 13px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
select:hover,
textarea:hover {
    border-color: var(--border-dark);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.15);
    background: var(--surface);
}

textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 48px;
    cursor: pointer;
}

select:disabled {
    background-color: var(--bg-soft);
    cursor: not-allowed;
    opacity: 0.7;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--orange);
    margin-top: 2px;
}

.checkbox-row label {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    cursor: pointer;
}

.form-footer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}

@media (min-width: 640px) {
    .form-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.form-note {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 500px;
}

.form-note.warning {
    color: #92400e;
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .form-note.warning {
    background: rgba(255, 138, 0, 0.1);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
}

.reg-inline-msg {
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
    animation: slideDown 0.3s ease;
}

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

/* ==================== 9. PAYMENT SECTION - FIXED ==================== */
.pay-layout {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (min-width: 1024px) {
    .pay-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    .pay-summary {
        flex: 1;
        position: sticky;
        top: 24px;
    }
    .pay-panel {
        flex: 1.2;
    }
}

.card.pay-summary .card-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text);
}

.pay-target {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    border: 2px solid #fb923c;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.pay-target::before {
    content: '💰';
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    opacity: 0.2;
}

.pay-target-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #92400e;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pay-target-label::before {
    content: '📍';
    font-size: 12px;
}

.pay-target-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

@media (min-width: 640px) {
    .pay-target-main {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
}

.pay-target-name {
    font-size: 20px;
    font-weight: 900;
    color: #ea580c;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pay-target-id {
    font-size: 15px;
    font-weight: 700;
    color: #c2410c;
    background: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid #fb923c;
}

.pay-target-note {
    font-size: 14px;
    color: #92400e;
    line-height: 1.7;
    font-weight: 500;
}

/* FIXED: Payment Methods - Now Selectable */
.pay-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.payment-method {
    cursor: pointer;
    padding: 16px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-md);
    flex-direction: column;
    text-align: center;
    position: relative;
}

.payment-method:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--orange);
}

.payment-method.active {
    border-color: var(--orange);
    background: var(--orange-light);
    color: var(--orange-dark);
}
/* Auto highlight selected method (no JS) */
.payment-method:has(input[type="radio"]:checked){
  border-color: var(--orange) !important;
  background: var(--orange-light) !important;
  color: var(--orange-dark) !important;
  box-shadow: 0 8px 20px rgba(255, 138, 0, 0.18);
}

.payment-method input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-method .method-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.payment-method .method-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payment-method .method-text strong {
    font-size: 14px;
    font-weight: 700;
}

.payment-method .method-text small {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.payment-method.active .method-text small {
    color: var(--orange-dark);
}

.result-note {
    margin-top: 20px;
    padding: 18px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.6;
    animation: slideDown 0.3s ease;
    display: none;
}

/* Payment Instructions */
.payment-instructions {
    background: var(--bg-soft);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.instructions-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.instructions-list {
    padding-left: 20px;
    margin: 0;
}

.instructions-list li {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.payment-tips {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.tip-icon {
    font-size: 16px;
}

/* ==================== 10. STATUS SECTION ==================== */
.status-box {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
    border: 2px solid var(--border);
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.6;
    animation: slideDown 0.3s ease;
}

.result-card {
    margin-top: 20px;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.4s ease;
}

.status-header-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .status-header-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.status-badge {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-badge--paid {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid #86efac;
}

.status-badge--paid::before {
    background: #166534;
}

.status-badge--pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-badge--pending::before {
    background: #92400e;
}

.status-badge--unpaid {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.status-badge--unpaid::before {
    background: #991b1b;
}

.status-id {
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    background: var(--bg-soft);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.status-item {
    padding: 16px;
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.status-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.status-item-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.status-item-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

.status-note {
    padding-top: 20px;
    border-top: 2px dashed var(--border);
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Loading animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Error states */
.error-border {
    border-color: #ef4444 !important;
}

.error-text {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Success states */
.success-border {
    border-color: #10b981 !important;
}

/* Process steps */
.process-steps {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.process-step {
    font-size: 13px;
    color: var(--text-muted);
    position: relative;
    padding-left: 24px;
}

.process-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border);
}

.process-step.active {
    color: var(--orange);
    font-weight: 600;
}

.process-step.active::before {
    background: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.2);
}

/* Input with prefix */
.input-with-prefix {
    display: flex;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
}

.input-with-prefix:focus-within {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.15);
}

.prefix {
    padding: 14px 12px;
    background: var(--bg-soft);
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    border-right: 2px solid var(--border);
}

.input-with-prefix input {
    border: none;
    padding-left: 12px;
}

/* Select wrapper */
.select-wrapper {
    position: relative;
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

/* Hint text */
.hint-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Status input wrapper */
.status-input-wrapper {
    position: relative;
}

.btn-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    display: none;
}

.status-input-wrapper:focus-within .btn-clear {
    display: block;
}

/* Step number */
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--orange);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    margin-right: 8px;
}

/* Link in checkbox */
.link {
    color: var(--orange);
    text-decoration: underline;
    transition: opacity 0.2s;
}

.link:hover {
    opacity: 0.8;
}

/* Button loading states */
.btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Card badges */
.card-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--orange-light);
    color: var(--orange-dark);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==================== 11. UPDATED FOOTER ==================== */
.site-footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
    margin-top: 64px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.footer-brand {
    margin-bottom: 24px;
}

.footer-logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(45deg, var(--orange), var(--yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: white;
    margin-bottom: 16px;
}

.footer-brand h3 {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: 14px;
    color: var(--text-muted);
}

/* FIXED: Real Social Icons */
.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text);
}

.social-link:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: white;
    transform: translateY(-2px);
}

.social-link i {
    font-size: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--orange);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.contact-icon {
    font-size: 16px;
    width: 24px;
    color: var(--orange);
}

.footer-newsletter p {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text);
}

.newsletter-form {
    display: flex;
    gap: 8px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
}

.newsletter-form button {
    width: 44px;
    border-radius: var(--radius-md);
    background: var(--orange);
    color: white;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.newsletter-form button:hover {
    background: var(--orange-dark);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
}

.footer-copyright {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-copyright .sep {
    margin: 0 8px;
    opacity: 0.5;
}

.footer-copyright a {
    color: var(--text-muted);
    text-decoration: underline;
}

.footer-copyright a:hover {
    color: var(--orange);
}

.footer-built {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==================== 12. RESPONSIVE ==================== */
@media (max-width: 768px) {
    .section { padding: 48px 0; }
    .hero-title { font-size: 32px; }
    .tournament-layout { gap: 24px; }
    .form-footer { text-align: center; }
    .footer-grid { gap: 32px; }
}

@media (max-width: 480px) {
    .section-title { font-size: 26px; }
    .hero-title { font-size: 28px; }
    .nav-right { gap: 8px; }
    .nav-btn { padding: 8px 16px; font-size: 13px; }
    .btn { width: 100%; justify-content: center; }
    .panel { padding: 24px; }
    .pay-methods { flex-direction: column; }
    .payment-method { width: 100%; }
}

/* ==================== 13. ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ==================== 14. DARK MODE FIXES ==================== */
[data-theme="dark"] .hero-summary-card {
    background: var(--surface);
}

[data-theme="dark"] .card-feature {
    background: rgba(255, 138, 0, 0.1);
}

[data-theme="dark"] .timeline-note {
    background: rgba(255, 138, 0, 0.1);
}

[data-theme="dark"] .prize-note {
    background: rgba(255, 138, 0, 0.1);
}

[data-theme="dark"] .pay-target {
    background: rgba(255, 138, 0, 0.1);
    border-color: rgba(251, 146, 60, 0.5);
}

[data-theme="dark"] .payment-method.active {
    background: rgba(255, 138, 0, 0.15);
}

/* Print styles */
@media print {
    .site-header, .mobile-menu, .hero-ctas, .nav-burger, .site-footer, .theme-toggle-btn, .mobile-register-btn {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* =========================================================
DREX ESPORTS – Dashboard Panels CSS
Complete CSS for Hosts.html & Team.html
========================================================= */

/* ==================== DASHBOARD BASE STYLES ==================== */
.host-dashboard, .team-dashboard {
    min-height: 100vh;
    background: radial-gradient(900px 420px at 0% 0%, rgba(255, 138, 0, 0.1), transparent 60%),
                radial-gradient(900px 420px at 100% 0%, rgba(99, 102, 241, 0.08), transparent 60%),
                var(--bg);
}

.host-dashboard .page, .team-dashboard .shell {
    max-width: var(--container);
    margin: 0 auto;
    padding: 24px var(--padding);
}

@media (max-width: 768px) {
    .host-dashboard .page, .team-dashboard .shell {
        padding: 16px;
    }
}

/* ==================== TOP BAR (Shared) ==================== */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        text-align: center;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo, .brand-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: linear-gradient(45deg, var(--orange), var(--yellow));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    flex-shrink: 0;
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
}

.brand-text-main {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--text);
}

.brand-text-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

@media (max-width: 768px) {
    .topbar-right {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
}

.env-pill {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(45deg, var(--orange), var(--yellow));
    color: white;
}

.pill-soft {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    background: var(--orange-light);
    color: var(--orange-dark);
    border: 1px solid rgba(255, 138, 0, 0.2);
}

/* ==================== LOGOUT & BACK BUTTONS ==================== */
.logout-btn, .btn-secondary {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover, .btn-secondary:hover {
    background: var(--orange-light);
    border-color: var(--orange);
    transform: translateY(-1px);
}

/* ==================== CARD COMPONENTS ==================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .card {
        padding: 24px;
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.card-kicker {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--orange);
    margin-bottom: 4px;
}

.card-title {
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
    color: var(--text);
}

.card-sub {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.hint, .muted {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==================== HOST PANEL SPECIFIC ==================== */
/* Login Grid */
.login-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 24px;
}

@media (min-width: 1024px) {
    .login-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Field Rows */
.field-row {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s;
}

.field:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.1);
}

/* Stats Card in Host Login */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 12px;
}

.stat-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.stat-chip-row .chip {
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    color: var(--text-muted);
    font-size: 11px;
    padding: 4px 10px;
}

.chip-row-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
}

/* Dashboard Grid */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 24px;
}

@media (min-width: 1024px) {
    .dash-grid {
        grid-template-columns: 1fr 2fr;
    }
}

/* Badge Live */
.badge-live {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    background: var(--orange-light);
    color: var(--orange-dark);
    margin-left: 8px;
}

/* Filters Row */
.filters-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.filters-left {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    flex: 1;
}

.filters-right {
    display: flex;
    gap: 8px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

@media (max-width: 768px) {
    .filter-group {
        min-width: 100%;
    }
}

.filter-input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
}

.filter-input[type="date"] {
    padding-right: 12px;
}

/* Table Styles */
.table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th {
    padding: 16px;
    background: var(--bg-soft);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.table tbody tr:hover {
    background: var(--bg-soft);
}

.empty-state {
    padding: 48px 16px;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Status Messages */
.status-msg {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-top: 16px;
}

.status-msg.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #166534;
}

.status-msg.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

/* ==================== TEAM PANEL SPECIFIC ==================== */
/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: 1fr 2fr;
    }
}

/* Form Fields */
.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-top: 16px;
}

.alert.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #166534;
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

/* Session Box */
.session-box {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.session-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

/* Status Pills */
.status-pill {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.status-paid {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-neutral {
    background: var(--bg-soft);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.status-unpaid {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-soft {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: var(--orange-light);
    color: var(--orange-dark);
    margin-left: 8px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 12px;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.info-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

/* Section Title Small */
.section-title-small {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
    border-radius: var(--radius-full);
}

/* Textarea */
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* ==================== UTILITY CLASSES ==================== */
.hidden {
    display: none !important;
}

/* ==================== DARK MODE FIXES ==================== */
[data-theme="dark"] .topbar {
    background: var(--surface);
}

[data-theme="dark"] .stat-card {
    background: var(--surface);
}

[data-theme="dark"] .table th {
    background: rgba(30, 41, 59, 0.5);
}

[data-theme="dark"] .table tbody tr:hover {
    background: rgba(30, 41, 59, 0.3);
}

[data-theme="dark"] .status-msg.success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .status-msg.error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .alert.success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .alert.error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#dashView, #dashboard {
    animation: fadeIn 0.3s ease;
}

/* ==================== RESPONSIVE FIXES ==================== */
@media (max-width: 640px) {
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    .filters-right {
        justify-content: flex-start;
    }
    .table {
        display: block;
        overflow-x: auto;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .brand {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================
   MAIN SECTION HEADERS (big sections fix)
   - Register / Payment / Status / Tournament
   ========================================= */
.section > .container > .section-header {
    max-width: 840px;
    margin: 0 auto 40px;
    display: grid;
    gap: 8px;
    text-align: center;
    justify-items: center;
}

/* Paragraph under heading */
.section > .container > .section-header .section-sub {
    max-width: 600px;
    margin: 0;
    line-height: 1.6;
}

/* DESKTOP: 2-column style – badge left, text right */
@media (min-width: 992px) {
    .section > .container > .section-header {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        text-align: left;
        justify-items: flex-start;
    }

    .section > .container > .section-header .section-kicker {
        grid-row: 1 / 3;       /* badge poora left side pe */
        margin-bottom: 0;
    }

    .section > .container > .section-header .section-title {
        margin-bottom: 4px;
    }

    .section > .container > .section-header .section-sub {
        max-width: none;       /* full width text right side */
    }
}

/* SMALL MOBILE: thoda compact text sizes */
@media (max-width: 480px) {
    .section > .container > .section-header .section-title {
        font-size: 24px;
        line-height: 1.25;
    }

    .section > .container > .section-header .section-sub {
        font-size: 14px;
    }
}
/* ========== Mega Admin ========== */
body.admin-dashboard .page {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-grid.hidden {
    display: none;
}

.admin-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
}

.metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
}

.stage-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.stage-admin-card {
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    padding: 12px 14px;
    background: var(--bg-soft);
}

.stage-admin-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.panel.compact {
    max-width: 420px;
}

.panel.subtle {
    background: var(--bg-soft);
}

.panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}


/* ===== Leaderboard / Match Results Additions ===== */
.anchor-spacer { display:block; position:relative; top:-90px; height:0; visibility:hidden; }

.match-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.match-status-select { min-width:140px; }
.match-reason-select { min-width:180px; }

.match-editor {
  margin-top:12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.match-editor-head {
  padding: 12px 16px;
  background: var(--bg-soft);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.match-editor-body { padding: 12px 16px; }
.match-editor-body .table td, .match-editor-body .table th { padding: 10px; }
.small-muted { font-size: 12px; color: var(--text-muted); }

.input-mini {
  width: 72px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
}


/* =========================
   How to Register Video Card
   ========================= */
.video-card .video-embed{
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.video-card .video-embed iframe{
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}



/* =========================================================
   NEW: Homepage modes (Closed / Maintenance) + Leaderboard v2
   ========================================================= */

/* Top view slot (used for mobile open + closed state) */
#topView { display: none; padding-top: 22px; padding-bottom: 10px; }
.progress-mobile-slot, .video-mobile-slot, .leaderboard-closed-slot { margin-top: 12px; }

/* Show top view on mobile (registrations open) */
@media (max-width: 768px) {
  body.main-site:not(.reg-closed) #topView { display: block; }
  body.main-site:not(.reg-closed) #hero { display: none; } /* user request */
}

/* Show top view when registrations closed (all devices) */
body.reg-closed #topView { display: block; }

/* Closed notice (transparent red circled) */
.closed-notice{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(239,68,68,.6);
  background: rgba(239,68,68,.10);
  color: rgba(239,68,68,.95);
  font-weight: 700;
  letter-spacing:.2px;
}
.closed-notice::before{
  content:'⛔';
  font-size: 16px;
}

/* Site mode notice (small line) */
.site-mode-notice{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245,158,11,.35);
  background: rgba(245,158,11,.12);
  color: rgba(245,158,11,.95);
  font-weight: 600;
}

/* Hide sections when registrations closed */
body.reg-closed #registration,
body.reg-closed #payment,
body.reg-closed #status,
body.reg-closed #tournament,
body.reg-closed #hero {
  display: none !important;
}
body.reg-closed .video-card { display: none !important; }

/* Brackets */
.brackets-section { padding-top: 10px; }
.bracket{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
@media (max-width: 980px){
  .bracket{ grid-template-columns: 1fr; }
}
.bracket-col{
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(255,255,255,.03);
  border-radius: 18px;
  padding: 14px;
}
.bracket-col-title{
  font-weight: 800;
  letter-spacing: .2px;
  margin-bottom: 12px;
}
.match-card{
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 16px;
  padding: 12px;
  background: rgba(15,23,42,.35);
  margin-bottom: 12px;
}
.match-card.highlight{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.08);
}
.match-head{
  font-weight: 800;
  margin-bottom: 10px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  opacity: .95;
}
.match-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px dashed rgba(148,163,184,.22);
}
.match-row:first-of-type{ border-top: 0; }

/* Leaderboard v2 */
.leaderboard-section .table-wrap{
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(2,6,23,.35);
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
}
.leaderboard-section table.table{
  width:100%;
  border-collapse: collapse;
}
.leaderboard-section thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  color: rgba(226,232,240,.9);
  background: rgba(2,6,23,.85);
  border-bottom: 1px solid rgba(148,163,184,.22);
  padding: 14px 14px;
}
.leaderboard-section tbody td{
  padding: 14px 14px;
  border-bottom: 1px solid rgba(148,163,184,.14);
  color: rgba(226,232,240,.92);
}
.leaderboard-section tbody tr:nth-child(odd){
  background: rgba(148,163,184,.04);
}
.leaderboard-section tbody tr:hover{
  background: rgba(59,130,246,.08);
}
.leaderboard-section tbody td:first-child{
  width: 72px;
  font-weight: 900;
}
.leaderboard-section tbody tr:nth-child(1) td:first-child,
.leaderboard-section tbody tr:nth-child(2) td:first-child,
.leaderboard-section tbody tr:nth-child(3) td:first-child{
  color: rgba(34,197,94,.95);
}

/* Site mode overlay */
.site-mode-overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2,6,23,.62);
  backdrop-filter: blur(8px);
  z-index: 9999;
}
.site-mode-card{
  width: min(720px, 100%);
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(15,23,42,.80);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  padding: 20px 18px;
}
/* FIX: Maintenance/Setup overlay text visibility */
.site-mode-card { color: rgba(255,255,255,0.92); }
.site-mode-card h2 { color: #fff; }
.site-mode-card p { color: rgba(255,255,255,0.86); }

.site-mode-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:999px;
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.28);
  color: rgba(245,158,11,.95);
  font-weight: 800;
}
.site-mode-card h2{
  margin: 14px 0 8px;
  font-size: 28px;
  letter-spacing: .2px;
}
.site-mode-card p{
  margin: 0;
  opacity: .92;
  line-height: 1.6;
}
.site-mode-actions{ margin-top: 16px; }

/* Admin switches + danger button (admin.html uses same stylesheet) */
.switch{
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
}
.switch input{ opacity: 0; width: 0; height: 0; }
.switch .slider{
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(148,163,184,.35);
  transition: .2s;
  border-radius: 999px;
}
.switch .slider:before{
  content:"";
  position:absolute;
  height: 22px;
  width: 22px;
  left: 4px;
  top: 4px;
  background: white;
  transition: .2s;
  border-radius: 50%;
}
.switch input:checked + .slider{
  background: rgba(34,197,94,.65);
}
.switch input:checked + .slider:before{
  transform: translateX(22px);
}

.btn.danger{
  background: rgba(239,68,68,.18);
  border: 1px solid rgba(239,68,68,.35);
  color: rgba(239,68,68,.95);
}
.btn.danger:hover{ filter: brightness(1.06); }

body.main-site:not(.reg-closed) #leaderboard { display:none; }
/* ===== Leaderboard: new clean look ===== */
.leaderboard-tools{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  margin: 14px 0 6px;
  flex-wrap: wrap;
}

.leaderboard-search{
  width: min(520px, 100%);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.leaderboard-section .table-wrap{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.leaderboard-section thead th{
  background: var(--bg-soft);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.leaderboard-section tbody td{
  color: var(--text);
}

/* Rank icons */
.rank-ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.rank-num{
  font-weight: 800;
}
.rank-ico.gold{ background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.35); }
.rank-ico.silver{ background: rgba(148,163,184,0.18); border-color: rgba(148,163,184,0.35); }
.rank-ico.bronze{ background: rgba(234,88,12,0.14); border-color: rgba(234,88,12,0.32); }
/* ===== Top Kills cards ===== */
.top-kills-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px){
  .top-kills-grid{ grid-template-columns: 1fr; }
}

.top-kills-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.tk-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.tk-team{
  font-weight: 800;
  margin-bottom: 8px;
}

.tk-kills{
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.28);
}

.tk-players{
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}
/* ==========================
   Mobile polish for TopView
   ========================== */
@media (max-width: 768px){

  /* TopView spacing + stack gap */
  #topView { padding-top: 12px; padding-bottom: 14px; }
  #topView .container { display:flex; flex-direction:column; gap:12px; }
  .progress-mobile-slot, .video-mobile-slot, .leaderboard-closed-slot { margin-top: 0; }

  /* ✅ Progress ko proper card look do (mobile me ye hi “bura” lag raha tha) */
  #topView #heroProgressCard{
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 14px 12px;
    box-shadow: var(--shadow-sm);
    margin: 0;
  }
  #topView .progress-title{ font-size: 13px; margin-bottom: 10px; }
  #topView .progress-bar{ height: 10px; border-radius: 999px; margin-bottom: 10px; }
  #topView .progress-fill{ border-radius: 999px; }
  #topView .progress-stats{ font-size: 12px; margin-top: 0; }

  /* ✅ Video card compact (padding + header sizes) */
  #topView .info-card{ padding: 16px; border-radius: 18px; }
  #topView .card-header{ margin-bottom: 12px; gap: 10px; }
  #topView .card-icon{ width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
  #topView .card-header h3{ font-size: 17px; }

  /* ✅ Video embed border light theme me better */
  #topView .video-card .video-embed{
    border: 1px solid var(--border);
    background: #000;
    border-radius: 16px;
  }
  #topView .video-card .hint{ font-size: 12px; margin-top: 10px; }

  /* ✅ Neechay wale sections ki extra height kam */
  .section { padding: 40px 0; }
  .section-header { margin-bottom: 22px; }
  .section-title { font-size: 24px; }
  .section-sub { font-size: 14px; }
}

@media (max-width: 420px){
  #topView .info-card{ padding: 14px; }
  #topView #heroProgressCard{ padding: 12px; }
}
/* =========================
   Motion BG (NO VIDEO)
   Works on PC + Mobile
   ========================= */

.hero-minimal, #topView{
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.motion-bg{
  position:absolute;
  inset:-35%;
  z-index:0;
  pointer-events:none;

  background:
    radial-gradient(520px 440px at 18% 25%, rgba(255,138,0,0.38), transparent 62%),
    radial-gradient(560px 440px at 82% 22%, rgba(255,213,74,0.28), transparent 64%),
    radial-gradient(600px 480px at 72% 86%, rgba(99,102,241,0.16), transparent 66%),
    radial-gradient(560px 460px at 28% 78%, rgba(16,185,129,0.10), transparent 66%);

  filter: blur(34px);
  opacity: 0.85;
  transform: translate3d(0,0,0);
  animation: drexBgBlobs 16s ease-in-out infinite alternate;
  will-change: transform;
}

/* grid overlay */
.motion-bg::after{
  content:"";
  position:absolute;
  inset:0;

  background:
    radial-gradient(900px 480px at 50% 18%, rgba(255,255,255,0.22), transparent 70%),
    linear-gradient(90deg, rgba(255,138,0,0.06), transparent 40%, rgba(99,102,241,0.05)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.18) 0px, rgba(255,255,255,0.18) 1px, transparent 1px, transparent 88px),
    repeating-linear-gradient(0deg,  rgba(255,255,255,0.12) 0px, rgba(255,255,255,0.12) 1px, transparent 1px, transparent 88px);

  opacity: 0.20;
  mix-blend-mode: overlay;
  animation: drexBgGrid 18s linear infinite;
}

/* content above bg */
.hero-minimal .container, #topView .container{
  position: relative;
  z-index: 2;
}

@keyframes drexBgBlobs{
  0%   { transform: translate(-2%, -1%) scale(1.02) rotate(0deg); }
  40%  { transform: translate(3%, 2%)  scale(1.06) rotate(6deg); }
  70%  { transform: translate(-1%, 4%) scale(1.03) rotate(10deg); }
  100% { transform: translate(4%, -2%) scale(1.07) rotate(14deg); }
}
@keyframes drexBgGrid{
  0%   { background-position: 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 0 0, 140px 0, 120px 60px, 60px 120px; }
}

/* Dark mode tuning */
[data-theme="dark"] .motion-bg{ opacity: 0.65; filter: blur(38px); }
[data-theme="dark"] .motion-bg::after{ opacity: 0.12; mix-blend-mode: screen; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .motion-bg, .motion-bg::after{ animation:none !important; }
}
/* Mobile fixed header */
@media (max-width: 768px){
  .site-header{
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 2000;
  }
  body{
    padding-top: 76px; /* header height compensation */
  }
}


/* =========================
   ADMIN: STAGES MANAGER
   ========================= */
.stages-editor{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:12px;
}
.stage-editor-card{
  border:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.12);
  padding:14px;
  border-radius:14px;
}
.stage-editor-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.stage-editor-title{
  font-weight:700;
}
/* =========================
   REGISTRATION CLOSED VIEW
   Stages in top half screen
   ========================= */
body.reg-closed #topView .container{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* the moved stage box */
body.reg-closed #topView .timeline-container{
  flex: 0 0 50vh;
  max-height: 50vh;
  overflow: auto;
  padding: 14px;
  border-radius: 16px;
}

/* leaderboard stays in remaining area */
body.reg-closed #topView #leaderboard{
  flex: 1 1 auto;
}

/* “complete css change” for stage cards */
body.reg-closed .timeline{
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

body.reg-closed .stage-card{
  min-width: 280px;
  scroll-snap-align: start;
  border-radius: 16px;
}

/* optional: tighter stage header for closed mode */
body.reg-closed .stage-header h4{
  font-size: 16px;
  line-height: 1.2;
}
.winner-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
@media (max-width:768px){.winner-grid{grid-template-columns:1fr;}}
.winner-box{padding:12px;border-radius:14px;border:1px solid rgba(255,255,255,.08);}
.winner-title{font-weight:700;margin-bottom:8px;}
.lb-badge{margin-left:8px;padding:3px 8px;border-radius:999px;font-size:12px;font-weight:700;}
.lb-badge.qual{background:rgba(34,197,94,.15);border:1px solid rgba(34,197,94,.35);}
.lb-badge.disq{background:rgba(239,68,68,.15);border:1px solid rgba(239,68,68,.35);}
.lb-badge.pend{background:rgba(234,179,8,.15);border:1px solid rgba(234,179,8,.35);}
/* =========================
   HISTORY PAGE REDESIGN
   ========================= */
.history-wrap{padding:34px 0 60px;}
.history-hero{
  display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  padding:18px;border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
}
.history-title{margin:0;font-size:30px;letter-spacing:.2px}
.history-subtitle{margin:6px 0 0;opacity:.8}
.history-hero-right{min-width:320px;display:flex;flex-direction:column;gap:10px}
.history-search .input{width:100%}
.history-filters{display:flex;flex-wrap:wrap;gap:8px}
.chip{
  padding:8px 12px;border-radius:999px;cursor:pointer;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  font-weight:700;font-size:13px;
}
.chip.active{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.25);}

.history-grid{
  margin-top:14px;
  display:grid;grid-template-columns:repeat(3,1fr);gap:14px;
}
@media (max-width:1100px){.history-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:720px){
  .history-hero{flex-direction:column;align-items:stretch}
  .history-hero-right{min-width:unset}
  .history-grid{grid-template-columns:1fr;}
}

.history-card{
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  padding:14px;
}
.history-card-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.history-card h3{margin:0;font-size:18px}
.history-meta{opacity:.8;font-size:13px;margin-top:6px;display:flex;gap:10px;flex-wrap:wrap}
.kpi-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.kpi{
  flex:1 1 90px;
  padding:10px;border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.12);
}
.kpi .k{opacity:.8;font-size:12px}
.kpi .v{font-weight:800;font-size:16px;margin-top:4px}

.history-toggle{margin-top:12px;display:flex;gap:10px;align-items:center}
.history-toggle button{padding:8px 12px;border-radius:12px}
.topteams{
  margin-top:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  overflow:hidden;
  display:none;
}
.topteams.active{display:block;}
.topteams table{width:100%;border-collapse:collapse;font-size:13px}
.topteams th,.topteams td{padding:10px;border-bottom:1px solid rgba(255,255,255,.06);text-align:left}
.topteams th{opacity:.8}

.hero-badge.live {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.hero-badge.live .badge-dot {
    background-color: #22c55e;
    box-shadow: 0 0 8px rgba(34,197,94,.6);
}
/* Fix: stage progress labels spacing */
.progress-labels #stageProgressLabels{
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.progress-labels #stageProgressLabels span{
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}
/* ===== Modal (Global) ===== */
.modal-overlay{
  position: fixed;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(8px);
  z-index: 99999;
}

.modal-card{
  width: min(560px, 100%);
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 16px;
}

.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-kicker{
  display:inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.modal-title{
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}

.modal-text{
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 14px;
}

.modal-actions{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.modal-close{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor:pointer;
}

.modal-close:hover{
  background: var(--orange-light);
  border-color: var(--orange);
}

.hidden{ display:none !important; }
