/**
 * Series Leaderboard - Athletic Stadium Energy Design
 * ESPN-style sports broadcast aesthetics with bold typography,
 * dramatic stat displays, and dynamic compositions
 */

/* ==========================================================================
   CSS Custom Properties - Leaderboard Theme
   ========================================================================== */

.series-leaderboard {
    --lb-gold: #fbbf24;
    --lb-silver: #94a3b8;
    --lb-bronze: #d97706;
    --lb-surface: var(--theme-surface-1, rgba(30, 41, 59, 0.8));
    --lb-surface-elevated: var(--theme-surface-2, rgba(51, 65, 85, 0.9));
    --lb-border: rgba(255, 255, 255, 0.08);
    --lb-glow: rgba(var(--flipt-primary-rgb, 59, 130, 246), 0.4);
}

/* ==========================================================================
   Hero Section - Broadcast-Style Series Header
   ========================================================================== */

.lb-hero {
    position: relative;
    padding: 3rem 0;
    margin-bottom: 2rem;
    overflow: hidden;
}

.lb-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(var(--flipt-primary-rgb), 0.15) 0%, transparent 50%),
        linear-gradient(225deg, rgba(var(--flipt-secondary-rgb), 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.lb-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--flipt-primary) 0%,
        var(--flipt-secondary) 50%,
        var(--flipt-primary) 100%);
}

.lb-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}

.lb-series-image {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 0 30px rgba(var(--flipt-primary-rgb), 0.3),
        0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.lb-series-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lb-series-label {
    font-family: 'Karla', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--flipt-primary);
    opacity: 0.9;
}

.lb-series-title {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lb-series-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.lb-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
}

.lb-meta-item i {
    color: var(--flipt-primary);
}

.lb-hero-stats {
    display: flex;
    gap: 1.5rem;
}

.lb-hero-stat {
    text-align: center;
    padding: 1rem 1.5rem;
    background: var(--lb-surface);
    border-radius: 12px;
    border: 1px solid var(--lb-border);
    min-width: 100px;
}

.lb-hero-stat-value {
    font-family: 'Karla', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 2rem;
    font-weight: 800;
    color: var(--flipt-primary);
    line-height: 1;
}

.lb-hero-stat-label {
    font-family: 'Karla', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--theme-text-muted);
    margin-top: 0.25rem;
}

/* ==========================================================================
   Your Position Card - Personal Highlight
   ========================================================================== */

.lb-your-position {
    position: relative;
    background: var(--lb-surface-elevated);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--lb-border);
    overflow: hidden;
}

.lb-your-position::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--flipt-primary) 0%, var(--flipt-secondary) 100%);
}

.lb-your-position-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.lb-your-position-label {
    font-family: 'Karla', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--flipt-primary);
}

.lb-your-position-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding-left: 1rem;
}

.lb-your-tag-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.lb-your-tag-number {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.lb-your-tag-hash {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--theme-text-muted);
}

.lb-your-tag-value {
    font-family: 'Karla', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--flipt-primary) 0%, var(--flipt-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lb-your-tag-name {
    font-family: 'Karla', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    text-align: center;
}

.lb-your-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.lb-your-stat {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.lb-your-stat-value {
    font-family: 'Karla', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--theme-text-primary);
    line-height: 1;
}

.lb-your-stat-label {
    font-family: 'Karla', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--theme-text-muted);
    margin-top: 0.5rem;
}

/* ==========================================================================
   Division Navigation - Broadcast Ticker Style
   ========================================================================== */

.lb-division-nav {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--lb-surface);
    border-radius: 12px;
    margin-bottom: 2rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.lb-division-nav::-webkit-scrollbar {
    display: none;
}

.lb-division-tab {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--theme-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lb-division-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--theme-text-primary);
}

.lb-division-tab.active {
    background: linear-gradient(135deg, var(--flipt-primary) 0%, var(--flipt-secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--flipt-primary-rgb), 0.4);
}

.lb-division-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.lb-division-tab.active .lb-division-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Podium Section - Top 3 Showcase
   ========================================================================== */

.lb-podium {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: end;
}

.lb-podium-place {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: var(--lb-surface);
    border-radius: 16px;
    border: 1px solid var(--lb-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lb-podium-place:hover {
    transform: translateY(-4px);
}

/* First place - tallest, gold accent */
.lb-podium-place[data-place="1"] {
    order: 2;
    padding-bottom: 3rem;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.1) 0%, var(--lb-surface) 50%);
    border-color: rgba(251, 191, 36, 0.3);
}

