/* ============================================
   SSB STATS - Dark Glassmorphism Theme
   Color scheme inspired by Darkeum.qss
   ============================================ */

:root {
    --bg-primary: #080808;
    --bg-secondary: #0f0f0f;
    --bg-card: rgba(18, 18, 18, 0.75);
    --bg-card-solid: #141414;
    --bg-hover: rgba(32, 32, 32, 0.7);
    --accent: #607cff;
    --accent-dark: #4969ff;
    --accent-light: #8399ff;
    --accent-glow: rgba(96, 124, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a8aab8;
    --text-muted: #5a5c6e;
    --success: #4ade80;
    --success-dark: #22c55e;
    --danger: #f87171;
    --danger-dark: #ef4444;
    --warning: #fbbf24;
    --border: rgba(96, 124, 255, 0.15);
    --border-strong: rgba(96, 124, 255, 0.3);
    --scrollbar-track: rgba(255, 255, 255, 0.05);
    --scrollbar-thumb: rgba(255, 255, 255, 0.18);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.28);
    --glass-blur: 16px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Orbitron', 'Inter', sans-serif;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(96, 124, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(73, 105, 255, 0.04) 0%, transparent 60%);
}

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--accent-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   GLASS CARD
   ============================================ */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    width: 100%; /* Force full width */
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 64px;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Use a positive gap instead of negative margins */
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none; /* Good practice for links */
    margin-left: 0; /* REMOVE the negative margin */
}
.nav-logo:hover {
    color: var(--accent);
}
.logo-icon {
    font-size: 1.5rem;
}
.logo-icon-img {
    height: 30px;
    width: auto;
    display: block;
}
.logo-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 16px;
    border-radius: var(--radius-sm);

    font-weight: 500;
    font-size: 0.9rem;

    color: var(--text-secondary);

    transition: all var(--transition);

    white-space: nowrap;   /* prevents word wrapping */
}

.nav-link svg {
    width: 18px;
    height: 18px;
    opacity: 0.85;
    transition: all var(--transition);
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link:hover svg {
    transform: scale(1.15);
    opacity: 1;
}

.nav-link.active {
    background: var(--accent);
    color: #fff;
}

.nav-link.active svg {
    opacity: 1;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 64px - 60px);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 0 0 20px var(--accent-glow);
    color: #fff;
    transform: translateY(-1px);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.12);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1.05rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent-light) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-disclaimer {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    max-width: 720px;
    margin: -1.2rem auto 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ============================================
   SEARCH INPUT
   ============================================ */
.search-input,
.fighter-input,
.filter-input {
    width: 100%;
    padding: 12px 18px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition);
}
.search-input:focus,
.fighter-input:focus,
.filter-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-input::placeholder,
.fighter-input::placeholder,
.filter-input::placeholder {
    color: var(--text-muted);
}

.roster-search-wrapper {
    max-width: 400px;
    margin: 0 auto 2rem;
}

.leaderboard-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.leaderboard-controls .search-input { flex: 1; min-width: 200px; max-width: 360px; }

.lb-filter-group { display: flex; align-items: center; gap: 0.6rem; }
.lb-filter-label { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; }
.lb-min-pills { display: flex; gap: 4px; }
.lb-min-pill {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.78rem;
    font-family: var(--font-body);
    padding: 3px 10px;
    transition: all var(--transition);
}
.lb-min-pill:hover { border-color: var(--accent); color: var(--accent); }
.lb-min-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================
   ROSTER GRID
   ============================================ */
.roster-section {
    padding-bottom: 3rem;
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.fighter-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
}
.fighter-card.fade-in {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.4s ease forwards;
}

.fighter-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: var(--accent);
    box-shadow: 0 8px 32px var(--accent-glow);
    background: var(--bg-hover);
}

.fighter-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fighter-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition);
}
.fighter-card:hover .fighter-card-image img {
    transform: scale(1.05);
}

.fighter-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
}

/* Champion styling on roster cards */
.fighter-card.is-champion {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.15);
}
.card-champ-crown {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 1.1rem;
    line-height: 1;
}
.fighter-card { position: relative; }
.card-champ-titles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}
.card-champ-tag {
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fbbf24;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Champion pill on fighter profile hero */
.fighter-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 4px;
}
.current-titles-badge { display: flex; flex-wrap: wrap; gap: 8px; }
.current-champ-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Champion tag on leaderboard */
.fighter-cell-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.lb-champ-tag {
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fbbf24;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.lb-award-tag {
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(129, 140, 248, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.4);
    color: #a5b4fc;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.lb-tc-badge {
    font-size: 0.68rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(251, 191, 36, 0.2));
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #c084fc;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ============================================
   HEAD TO HEAD
   ============================================ */
.h2h-section {
    padding-bottom: 3rem;
}

.h2h-portraits {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.portrait-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.portrait-frame {
    width: 220px;
    height: 230px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--bg-card-solid);
    transition: all 0.5s ease;
}
.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stage-frame {
    width: 380px;
    height: 230px;
}

.portrait-frame.winner-glow {
    border-color: var(--success);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.4), 0 0 60px rgba(74, 222, 128, 0.15);
}
.portrait-frame.loser-dim {
    opacity: 0.65;
    border-color: var(--danger-dark);
}

.portrait-panel .autocomplete-wrapper {
    width: 220px;
}
.stage-panel .autocomplete-wrapper {
    width: 380px;
}

/* Comparison Bar */
.h2h-comparison-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.comparison-label {
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 80px;
    text-align: center;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.comparison-track {
    flex: 1;
    display: flex;
    height: 36px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.comparison-fill {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 40px;
}
.comparison-fill-left {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 18px 0 0 18px;
}
.comparison-fill-right {
    background: linear-gradient(90deg, var(--danger), #ff9b9b);
    border-radius: 0 18px 18px 0;
}
.comparison-pct {
    font-weight: 700;
    font-size: 0.85rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Filters */
.h2h-filters {
    max-width: 900px;
    margin: 0 auto 2rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.h2h-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.error-msg {
    text-align: center;
    color: var(--danger);
    margin-top: 12px;
    font-weight: 500;
    min-height: 24px;
}

/* Results */
.h2h-results {
    margin-top: 2rem;
}

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

/* ============================================
   AUTOCOMPLETE DROPDOWN
   ============================================ */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-strong);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow-lg);
}
.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background var(--transition);
    border-bottom: 1px solid var(--border);
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: var(--bg-hover);
    color: var(--accent-light);
}

/* ============================================
   COLLAPSIBLE SECTIONS
   ============================================ */
.collapsible-card {
    padding: 0 !important;
    overflow: hidden;
}

.collapsible-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    text-align: left;
    gap: 12px;
}
.collapsible-header:hover {
    background: var(--bg-hover);
}
.collapsible-header .table-title {
    margin: 0;
}

.chevron {
    font-size: 1.1rem;
    color: var(--accent);
    transition: transform var(--transition);
    flex-shrink: 0;
    display: inline-block;
}
.collapsible-header[aria-expanded="false"] .chevron {
    transform: rotate(180deg);
}

.collapsible-body {
    overflow: hidden;
    max-height: 0;
}
.collapsible-body.ready {
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.collapsible-body-inner {
    padding: 0 20px 20px;
}

/* ============================================
   STATS TABLES
   ============================================ */
.stats-table-wrapper {
    padding: 20px;
    overflow-x: auto;
}

.table-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    color: var(--accent-light);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table thead th {
    padding: 10px 14px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--accent);
    white-space: nowrap;
}

.stats-table thead th.row-label-header {
    text-align: left;
    width: 45%;
}

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

.stats-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.row-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-cell {
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pct-cell {
    color: var(--accent-light);
}

.table-separator {
    background: var(--bg-secondary) !important;
}
.separator-cell {
    text-align: center !important;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    padding: 8px !important;
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 20px !important;
}

/* ============================================
   FIGHTER PROFILE
   ============================================ */
.fighter-profile-section {
    padding-bottom: 3rem;
}

.fighter-hero {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
    justify-content: center;
}

.fighter-hero-image {
    width: 250px;
    height: 260px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--accent);
    box-shadow: 0 0 40px var(--accent-glow);
    flex-shrink: 0;
}
.fighter-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fighter-hero-info {
    flex: 1;
    min-width: 280px;
}

.fighter-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.fighter-hero-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.fighter-hero-name {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #fff, var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.fighter-nickname {
    font-size: 1.1rem;
    color: var(--accent-light);
    font-style: italic;
    margin-bottom: 0.25rem;
}
.fighter-game {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}
.fighter-bio {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 480px;
    margin-bottom: 1.25rem;
}

.current-titles-showcase {
    flex: 0 0 320px;
    display: grid;
    gap: 1rem;
    align-self: flex-start;
}

.fighter-title-card {
    padding: 1rem 1rem 1.15rem;
    border-radius: 22px;
    background:
        radial-gradient(circle at top, rgba(251, 191, 36, 0.18), transparent 52%),
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    border: 1px solid rgba(251, 191, 36, 0.24);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
}

.fighter-title-kicker {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(251, 191, 36, 0.92);
    margin-bottom: 0.35rem;
}

