/**
 * BrettZone Master Stylesheet
 * Based on HAVOC Design System
 */

/* ============================================
   CSS Custom Properties (Theme Variables)
   ============================================ */
:root {
    /* Primary Colors */
    --primary-dark: #291C5E;
    --primary-darker: #1a1240;
    --player2-cyan: #00DAD8;
    --player2-blue: #666FE5;
    --light-purple: #C9CCF0;
    --medium-purple: #8B87C5;
    --player1-pink: #CF23CA;
    
    /* Background & Surface */
    --background-black: #0a0a0f;
    --card-bg: rgba(41, 28, 94, 0.6);
    --card-border: rgba(102, 111, 229, 0.3);
    
    /* Status Colors */
    --success-green: #22c55e;
    --danger-red: #ef4444;
    --warning-yellow: #eab308;
    
    /* Text Colors */
    --text-primary: #F4F4F4;
    --text-secondary: #9090a0;
    
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 60px;
    --header-height: 0px;
    --controls-height: 0px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* ============================================
   Base Styles & Reset
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--background-black);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(102, 111, 229, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(207, 35, 202, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 218, 216, 0.05) 0%, transparent 60%);
    z-index: -1;
    animation: bgPulse 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin-top: 0;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, var(--player2-cyan) 0%, var(--player2-blue) 50%, var(--player1-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

a {
    color: var(--player2-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--light-purple);
    text-decoration: underline;
}

/* ============================================
   Layout - Main Wrapper
   ============================================ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}


/* Mobile - no sidebar margin */
@media (max-width: 767px) {
    .main-wrapper {
        margin-left: 0;
        padding: 20px 15px;
        padding-top: 70px; /* Space for mobile header */
    }
}

/* ============================================
   Left Sidebar Navigation
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    border-right: 1px solid var(--card-border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal), transform var(--transition-normal);
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--player2-cyan) 0%, var(--player1-pink) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    font-style: italic;
    background: linear-gradient(135deg, var(--player2-cyan) 0%, var(--player1-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
}

.nav-section {
    padding: 0 15px;
    margin-bottom: 20px;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--medium-purple);
    padding: 10px 15px;
    margin-bottom: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--light-purple);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(102, 111, 229, 0.2);
    color: var(--player2-cyan);
    text-decoration: none;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--player2-blue) 0%, var(--primary-dark) 100%);
    color: white;
    border: 1px solid var(--player2-cyan);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-item-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--card-border);
}

/* Sidebar Collapse Toggle */
.sidebar-collapse-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    color: var(--light-purple);
    transition: all var(--transition-fast);
}

.sidebar-collapse-toggle:hover {
    background: rgba(102, 111, 229, 0.2);
    color: var(--player2-cyan);
}

.sidebar-collapse-toggle .collapse-icon {
    font-size: 1rem;
    transition: transform var(--transition-normal);
}

.sidebar-collapse-toggle .collapse-toggle-label {
    flex: 1;
    white-space: nowrap;
}

/* Collapsed state - rotate icon */
.sidebar-collapsed .sidebar-collapse-toggle .collapse-icon {
    transform: rotate(180deg);
}

/* Collapsed Sidebar - Manual toggle via body class */
.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

.sidebar-collapsed .sidebar-brand-text,
.sidebar-collapsed .nav-section-title,
.sidebar-collapsed .nav-item-text,
.sidebar-collapsed .collapse-toggle-label {
    display: none;
}

.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding: 20px 10px;
}

.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar-collapsed .nav-item i {
    margin: 0;
}

.sidebar-collapsed .sidebar-footer {
    padding: 15px 10px;
}

.sidebar-collapsed .sidebar-collapse-toggle {
    justify-content: center;
    padding: 10px;
}

.sidebar-collapsed .main-wrapper {
    margin-left: var(--sidebar-collapsed);
}