.lb-podium-place[data-place="1"]:hover {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
}

/* Second place - silver accent */
.lb-podium-place[data-place="2"] {
    order: 1;
    padding-bottom: 2rem;
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.1) 0%, var(--lb-surface) 50%);
    border-color: rgba(148, 163, 184, 0.3);
}

.lb-podium-place[data-place="2"]:hover {
    box-shadow: 0 0 30px rgba(148, 163, 184, 0.2);
}

/* Third place - bronze accent */
.lb-podium-place[data-place="3"] {
    order: 3;
    padding-bottom: 1.5rem;
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.1) 0%, var(--lb-surface) 50%);
    border-color: rgba(217, 119, 6, 0.3);
}

.lb-podium-place[data-place="3"]:hover {
    box-shadow: 0 0 30px rgba(217, 119, 6, 0.2);
}

.lb-podium-rank {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 800;
}

.lb-podium-place[data-place="1"] .lb-podium-rank {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e1e1e;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.5);
}

.lb-podium-place[data-place="2"] .lb-podium-rank {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    color: #1e1e1e;
    box-shadow: 0 4px 15px rgba(148, 163, 184, 0.4);
}

.lb-podium-place[data-place="3"] .lb-podium-rank {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1e1e1e;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
}

.lb-podium-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.lb-podium-place[data-place="1"] .lb-podium-avatar {
    width: 88px;
    height: 88px;
    border-color: rgba(251, 191, 36, 0.4);
}

.lb-podium-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--theme-text-muted);
    font-size: 1.5rem;
}

.lb-podium-place[data-place="1"] .lb-podium-avatar-placeholder {
    width: 88px;
    height: 88px;
    font-size: 2rem;
}

.lb-podium-name {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
    color: var(--theme-text-primary);
    margin-bottom: 0.5rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-podium-name a {
    color: inherit;
    text-decoration: none;
}

.lb-podium-name a:hover {
    color: var(--flipt-primary);
}

.lb-podium-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
}

.lb-podium-stat {
    text-align: center;
}

.lb-podium-stat-value {
    font-family: 'Karla', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--theme-text-primary);
}

.lb-podium-stat-label {
    font-family: 'Karla', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--theme-text-muted);
}

.lb-podium-payout {
    margin-top: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 100px;
    font-family: 'Karla', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 0.875rem;
    font-weight: 700;
    color: #22c55e;
}

/* ==========================================================================
   Standings Table - Clean Athletic Style
   ========================================================================== */

.lb-standings {
    background: var(--lb-surface);
    border-radius: 16px;
    border: 1px solid var(--lb-border);
    overflow: hidden;
    margin-bottom: 2rem;
}

.lb-standings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--lb-border);
}

.lb-standings-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Karla', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin: 0;
}

.lb-standings-title i {
    color: var(--flipt-primary);
}

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

.lb-table thead {
    background: rgba(0, 0, 0, 0.15);
}

.lb-table th {
    padding: 0.875rem 1rem;
    font-family: 'Karla', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--theme-text-muted);
    text-align: left;
    border-bottom: 1px solid var(--lb-border);
}

.lb-table th:first-child {
    padding-left: 1.5rem;
    width: 60px;
}

.lb-table th.text-center {
    text-align: center;
}

.lb-table th.text-end {
    text-align: right;
    padding-right: 1.5rem;
}

.lb-table tbody tr {
    border-bottom: 1px solid var(--lb-border);
    transition: background 0.2s ease;
}

.lb-table tbody tr:last-child {
    border-bottom: none;
}

.lb-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.lb-table tbody tr.lb-row-you {
    background: rgba(var(--flipt-primary-rgb), 0.1);
}

.lb-table tbody tr.lb-row-you:hover {
    background: rgba(var(--flipt-primary-rgb), 0.15);
}

.lb-table td {
    padding: 1rem;
    vertical-align: middle;
}

.lb-table td:first-child {
    padding-left: 1.5rem;
}

.lb-rank-cell {
    font-family: 'Karla', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--theme-text-muted);
}

.lb-rank-cell.top-3 {
    color: var(--theme-text-primary);
}