.fighter-title-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.fighter-title-belt-wrap {
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fighter-title-belt {
    width: 100%;
    max-width: 320px;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.fighter-title-fallback {
    width: 100%;
    max-width: 320px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 4rem;
}

.fighter-stat-cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 100px;
    padding: 20px;
    text-align: center;
}
/* Subtle streak inline stats */
.stat-card-subtle {
    flex: 1;
    min-width: 110px;
    padding: 12px 16px;
    text-align: center;
    border-left: 1px solid var(--border);
}
.subtle-value {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 3px;
}
.subtle-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.streak-win-card .subtle-value  { color: #4ade80; }
.streak-loss-card .subtle-value { color: #f87171; }

/* Active streak badge */
.active-streak-row { margin-bottom: 10px; }
.active-streak-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 10px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.win-streak-pill {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #4ade80;
}
.loss-streak-pill {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #f87171;
}
.active-streak-label {
    font-size: 0.72rem;
    font-weight: 500;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.stat-card-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Power score season table */
.ps-season-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.ps-season-table th {
    text-align: left;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ps-season-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ps-season-table tbody tr:last-child td { border-bottom: none; }
.fighter-record-table td:first-child { font-weight: 600; color: var(--text-primary); }
.fighter-record-table .stat-cell { text-align: center; }
.fighter-record-table th:not(:first-child) { text-align: center; }
.stats-card-full .fighter-record-table { display: block; }
.stats-card-full .fighter-record-table tbody { display: block; max-height: 360px; overflow-y: auto; }
.stats-card-full .fighter-record-table thead,
.stats-card-full .fighter-record-table tbody tr { display: table; width: 100%; table-layout: fixed; }

.ppv-performance-intro {
    padding: 0 20px 8px;
}

.ppv-performance-intro-copy {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.ppv-performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    padding: 0 20px 18px;
}

.ppv-performance-grid--belt {
    grid-template-columns: repeat(auto-fill, minmax(170px, 240px));
    justify-content: start;
}

.ppv-performance-tile {
    border: 1px solid var(--ppv-border, rgba(255,255,255,0.08));
    border-radius: 14px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
        linear-gradient(135deg, var(--ppv-tint, transparent), transparent 70%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        inset 0 0 0 999px var(--ppv-tint, transparent);
}

.ppv-performance-tile--low-sample {
    opacity: 0.82;
}

.ppv-performance-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 55%),
        linear-gradient(135deg, rgba(18, 24, 38, 0.96), rgba(10, 14, 24, 0.98));
}

.ppv-performance-logo-wrap--belt {
    aspect-ratio: 4 / 3;
}

.ppv-performance-logo-wrap--fallback {
    padding: 0.9rem;
}

.ppv-performance-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.4rem;
    transform: translateY(3%) scale(1.15);
    transform-origin: center;
    position: relative;
    z-index: 1;
}

.ppv-performance-logo--belt {
    padding: 0.8rem;
    transform: scale(1.08);
}

.ppv-performance-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)),
        linear-gradient(135deg, var(--ppv-tint, transparent), transparent 65%);
    opacity: 1;
}

.ppv-performance-pct {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 2px rgba(0,0,0,0.28);
    background: rgba(7, 10, 18, 0.32);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 0.2rem 0.45rem;
}

.ppv-performance-meta {
    padding: 0.8rem 0.85rem 0.9rem;
}

.ppv-performance-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 0.25rem;
}

.ppv-performance-record {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.ppv-performance-record span {
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 0.3rem;
}

.ppv-performance-fallback {
    position: relative;
    z-index: 1;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.25;
}

.format-spotlight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 0.9rem;
}

.format-spotlight-card {
    border: 1px solid var(--format-border, rgba(255,255,255,0.08));
    border-radius: 14px;
    padding: 0.9rem 0.95rem;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
        linear-gradient(135deg, var(--format-tint, transparent), transparent 72%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        inset 0 0 0 999px var(--format-tint, transparent);
}

.format-spotlight-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.65rem;
}

.format-spotlight-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.format-spotlight-pct {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
}

.format-spotlight-bar {
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.07);
    margin-bottom: 0.6rem;
}

.format-spotlight-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--format-border, rgba(255,255,255,0.2)), rgba(255,255,255,0.95));
}

.format-spotlight-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.format-table-note {
    margin: 0 0 0.8rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.fighter-record-table-compact th:first-child,
.fighter-record-table-compact td:first-child {
    width: 42%;
}

.brand-performance-grid {
    display: grid;
    gap: 12px;
}

.brand-performance-card {
    border: 1px solid var(--brand-border, rgba(255,255,255,0.08));
    border-radius: 14px;
    padding: 0.95rem 1rem;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
        linear-gradient(135deg, var(--brand-tint, transparent), transparent 72%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        inset 0 0 0 999px var(--brand-tint, transparent);
}

.brand-performance-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.7rem;
}

.brand-performance-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-performance-pct {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--text-primary);
}

.brand-performance-bar {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.07);
    margin-bottom: 0.7rem;
}

.brand-performance-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-border, rgba(255,255,255,0.2)), rgba(255,255,255,0.95));
}

.brand-performance-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Stage Treemap */
.stage-bubble-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.76rem;
    color: var(--text-secondary);
}
.stage-heatmap-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px 16px 8px;
    align-items: center;
}
.stage-heatmap-search {
    min-width: 0;
}
.stage-heatmap-input {
    width: 100%;
}
.stage-heatmap-result {
    grid-column: 1 / -1;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.stage-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.stage-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.treemap-container {
    position: relative;
    width: 100%;
    padding-bottom: 52.5%;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}
.treemap-tile {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, z-index 0s;
    border: 1px solid rgba(0,0,0,0.4);
    box-sizing: border-box;
}
.treemap-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.treemap-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.55;
    transition: opacity 0.15s ease;
}
.treemap-tile:hover .treemap-overlay {
    opacity: 0.3;
}
.treemap-tile:hover {
    z-index: 2;
    border-color: rgba(255,255,255,0.4);
}
.treemap-tile-highlighted {
    z-index: 4;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.92), 0 0 0 2px rgba(96,124,255,0.35);
    transform: scale(1.02);
}
.treemap-tile-dimmed {
    opacity: 0.28;
}
.treemap-label {
    position: relative;
    z-index: 1;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6);
    text-align: center;
    line-height: 1.15;
    padding: 0 4px;
    max-width: 95%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.treemap-record {
    position: relative;
    z-index: 1;
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,0.5);
}