/* Mobile Sidebar */
@media (max-width: 767px) {
    .sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Reset collapsed state on mobile - always show full sidebar when open */
    .sidebar-collapsed .sidebar,
    .sidebar {
        width: var(--sidebar-width);
    }
    
    .sidebar-collapsed .sidebar-brand-text,
    .sidebar-collapsed .nav-section-title,
    .sidebar-collapsed .nav-item-text,
    .sidebar-collapsed .collapse-toggle-label,
    .sidebar-brand-text,
    .nav-section-title,
    .nav-item-text,
    .collapse-toggle-label {
        display: block;
    }
    
    .sidebar-collapsed .sidebar-header,
    .sidebar-header {
        justify-content: space-between;
        padding: 20px;
    }
    
    .sidebar-collapsed .nav-item,
    .nav-item {
        justify-content: flex-start;
        padding: 12px 15px;
    }
    
    .sidebar-collapsed .sidebar-footer,
    .sidebar-footer {
        padding: 15px 20px;
    }
    
    .sidebar-collapsed .sidebar-collapse-toggle,
    .sidebar-collapse-toggle {
        justify-content: flex-start;
        padding: 10px 15px;
    }
    
    /* Hide collapse toggle on mobile - not useful there */
    .sidebar-collapse-toggle {
        display: none;
    }
    
    .sidebar-collapsed .main-wrapper,
    .main-wrapper {
        margin-left: 0;
    }
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    border-bottom: 1px solid var(--card-border);
    z-index: 999;
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 767px) {
    .mobile-header {
        display: flex;
    }
}

.mobile-menu-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--player2-cyan);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.mobile-menu-btn:hover {
    background: rgba(102, 111, 229, 0.2);
}

.mobile-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    font-style: italic;
    background: linear-gradient(135deg, var(--player2-cyan) 0%, var(--player1-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.sidebar-backdrop.show {
    display: block;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--player2-cyan) 0%, var(--player2-blue) 50%, var(--player1-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   Cards
   ============================================ */
.section-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header-custom {
    background: rgba(0, 0, 0, 0.3);
    padding: 18px 24px;
    border-bottom: 1px solid var(--card-border);
}

.card-header-custom h3 {
    color: var(--player2-cyan);
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    margin: 0;
}

.card-body-custom {
    padding: 24px;
}

/* Tournament Card */
.tournament-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-normal);
    height: 100%;
}

.tournament-card:hover {
    transform: translateY(-4px);
    border-color: var(--player2-cyan);
    box-shadow: 0 8px 30px rgba(0, 218, 216, 0.15);
}

.tournament-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--card-border);
}

.tournament-card-header.active {
    background: linear-gradient(135deg, var(--danger-red) 0%, #b91c1c 100%);
}

.tournament-card-header h5 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

.tournament-card-header h5 a {
    color: white;
    text-decoration: none;
}

.tournament-card-header h5 a:hover {
    text-decoration: underline;
}

.tournament-card-body {
    padding: 20px;
}

.tournament-card-body p {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tournament-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* Clickable tournament card */
.tournament-card.clickable {
    cursor: pointer;
}

.tournament-card.clickable .tournament-card-header h5 {
    color: white;
}

/* Fight Card (horizontal scroll) */
.fight-card {
    display: inline-flex;
    align-items: center;
    width: 320px;
    height: 90px;
    margin-right: 15px;
    vertical-align: top;
    white-space: normal;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.fight-card:hover {
    transform: translateY(-4px);
    border-color: var(--player2-cyan);
    box-shadow: 0 8px 20px rgba(0, 218, 216, 0.2);
}

.fight-card-thumbnail {
    width: 130px;
    height: 90px;
    background: #000;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.fight-card-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fight-card-thumbnail .throbber {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid var(--player2-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.fight-card-body {
    padding: 12px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.fight-card-vs {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fight-card-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   Tables
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--medium-purple);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--card-border);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(102, 111, 229, 0.15);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(102, 111, 229, 0.1);
}

.data-table td a {
    color: inherit;
    text-decoration: none;
}

.data-table td a:hover {
    color: var(--player2-cyan);
    text-decoration: underline;
}

/* Bot Thumbnail in Tables */
.bot-thumbnail {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    object-fit: cover;
    border: 2px solid var(--card-border);
}

/* DataTables Integration */
.dataTables_wrapper {
    color: var(--text-primary);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-secondary);
    padding: 15px 0;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: var(--primary-dark);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--player2-cyan);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 218, 216, 0.2);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-secondary) !important;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 6px 12px;
    margin: 0 2px;
    transition: all var(--transition-fast);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(102, 111, 229, 0.2) !important;
    border-color: var(--player2-blue) !important;
    color: var(--player2-cyan) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--player2-blue) !important;
    border-color: var(--player2-cyan) !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
}