.lb-player-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lb-player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.lb-player-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-muted);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.lb-player-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lb-player-name {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-player-name:hover {
    color: var(--flipt-primary);
}

.lb-player-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.lb-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lb-badge-you {
    background: var(--flipt-primary);
    color: white;
}

.lb-badge-clinched {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: var(--lb-gold);
}

.lb-badge-registered {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.lb-stat-cell {
    font-family: 'Karla', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    text-align: center;
}

.lb-trend-cell {
    text-align: center;
}

.lb-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 100px;
    font-family: 'Karla', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 0.75rem;
    font-weight: 700;
}

.lb-trend-up {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.lb-trend-down {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.lb-trend-stable {
    background: rgba(148, 163, 184, 0.15);
    color: var(--theme-text-muted);
}

.lb-payout-cell {
    text-align: right;
    padding-right: 1.5rem;
}

.lb-payout-amount {
    display: inline-flex;
    padding: 0.375rem 0.75rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 100px;
    font-family: 'Karla', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 0.875rem;
    font-weight: 700;
    color: #22c55e;
}

/* ==========================================================================
   CUTLINE INDICATOR - Sports Broadcast "Bubble Line" Style
   ========================================================================== */

.lb-cutline-row {
    position: relative;
}

.lb-cutline-row td {
    padding: 0;
    background: transparent;
    position: relative;
}

.lb-cutline-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem 0;
}

/* Animated gradient line */
.lb-cutline-indicator::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(251, 191, 36, 0.3) 10%,
        rgba(251, 191, 36, 0.8) 30%,
        #fbbf24 50%,
        rgba(251, 191, 36, 0.8) 70%,
        rgba(251, 191, 36, 0.3) 90%,
        transparent 100%
    );
    animation: cutline-pulse 3s ease-in-out infinite;
}

@keyframes cutline-pulse {
    0%, 100% {
        opacity: 0.7;
        filter: blur(0px);
    }
    50% {
        opacity: 1;
        filter: blur(1px);
    }
}

/* Glow effect behind the line */
.lb-cutline-indicator::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    height: 8px;
    transform: translateY(-50%);
    background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.25) 0%, transparent 70%);
    filter: blur(6px);
}

.lb-cutline-chip {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-family: 'Oswald', 'Impact', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #fbbf24;
    background: linear-gradient(135deg,
        rgba(17, 24, 39, 0.95) 0%,
        rgba(30, 41, 59, 0.95) 100%);
    border: 2px solid rgba(251, 191, 36, 0.6);
    border-radius: 4px;
    box-shadow:
        0 0 20px rgba(251, 191, 36, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Diagonal corner accents - broadcast style */
.lb-cutline-chip::before,
.lb-cutline-chip::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-style: solid;
    border-color: #fbbf24;
}

.lb-cutline-chip::before {
    top: -4px;
    left: -4px;
    border-width: 2px 0 0 2px;
}

.lb-cutline-chip::after {
    bottom: -4px;
    right: -4px;
    border-width: 0 2px 2px 0;
}

.lb-cutline-chip i {
    color: #fbbf24;
    font-size: 0.7rem;
    animation: cutline-icon-flash 2s ease-in-out infinite;
}

@keyframes cutline-icon-flash {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Light mode adjustments */
@media (prefers-color-scheme: light) {
    .lb-cutline-chip {
        background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 250, 252, 0.95) 100%);
        color: #b45309;
        border-color: rgba(217, 119, 6, 0.6);
        box-shadow:
            0 0 20px rgba(251, 191, 36, 0.2),
            0 4px 12px rgba(0, 0, 0, 0.1);
        text-shadow: none;
    }

    .lb-cutline-chip i {
        color: #d97706;
    }

    .lb-cutline-chip::before,
    .lb-cutline-chip::after {
        border-color: #d97706;
    }
}

/* ==========================================================================
   Light Mode - Bootstrap Theme Attribute
   ========================================================================== */

[data-bs-theme="light"] .series-leaderboard {
    --lb-surface: rgba(255, 255, 255, 0.8);
    --lb-surface-elevated: rgba(248, 250, 252, 0.95);
    --lb-border: rgba(0, 0, 0, 0.08);
}