.ps-score-cell { font-weight: 700; font-family: var(--font-heading); }
.ps-rank-cell  { color: var(--text-secondary); font-size: 0.85rem; }
.ps-tier-5 { color: #34d399; }
.ps-tier-4 { color: #84cc16; }
.ps-tier-3 { color: #facc15; }
.ps-tier-2 { color: #fb923c; }
.ps-tier-1 { color: #f87171; }

/* Leaderboard power score column */
.power-col { font-weight: 700; }
.ps-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent), 0 0 12px rgba(96, 124, 255, 0.4);
    flex-shrink: 0;
}
.ps-tier-5 .ps-dot { background: #34d399; box-shadow: 0 0 6px #34d399, 0 0 12px rgba(52,211,153,0.4); }
.ps-tier-4 .ps-dot { background: #84cc16; box-shadow: 0 0 6px #84cc16, 0 0 12px rgba(132,204,22,0.4); }
.ps-tier-3 .ps-dot { background: #facc15; box-shadow: 0 0 6px #facc15, 0 0 12px rgba(250,204,21,0.4); }
.ps-tier-2 .ps-dot { background: #fb923c; box-shadow: 0 0 6px #fb923c, 0 0 12px rgba(251,146,60,0.4); }
.ps-tier-1 .ps-dot { background: #f87171; box-shadow: 0 0 6px #f87171, 0 0 12px rgba(248,113,113,0.4); }

/* H2H power score compare table */
.ps-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.ps-compare-table th {
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ps-compare-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ps-compare-table tbody tr:last-child td { border-bottom: none; }
.ps-season-label { text-align: center; color: var(--text-secondary); font-weight: 600; }
.ps-right { text-align: right; }
.ps-winner { text-shadow: 0 0 8px currentColor; }

/* Career power score table header rows */
.ps-name-row th { border-bottom: none; padding-bottom: 2px; }
.ps-fighter-name {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}
.ps-fighter-left  { text-align: left; }
.ps-fighter-right { text-align: right; }
.ps-subheader-row th {
    padding-top: 2px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.7;
}
.ps-col-label:first-child, .ps-col-label:nth-child(2) { text-align: left; }
.ps-col-label:nth-child(4), .ps-col-label:last-child  { text-align: right; }
.ps-season-label-th { text-align: center; }

/* H2H power score season mode side-by-side */
.ps-season-sidebyside {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px 0 8px;
    flex-wrap: wrap;
}
.ps-sb-card {
    flex: 1;
    min-width: 140px;
    max-width: 220px;
    text-align: center;
    padding: 16px 12px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    transition: border-color 0.2s;
}
.ps-sb-card.ps-winner {
    border-color: rgba(251,191,36,0.4);
    box-shadow: 0 0 16px rgba(251,191,36,0.12);
}
.ps-sb-fighter {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.ps-sb-season {
    font-size: 0.72rem;
    color: var(--text-muted, #6b7280);
    margin-bottom: 12px;
}
.ps-sb-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}
.ps-sb-score {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
}
.ps-sb-rank {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 700;
}
.ps-sb-vs {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted, #6b7280);
}

/* ---- Accolades Section ---- */
.accolades-section {
    margin-bottom: 24px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(var(--glass-blur));
}
.accolades-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.accolades-group { display: contents; }
.accolade-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}
.champ-badge {
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fbbf24;
}
.award-badge {
    background: rgba(96, 124, 255, 0.12);
    border: 1px solid var(--border-strong);
    color: var(--accent-light);
}
.event-badge {
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.35);
    color: #c4b5fd;
}
.triple-crown-badge {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(251, 191, 36, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #c084fc;
    font-weight: 700;
}
.major-winner-badge {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(234, 179, 8, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.45);
    color: #fbbf24;
    font-weight: 700;
}
.super-major-winner-badge {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(251, 146, 60, 0.15));
    border: 1px solid rgba(251, 191, 36, 0.6);
    color: #fcd34d;
    font-weight: 700;
}
.badge-icon { font-size: 1rem; }
.badge-season { font-size: 0.75rem; opacity: 0.7; margin-left: 4px; }


/* ---- Wide table scroll (holistic view) ---- */
.table-scroll-wrapper { overflow-x: auto; }
.table-scroll-wrapper .stats-table { min-width: 600px; }

.stats-grid-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: -8px;
}
.collapse-all-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.5px;
}
.collapse-all-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.collapse-all-icon {
    font-size: 0.9rem;
}

.fighter-stats-section {
    margin-top: 2rem;
}

.fighter-stats-shell {
    position: relative;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    overflow: hidden;
}

.fighter-stats-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent 32%);
    pointer-events: none;
}

.fighter-stats-intro {
    position: relative;
    z-index: 1;
    margin-bottom: 1.4rem;
    padding: 0 0.25rem;
}

.fighter-stats-kicker {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: var(--accent-light);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.fighter-stats-heading {
    margin: 0 0 0.35rem;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    line-height: 1.1;
    color: var(--text-primary);
}

.fighter-stats-copy {
    max-width: 700px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.fighter-stats-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: start;
}

.fighter-stats-card {
    position: relative;
    overflow: hidden;
    min-height: 100%;
    padding: 1.15rem 1.2rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(28, 31, 39, 0.94), rgba(18, 20, 28, 0.9)),
        rgba(16, 18, 24, 0.82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.fighter-stats-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
    opacity: 1;
}

.fighter-stats-card-feature {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 34%),
        linear-gradient(180deg, rgba(34, 37, 47, 0.96), rgba(18, 20, 28, 0.92));
}

.fighter-stats-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.fighter-stats-card-header .analytics-chart-subtitle {
    margin-bottom: 0;
}

.fighter-stats-card-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 0.95rem;
    color: rgba(233, 239, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.14);
}

.fighter-stats-canvas {
    position: relative;
    min-height: 240px;
}

.fighter-stats-canvas-compact {
    height: 240px;
}

.stats-card-full {
    grid-column: 1 / -1;
}

/* ============================================
   LEADERBOARD
   ============================================ */
.leaderboard-section {
    padding-bottom: 3rem;
}

.leaderboard-wrapper {
    padding: 24px;
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table thead th {
    padding: 12px 10px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--accent);
    cursor: default;
}

.leaderboard-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color var(--transition);
}
.leaderboard-table thead th.sortable:hover {
    color: var(--accent-light);
}
.leaderboard-table thead th.sortable.active {
    color: var(--accent);
}
.leaderboard-table thead th.sortable::after {
    content: ' \25BC';
    font-size: 0.65rem;
    opacity: 0.3;
}
.leaderboard-table thead th.sortable.active::after {
    opacity: 1;
}
.leaderboard-table thead th.sortable.active.asc::after {
    content: ' \25B2';
}

/* Season archive table sortable headers */
.leaderboard-table thead th.sr-sortable {
    cursor: pointer;
    user-select: none;
    transition: color var(--transition);
}
.leaderboard-table thead th.sr-sortable:hover { color: var(--accent-light); }
.leaderboard-table thead th.sr-sortable.sr-active { color: var(--accent); }
.leaderboard-table thead th.sr-sortable::after {
    content: ' \25BC';
    font-size: 0.65rem;
    opacity: 0.3;
}
.leaderboard-table thead th.sr-sortable.sr-active::after { opacity: 1; }
.leaderboard-table thead th.sr-sortable.sr-active.sr-asc::after { content: ' \25B2'; }

.leaderboard-table thead th.rank-col {
    width: 60px;
}
.leaderboard-table thead th.fighter-col {
    text-align: left;
}

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

.leaderboard-table tbody td {
    padding: 10px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.rank-cell {
    text-align: center;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-muted);
}
.rank-cell.rank-1 {
    color: #fbbf24;
    font-size: 1.2rem;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
}
.rank-cell.rank-2 {
    color: #c0c0c0;
    font-size: 1.1rem;
}
.rank-cell.rank-3 {
    color: #cd7f32;
    font-size: 1.05rem;
}

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

.leaderboard-portrait {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.fighter-link {
    font-weight: 600;
}

.pct-high {
    color: var(--success) !important;
}
.pct-mid {
    color: var(--warning) !important;
}
.pct-low {
    color: var(--danger) !important;
}

/* ============================================
   GRAPHS
   ============================================ */
.graphs-section {
    padding-bottom: 3rem;
}

.graph-controls {
    display: flex;
    gap: 16px;
    max-width: 500px;
    margin: 0 auto 2rem;
    padding: 16px 20px;
    align-items: center;
}
.graph-controls .autocomplete-wrapper {
    flex: 1;
}

.fighter-hero {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 24px 32px;
    margin-bottom: 2rem;
}
.hero-portrait {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px var(--accent-glow));
}
.hero-info {
    flex: 1;
}
.hero-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: 1px;
}
.hero-stats {
    display: flex;
    gap: 40px;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.hero-stat-val {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}
.hero-stat-val.win { color: var(--success); }
.hero-stat-val.loss { color: var(--danger); }
.hero-stat-val.accent { color: var(--accent-light); }
.hero-stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.chart-card {
    padding: 24px;
}
.chart-card.chart-wide {
    grid-column: span 3;
}
.chart-card.chart-2col {
    grid-column: span 2;
}

.chart-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--accent-light);
    letter-spacing: 0.5px;
}

.chart-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
}
.chart-container-wide {
    aspect-ratio: 3 / 1;
    min-height: 300px;
}
.chart-container-combo {
    position: relative;
    width: 100%;
    height: 280px;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 16px;
}
.loading-overlay p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   FOOTER
   ============================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 20px 2rem;
    text-align: center;
}
.footer-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-disclaimer {
    margin-top: 8px;
    font-size: 0.7rem !important;
    opacity: 0.5;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
    50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 60px rgba(96, 124, 255, 0.15); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 26, 0.95);
        backdrop-filter: blur(20px);
        padding: 16px;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.show {
        display: flex;
    }
    .nav-toggle {
        display: flex;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }
    .chart-card.chart-wide,
    .chart-card.chart-2col {
        grid-column: span 1;
    }
    .fighter-hero {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 20px;
    }
    .hero-stats {
        justify-content: center;
        gap: 24px;
    }

    .h2h-portraits {
        flex-direction: column;
        align-items: center;
    }
    .portrait-frame {
        width: 180px;
        height: 190px;
    }
    .stage-frame {
        width: 300px;
        height: 180px;
    }
    .portrait-panel .autocomplete-wrapper,
    .stage-panel .autocomplete-wrapper {
        width: 100%;
        max-width: 300px;
    }

    .fighter-hero {
        text-align: center;
    }
    .fighter-hero-top {
        flex-direction: column;
        align-items: center;
    }
    .fighter-hero-copy {
        width: 100%;
    }
    .current-titles-showcase {
        width: 100%;
        max-width: 420px;
        flex: 1 1 auto;
    }
    .fighter-bio {
        max-width: 100%;
    }
    .fighter-hero-name {
        font-size: 1.8rem;
    }
    .fighter-stats-shell {
        padding: 1.15rem;
        border-radius: 22px;
    }
    .fighter-stats-heading {
        font-size: 1.35rem;
    }
    .fighter-stats-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .stats-card-full {
        grid-column: auto;
    }

    .h2h-comparison-bar {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 900px) and (min-width: 601px) {
    .roster-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .main-content {
        padding: 1rem;
    }
    .fighter-title-card {
        padding: 0.9rem;
    }
    .fighter-title-belt-wrap,
    .fighter-title-fallback {
        min-height: 140px;
    }
    .fighter-title-belt {
        max-width: 100%;
    }
    .roster-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .fighter-card-name {
        font-size: 0.75rem;
    }
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    background-clip: padding-box;
}

/* ============================================
   SEASON ARCHIVE & POWER RANKINGS TOGGLE
   ============================================ */

.seasons-section {
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.season-page-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: end;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
}

.season-page-kicker,
.season-pills-kicker,
.season-hero-kicker,
.season-card-kicker {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f6d17a;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.season-page-meta {
    min-width: 180px;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: right;
}

.season-page-meta-label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.season-page-meta-value {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-primary);
}

.season-pills-wrap {
    padding: 1rem 1.25rem 1.1rem;
    margin-bottom: 1.25rem;
}

.season-pills-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.season-pills-title {
    font-size: 0.98rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Season pill selector (shared between Power Rankings and Season Archive) */
.season-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
}

.season-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition);
}

.season-pill:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.season-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}

.season-heading {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--accent-light);
    margin-bottom: 0.35rem;
    letter-spacing: 0.05em;
}

.season-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: end;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.15rem;
}

.season-hero-copy {
    color: var(--text-secondary);
    max-width: 760px;
}

.season-hero-tagline {
    font-family: var(--font-heading);
    color: #f6d17a;
    text-align: right;
    line-height: 1.4;
    max-width: 260px;
}

/* Two-column grid for events + awards */
.season-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.season-card {
    padding: 1.25rem 1.5rem;
}

.season-section-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
        rgba(10, 14, 22, 0.62);
    border: 1px solid rgba(255,255,255,0.08);
}

.season-card-shell {
    padding: 1.25rem 1.5rem 0.75rem;
}

.season-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.season-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 0;
}

.season-card-chip {
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-size: 0.76rem;
    white-space: nowrap;
}

.season-card-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.season-timeline-body {
    padding: 0 1.5rem 1.25rem;
}

.season-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.season-highlight-row {
    display: grid;
    grid-template-columns: 1.5rem 1fr 1fr;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}

.season-highlight-row:last-child {
    border-bottom: none;
}

.highlight-icon {
    font-size: 1rem;
    text-align: center;
}

.highlight-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.highlight-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.empty-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

.season-rankings-card .table-scroll-wrapper {
    padding: 0 1.25rem 1.25rem;
}

/* Power Rankings subtitle */
#rankingsSubtitle {
    transition: opacity 0.2s ease;
}

@media (max-width: 700px) {
    .season-top-grid,
    .season-page-intro,
    .season-hero {
        grid-template-columns: 1fr;
    }

    .season-page-meta,
    .season-hero-tagline {
        text-align: left;
        max-width: none;
    }

}

@media (max-width: 560px) {
    .season-highlight-row {
        grid-template-columns: 1.5rem 1fr;
    }

    .highlight-value {
        grid-column: 2;
        text-align: left;
    }
}