/* Primary Gradient Button */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--player2-blue) 0%, var(--primary-dark) 100%);
    border-color: var(--player2-cyan);
    color: white;
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, var(--player2-cyan) 0%, var(--player2-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 218, 216, 0.3);
    color: white;
}

/* Secondary Outline Button */
.btn-secondary {
    background: transparent;
    border-color: var(--medium-purple);
    color: var(--light-purple);
}

.btn-secondary:hover {
    border-color: var(--player2-cyan);
    color: var(--player2-cyan);
    background: rgba(0, 218, 216, 0.1);
}

/* Danger Button */
.btn-danger {
    background: transparent;
    border-color: var(--danger-red);
    color: var(--danger-red);
}

.btn-danger:hover {
    background: var(--danger-red);
    color: white;
}

/* Success Button */
.btn-success {
    background: transparent;
    border-color: var(--success-green);
    color: var(--success-green);
}

.btn-success:hover {
    background: var(--success-green);
    color: white;
}

/* Small Button */
.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================
   Form Inputs
   ============================================ */
.form-control-custom {
    background: var(--primary-dark);
    border: 1px solid var(--player2-blue);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    transition: all var(--transition-fast);
}

.form-control-custom::placeholder {
    color: var(--text-secondary);
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--player2-cyan);
    box-shadow: 0 0 15px rgba(0, 218, 216, 0.2);
}

/* Form Switch */
.form-switch-custom {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.form-switch-custom input {
    opacity: 0;
    width: 0;
    height: 0;
}

.form-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-darker);
    border: 1px solid var(--card-border);
    border-radius: 26px;
    transition: var(--transition-fast);
}

.form-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: var(--medium-purple);
    border-radius: 50%;
    transition: var(--transition-fast);
}

.form-switch-custom input:checked + .form-switch-slider {
    background-color: var(--player2-blue);
    border-color: var(--player2-cyan);
}

.form-switch-custom input:checked + .form-switch-slider:before {
    transform: translateX(24px);
    background-color: var(--player2-cyan);
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-cyan {
    background: rgba(0, 218, 216, 0.15);
    border: 1px solid rgba(0, 218, 216, 0.3);
    color: var(--player2-cyan);
}

.badge-pink {
    background: rgba(207, 35, 202, 0.15);
    border: 1px solid rgba(207, 35, 202, 0.3);
    color: var(--player1-pink);
}

.badge-blue {
    background: rgba(102, 111, 229, 0.15);
    border: 1px solid rgba(102, 111, 229, 0.3);
    color: var(--player2-blue);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success-green);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger-red);
}

.badge-warning {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: var(--warning-yellow);
}

/* ============================================
   Video Container
   ============================================ */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* ============================================
   Fights Scroll Container
   ============================================ */
.fights-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 15px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--player2-blue) var(--primary-darker);
}

.fights-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.fights-scroll-container::-webkit-scrollbar-track {
    background: var(--primary-darker);
    border-radius: 4px;
}

.fights-scroll-container::-webkit-scrollbar-thumb {
    background: var(--player2-blue);
    border-radius: 4px;
}

.fights-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--player2-cyan);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    padding: 40px 0;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 30px;
}

.hero-section.hero-compact {
    padding: 15px 0 10px;
    margin-bottom: 0;
    border-bottom: none;
}

.hero-compact .page-header {
    margin-bottom: 10px;
}

.hero-compact .page-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

/* Hero video - wider but shorter embed */
.video-container.hero-video {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 0;
    height: 400px;
}

.video-container.hero-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* ============================================
   Recent Fights Section
   ============================================ */
.recent-fights-section {
    padding: 30px 0;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 30px;
}

.recent-fights-section h3 {
    color: var(--player2-cyan);
    font-family: 'Outfit', sans-serif;
    margin-bottom: 15px;
}