/* Hero title - use dark gradient for light backgrounds */
[data-bs-theme="light"] .lb-series-title {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero background gradient - lighter in light mode */
[data-bs-theme="light"] .lb-hero::before {
    background:
        linear-gradient(135deg, rgba(var(--flipt-primary-rgb), 0.08) 0%, transparent 50%),
        linear-gradient(225deg, rgba(var(--flipt-secondary-rgb), 0.05) 0%, transparent 50%);
}

/* Series image - lighter shadow */
[data-bs-theme="light"] .lb-series-image {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow:
        0 0 30px rgba(var(--flipt-primary-rgb), 0.15),
        0 10px 40px -10px rgba(0, 0, 0, 0.2);
}

/* Hero stat boxes - light background */
[data-bs-theme="light"] .lb-hero-stat {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Cutline chip - light mode */
[data-bs-theme="light"] .lb-cutline-chip {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.95) 100%);
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.6);
    box-shadow:
        0 0 20px rgba(251, 191, 36, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    text-shadow: none;
}

[data-bs-theme="light"] .lb-cutline-chip i {
    color: #d97706;
}

[data-bs-theme="light"] .lb-cutline-chip::before,
[data-bs-theme="light"] .lb-cutline-chip::after {
    border-color: #d97706;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lb-cutline-indicator::before,
    .lb-cutline-chip i {
        animation: none;
    }
}

/* ==========================================================================
   Interactive Cutline - Click to see your relation
   ========================================================================== */

.lb-cutline-interactive {
    cursor: pointer;
    transition: all 0.2s ease;
}

.lb-cutline-interactive:hover,
.lb-cutline-interactive:focus {
    transform: scale(1.05);
    border-color: #fbbf24;
    box-shadow:
        0 0 30px rgba(251, 191, 36, 0.5),
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.lb-cutline-interactive:active {
    transform: scale(0.98);
}

/* Popover styles for cutline relation */
.lb-cutline-popover {
    --bs-popover-max-width: 280px;
    --bs-popover-border-color: rgba(251, 191, 36, 0.4);
    --bs-popover-bg: rgba(17, 24, 39, 0.98);
    font-family: 'Karla', system-ui, sans-serif;
}

.lb-cutline-popover .popover-body {
    padding: 1rem;
}

.cutline-relation-content {
    text-align: center;
}

.cutline-relation-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.cutline-relation-icon.above {
    color: #22c55e;
}

.cutline-relation-icon.below {
    color: #f97316;
}

.cutline-relation-icon.on-line {
    color: #fbbf24;
}

.cutline-relation-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--theme-text-primary, #f1f5f9);
}

.cutline-relation-details {
    font-size: 0.8rem;
    color: var(--theme-text-secondary, #94a3b8);
}

.cutline-relation-hint {
    display: block;
    font-size: 0.7rem;
    color: var(--theme-text-tertiary, #64748b);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Light mode popover adjustments */
[data-bs-theme="light"] .lb-cutline-interactive:hover,
[data-bs-theme="light"] .lb-cutline-interactive:focus {
    border-color: #d97706;
    box-shadow:
        0 0 30px rgba(251, 191, 36, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="light"] .lb-cutline-popover {
    --bs-popover-bg: rgba(255, 255, 255, 0.98);
    --bs-popover-border-color: rgba(217, 119, 6, 0.3);
}

[data-bs-theme="light"] .cutline-relation-title {
    color: #1e293b;
}

[data-bs-theme="light"] .cutline-relation-details {
    color: #475569;
}

[data-bs-theme="light"] .cutline-relation-hint {
    color: #64748b;
}

/* ==========================================================================
   Bag Tag Grid - Card Showcase
   ========================================================================== */

.lb-tags-section {
    margin-bottom: 2rem;
}

.lb-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.lb-section-title {
    font-family: 'Karla', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin: 0;
}

.lb-section-title i {
    color: var(--flipt-primary);
}

.lb-section-hint {
    font-size: 0.75rem;
    color: var(--theme-text-muted);
    font-weight: 500;
    margin-left: auto;
    opacity: 0.7;
}

.lb-section-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--lb-border), transparent);
}

.lb-tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

/* Make bag tag cards clickable for modal exploration */
.lb-tag-grid .lb-tag-card.clickable {
    cursor: pointer;
}

.lb-tag-grid .lb-tag-card.clickable:hover {
    transform: translateY(-6px) scale(1.02);
}

.lb-tag-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    --card-max-width-landscape: 320px;
    --card-max-width-portrait: 240px;
}

.lb-tag-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.lb-tag-card.lb-tag-yours {
    box-shadow: 0 0 0 3px var(--flipt-primary), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.lb-tag-card .bag-tag-collectible-container {
    gap: 10px;
}

.lb-tag-card .bag-tag-detail-link {
    padding: 10px 18px;
    font-size: 13px;
}

.lb-tag-card .bag-tag-detail-link i {
    font-size: 0.9em;
}

.lb-event-averages {
    margin: 0.75rem 0 1rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--lb-border);
    border-radius: 14px;
}