/* ============================================
   CHAMPIONSHIP TIMELINE
   ============================================ */

.champ-page-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.champ-page-copy {
    max-width: 760px;
}

.champ-page-kicker {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: var(--accent-light);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.champ-page-heading {
    margin: 0 0 0.35rem;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    line-height: 1.15;
    color: var(--text-primary);
}

.champ-page-text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
}

.champ-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

.champ-summary-card {
    padding: 1rem 1.1rem;
    border-color: rgba(255,255,255,0.08);
    background: rgba(18, 18, 18, 0.58);
}

.champ-summary-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.champ-summary-value {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.champ-summary-note {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.champ-timeline-row {
    margin-bottom: 1.5rem;
}

.champ-timeline-row:last-child {
    margin-bottom: 0;
}

.champ-timeline-label {
    font-size: 0.8rem;
    font-family: var(--font-heading);
    letter-spacing: 0.06em;
    color: var(--accent-light);
    margin-bottom: 0.15rem;
    text-transform: uppercase;
}

.champ-belt-card {
    padding: 1rem 1.1rem 1.15rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(18, 18, 18, 0.5);
}

.champ-belt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.4rem;
    margin-bottom: 1rem;
}

.champ-belt-title-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 auto;
    min-width: 0;
}

.champ-belt-icon {
    width: 17rem;
    height: 9.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    flex: 0 0 auto;
    overflow: hidden;
}

.champ-belt-button {
    appearance: none;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.champ-belt-button:hover,
.champ-belt-button:focus-visible {
    border-color: rgba(99, 102, 241, 0.65);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.18), rgba(255,255,255,0.05));
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.28), 0 10px 26px rgba(99, 102, 241, 0.18);
    transform: translateY(-1px);
}

.champ-belt-button:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.9);
    outline-offset: 3px;
}

.champ-belt-icon-image-wrap {
    padding: 0.45rem 0.7rem;
}

.champ-belt-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.champ-belt-icon-fallback {
    font-size: 3.5rem;
}

.champ-belt-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.45rem;
}

.champ-belt-fact {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.36rem 0.72rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    min-height: 2.2rem;
}

.champ-belt-fact-button {
    appearance: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.champ-belt-fact-label {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.champ-belt-fact-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.champ-belt-title-wrap .champ-timeline-label {
    font-size: 1.35rem;
    line-height: 1.1;
}

.champ-belt-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.champ-belt-stat {
    font-size: 0.95rem;
}

.champ-belt-overlay-panel {
    max-width: min(1200px, 96vw);
    overflow: visible;
}

.champ-belt-overlay-body {
    padding: 1rem 1.25rem 1.4rem;
}

.champ-belt-overlay-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.champ-belt-fact-button:hover,
.champ-belt-fact-button:focus-visible {
    border-color: rgba(251, 191, 36, 0.28);
    background: rgba(251, 191, 36, 0.08);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.08);
    outline: none;
}

.champ-belt-fact-button:hover .champ-belt-fact-label,
.champ-belt-fact-button:focus-visible .champ-belt-fact-label {
    color: rgba(251, 191, 36, 0.82);
}

.champ-belt-fact-button:hover .champ-belt-fact-value,
.champ-belt-fact-button:focus-visible .champ-belt-fact-value {
    color: #fcd34d;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.18);
}

.champ-belt-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.champ-belt-stat {
    font-size: 0.74rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    white-space: nowrap;
}

.champ-belt-stat strong {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.8rem;
}

.champ-timeline-bar {
    display: flex;
    align-items: stretch;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 90px;
    border: 1px solid var(--border);
}

.champ-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.4rem;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    text-align: center;
    min-width: 70px;
    gap: 0.2rem;
    transition: background var(--transition);
}

.champ-segment:hover {
    background: var(--bg-hover);
}

.champ-segment:last-child {
    border-right: none;
}

.champ-segment-last {
    background: rgba(74, 222, 128, 0.07);
    border-left: 2px solid rgba(74, 222, 128, 0.7);
}

.champ-segment-focus {
    background: rgba(251, 191, 36, 0.16);
    border-left-color: rgba(251, 191, 36, 0.9);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.24);
}

.champ-segment-longest {
    background: rgba(251, 191, 36, 0.08);
}

.champ-longest-star {
    font-size: 0.75rem;
    line-height: 1;
}

.champ-legend {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
}

.champ-segment-last:first-child {
    border-left: none;
}

.champ-seg-portrait {
    width: 38px;
    height: 38px;
    object-fit: contain;
    object-position: center top;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

.champ-seg-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    text-decoration: none;
}

.champ-seg-name:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

.champ-seg-months {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Season divider inside all-time championship bar */
.champ-season-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.65rem;
    font-family: var(--font-heading);
    color: var(--accent);
    background: rgba(96, 124, 255, 0.12);
    border-left: 1px solid var(--accent);
    border-right: none;
    padding: 0.4rem 0.2rem;
    flex-shrink: 0;
    width: 20px;
    letter-spacing: 0.05em;
}

.champ-season-divider-first {
    border-left: none;
    border-right: 1px solid rgba(96, 124, 255, 0.3);
    background: transparent;
}

/* Tag team segment: two fighters in one block */
.champ-segment-tag {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.1rem 0.4rem;
}

.champ-tag-fighter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.champ-tag-amp {
    font-size: 0.7rem;
    color: var(--text-muted);
    align-self: center;
    flex-shrink: 0;
}

/* ============================================
   SCROLLABLE CHAMPIONSHIP BARS (all-time tab)
   ============================================ */

.champ-scroll-wrapper {
    position: relative;
}

/* Left-edge gradient fade — visible after scrolling away from start */
.champ-scroll-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 6px;
    width: 64px;
    background: linear-gradient(to left, transparent, var(--bg-deep, #0a0a1a));
    pointer-events: none;
    border-radius: var(--radius) 0 0 var(--radius);
    transition: opacity 0.25s;
    opacity: 0;
    z-index: 1;
}

.champ-scroll-wrapper.champ-scroll-has-left::before {
    opacity: 1;
}

/* Right-edge gradient fade — hints there's more to scroll */
.champ-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 6px; /* above scrollbar */
    width: 64px;
    background: linear-gradient(to right, transparent, var(--bg-deep, #0a0a1a));
    pointer-events: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    transition: opacity 0.25s;
    z-index: 1;
}

/* Hide the right fade once scrolled to the end */
.champ-scroll-wrapper.champ-scroll-at-end::after {
    opacity: 0;
}

.champ-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;   /* room for the scrollbar */
    /* Styled scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.champ-scroll-container::-webkit-scrollbar       { height: 4px; }
.champ-scroll-container::-webkit-scrollbar-track { background: var(--scrollbar-track); border-radius: 999px; }
.champ-scroll-container::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 999px; }

/* The bar itself must NOT shrink — let it be as wide as its content */
.champ-scroll-container .champ-timeline-bar {
    width: max-content;
    min-width: 100%;
}

/* Bigger segments for the all-time championships page */
.champ-all-time .champ-timeline-bar {
    min-height: 120px;
}

.champ-all-time .champ-segment {
    min-width: 100px;
    padding: 0.8rem 0.5rem;
}

.champ-all-time .champ-seg-portrait {
    width: 52px;
    height: 52px;
}

.champ-all-time .champ-seg-name {
    font-size: 0.72rem;
}

.champ-all-time .champ-season-divider {
    width: 22px;
    font-size: 0.7rem;
}

@media (max-width: 900px) {
    .champ-page-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .champ-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .champ-belt-header {
        flex-direction: column;
    }

    .champ-belt-stats {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .champ-summary-strip {
        grid-template-columns: 1fr;
    }

    .champ-page-heading {
        font-size: 1.25rem;
    }

    .champ-belt-card {
        padding: 0.9rem;
    }

    .champ-belt-header {
        gap: 0.75rem;
    }

    .champ-belt-title-wrap {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .champ-belt-icon,
    .champ-belt-icon-image-wrap,
    .champ-belt-button {
        width: 100%;
        max-width: 100%;
    }

    .champ-belt-icon {
        height: 7rem;
        border-radius: 18px;
    }

    .champ-belt-icon-image-wrap {
        padding: 0.3rem 0.4rem;
    }

    .champ-belt-subtitle {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.45rem;
        margin-top: 0.3rem;
    }

    .champ-belt-fact {
        width: 100%;
        justify-content: space-between;
    }

    .champ-belt-stats {
        width: 100%;
        justify-content: center;
    }

    .champ-all-time .champ-season-divider {
        width: 18px;
        font-size: 0.62rem;
    }
}

/* ============================================
   FIGHT LOG PAGE
   ============================================ */

.fight-filters {
    padding: 1.35rem 1.45rem 1.2rem;
    margin-bottom: 1.25rem;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)),
        radial-gradient(circle at top right, rgba(228,190,109,0.12), transparent 36%);
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.18);
}

.fight-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.fight-filter-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #f1d38a;
    margin-bottom: 0.35rem;
}

.fight-filter-title {
    margin: 0;
    font-size: 1.22rem;
    color: var(--text-primary);
}

.fight-filter-copy {
    margin: 0.35rem 0 0;
    max-width: 46rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.fight-filter-summary {
    min-width: 124px;
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    text-align: right;
}

.fight-filter-summary-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.fight-filter-summary strong {
    display: block;
    margin-top: 0.2rem;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    color: var(--text-primary);
}

.fight-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.fight-filter-group {
    padding: 0.75rem 0.8rem 0.8rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
}

.fight-filter-group-featured {
    grid-column: span 2;
}

.fight-fighter-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.fight-fighter-builder {
    display: grid;
    gap: 0.6rem;
}

.fight-fighter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
    align-items: center;
}

.fight-fighter-row:not([data-row="1"]) {
    grid-template-columns: 92px minmax(0, 1fr) auto;
}

.fight-fighter-row.is-hidden {
    display: none;
}