/* ============================================
   Stats Banner
   ============================================ */
.stats-banner {
    background: linear-gradient(135deg, var(--player2-blue) 0%, var(--primary-dark) 100%);
    border: 1px solid var(--player2-cyan);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--player2-cyan);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--light-purple);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   Bot Images
   ============================================ */
.bot-image-container {
    padding: 10px;
    border-radius: 50%;
    display: inline-block;
}

.bot-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--player2-cyan);
    box-shadow: 0 0 20px rgba(0, 218, 216, 0.3);
    background-color: rgba(128, 128, 128, 0.15);
}

.bot-image-sm {
    width: 80px;
    height: 80px;
    border-width: 3px;
}

/* Winner Badge */
.winner {
    position: relative;
}

.winner::after {
    content: "WINNER";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--success-green) 0%, #16a34a 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

/* VS Badge */
.vs-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--danger-red) 0%, #b91c1c 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* ============================================
   Match Details Panel
   ============================================ */
.match-details {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
}

.match-details h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--player2-cyan);
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
}

.match-details p {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.match-details strong {
    color: var(--text-primary);
}

/* ============================================
   Camera List
   ============================================ */
.camera-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.camera-list li {
    cursor: pointer;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
    color: var(--text-primary);
}

.camera-list li:hover {
    background: rgba(102, 111, 229, 0.2);
    border-color: var(--player2-blue);
}

.camera-list li.active {
    background: linear-gradient(135deg, var(--player2-blue) 0%, var(--primary-dark) 100%);
    border-color: var(--player2-cyan);
    color: white;
}

.camera-list li .download-icon {
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.camera-list li .download-icon:hover {
    color: var(--player2-cyan);
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-container {
    margin-bottom: 20px;
}

.progress-bar-wrapper {
    background: var(--primary-darker);
    border-radius: 10px;
    height: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--card-border);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--player2-blue), var(--player2-cyan));
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

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

.progress-percent {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--player2-cyan);
    text-align: center;
    margin-bottom: 12px;
}

.progress-status {
    text-align: center;
    color: var(--text-primary);
    font-size: 1rem;
    margin-top: 16px;
    min-height: 24px;
}

.progress-detail {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 8px;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    margin-bottom: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background: linear-gradient(135deg, var(--success-green) 0%, #16a34a 100%);
}

.toast-error {
    background: linear-gradient(135deg, var(--danger-red) 0%, #b91c1c 100%);
}

.toast-warning {
    background: linear-gradient(135deg, var(--warning-yellow) 0%, #ca8a04 100%);
}

.toast-info {
    background: linear-gradient(135deg, var(--player2-blue) 0%, var(--primary-dark) 100%);
}

/* ============================================
   Autocomplete Dropdown
   ============================================ */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    border: 1px solid var(--card-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.autocomplete-item:hover {
    background: rgba(102, 111, 229, 0.2);
}

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

.autocomplete-item img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 50%;
    border: 2px solid var(--card-border);
}

/* ============================================
   Loading States
   ============================================ */
.loading-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 218, 216, 0.2);
    border-top-color: var(--player2-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   Grid System (Tournaments)
   ============================================ */
.tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

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

/* ============================================
   Fight Grid (As It Happens)
   ============================================ */
.fight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

@media (max-width: 767px) {
    .fight-grid {
        grid-template-columns: 1fr;
    }
    
    .fight-card {
        width: 100%;
        margin-right: 0;
    }
}

/* ============================================
   Section Dividers
   ============================================ */
.section-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--card-border), transparent);
    margin: 30px 0;
}

.date-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    gap: 15px;
}

.date-divider::before,
.date-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--card-border);
}