.lb-event-averages__title {
    font-weight: 700;
    color: var(--theme-text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.lb-event-averages__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lb-event-avg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.625rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--theme-text-secondary);
    font-size: 0.85rem;
    cursor: help;
    max-width: 100%;
}

.lb-event-avg__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14rem;
}

.lb-event-avg__value {
    font-weight: 800;
    color: var(--theme-text-primary);
}

/* ==========================================================================
   Sidebar - Leagues & Info Cards
   ========================================================================== */

.lb-sidebar-card {
    background: var(--lb-surface);
    border-radius: 16px;
    border: 1px solid var(--lb-border);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.lb-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--lb-border);
}

.lb-sidebar-title {
    font-family: 'Karla', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin: 0;
}

.lb-sidebar-title i {
    color: var(--flipt-primary);
    margin-right: 0.5rem;
}

.lb-league-list {
    padding: 0.5rem;
}

.lb-league-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.lb-league-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.lb-league-image {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.lb-league-info {
    flex: 1;
    min-width: 0;
}

.lb-league-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.lb-league-name {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    line-height: 1.2;
}

.lb-league-day {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    background: var(--flipt-primary);
    border-radius: 100px;
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}

.lb-league-desc {
    font-size: 0.75rem;
    color: var(--theme-text-secondary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lb-league-meta {
    display: flex;
    gap: 0.75rem;
}

.lb-league-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--theme-text-muted);
}

.lb-league-meta-item i {
    color: var(--flipt-primary);
    font-size: 0.65rem;
}

/* Infographic card */
.lb-infographic {
    padding: 1rem;
}

.lb-infographic-image {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.lb-infographic-image:hover {
    transform: scale(1.02);
}

/* ==========================================================================
   Animations - Staggered Reveals
   ========================================================================== */

.lb-animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: lbFadeUp 0.6s ease forwards;
}

@keyframes lbFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lb-stagger-1 { animation-delay: 0.1s; }
.lb-stagger-2 { animation-delay: 0.2s; }
.lb-stagger-3 { animation-delay: 0.3s; }
.lb-stagger-4 { animation-delay: 0.4s; }
.lb-stagger-5 { animation-delay: 0.5s; }

/* Podium entrance animation */
.lb-podium-place {
    opacity: 0;
    transform: translateY(30px);
    animation: lbPodiumReveal 0.8s ease forwards;
}

.lb-podium-place[data-place="2"] { animation-delay: 0.1s; }
.lb-podium-place[data-place="3"] { animation-delay: 0.2s; }
.lb-podium-place[data-place="1"] { animation-delay: 0.3s; }

@keyframes lbPodiumReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 992px) {
    .lb-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .lb-series-image {
        margin: 0 auto;
    }

    .lb-series-meta {
        justify-content: center;
    }

    .lb-hero-stats {
        justify-content: center;
    }

    .lb-your-position-content {
        grid-template-columns: 1fr;
    }

    .lb-podium {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .lb-podium-place {
        order: unset !important;
        padding: 1.5rem 1rem !important;
    }

    .lb-podium-place[data-place="1"] {
        order: -1 !important;
    }
}

@media (max-width: 768px) {
    .lb-hero {
        padding: 2rem 0;
    }

    .lb-series-title {
        font-size: 1.75rem;
    }

    .lb-hero-stats {
        flex-wrap: wrap;
    }

    .lb-hero-stat {
        min-width: 80px;
        padding: 0.75rem 1rem;
    }

    .lb-hero-stat-value {
        font-size: 1.5rem;
    }

    .lb-division-nav {
        gap: 0.25rem;
        padding: 0.25rem;
    }

    .lb-division-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .lb-table th,
    .lb-table td {
        padding: 0.75rem 0.5rem;
    }

    .lb-table th:first-child,
    .lb-table td:first-child {
        padding-left: 0.75rem;
    }

    .lb-player-cell {
        gap: 0.5rem;
    }

    .lb-player-avatar,
    .lb-player-avatar-placeholder {
        width: 28px;
        height: 28px;
    }

    .lb-tag-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ==========================================================================
   Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .lb-animate-in,
    .lb-podium-place,
    .lb-tag-card,
    .lb-division-tab {
        animation: none !important;
        opacity: 1;
        transform: none;
        transition: none !important;
    }
}