.fight-filter-operator {
    min-width: 92px;
    text-transform: uppercase;
    font-weight: 700;
}

.fight-add-filter-btn,
.fight-remove-filter-btn {
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.fight-add-filter-btn {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    padding: 0.5rem 0.85rem;
}

.fight-add-filter-btn:hover:not(:disabled),
.fight-remove-filter-btn:hover {
    transform: translateY(-1px);
}

.fight-add-filter-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.fight-remove-filter-btn {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    color: var(--text-muted);
    padding: 0.58rem 0.75rem;
}

.fight-filter-microcopy {
    margin: 0.55rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.fight-filter-microcopy strong {
    color: var(--text-primary);
}

.fight-filter-group label {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.fight-filter-input {
    width: 100%;
    background: rgba(12, 13, 18, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 0.58rem 0.78rem;
    font-size: 0.86rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.fight-filter-input:focus {
    border-color: rgba(228, 190, 109, 0.45);
    background: rgba(15, 17, 24, 0.78);
    box-shadow: 0 0 0 3px rgba(228, 190, 109, 0.09);
}

.fight-filter-input option {
    background: #1a1a2e;
    color: var(--text-primary);
}

.fight-filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.15rem;
}

.fight-filter-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.fight-filter-clear-btn {
    border: 1px solid rgba(228, 190, 109, 0.24);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
    color: #f2d89b;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.fight-filter-clear-btn:hover,
.fight-filter-clear-btn:focus-visible {
    border-color: rgba(228, 190, 109, 0.42);
    background: linear-gradient(180deg, rgba(228,190,109,0.14), rgba(255,255,255,0.05));
    color: #fff1c9;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

/* Fight list container */
.fight-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Single fight row */
.fight-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fight-row:hover {
    border-color: rgba(228, 190, 109, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.fight-row:hover .fight-row-main,
.fight-row:focus-within .fight-row-main {
    background: linear-gradient(90deg, rgba(255,255,255,0.035), rgba(228,190,109,0.05));
}

/* Fighter-page perspective indicator: big W or L on far left */
.fight-row.perspective-win .fight-row-main,
.fight-row.perspective-loss .fight-row-main {
    position: relative;
    padding-left: 2.75rem;
}

.fight-row.perspective-win .fight-row-main::before,
.fight-row.perspective-loss .fight-row-main::before {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.fight-row.perspective-win .fight-row-main::before {
    content: 'W';
    background: rgba(74, 222, 128, 0.12);
    color: var(--success);
    border-right: 2px solid rgba(74, 222, 128, 0.25);
}

.fight-row.perspective-loss .fight-row-main::before {
    content: 'L';
    background: rgba(248, 113, 113, 0.09);
    color: var(--danger);
    border-right: 2px solid rgba(248, 113, 113, 0.2);
}

.fight-row-main {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.fight-meta-col {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 1rem;
}

.fight-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

.fight-badge-season     { background: rgba(96,124,255,0.2);  color: #8399ff; }
.fight-badge-type       { background: rgba(96,124,255,0.1);  color: var(--text-secondary); border: 1px solid rgba(96,124,255,0.25); }
.fight-badge-contender  { background: rgba(74,222,128,0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.fight-badge-champ      { background: rgba(251,191,36,0.15); color: #fbbf24; }
.fight-badge-ppv        { background: rgba(167,139,250,0.15);color: #a78bfa; }

.fight-location-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}
.fight-location-thumb {
    height: 32px;
    width: 56px;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0.85;
    flex-shrink: 0;
}
.fight-location-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Participants column */
.fight-participants-col {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex-wrap: wrap;
}

.fight-side {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.fight-fighter-chip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.fight-portrait {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
}

.fight-fighter-name {
    font-size: 0.82rem;
    color: var(--text-primary);
    white-space: nowrap;
    text-decoration: none;
}

.fight-fighter-name:hover {
    color: var(--accent);
}

.fight-side-win .fight-fighter-name {
    font-weight: 600;
}

/* Free-for-all: multi-person non-team match — all fighters with vs between them */
.fight-side-ffa {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.fight-side-ffa .fight-vs-divider {
    flex-shrink: 0;
}

/* Chip win/loss tinting */
.chip-win {
    background: rgba(74, 222, 128, 0.06);
    border-radius: 6px;
    padding: 0.1rem 0.3rem;
}

.chip-loss {
    opacity: 0.75;
}

/* Inline W/L badge on each chip */
.fight-chip-result {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.fight-chip-result.win  { background: rgba(74,222,128,0.2);   color: var(--success); }
.fight-chip-result.loss { background: rgba(248,113,113,0.12); color: var(--danger);  }

/* & connector between tag team partners */
.fight-amp {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0 0.1rem;
    flex-shrink: 0;
}

.fight-vs-divider {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
    padding: 0 0.2rem;
}

.fight-overflow-chip {
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
}

/* ---- Compare Against Widget ---- */
.compare-against-section {
    margin-bottom: 1.5rem;
}

.compare-against-card {
    padding: 1rem 1.5rem;
}

.ca-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ca-icon {
    font-size: 1rem;
    opacity: 0.7;
}

.ca-title {
    color: var(--accent);
}

.ca-body {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ca-fighter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 60px;
}

.ca-portrait {
    width: 52px;
    height: 52px;
    object-fit: contain;
    object-position: center top;
    border-radius: 8px;
    background: rgba(96, 124, 255, 0.05);
    transition: opacity 0.2s;
}

.ca-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ca-opponent-name {
    color: #fb923c;
}

.ca-vs {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(176, 184, 209, 0.4);
    letter-spacing: 0.05em;
}

.ca-search-wrap {
    flex: 1;
    min-width: 160px;
    max-width: 320px;
}

.ca-input {
    width: 100%;
    padding: 8px 14px;
    font-size: 0.85rem;
}

.ca-btn {
    white-space: nowrap;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

/* Fighter page — advanced analytics collapsible */
.fighter-advanced-analytics {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.fighter-advanced-analytics .fight-history-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(18, 18, 18, 0.56);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.025),
        0 10px 28px rgba(0, 0, 0, 0.18);
}

.fighter-advanced-analytics .fight-history-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
    opacity: 0.9;
    pointer-events: none;
}

.fighter-advanced-analytics .fight-history-header {
    justify-content: flex-start;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.fighter-analytics-intro {
    margin-bottom: 0;
    padding: 0;
}

.fighter-analytics-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}

.fighter-analytics-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    font-size: 1rem;
    color: rgba(233, 239, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.14);
}

.advanced-analytics-content {
    padding: 1.25rem 1.5rem 1.5rem;
    display: grid;
    gap: 1rem;
}

.analytics-chart-wrapper {
    position: relative;
    overflow: hidden;
    padding: 1.15rem 1.2rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(28, 31, 39, 0.94), rgba(18, 20, 28, 0.9)),
        rgba(16, 18, 24, 0.82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.analytics-chart-wrapper::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
    opacity: 1;
    pointer-events: none;
}

.analytics-chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.2rem;
}

.analytics-chart-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.analytics-chart-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding-bottom: 0.5rem; /* room for scrollbar */
}

.analytics-chart-scroll::-webkit-scrollbar {
    height: 6px;
}
.analytics-chart-scroll::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}
.analytics-chart-scroll::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
}

.analytics-chart-container {
    position: relative;
    height: 400px;
    /* width is set dynamically in JS based on data length */
}

/* Advanced Analytics — divider between chart sections */
.analytics-divider {
    display: none;
}

/* Rivals section */
.rivals-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

.rivals-column-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 0.6rem;
}
.rivals-column-title.victim-title  { color: #4ade80; }
.rivals-column-title.nemesis-title { color: #f87171; }

.rival-cards { display: flex; flex-direction: column; gap: 0.45rem; }

.rival-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}
.rival-card:hover { transform: translateX(3px); }
.rival-card.victim-card   { border-color: rgba(74,  222, 128, 0.22); box-shadow: 0 2px 8px rgba(74,  222, 128, 0.04); }
.rival-card.nemesis-card  { border-color: rgba(248, 113, 113, 0.22); box-shadow: 0 2px 8px rgba(248, 113, 113, 0.04); }
.rival-card.victim-card:hover  { box-shadow: 0 2px 18px rgba(74,  222, 128, 0.18); }
.rival-card.nemesis-card:hover { box-shadow: 0 2px 18px rgba(248, 113, 113, 0.18); }

.rival-rank { font-size: 0.7rem; font-weight: 800; width: 18px; text-align: center; flex-shrink: 0; opacity: 0.75; }
.victim-card  .rival-rank { color: #4ade80; }
.nemesis-card .rival-rank { color: #f87171; }

.rival-portrait {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid;
    background: var(--bg-card);
}
.victim-card  .rival-portrait { border-color: rgba(74,  222, 128, 0.4); }
.nemesis-card .rival-portrait { border-color: rgba(248, 113, 113, 0.4); }

.rival-info   { flex: 1; min-width: 0; }
.rival-name   { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rival-record { font-size: 0.74rem; color: var(--text-muted); margin-top: 1px; }

.rival-winrate { font-size: 0.88rem; font-weight: 700; flex-shrink: 0; }
.victim-card  .rival-winrate { color: #4ade80; }
.nemesis-card .rival-winrate { color: #f87171; }

.rivals-empty { font-size: 0.82rem; color: var(--text-muted); margin: 0.25rem 0; }

@media (max-width: 600px) {
    .rivals-section { grid-template-columns: 1fr; }
}

/* Fighter page — sticky page TOC nav */
.fighter-page-nav {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0;
    margin: 0.75rem 0 1.5rem;
    overflow-x: auto;
    position: sticky;
    top: 64px;
    z-index: 50;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(96, 124, 255, 0.1);
    scrollbar-width: none;
}
.fighter-page-nav::-webkit-scrollbar { display: none; }

.page-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(96, 124, 255, 0.2);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-heading);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    background: transparent;
    flex-shrink: 0;
}
.page-nav-pill:hover {
    border-color: rgba(96, 124, 255, 0.5);
    color: var(--text-primary);
}
.page-nav-pill.active {
    background: rgba(96, 124, 255, 0.15);
    border-color: #607cff;
    color: #607cff;
}

/* ============================================
   EVENTS PAGE
   ============================================ */

.event-season-group { margin-bottom: 2.5rem; }

.event-season-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-light);
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.event-card {
    padding: 0;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.event-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.event-card-stage-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.event-card-stage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.event-card-stage-wrap--logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 55%),
        linear-gradient(135deg, rgba(18, 24, 38, 0.96), rgba(10, 14, 24, 0.98));
}

.event-card-stage--logo {
    object-fit: contain;
    width: 100%;
    height: 100%;
    padding: 0;
    transform: translateY(3%) scale(1.18);
    transform-origin: center;
}

.event-card:hover .event-card-stage {
    transform: scale(1.04);
}

.event-card-stage-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}

.event-card-body {
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.event-card-name-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.event-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.event-card-title-link {
    flex-shrink: 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.78;
    transition: color var(--transition), opacity var(--transition);
}

.event-card-title-link:hover {
    color: var(--accent-light);
    opacity: 1;
}

.event-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.event-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.event-stat {
    font-size: 0.75rem;
    background: rgba(96,124,255,0.1);
    color: var(--accent-light);
    padding: 2px 8px;
    border-radius: 10px;
}

.event-stat-title {
    background: rgba(251,191,36,0.12);
    color: #fbbf24;
}

.event-card-action {
    margin-top: auto;
    margin-top: 0.9rem;
    width: 100%;
    border: 1px solid rgba(96,124,255,0.18);
    background: rgba(96,124,255,0.08);
    color: var(--accent-light);
    padding: 0.72rem 0.9rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.event-card-action:hover {
    background: rgba(96,124,255,0.13);
    border-color: rgba(96,124,255,0.32);
    transform: translateY(-1px);
}

.event-detail-hero {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 240px;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    align-items: center;
    background:
        radial-gradient(circle at top left, rgba(96,124,255,0.12), transparent 32%),
        radial-gradient(circle at bottom right, rgba(255,196,87,0.1), transparent 30%),
        linear-gradient(180deg, rgba(25, 29, 39, 0.95), rgba(15, 18, 27, 0.92));
}

.event-detail-hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 55%),
        linear-gradient(135deg, rgba(18, 24, 38, 0.96), rgba(10, 14, 24, 0.98));
    padding: 1rem;
    overflow: hidden;
}

.event-detail-hero-logo img {
    max-height: 120px;
    object-fit: contain;
}

.event-detail-hero-logo--fallback {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
}

.event-detail-hero-copy .section-title,
.event-detail-hero-copy .section-subtitle {
    margin-left: 0;
}

.event-detail-hero-copy .section-title {
    margin-bottom: 0.35rem;
}

.event-detail-hero-note {
    margin: 0;
    max-width: 720px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.event-detail-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.event-detail-hero-chip {
    min-width: 180px;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
}

.event-detail-hero-chip-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.event-detail-hero-chip strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.event-detail-hero-rail {
    display: grid;
    gap: 0.65rem;
    align-self: stretch;
    padding: 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025)),
        rgba(9, 12, 20, 0.56);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.event-detail-hero-rail-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
}

.event-detail-hero-rail-value {
    font-size: 2.65rem;
    line-height: 1;
    font-weight: 900;
    color: var(--text-primary);
}

.event-detail-hero-rail-copy {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.event-detail-hero-rail-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.event-detail-hero-rail-stats span {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.event-detail-hero-rail-stats strong {
    color: var(--text-primary);
    font-size: 1.05rem;
}

.event-detail-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 1.25rem;
}

.event-detail-stat {
    padding: 1rem 1.1rem;
    background:
        linear-gradient(180deg, rgba(29, 34, 46, 0.94), rgba(17, 21, 30, 0.9)),
        rgba(13, 16, 24, 0.84);
    position: relative;
    overflow: hidden;
}

.event-detail-stat::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,197,88,0.75), rgba(96,124,255,0.65));
    opacity: 0.75;
}

.event-detail-stat-label {
    position: relative;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.event-detail-stat strong {
    position: relative;
    display: block;
    font-size: 1.65rem;
    color: var(--text-primary);
}

.event-detail-stat-copy {
    position: relative;
    display: block;
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.event-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 1.25rem;
}

.event-detail-card {
    padding: 1.15rem 1.2rem 1.25rem;
    background:
        radial-gradient(circle at top right, rgba(96,124,255,0.08), transparent 28%),
        linear-gradient(180deg, rgba(28, 31, 39, 0.94), rgba(18, 20, 28, 0.9)),
        rgba(16, 18, 24, 0.82);
}

.event-detail-card-full {
    padding-bottom: 1.35rem;
}

.event-detail-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.event-detail-card-copy {
    margin: 0 0 0.9rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.event-detail-empty {
    margin: 0;
    color: var(--text-muted);
}

.event-insight-list,
.event-record-list {
    display: grid;
    gap: 0.7rem;
}

.event-insight-item,
.event-record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.025);
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.event-insight-item {
    align-items: flex-start;
}

.event-insight-item:hover,
.event-record-item:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.04);
}

.event-insight-title,
.event-record-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.event-insight-meta,
.event-record-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.event-insight-value,
.event-record-score {
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-light);
}

.event-insight-value-wrap {
    display: grid;
    justify-items: end;
    gap: 0.15rem;
    flex-shrink: 0;
    padding-left: 0.75rem;
}

.event-insight-value-label {
    color: var(--text-muted);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-record-item--good {
    background: linear-gradient(90deg, rgba(34,197,94,0.12), rgba(255,255,255,0.02) 45%);
}

.event-record-item--bad {
    background: linear-gradient(90deg, rgba(248,113,113,0.12), rgba(255,255,255,0.02) 45%);
}

.event-record-item--good .event-record-score {
    color: #4ade80;
}

.event-record-item--bad .event-record-score {
    color: #f87171;
}

.event-edition-item {
    position: relative;
    gap: 0.9rem;
    justify-content: flex-start;
    align-items: center;
}

.event-edition-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background:
        radial-gradient(circle at top, rgba(255,255,255,0.15), transparent 55%),
        linear-gradient(135deg, rgba(96,124,255,0.2), rgba(255,196,87,0.14));
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 800;
    flex-shrink: 0;
}

.event-edition-trace {
    width: 42px;
    height: 1px;
    margin-left: auto;
    background: linear-gradient(90deg, rgba(255,255,255,0.22), rgba(255,255,255,0.02));
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .event-detail-hero,
    .event-detail-grid {
        grid-template-columns: 1fr;
    }

    .event-detail-hero-rail {
        order: 3;
    }

    .event-detail-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .event-detail-hero-logo {
        min-height: 140px;
    }

    .event-detail-hero-chip {
        min-width: 100%;
    }

    .event-detail-hero-rail-stats {
        grid-template-columns: 1fr;
    }

    .event-detail-stat-grid {
        grid-template-columns: 1fr;
    }

    .event-insight-item,
    .event-record-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .event-insight-value-wrap,
    .event-record-score {
        padding-left: 0;
        align-self: flex-start;
    }

    .event-edition-trace {
        display: none;
    }
}

/* Event overlay / modal */
.event-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8,8,20,0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}

.event-overlay-panel {
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.event-overlay-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem 1.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.event-overlay-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.event-overlay-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}

.event-overlay-close {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    padding: 2px 10px;
    flex-shrink: 0;
    transition: all var(--transition);
}

.event-overlay-close:hover { border-color: var(--accent); color: var(--accent); }

#overlayFights { padding: 0.75rem; }

/* Fighter page — fight history collapsible */
.fighter-fight-history {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Header row mirrors .collapsible-header in layout/padding */
.fight-history-card .fight-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    transition: background var(--transition);
    /* Reset button defaults */
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    color: inherit;
    font: inherit;
    text-align: left;
}

.fight-history-card .fight-history-header:hover {
    background: var(--bg-hover);
}

/* Title label: matches .table-title color */
.fight-history-label {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fight-history-icon {
    opacity: 0.7;
}

/* Chevron: same size/transition as .chevron but dimmer */
.fight-history-chevron {
    font-size: 1.1rem;
    color: rgba(96, 124, 255, 0.5);
    transition: transform var(--transition);
    flex-shrink: 0;
    display: inline-block;
}

.fight-history-body {
    border-top: 1px solid var(--border-color);
    padding: 0.75rem;
}

.fight-history-body .fight-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.fight-history-body .fight-row:last-child {
    border-bottom: none;
}

.fight-detail-info {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fight-detail-info span { color: var(--text-primary); font-weight: 500; }

.fight-detail-participants {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fight-detail-fighter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
}

.fight-detail-fighter.is-winner {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.fight-detail-fighter.is-loser {
    background: rgba(255, 255, 255, 0.03);
    opacity: 0.75;
}

.fight-detail-portrait {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 4px;
}

.fight-detail-fighter-info {
    flex: 1;
    min-width: 0;
}

.fight-detail-fighter-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.fight-detail-fighter-name:hover { color: var(--accent); }

.fight-detail-result-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.fight-detail-result-badge.win  { background: rgba(74,222,128,0.2); color: var(--success); }
.fight-detail-result-badge.loss { background: rgba(248,113,113,0.15); color: var(--danger); }

.fight-detail-stocks {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
}

/* Empty / error states */
.fight-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.fight-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fight-page-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fight-page-nav {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.fight-back-link {
    white-space: nowrap;
}

.fight-hero-card {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 1.4rem;
    padding: 1.35rem 1.5rem;
}

.fight-page-kicker,
.fight-detail-section-kicker {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: var(--accent-light);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.fight-page-title,
.fight-detail-section-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-heading);
    line-height: 1.08;
    color: var(--text-primary);
}

.fight-page-title {
    font-size: 2rem;
}

.fight-page-subtitle,
.fight-detail-section-copy {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
}

.fight-page-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1rem 0 0.8rem;
}

.fight-page-result {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
}

.fight-hero-arena {
    display: grid;
    align-items: center;
    gap: 1rem;
}

.fight-layout-singles {
    grid-template-columns: minmax(140px, 1fr) minmax(240px, 1.15fr) minmax(140px, 1fr);
}

.fight-layout-multi,
.fight-layout-tag {
    grid-template-columns: 1fr;
}

.fight-hero-side {
    display: flex;
    justify-content: center;
}

.fight-hero-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.fight-hero-stage-wide {
    margin-bottom: 0.5rem;
}

.fight-hero-stage-img {
    width: 100%;
    max-width: 440px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 34px rgba(0,0,0,0.24);
}

.fight-hero-stage-placeholder {
    width: 100%;
    max-width: 440px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    border: 1px dashed rgba(255,255,255,0.12);
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
}

.fight-hero-stage-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.fight-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.9rem;
}

.fight-hero-fighter-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 0.75rem;
    border-radius: 18px;
    text-decoration: none;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.fight-hero-fighter-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.18);
}

.fight-hero-fighter-card.is-winner {
    background: rgba(74,222,128,0.08);
    border-color: rgba(74,222,128,0.22);
}

.fight-hero-fighter-img {
    width: 92px;
    height: 92px;
    object-fit: contain;
}

.fight-hero-fighter-card-small .fight-hero-fighter-img {
    width: 70px;
    height: 70px;
}

.fight-hero-fighter-name {
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.fight-hero-fighter-outcome {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.fight-detail-grid-page {
    display: grid;
    gap: 1rem;
}

.fight-detail-section {
    padding: 1.2rem 1.35rem 1.35rem;
}

.fight-detail-section-header {
    margin-bottom: 1rem;
}

.fight-pre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.fight-pre-card {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
}

.fight-pre-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.fight-pre-portrait {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.fight-pre-name {
    display: inline-block;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.fight-pre-name:hover {
    color: var(--accent);
}

.fight-pre-status,
.fight-pre-streak {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.fight-pre-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.fight-pre-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.55rem 0.6rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
}

.fight-pre-stat span {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.fight-pre-stat strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.fight-pre-streak {
    margin-top: 0.8rem;
}

.fight-pre-stats-contextual {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.fight-matchup-scoreboard {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(180px, auto) minmax(120px, 1fr);
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.fight-matchup-side,
.fight-matchup-center {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

.fight-matchup-name,
.fight-matchup-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.fight-matchup-score {
    margin-top: 0.2rem;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-primary);
}

.fight-matchup-post {
    margin-top: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.fight-context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.fight-context-card {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
}

.fight-context-title {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.fight-context-rows {
    display: grid;
    gap: 0.55rem;
}

.fight-context-rows div {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.fight-context-rows strong {
    color: var(--text-primary);
}

.fight-insights-list {
    display: grid;
    gap: 0.65rem;
}

.fight-insight-row {
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .fight-filter-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .fight-filter-summary {
        min-width: 0;
        width: 100%;
        text-align: left;
    }
    .fight-filter-group-featured {
        grid-column: span 1;
    }
    .fight-fighter-filter-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .fight-fighter-row:not([data-row="1"]) {
        grid-template-columns: 1fr;
    }
    .fight-hero-card {
        grid-template-columns: 1fr;
    }
    .fight-layout-singles {
        grid-template-columns: 1fr;
    }
    .fight-row-main {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .fight-detail-grid {
        grid-template-columns: 1fr;
    }
    .fight-matchup-scoreboard {
        grid-template-columns: 1fr;
    }
    .fight-pre-stats {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-section {
    max-width: 860px;
}

.about-block {
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
}

.about-heading {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-light);
    letter-spacing: 0.5px;
    margin: 0 0 1.1rem 0;
}

.about-subheading {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.3px;
    margin: 1.5rem 0 0.6rem 0;
}

.about-block p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0 0 0.9rem 0;
    font-size: 0.95rem;
}

.about-block p:last-child { margin-bottom: 0; }

.about-block strong { color: var(--text-primary); font-weight: 600; }

/* Schema table */
.about-schema {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0 1.25rem;
    border-left: 2px solid rgba(96, 124, 255, 0.3);
    padding-left: 1.25rem;
}

.schema-item {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.schema-table {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    color: var(--accent-light);
    white-space: nowrap;
    min-width: 130px;
}

.schema-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* Architecture diagram */
.about-arch-diagram {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.75rem;
    justify-content: center;
}

.arch-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: rgba(96, 124, 255, 0.07);
    border: 1px solid rgba(96, 124, 255, 0.2);
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    min-width: 120px;
    text-align: center;
}

.arch-icon {
    font-size: 1.5rem;
}

.arch-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.arch-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.arch-arrow {
    font-size: 1.25rem;
    color: rgba(96, 124, 255, 0.5);
    flex-shrink: 0;
}

/* Tech stack grid */
.about-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.stack-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.stack-name {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-light);
}

.stack-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .about-arch-diagram {
        flex-direction: column;
    }
    .arch-arrow {
        transform: rotate(90deg);
    }
    .about-block {
        padding: 1.25rem 1rem;
    }
    .schema-item {
        flex-direction: column;
        gap: 0.1rem;
    }
}

.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: rgba(96,124,255,0.07); }

.chart-section-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 1rem 0;
}

/* ── Comparison Page ─────────────────────────────────────────── */

.compare-page {
    margin: 0 auto;
    padding: 2rem 1rem;
}

.compare-hero {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.compare-fighter-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.compare-vs-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-top: 1.5rem;
}

.vs-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #607cff, #fb923c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.08em;
}

/* Mode Toggle Bar */
.mode-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.mode-toggle {
    display: flex;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.mode-btn {
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.mode-btn:hover { background: rgba(96,124,255,0.1); color: #e0e4f7; }
.mode-btn.active { background: rgba(96,124,255,0.22); color: #607cff; }
.season-pickers {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.season-picker-label {
    font-size: 0.85rem;
    font-weight: 600;
}
.season-picker-vs {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0.25rem;
}
.season-select {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #e0e4f7;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
}
.season-select:focus { outline: none; border-color: #607cff; }

/* Scoreboard */
.compare-scoreboard {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.sb-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 120px;
}

.sb-left { align-items: flex-end; }
.sb-right { align-items: flex-start; }

.sb-portrait {
    width: 72px;
    height: 75px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.sb-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
}

.sb-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 2;
    min-width: 180px;
}

.sb-scores {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.sb-score {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
}

.sb-dash {
    font-size: 2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.sb-bar-track {
    display: flex;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
}

.sb-bar-fill {
    height: 100%;
    transition: width 0.7s cubic-bezier(.4,0,.2,1);
}

.sb-bar-f1 { background: #607cff; border-radius: 4px 0 0 4px; }
.sb-bar-f2 { background: #fb923c; border-radius: 0 4px 4px 0; }

.sb-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Color helpers */
.f1-color { color: #607cff; }
.f2-color { color: #fb923c; }

/* Stats Comparison Grid */
.compare-card {
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
}

.compare-grid-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
}

.compare-grid-table thead th {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    padding: 0.5rem 1rem 1rem;
    letter-spacing: 0.03em;
}

.compare-grid-table .grid-metric {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.6rem 0.5rem;
    width: 34%;
}

.compare-grid-table .grid-val {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.compare-grid-table .grid-winner {
    color: var(--text-primary);
}

.f1-winner-cell { background: rgba(96,124,255,0.13); color: #607cff !important; }
.f2-winner-cell { background: rgba(251,146,60,0.13);  color: #fb923c !important; }

.compare-grid-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(96,124,255,0.07);
}

@media (max-width: 700px) {
    .compare-hero { flex-direction: column; align-items: center; }
    .compare-scoreboard { flex-direction: column; }
    .sb-left, .sb-right { align-items: center; }
    .sb-score { font-size: 2.5rem; }
}


/* ============================================
   Chat / Ask AI page
   ============================================ */
.beta-badge,
.nav-beta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 211, 122, 0.32);
    background: rgba(255, 211, 122, 0.12);
    color: #f6d17a;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: middle;
}

.beta-badge {
    margin-left: 0.5rem;
}

.nav-beta-badge {
    margin-left: 0.35rem;
    font-size: 0.58rem;
    padding: 0.08rem 0.36rem;
}

.chat-container {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.chat-messages {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 320px;
    max-height: 520px;
    overflow-y: auto;
}

.chat-message {
    display: flex;
}

.chat-message-user {
    justify-content: flex-end;
}

.chat-message-ai {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 80%;
    padding: 0.65rem 1rem;
    border-radius: 14px;
    font-size: 0.92rem;
    line-height: 1.55;
}

.chat-message-user .chat-bubble {
    background: rgba(96, 124, 255, 0.2);
    border: 1px solid rgba(96, 124, 255, 0.35);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
}

.chat-message-ai .chat-bubble {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-bottom-left-radius: 4px;
}

.chat-thinking {
    opacity: 0.5;
    font-style: italic;
}

.chat-input-row {
    display: flex;
    gap: 0.6rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}

.chat-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    font-size: 0.92rem;
    outline: none;
    transition: border-color var(--transition);
}

.chat-input:focus {
    border-color: var(--accent);
}

.chat-send-btn {
    white-space: nowrap;
    padding: 0.6rem 1.2rem;
}

.chat-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.5rem 1.5rem 1rem;
    margin: 0;
    text-align: center;
}

.chat-table-wrap {
    margin-top: 0.75rem;
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.chat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.chat-table th {
    background: rgba(96, 124, 255, 0.1);
    color: var(--text-muted);
    padding: 5px 10px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.chat-table td {
    padding: 4px 10px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    white-space: nowrap;
}

.chat-sql-details {
    margin-top: 0.6rem;
    font-size: 0.78rem;
}

.chat-sql-details summary {
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
}

.chat-sql {
    display: block;
    margin-top: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0,0,0,0.25);
    border-radius: 6px;
    color: #a5b4fc;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: monospace;
}


/* ============================================
   Floating Chat Widget
   ============================================ */
.float-chat-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.float-chat-btn {
    height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #818cf8);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(96, 124, 255, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.float-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(96, 124, 255, 0.7);
}

.float-chat-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.float-chat-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.float-chat-panel {
    width: 360px;
    max-height: 520px;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.float-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: rgba(96, 124, 255, 0.08);
    flex-shrink: 0;
}

.float-chat-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
}

.float-chat-close:hover { color: var(--text-primary); }

.float-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 200px;
    max-height: 340px;
}

.float-chat-input-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    flex-shrink: 0;
}

@media (max-width: 500px) {
    .float-chat-panel { width: calc(100vw - 32px); }
    .float-chat-wrap { bottom: 16px; right: 16px; }
}

.nav-logout-form {
    margin: 0;
}

.nav-link-button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

.admin-login-page {
    max-width: 560px;
    margin: 0 auto;
}

.admin-login-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-login-form label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.admin-login-form input {
    width: 100%;
    padding: 12px 18px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition);
}

.admin-login-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-login-error {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: #ffd3d3;
}

.schedule-admin-page {
    max-width: 1500px;
    margin: 0 auto;
}

.page-shell-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.page-shell-title {
    margin: 0;
}

.page-shell-subtitle,
.schedule-empty-state {
    color: var(--text-secondary, #b8bfd8);
}

.eyebrow {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent-primary, #607cff);
    font-size: 0.72rem;
    font-weight: 700;
}

.schedule-admin-banner {
    background: rgba(64, 176, 116, 0.15);
    border: 1px solid rgba(64, 176, 116, 0.3);
    color: #b7f3cc;
    border-radius: 999px;
    padding: 0.7rem 1rem;
}

.brand-jump-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.brand-jump-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    background: rgba(96, 124, 255, 0.18);
    border: 1px solid rgba(96, 124, 255, 0.24);
}

.brand-jump-link:hover {
    background: rgba(96, 124, 255, 0.28);
}

.brand-show-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(96, 124, 255, 0.1);
}

.brand-show-settings label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 200px;
    flex: 1;
}

.brand-show-settings label > span {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.brand-show-settings select,
.brand-show-settings input[type="text"] {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(96, 124, 255, 0.16);
    background: linear-gradient(180deg, rgba(10, 11, 18, 0.98), rgba(6, 7, 12, 1));
    background-color: #0b0d15;
    color: var(--text-primary);
    padding: 0.7rem 0.9rem;
    appearance: none;
    -webkit-appearance: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.brand-show-settings input[type="text"]::placeholder {
    color: var(--text-muted);
}

.brand-show-settings select {
    cursor: pointer;
    padding-right: 2.3rem;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
        linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.brand-show-settings select:focus,
.brand-show-settings input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.brand-show-settings select option {
    background: #0b0d15;
    color: #fff;
}

.brand-show-settings input.is-invalid {
    border-color: rgba(248, 113, 113, 0.9) !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.16) !important;
    color: #ffd2d2 !important;
}

.brand-show-settings input[type="hidden"] {
    display: none;
}

.schedule-brand-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.schedule-brand-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background:
        linear-gradient(180deg, rgba(20, 24, 38, 0.88), rgba(10, 12, 22, 0.92)),
        radial-gradient(circle at top left, rgba(96, 124, 255, 0.12), transparent 38%);
    border: 1px solid rgba(96, 124, 255, 0.14);
}

.schedule-brand-header,
.scheduled-match-row-header,
.schedule-submit-row,
.schedule-match-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.schedule-brand-header h2,
.schedule-existing-matches h3,
.participant-editor h3 {
    margin: 0;
}

.schedule-brand-meta,
.scheduled-match-summary {
    color: var(--text-secondary, #b8bfd8);
}

.schedule-existing-matches {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.scheduled-match-row {
    border: 1px solid rgba(96, 124, 255, 0.12);
    border-radius: 16px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(17, 19, 31, 0.88), rgba(12, 14, 24, 0.96));
}

.scheduled-status {
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.08);
}

.scheduled-status.status-queued {
    color: #ffe08c;
}

.scheduled-status.status-running {
    color: #7dd3fc;
    background: rgba(125, 211, 252, 0.1);
}

.scheduled-status.status-completed {
    color: var(--success);
    background: rgba(74, 222, 128, 0.1);
}

.scheduled-status.status-failed {
    color: var(--danger);
    background: rgba(248, 113, 113, 0.1);
}

.scheduled-status.status-cancelled {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    text-decoration: line-through;
}

.scheduled-participant-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.scheduled-participant-chip {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
}

.schedule-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-match-label {
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.schedule-section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.schedule-section-divider::before,
.schedule-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(96, 124, 255, 0.12);
}

.schedule-match-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-match-card {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.25rem;
    border-radius: 18px;
    border: 1px solid rgba(96, 124, 255, 0.18);
    background:
        linear-gradient(180deg, rgba(14, 16, 28, 0.94), rgba(9, 11, 20, 0.98)),
        radial-gradient(circle at top right, rgba(96, 124, 255, 0.08), transparent 32%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 2px 12px rgba(0, 0, 0, 0.3);
}

.schedule-card-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.schedule-add-match-btn {
    align-self: flex-start;
}

.schedule-inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary, #b8bfd8);
}

.schedule-toggle-chip {
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(96, 124, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    transition: all var(--transition);
}

.schedule-toggle-chip.is-active {
    color: #ffffff;
    background: rgba(96, 124, 255, 0.18);
    border-color: rgba(96, 124, 255, 0.34);
    box-shadow: 0 0 0 2px rgba(96, 124, 255, 0.12);
}

.schedule-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.schedule-form-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.schedule-form label,
.schedule-notes {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.schedule-field > span,
.schedule-form label > span,
.schedule-notes > span {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary, #a8aab8);
}

.schedule-admin-page .schedule-form input:not([type="checkbox"]),
.schedule-admin-page .schedule-form select,
.schedule-admin-page .schedule-form textarea {
    width: 100%;
    border-radius: 18px !important;
    border: 1px solid rgba(96, 124, 255, 0.16) !important;
    background: linear-gradient(180deg, rgba(10, 11, 18, 0.98), rgba(6, 7, 12, 1)) !important;
    background-color: #0b0d15 !important;
    color: var(--text-primary) !important;
    padding: 0.8rem 0.9rem;
    transition: all var(--transition);
    appearance: none;
    -webkit-appearance: none;
    color-scheme: dark;
    font-family: var(--font-body);
    font-size: 0.95rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.schedule-admin-page .schedule-form input::placeholder,
.schedule-admin-page .schedule-form textarea::placeholder {
    color: var(--text-muted);
}

.schedule-admin-page .schedule-form input:not([type="checkbox"]):focus,
.schedule-admin-page .schedule-form select:focus,
.schedule-admin-page .schedule-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow:
        0 0 0 3px var(--accent-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.schedule-admin-page .schedule-form select option {
    background: #0b0d15 !important;
    color: #ffffff !important;
}

.schedule-admin-page .schedule-form input[type="number"]::-webkit-outer-spin-button,
.schedule-admin-page .schedule-form input[type="number"]::-webkit-inner-spin-button {
    opacity: 0.7;
}

.schedule-admin-page .schedule-form input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(0.85);
    opacity: 0.8;
    cursor: pointer;
}

.schedule-admin-page .schedule-form select {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
        linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.3rem;
}

/* ---- Toggle pill shared base ---- */
.schedule-inline-toggle input[type="checkbox"],
.schedule-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.schedule-inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition);
    user-select: none;
    white-space: nowrap;
}

.schedule-inline-toggle::before {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    flex-shrink: 0;
    transition: all var(--transition);
}

.schedule-inline-toggle:has(input:checked) {
    border-color: var(--accent);
    background: rgba(96, 124, 255, 0.14);
    color: var(--accent-light);
    box-shadow: 0 0 0 1px var(--accent-glow);
}

.schedule-inline-toggle:has(input:checked)::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 6px var(--accent-glow);
}

.schedule-checkbox {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    align-self: end;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition);
    user-select: none;
    white-space: nowrap;
}

.schedule-checkbox::before {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    flex-shrink: 0;
    transition: all var(--transition);
}

.schedule-checkbox:has(input:checked) {
    border-color: var(--accent);
    background: rgba(96, 124, 255, 0.14);
    color: var(--accent-light);
    box-shadow: 0 0 0 1px var(--accent-glow);
}

.schedule-checkbox:has(input:checked)::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 6px var(--accent-glow);
}

.schedule-admin-page .participant-row .schedule-field {
    align-self: stretch;
}

.schedule-admin-page .participant-row .schedule-field input,
.schedule-admin-page .participant-row .schedule-field select {
    min-height: 44px;
}

.schedule-checkbox.compact {
    align-self: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.participant-editor {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.participant-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.participant-editor-header h4 {
    margin: 0;
    color: var(--text-secondary, #a8aab8);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}

.participant-editor-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.schedule-add-participant-btn,
.schedule-remove-participant-btn {
    align-self: flex-start;
}

.participant-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1.5fr) 100px 150px 1.2fr 100px 110px;
    gap: 0.65rem;
    align-items: center;
    padding: 0.8rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(16, 18, 28, 0.98), rgba(9, 11, 18, 1));
    border: 1px solid rgba(96, 124, 255, 0.12);
}

.participant-team-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.participant-row-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-primary, #607cff);
}

@media (max-width: 1100px) {
    .participant-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .page-shell-header,
    .schedule-brand-header,
    .scheduled-match-row-header,
    .schedule-submit-row,
    .schedule-match-card-header,
    .schedule-form-grid,
    .schedule-form-grid.compact {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .participant-row {
        grid-template-columns: 1fr;
    }

    .participant-team-fields {
        grid-template-columns: 1fr;
    }
}