.date-divider span {
    color: var(--player2-cyan);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   Responsive Utilities
   ============================================ */
.d-mobile-only {
    display: none;
}

@media (max-width: 767px) {
    .d-mobile-only {
        display: block;
    }
    
    .d-mobile-hide {
        display: none !important;
    }
}

@media (max-width: 1599px) and (min-width: 768px) {
    .d-tablet-hide {
        display: none !important;
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-cyan { color: var(--player2-cyan); }
.text-pink { color: var(--player1-pink); }
.text-blue { color: var(--player2-blue); }
.text-success { color: var(--success-green); }
.text-danger { color: var(--danger-red); }
.text-warning { color: var(--warning-yellow); }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.px-3 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-4 { padding-left: 2rem; padding-right: 2rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

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

.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

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

/* ============================================
   Enhanced Mobile Styles
   ============================================ */

/* Touch-friendly tap targets */
@media (max-width: 767px) {
    .btn,
    .nav-item,
    .camera-list li,
    .tournament-card,
    .fight-card {
        min-height: 44px;
    }
    
    /* Larger touch targets for interactive elements */
    .form-control-custom,
    .form-switch-custom {
        min-height: 44px;
    }
    
    /* Stack buttons on mobile */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        border-radius: 8px !important;
    }
    
    /* Horizontal scrolling hints */
    .fights-scroll-container {
        position: relative;
    }
    
    .fights-scroll-container::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 40px;
        background: linear-gradient(90deg, transparent, var(--background-black));
        pointer-events: none;
    }
    
    /* Better table display on mobile */
    .table-responsive {
        margin: 0 -15px;
        padding: 0 15px;
        border-radius: 0;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    /* Compact cards on mobile */
    .tournament-card {
        margin-bottom: 15px;
    }
    
    .tournament-card-body {
        padding: 15px;
    }
    
    .tournament-card-actions {
        flex-direction: column;
    }
    
    .tournament-card-actions .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .tournament-card-actions .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Stats banner mobile */
    .stats-banner {
        padding: 20px 15px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Fight card mobile */
    .fight-card {
        height: auto;
        min-height: 80px;
    }
    
    .fight-card-thumbnail {
        width: 100px;
        height: 70px;
    }
    
    .fight-card-vs {
        font-size: 0.8rem;
    }
    
    .fight-card-info {
        font-size: 0.7rem;
    }
    
    /* Bot images mobile */
    .bot-image {
        width: 100px;
        height: 100px;
    }
    
    .bot-image-sm {
        width: 60px;
        height: 60px;
    }
    
    /* Page header mobile */
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    /* Search section mobile */
    .search-form {
        flex-direction: column;
    }
    
    .search-form .form-group {
        width: 100%;
    }
    
    /* Video container mobile */
    .video-container {
        padding-top: 56.25%;
        border-radius: 8px;
    }
    
    /* Hero video mobile */
    .video-container.hero-video {
        max-width: 100%;
        height: 480px;
    }
    
    .video-container.hero-video iframe {
        border-radius: 8px;
    }
    
    /* Camera list mobile */
    .camera-list li {
        padding: 14px 12px;
    }
    
    /* Controls row mobile */
    .controls-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .controls-left,
    .controls-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Small mobile devices */
@media (max-width: 375px) {
    .main-wrapper {
        padding: 15px 10px;
        padding-top: 65px;
    }
    
    .page-header h1 {
        font-size: 1.25rem;
    }
    
    .btn-sm {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .fight-card-thumbnail {
        width: 80px;
        height: 60px;
    }
}

/* Tablet landscape */
@media (min-width: 768px) and (max-width: 1024px) {
    .tournament-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fight-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Smooth scrolling for touch devices */
@media (hover: none) and (pointer: coarse) {
    .fights-scroll-container,
    .table-responsive,
    .tournament-bracket {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }
    
    .fight-card {
        scroll-snap-align: start;
    }
    
    /* Remove hover effects on touch devices */
    .tournament-card:hover,
    .fight-card:hover,
    .nav-item:hover {
        transform: none;
    }
    
    /* Active states for touch */
    .tournament-card:active,
    .fight-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .btn:active {
        transform: scale(0.95);
    }
}

/* Safe area insets for notched phones */
@supports (padding: max(0px)) {
    .main-wrapper {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    .sidebar {
        padding-left: max(0px, env(safe-area-inset-left));
    }
    
    .mobile-header {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .sidebar,
    .mobile-header,
    .sidebar-backdrop {
        display: none !important;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    body::before {
        display: none;
    }
}

