﻿:root {
    /* Primary Colors */
    --primary-color: #00d4ff;
    --primary-glow: rgba(0, 212, 255, 0.6);
    --secondary-color: #ff6b00;
    --secondary-glow: rgba(255, 107, 0, 0.5);
    --gold-color: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.6);
    
    /* Accent Colors */
    --attack-color: #ff6b00;
    --defense-color: #00d4ff;
    --agility-color: #00ff88;
    --stamina-color: #ff3366;
    --intel-color: #9966ff;
    --special-color: #ffcc00;
    
    /* Tier Colors */
    --tier-s-color: #ffd700;
    --tier-a-color: #ff4d4d;
    --tier-b-color: #4d94ff;
    --tier-c-color: #00ff88;
    --tier-d-color: #b3b3b3;
    --tier-f-color: #666666;
    
    /* Background Colors */
    --dark-bg: #0a0e1a;
    --darker-bg: #050810;
    --panel-bg: rgba(10, 14, 26, 0.95);
    --card-bg: rgba(0, 20, 40, 0.8);
    
    /* Border Colors */
    --border-bright: #00d4ff;
    --border-subtle: rgba(0, 212, 255, 0.3);
    --border-dim: rgba(255, 255, 255, 0.1);
    
    /* Text */
    --text-light: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
    --text-glow: 0 0 10px rgba(0, 212, 255, 0.8);
    
    /* Fonts */
    --font-display: 'Orbitron', 'Bebas Neue', sans-serif;
    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Rajdhani', 'Inter', sans-serif;
    --font-mono: 'Orbitron', monospace;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    
    /* Animation */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: 
        /* Vignette overlay */
        radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%),
        /* Hex pattern */
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 17.32v25.36L30 60 0 42.68V17.32z' fill='none' stroke='%2300d4ff' stroke-opacity='0.03' stroke-width='0.5'/%3E%3C/svg%3E"),
        /* Base gradient */
        radial-gradient(ellipse at top center, #0f1929 0%, #050810 50%, #000000 100%);
    background-size: 100% 100%, 60px 60px, 100% 100%;
    background-attachment: fixed;
    color: var(--text-light);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    /* Safe area support for notches and home bars */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.game-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.game-header {
    background: linear-gradient(180deg, rgba(5, 15, 30, 0.98) 0%, rgba(0, 10, 20, 0.95) 100%);
    border-bottom: 1px solid rgba(0, 212, 255, 0.4);
    padding: 6px 15px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 212, 255, 0.2);
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 50;
    position: relative;
}

.game-header h1 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6));
    margin: 0;
    white-space: nowrap;
}

.game-header h1 .title-mode {
    color: inherit;
    transition: all 0.3s ease;
}

/* Navigation Tabs Container */
.nav-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(0, 10, 20, 0.8);
    padding: 3px 6px;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.15);
}

.view-container {
    display: none;
    flex: 1;
    min-height: 0;
    overflow: hidden; /* No scrolling in main container */
}

.view-container.active-view {
    display: flex;
    flex-direction: column;
    position: relative;
}

.character-display-area {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr minmax(220px, 300px);
    gap: 8px;
    padding: 8px 12px;
    align-items: stretch;
    min-height: 0;
    position: relative;
    z-index: 5;
    transition: all 0.4s ease;
    overflow: hidden;
}

.character-display-area.compact-mode {
    padding-bottom: 60px;
    grid-template-columns: 0 1fr 0;
}

.character-display-area.compact-mode .character-showcase {
    grid-column: 2;
    justify-self: center;
    width: 100%;
    max-width: 800px;
}

.character-display-area.compact-mode .stats-panel {
    position: fixed;
    top: 70px;
    background: rgba(0, 14, 26, 0.95);
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    z-index: 20;
    backdrop-filter: blur(10px);
}

.character-display-area.compact-mode .stats-panel-left {
    left: 20px;
}

.character-display-area.compact-mode .stats-panel-right {
    right: 20px;
}

.character-display-area.compact-mode .stat-group {
    gap: 12px;
}

.character-display-area.compact-mode .stat-row {
    grid-template-columns: 30px 70px 1fr 45px;
    gap: 8px;
}

.character-display-area.compact-mode .stats-panel-right .stat-row {
    grid-template-columns: 45px 1fr 70px 30px;
}

.stats-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    padding: 6px 4px;
    overflow: visible; /* No scrollbars */
}

.stat-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: visible;
}

.stat-row {
    display: grid;
    grid-template-columns: 26px 42px 1fr 90px;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    transition: all var(--transition-fast);
    border-radius: 4px;
}

.stat-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.stats-panel-right .stat-row {
    grid-template-columns: 90px 1fr 42px 26px;
}

.stat-icon {
    font-size: 1rem;
    color: var(--primary-color);
    text-shadow: var(--text-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.stat-name {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-light);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.stat-bar-wrapper {
    position: relative;
    height: 18px;
}

/* Segmented stat bar - like Injustice cards */
.stat-bar {
    height: 100%;
    background: linear-gradient(180deg, #0a0a0a 0%, #151515 50%, #0a0a0a 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
}

/* Segment lines overlay */
.stat-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 8px,
        rgba(0, 0, 0, 0.6) 8px,
        rgba(0, 0, 0, 0.6) 10px
    );
    z-index: 2;
    pointer-events: none;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        currentColor 15%, 
        currentColor 85%, 
        rgba(0, 0, 0, 0.3) 100%);
    box-shadow: 0 0 12px currentColor, inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Remove old pulse animation - we'll use hover instead */
@keyframes statBarPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.1); }
}

/* Hover glow effect on stat bars */
.stat-row:hover .stat-bar-fill {
    filter: brightness(1.2);
    box-shadow: 0 0 20px currentColor, inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Color-coded stat bars based on tier */
.stat-bar-fill.stat-bar-tier-s {
    color: var(--tier-s-color);
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        #ffd700 15%, 
        #ff8c00 85%, 
        rgba(0, 0, 0, 0.3) 100%) !important;
    animation: statBarGlowS 2s ease-in-out infinite;
}

.stat-bar-fill.stat-bar-tier-a {
    color: var(--tier-a-color);
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        #ff4d4d 15%, 
        #cc0000 85%, 
        rgba(0, 0, 0, 0.3) 100%) !important;
}

.stat-bar-fill.stat-bar-tier-b {
    color: var(--tier-b-color);
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        #4d94ff 15%, 
        #0066cc 85%, 
        rgba(0, 0, 0, 0.3) 100%) !important;
}

.stat-bar-fill.stat-bar-tier-c {
    color: var(--tier-c-color);
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        #00ff88 15%, 
        #00aa55 85%, 
        rgba(0, 0, 0, 0.3) 100%) !important;
}

.stat-bar-fill.stat-bar-tier-d {
    color: var(--tier-d-color);
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        #888 15%, 
        #555 85%, 
        rgba(0, 0, 0, 0.3) 100%) !important;
    animation: none;
}

.stat-bar-fill.stat-bar-tier-f {
    background: linear-gradient(90deg, #333, #555) !important;
    box-shadow: none;
    animation: none;
}

@keyframes statBarGlowS {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.6); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.9), 0 0 30px rgba(255, 215, 0, 0.4); }
}

/* Remove the ::after pseudo since we now use gradient in fill */

.stat-value {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    white-space: nowrap;
    min-width: 90px;
}

/* Badge slot takes fixed space even when empty */
.stat-value .stat-badge-slot {
    min-width: 28px;
    display: flex;
    justify-content: flex-end;
}

.stat-value .stat-number {
    min-width: 36px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Tier badge inside stat value */
.stat-tier-badge {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    color: #000;
    text-shadow: none;
    letter-spacing: 0;
    line-height: 1;
}

/* MAX badge for stats = 100 */
.stat-max-badge {
    font-family: var(--font-display);
    font-size: 0.45rem;
    font-weight: 900;
    padding: 2px 4px;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 50%, #ffd700 100%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    color: #000;
    text-shadow: none;
    letter-spacing: 0.5px;
    animation: maxBadgePulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
    flex-shrink: 0;
}

/* HIGH badge for stats 98-99 */
.stat-high-badge {
    font-family: var(--font-display);
    font-size: 0.4rem;
    font-weight: 700;
    padding: 1px 3px;
    background: linear-gradient(135deg, #ff4d4d 0%, #cc0000 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    color: #fff;
    text-shadow: none;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* ELITE badge for stats 95-97 */
.stat-elite-badge {
    font-family: var(--font-display);
    font-size: 0.38rem;
    font-weight: 700;
    padding: 1px 3px;
    background: linear-gradient(135deg, #9933ff 0%, #6600cc 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    color: #fff;
    text-shadow: none;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

@keyframes maxBadgePulse {
    0%, 100% { 
        box-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
    }
    50% { 
        box-shadow: 0 0 12px rgba(255, 215, 0, 1);
    }
}

.stats-panel-right .stat-value {
    justify-content: flex-start;
    flex-direction: row-reverse;
}

.stats-panel-right .stat-value .stat-badge-slot {
    justify-content: flex-start;
}

.character-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    height: 100%;
    min-height: 0;
    padding: 6px 5px;
    overflow: hidden;
}

.character-name-display {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--text-light);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.9);
    text-align: center;
    flex-shrink: 0;
    line-height: 1;
}

.character-scientific-name {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
}

.character-model-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.character-silhouette {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    border: 2px dashed rgba(0, 212, 255, 0.2);
    border-radius: 50%;
}

.character-silhouette i {
    font-size: 8rem;
    color: rgba(0, 212, 255, 0.15);
}

.character-model {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 25px rgba(0, 212, 255, 0.5)) drop-shadow(0 0 50px rgba(0, 212, 255, 0.2));
    animation: float 4s ease-in-out infinite, glow 5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 25px rgba(0, 212, 255, 0.5)) drop-shadow(0 0 50px rgba(0, 212, 255, 0.2)); }
    50% { filter: drop-shadow(0 0 35px rgba(0, 212, 255, 0.7)) drop-shadow(0 0 70px rgba(0, 212, 255, 0.4)); }
}

/* Page Load Animations */
@keyframes fadeSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

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

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

/* Apply staggered animations to stats view elements */
.stats-panel-left {
    animation: fadeSlideLeft 0.5s ease-out forwards;
}

.stats-panel-right {
    animation: fadeSlideRight 0.5s ease-out forwards;
}

.character-showcase {
    animation: fadeSlideIn 0.4s ease-out forwards;
}

.character-grid-container {
    animation: fadeSlideIn 0.5s ease-out 0.2s forwards;
}

.character-mini-info {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 8px;
    flex-shrink: 0;
    font-family: var(--font-body);
}

.character-mini-info span {
    padding: 4px 10px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    font-weight: 500;
}

/* Quick Info Bar (Weight, Speed, Bite) */
.quick-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4px 10px;
    margin-top: 4px;
    flex-shrink: 0;
}

.quick-info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-body);
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 4px;
    transition: all var(--transition-fast);
    min-width: 90px;
}

.quick-info-item span {
    min-width: 50px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.quick-info-item:hover {
    background: rgba(0, 30, 50, 0.9);
    border-color: rgba(0, 212, 255, 0.35);
}

.quick-info-item.clickable {
    cursor: pointer;
}

.quick-info-item.clickable:hover {
    background: rgba(0, 40, 60, 0.9);
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.25);
}

.quick-info-item.clickable .toggle-icon {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 2px;
    transition: transform 0.3s ease;
}

.quick-info-item.clickable:hover .toggle-icon {
    color: var(--primary-color);
    transform: rotate(180deg);
}

.quick-info-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

.quick-info-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
}

/* ========================================
   ABILITIES & TRAITS SECTION
   ======================================== */
.abilities-traits-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 0 10px;
    max-width: 100%;
    overflow: hidden;
}

.abilities-container,
.traits-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.abilities-header,
.traits-header {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
}

.abilities-header i {
    color: #ffcc00;
    font-size: 0.65rem;
}

.traits-header i {
    color: #00ff88;
    font-size: 0.65rem;
}

.abilities-tags,
.traits-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.ability-tag,
.trait-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border-radius: 15px;
    transition: all 0.2s ease;
}

.ability-tag {
    background: rgba(255, 204, 0, 0.15);
    border: 1px solid rgba(255, 204, 0, 0.4);
    color: #ffcc00;
}

.ability-tag i {
    font-size: 0.6rem;
    opacity: 0.8;
}

.ability-tag:hover {
    background: rgba(255, 204, 0, 0.25);
    border-color: rgba(255, 204, 0, 0.6);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
    transform: translateY(-1px);
}

.trait-tag {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.4);
    color: #00ff88;
}

.trait-tag i {
    font-size: 0.6rem;
    opacity: 0.8;
}

.trait-tag:hover {
    background: rgba(0, 255, 136, 0.25);
    border-color: rgba(0, 255, 136, 0.6);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    transform: translateY(-1px);
}

.ability-tag.placeholder,
.trait-tag.placeholder {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
}

.ability-tag.none,
.trait-tag.none {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.bottom-info-bar {
    background: linear-gradient(180deg, rgba(5, 10, 20, 0.9), rgba(10, 15, 25, 0.95));
    border-top: 2px solid rgba(0, 212, 255, 0.4);
    padding: 5px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--text-light);
    flex-wrap: nowrap;
    position: relative;
    z-index: 5;
    overflow: hidden;
    white-space: nowrap;
    min-height: 32px;
    max-height: 32px;
}

/* Keep buttons centered when toggle-grid-btn is hidden */
.bottom-info-bar .toggle-grid-btn[style*="display: none"] + .info-separator {
    display: none;
}

.info-item-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

.info-item-inline span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-item-inline i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.info-label {
    font-family: var(--font-display);
    color: var(--primary-color);
    letter-spacing: 1px;
}

.info-separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 1rem;
}

.expand-details-btn {
    padding: 4px 12px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 4px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 110px;
}

.expand-details-btn:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(0, 212, 255, 0.15));
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

.expand-details-btn i {
    transition: transform 0.3s ease;
}

.expand-details-btn.expanded i {
    transform: rotate(180deg);
}

/* Stats Page Comments Button */
.stats-comments-btn {
    padding: 4px 10px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 4px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
}

.stats-comments-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stats-comments-btn:not(:disabled):hover {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.25);
}

.stats-comments-btn i {
    font-size: 0.7rem;
}

.stats-comment-count {
    background: rgba(0, 212, 255, 0.25);
    padding: 1px 5px;
    border-radius: 6px;
    font-size: 0.6rem;
}

.toggle-grid-btn {
    padding: 4px 12px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 4px;
    color: var(--gold-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 5px;
}

.toggle-grid-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.toggle-grid-btn i {
    transition: transform 0.3s ease;
}

.toggle-grid-btn.hidden i {
    transform: rotate(180deg);
}

/* Hide close button on desktop */
.details-close-btn {
    display: none;
}

.details-panel {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 14, 26, 0.98);
    border-top: 2px solid rgba(0, 212, 255, 0.3);
    transition: max-height 0.4s ease-out;
    z-index: 10;
    box-shadow: 0 -8px 30px rgba(0, 212, 255, 0.4);
}

.details-panel.expanded {
    max-height: 70vh;
    overflow-y: auto;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

.details-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.details-column.full-height .detail-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.detail-section {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
}

.detail-section h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: var(--text-glow);
}

.detail-section h3 i {
    font-size: 1.1rem;
}

.detail-item {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.5;
}

.detail-item strong {
    color: var(--primary-color);
    font-weight: 600;
}

.detail-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.fight-screen {
    min-height: 0; /* Removed fixed min-height to prevent overflow */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    overflow-x: auto;
    flex: 1; /* Allow it to fill available space */
}

.fighter-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    flex: 0 0 auto;
    max-height: 100%;
}

.fighter-left {
    flex-direction: row-reverse;
}

.fighter-display {
    width: 280px;
    height: 280px;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    border: 4px solid var(--border-bright);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5), inset 0 0 30px rgba(0, 212, 255, 0.1);
    flex-shrink: 1;
    min-height: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.fighter-display:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.7), inset 0 0 40px rgba(0, 212, 255, 0.2);
}

.fighter-left .fighter-display {
    background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.1) 0%, transparent 70%);
    border-color: #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5), inset 0 0 30px rgba(0, 255, 136, 0.1);
}

.fighter-left .fighter-display:hover {
    border-color: #00ff88;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.7), inset 0 0 40px rgba(0, 255, 136, 0.2);
}

.fighter-right .fighter-display {
    background: radial-gradient(ellipse at center, rgba(255, 0, 153, 0.1) 0%, transparent 70%);
    border-color: #ff0099;
    box-shadow: 0 0 30px rgba(255, 0, 153, 0.5), inset 0 0 30px rgba(255, 0, 153, 0.1);
}

.fighter-right .fighter-display:hover {
    border-color: #ff0099;
    box-shadow: 0 0 40px rgba(255, 0, 153, 0.7), inset 0 0 40px rgba(255, 0, 153, 0.2);
}

.fighter-display.selecting {
    border-color: var(--gold-color);
    box-shadow: 0 0 50px rgba(255, 215, 0, 1), inset 0 0 30px rgba(255, 215, 0, 0.3);
    animation: selectPulse 1.5s ease-in-out infinite;
}

.fighter-left .fighter-display.selecting {
    border-color: #00ff88;
    box-shadow: 0 0 50px rgba(0, 255, 136, 1), inset 0 0 30px rgba(0, 255, 136, 0.3);
}

.fighter-right .fighter-display.selecting {
    border-color: #ff0099;
    box-shadow: 0 0 50px rgba(255, 0, 153, 1), inset 0 0 30px rgba(255, 0, 153, 0.3);
}

@keyframes selectPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.fighter-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: rgba(0, 212, 255, 0.4);
    text-align: center;
}

.fighter-placeholder i {
    font-size: 3.5rem;
}

.fighter-placeholder p {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.fighter-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6));
    position: relative;
    z-index: 1;
}

.fighter-placeholder {
    position: relative;
    z-index: 1;
}

.fighter-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
    padding: 15px 10px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-radius: 0 0 8px 8px;
    z-index: 10;
    pointer-events: none;
}

.fighter-info-overlay * {
    pointer-events: auto;
}

.fighter-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: var(--text-light);
    text-shadow: var(--text-glow);
    margin: 0;
}

.view-stats-btn {
    padding: 6px 16px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(0, 212, 255, 0.1));
    border: 2px solid var(--border-bright);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    flex-shrink: 0;
}

.view-stats-btn:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.5), rgba(0, 212, 255, 0.2));
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
    transform: translateY(-2px);
}

.compare-stats-panel {
    width: 200px;
    background: rgba(0, 14, 26, 0.95);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compare-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-light);
}

.compare-stat-row i {
    color: var(--primary-color);
    font-size: 1rem;
    width: 20px;
}

.compare-stat-label {
    flex: 1;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.compare-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--gold-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Compare stat highlighting - winner/loser */
.compare-stat-row.stat-winner {
    background: rgba(0, 255, 100, 0.15);
    border-radius: 4px;
    border-left: 3px solid #00ff88;
}

.compare-stat-row.stat-winner .compare-stat-value {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}

.compare-stat-row.stat-winner i {
    color: #00ff88;
}

.compare-stat-row.stat-loser {
    background: rgba(255, 60, 60, 0.1);
    border-radius: 4px;
    border-left: 3px solid transparent;
    opacity: 0.7;
}

.compare-stat-row.stat-loser .compare-stat-value {
    color: #ff6666;
}

.compare-stat-row.stat-tie {
    background: rgba(255, 200, 0, 0.1);
    border-radius: 4px;
    border-left: 3px solid #ffcc00;
}

.compare-stat-row.stat-tie .compare-stat-value {
    color: #ffcc00;
}

.fight-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
}

.vs-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    letter-spacing: 8px;
    color: var(--secondary-color);
    text-shadow: 0 0 30px rgba(255, 107, 0, 1), 0 0 60px rgba(255, 107, 0, 0.6);
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
    margin-top: 20px; /* Add margin to prevent it from being too high */
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.fight-btn {
    padding: 15px 40px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 6px;
    background: linear-gradient(135deg, #ff6b00, #ff3300);
    border: 4px solid #ff8800;
    border-radius: 12px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 15px rgba(255, 107, 0, 0.8);
    box-shadow: 0 0 40px rgba(255, 107, 0, 0.6);
    flex-shrink: 0;
}

.fight-btn:hover {
    background: linear-gradient(135deg, #ff8800, #ff5500);
    box-shadow: 0 0 60px rgba(255, 107, 0, 1);
    transform: scale(1.1);
}

.fight-btn i {
    animation: spark 1s ease-in-out infinite;
}

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

.character-grid-container {
    background: linear-gradient(180deg, rgba(5, 10, 20, 0.98) 0%, rgba(0, 8, 18, 1) 100%);
    padding: 8px 0 12px 0;
    height: auto;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 -4px 20px rgba(0, 212, 255, 0.2), inset 0 1px 0 rgba(0, 212, 255, 0.1);
    transition: all 0.4s ease;
    overflow: visible;
    position: relative;
    z-index: 20;
    flex-shrink: 0;
    margin-bottom: 0;
}

.character-grid-container.hidden {
    height: 0;
    min-height: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Floating Show Menu Button */
.show-menu-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 2px solid var(--border-bright);
    border-radius: 30px;
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4), 0 0 30px rgba(255, 107, 0, 0.3);
    transition: all 0.3s ease;
    animation: showMenuPulse 2s ease-in-out infinite;
}

.show-menu-btn:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.6), 0 0 40px rgba(255, 107, 0, 0.4);
}

@keyframes showMenuPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4), 0 0 30px rgba(255, 107, 0, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(0, 212, 255, 0.6), 0 0 40px rgba(255, 107, 0, 0.5); }
}

.grid-controls {
    display: flex;
    gap: 10px;
    padding: 0 16px;
    align-items: center;
    position: relative;
    z-index: 100;
    overflow: visible;
}

/* Dropdown Menu Container for Filter/Sort */
.dropdown-menu-container {
    position: relative;
    z-index: 150;
}

.dropdown-toggle-btn {
    padding: 8px 14px;
    background: rgba(0, 212, 255, 0.15);
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 6px;
    color: var(--text-light);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-toggle-btn:hover {
    background: rgba(0, 212, 255, 0.25);
    border-color: var(--primary-color);
}

.dropdown-toggle-btn.active {
    background: rgba(0, 212, 255, 0.3);
    border-color: var(--primary-color);
}

.dropdown-toggle-btn .dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.dropdown-toggle-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-panel {
    position: absolute;
    bottom: 100%;
    right: 0;
    min-width: 200px;
    background: rgba(10, 14, 26, 0.98);
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.dropdown-panel.show {
    display: flex;
}

/* Filter panel with tabs - compact design */
.filter-panel-compact {
    width: 180px;
    min-width: 180px;
}

.filter-category-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.filter-tab {
    flex: 1;
    padding: 6px 4px;
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 4px;
    color: var(--text-muted);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--text-light);
}

.filter-tab.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-category-content {
    min-height: 100px;
    max-height: 150px;
}

.filter-category {
    display: none;
}

.filter-category.active {
    display: block;
}

/* Checkbox group for multi-select filters */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 140px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
}

.checkbox-group::-webkit-scrollbar {
    width: 4px;
}

.checkbox-group::-webkit-scrollbar-track {
    background: transparent;
}

.checkbox-group::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 2px;
}

.checkbox-group::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.checkbox-option:hover {
    background: rgba(0, 212, 255, 0.15);
}

.checkbox-option input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-option input[type="checkbox"]:checked + span {
    color: var(--primary-color);
    font-weight: 500;
}

/* Sort panel specific styles */
#sort-panel {
    width: 160px;
    min-width: 160px;
}

#sort-panel .sort-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.section-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    padding-bottom: 4px;
}

.dropdown-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-section label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.dropdown-section .filter-select {
    width: 100%;
}

.clear-filters-btn {
    padding: 8px 12px;
    background: rgba(255, 60, 60, 0.2);
    border: 1px solid rgba(255, 60, 60, 0.4);
    border-radius: 4px;
    color: #ff6666;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.clear-filters-btn:hover {
    background: rgba(255, 60, 60, 0.3);
    border-color: #ff6666;
}

.sort-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-option:hover {
    background: rgba(0, 212, 255, 0.15);
}

.sort-option input[type="radio"] {
    display: none;
}

.sort-option input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.sort-option span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.sort-option span i {
    width: 16px;
    font-size: 0.75rem;
    color: var(--primary-color);
}

.active-filters-badge {
    padding: 6px 12px;
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--primary-color);
    min-width: 75px;
    text-align: center;
}

#filter-count {
    margin-right: 4px;
}

.search-box {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-select {
    padding: 8px 12px;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-box:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--border-bright);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.filter-select option {
    background: var(--dark-bg);
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.radar-chart-container {
    width: 300px;
    height: 300px;
    position: relative;
    margin: 10px 0;
}

.stat-tier-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.7rem;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 0;
    color: #000;
    font-weight: bold;
    text-shadow: none;
    flex-shrink: 0;
}

.tier-s, .tier-splus, .tier-sminus { background: #ffd700; box-shadow: 0 0 8px #ffd700; }
.tier-a, .tier-aplus, .tier-aminus { background: #ff4d4d; box-shadow: 0 0 6px #ff4d4d; }
.tier-b, .tier-bplus, .tier-bminus { background: #4d94ff; box-shadow: 0 0 4px #4d94ff; }
.tier-c, .tier-cplus, .tier-cminus { background: #00ff88; }
.tier-d, .tier-dplus, .tier-dminus { background: #b3b3b3; }
.tier-f, .tier-fplus, .tier-fminus { background: #555555; color: #aaa; }

.character-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 12px 14px 12px;
    scroll-behavior: smooth;
    flex: 1;
    /* Native scrollbar styling */
    scrollbar-width: auto;
    scrollbar-color: rgba(0, 212, 255, 0.7) rgba(0, 0, 0, 0.4);
}

.character-grid::-webkit-scrollbar {
    height: 8px;
}

.character-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

.character-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.7), rgba(0, 255, 180, 0.8), rgba(0, 212, 255, 0.7));
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.character-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.9), rgba(0, 255, 180, 1), rgba(0, 212, 255, 0.9));
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.8);
}

/* ==================== GRID ROW WRAPPER ==================== */
.grid-row-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 60px;
}

/* ==================== ARROW BUTTONS ==================== */
.grid-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    background: linear-gradient(135deg, rgba(10, 20, 35, 0.95), rgba(5, 12, 25, 0.98));
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 50;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 212, 255, 0.15);
}

.grid-arrow:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.08));
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 212, 255, 0.4);
    transform: translateY(-50%) scale(1.08);
}

.grid-arrow:active {
    transform: translateY(-50%) scale(0.95);
    background: rgba(0, 212, 255, 0.1);
    transition: transform 0.1s ease;
}

.grid-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.grid-arrow-left {
    left: 4px;
}

.grid-arrow-right {
    right: 4px;
}

/* ==================== FADE MASKS ==================== */
.grid-fade-mask {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 10;
}

.grid-fade-left {
    left: 60px;
    background: linear-gradient(to right, rgba(5, 10, 20, 0.95) 0%, transparent 100%);
}

.grid-fade-right {
    right: 60px;
    background: linear-gradient(to left, rgba(5, 10, 20, 0.95) 0%, transparent 100%);
}

/* ==================== CUSTOM SCROLLBAR (hidden - using native) ==================== */
.grid-scrollbar-container {
    display: none;
}

.character-card {
    min-width: 95px;
    width: 95px;
    height: 120px;
    background: rgba(10, 20, 35, 0.9);
    border: 2px solid rgba(0, 212, 255, 0.25);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    flex-shrink: 0;
}

.character-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6), 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px) scale(1.03);
}

/* S-tier cards get special glow on hover */
.character-card.card-tier-s:hover,
.character-card.card-tier-splus:hover,
.character-card.card-tier-sminus:hover {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8), 0 4px 15px rgba(0, 0, 0, 0.4);
    border-color: #ffd700;
}

.character-card.selected {
    border-color: var(--gold-color);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.7), 0 0 50px rgba(255, 215, 0, 0.3), inset 0 0 20px rgba(255, 215, 0, 0.1);
    background: rgba(255, 215, 0, 0.12);
    transform: scale(1.05);
    animation: selectedPulse 2s ease-in-out infinite;
    z-index: 5;
}

/* Card Tier Badge (corner) */
.card-tier-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
    color: #000;
    z-index: 10;
}

/* Card Tier Border Colors */
.character-card.card-tier-s,
.character-card.card-tier-splus,
.character-card.card-tier-sminus {
    border-color: rgba(255, 215, 0, 0.5);
}
.character-card.card-tier-a,
.character-card.card-tier-aplus,
.character-card.card-tier-aminus {
    border-color: rgba(255, 77, 77, 0.4);
}
.character-card.card-tier-b,
.character-card.card-tier-bplus,
.character-card.card-tier-bminus {
    border-color: rgba(77, 148, 255, 0.4);
}
.character-card.card-tier-c,
.character-card.card-tier-cplus,
.character-card.card-tier-cminus {
    border-color: rgba(0, 255, 136, 0.4);
}
.character-card.card-tier-d,
.character-card.card-tier-dplus,
.character-card.card-tier-dminus {
    border-color: rgba(179, 179, 179, 0.4);
}
.character-card.card-tier-f,
.character-card.card-tier-fplus,
.character-card.card-tier-fminus {
    border-color: rgba(85, 85, 85, 0.4);
}

/* Hover Stats Overlay */
.card-hover-stats {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
}

.character-card:hover .card-hover-stats {
    opacity: 1;
    transform: translateY(0);
}

.hover-stat {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.7rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 2px;
}

.hover-stat-icon {
    font-size: 0.6rem;
}

@keyframes selectedPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.7); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.9); }
}

.character-card.selected-fighter1 {
    border-color: #00ff88;
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.8);
    background: rgba(0, 255, 136, 0.15);
}

.character-card.selected-fighter2 {
    border-color: #ff0099;
    box-shadow: 0 0 25px rgba(255, 0, 153, 0.8);
    background: rgba(255, 0, 153, 0.15);
}

.character-card-image {
    width: 100%;
    height: 75px;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
}

.character-card-name {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text-light);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.95));
    padding: 4px 4px;
    text-align: center;
    line-height: 1.15;
    word-break: break-word;
    overflow-wrap: break-word;
    min-height: 32px;
}

.mode-btn {
    padding: 5px 12px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 15px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mode-btn:hover {
    color: var(--text-light);
    background: rgba(0, 212, 255, 0.1);
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--primary-color), rgba(0, 255, 136, 0.8));
    color: #000;
    text-shadow: none;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    font-weight: 700;
}

.mode-btn i {
    font-size: 0.7rem;
}

/* Auth Container - Integrated into header */
.auth-container {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(0, 212, 255, 0.05));
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    color: var(--primary-color);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(0, 212, 255, 0.15));
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.auth-btn.logged-in {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 212, 255, 0.05));
    border-color: #00ff88;
    color: #00ff88;
}

.auth-btn.logged-in:hover {
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

/* ==================== AUTH AREA ==================== */
.auth-area {
    display: flex;
    align-items: center;
}

.auth-login-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 25px;
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.auth-login-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
}

.auth-login-btn i {
    font-size: 0.9rem;
}

/* ==================== USER STATS BAR (Header) ==================== */
.user-stats-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 15px;
}

.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.user-profile-mini:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.user-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.user-avatar-mini i {
    font-size: 1.2rem;
    color: #fff;
}

.user-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-level-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-name-level {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-name-mini {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--text-light);
}

.user-level-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.7rem;
    padding: 2px 6px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    border-radius: 4px;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.xp-bar-container {
    width: 120px;
    height: 8px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    border-radius: 3px;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.xp-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.5rem;
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: rgba(10, 25, 47, 0.98);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 12px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 160px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.2);
}

.user-profile-mini:hover .profile-dropdown,
.user-profile-mini.dropdown-open .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-light);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.profile-dropdown-item:hover {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary-color);
}

.profile-dropdown-item i {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}

.profile-dropdown-item.logout {
    color: #ff6b6b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
    padding-top: 12px;
}

.profile-dropdown-item.logout:hover {
    background: rgba(255, 77, 77, 0.15);
    color: #ff4d4d;
}

/* Battle Points Display */
.battle-points-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 107, 0, 0.4);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.battle-points-display:hover {
    background: rgba(255, 107, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
}

.bp-coin {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #ff6b00, #ff8c00, #ffd700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.6), inset 0 0 5px rgba(255, 215, 0, 0.4);
    animation: bpCoinGlow 2s ease-in-out infinite;
}

@keyframes bpCoinGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 107, 0, 0.6), inset 0 0 5px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 0, 0.8), inset 0 0 8px rgba(255, 215, 0, 0.6); }
}

.bp-icon {
    font-size: 0.8rem;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.bp-amount {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: #ffd700;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.bp-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 215, 0, 0.7);
    letter-spacing: 1px;
}

/* ==================== PROFILE MODAL ==================== */
.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.profile-modal.active {
    display: flex;
}

.profile-modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background: linear-gradient(180deg, rgba(10, 25, 47, 0.98) 0%, rgba(5, 15, 30, 0.98) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 16px;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.3), 0 0 100px rgba(0, 212, 255, 0.1);
    overflow-y: auto;
    position: relative;
}

.profile-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.profile-modal-close:hover {
    background: rgba(255, 77, 77, 0.3);
    border-color: #ff4d4d;
    color: #ff4d4d;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    flex-shrink: 0;
    position: relative;
}

.profile-avatar-large.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-avatar-large.clickable:hover {
    border-color: #00ff88;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.6);
    transform: scale(1.05);
}

.profile-avatar-large.clickable:hover .avatar-edit-overlay {
    opacity: 1;
}

.avatar-edit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.avatar-edit-overlay i {
    font-size: 1.5rem;
    color: #fff;
}

/* Always show a subtle edit hint on the avatar */
.profile-avatar-large.clickable::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color), #00ff88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--darker-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.profile-avatar-large.clickable::before {
    content: 'Γ£Ä';
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 0.9rem;
    color: #000;
    z-index: 3;
    font-weight: bold;
}

.profile-avatar-large > i {
    font-size: 3rem;
    color: #fff;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-login-hint {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 0 0 8px 0;
}

.profile-login-hint span {
    color: var(--primary-color);
}

.profile-user-info {
    flex: 1;
}

.profile-username {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 3px;
    color: var(--text-light);
    margin: 0 0 10px 0;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.profile-level-display {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-level-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    padding: 4px 12px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    border-radius: 6px;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.profile-xp-bar {
    width: 150px;
    height: 12px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.profile-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    border-radius: 5px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.profile-xp-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
}

/* Profile Stats Grid */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px 30px;
}

.profile-stat-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.profile-stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.profile-stat-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.profile-stat-icon.bp-coin-large {
    background: linear-gradient(135deg, #ff6b00, #ffd700);
    border: 2px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.5);
}

.profile-stat-icon.bp-coin-large span {
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.profile-stat-icon.xp-icon {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
}

.profile-stat-icon.level-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: #fff;
}

.profile-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--text-light);
    letter-spacing: 1px;
}

.profile-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Profile Sections */
.profile-section {
    padding: 20px 30px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.profile-section h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-section-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 15px 0;
}

/* Avatar Search */
.avatar-search-container {
    margin-bottom: 15px;
}

.avatar-search-input {
    width: 100%;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.avatar-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* Avatar Grid */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    padding: 5px;
}

.avatar-grid::-webkit-scrollbar {
    width: 8px;
}

.avatar-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.avatar-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.avatar-option {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.avatar-option:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.avatar-option.selected {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.avatar-option.selected::after {
    content: 'Γ£ô';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: #00ff88;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #000;
    font-weight: bold;
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile Input Groups */
.profile-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-input-group input {
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.profile-input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* Display Name Edit (legacy) */
.display-name-edit {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.display-name-edit input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.display-name-edit input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* Profile Footer */
.profile-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    position: sticky;
    bottom: 0;
}

.profile-footer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-member-since {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.profile-login-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 4px 0 0 0;
}

.profile-login-hint span {
    color: var(--primary-color);
    font-family: 'Consolas', monospace;
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-unsaved-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #ffc107;
    animation: pulse-warning 1.5s ease-in-out infinite;
}

.profile-unsaved-indicator.visible {
    display: flex;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.profile-save-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border: none;
    border-radius: 8px;
    color: #000;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.profile-save-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.5);
}

.profile-save-btn:disabled {
    background: linear-gradient(135deg, #4a4a4a, #3a3a3a);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    box-shadow: none;
}

.profile-save-btn.saving {
    pointer-events: none;
}

.profile-save-btn.saving i {
    animation: spin 1s linear infinite;
}

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

/* Avatar Picker Trigger */
.avatar-picker-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 2px dashed rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

.avatar-picker-trigger:hover {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
}

.avatar-picker-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.avatar-picker-trigger:hover .avatar-picker-preview {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.avatar-picker-preview i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
}

.avatar-picker-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-picker-hint {
    font-size: 0.85rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 5px;
}

.avatar-picker-hint i {
    color: var(--primary-color);
}

/* Avatar Picker Modal */
.avatar-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.avatar-picker-modal.active {
    display: flex;
}

.avatar-picker-content {
    background: linear-gradient(145deg, var(--card-bg), var(--darker-bg));
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

.avatar-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar-picker-header h3 {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-picker-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s ease;
}

.avatar-picker-close:hover {
    color: var(--text-light);
}

.avatar-picker-content .avatar-search-container {
    margin-bottom: 15px;
}

.avatar-picker-content .avatar-grid {
    max-height: 350px;
    flex: 1;
}

/* Username changes remaining */
.username-changes-remaining {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 8px;
}

.username-changes-remaining.warning {
    color: var(--warning-color, #ffaa00);
}

.username-changes-remaining.error {
    color: var(--danger-color, #ff4466);
}

/* REMOVED fight-profile-badge */

.battle-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.battle-stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 4px;
}

.battle-stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: block;
    margin-bottom: 2px;
}

.battle-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: var(--text-light);
}

.battle-stat-bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 4px;
    border-radius: 2px;
}

.battle-stat-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
}

@media (max-width: 1400px) {
    .character-display-area {
        gap: 10px;
        padding: 10px;
    }
    
    .character-model-container {
        max-width: 320px;
    }
    
    .fighter-display {
        max-width: 240px;
    }
    
    .stat-name {
        font-size: 1rem;
    }
    
    .stat-icon {
        font-size: 1.3rem;
    }
}

@media (max-width: 1024px) {
    /* Fix white edges - force black background */
    html {
        background-color: #000000 !important;
    }
    
    body {
        background-color: #000000;
    }
    
    /* --- GLOBAL LAYOUT --- */
    .game-screen {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
        min-height: 0;
        overflow: hidden;
    }
    
    .view-container.active-view {
        height: 100%;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    /* --- HEADER - Compact mobile layout --- */
    .game-header {
        padding: 8px 12px;
        gap: 6px;
        flex-shrink: 0;
        min-height: auto;
        padding-right: 60px; /* Space for auth button */
    }

    .game-header h1 {
        font-size: 0.85rem;
        letter-spacing: 2px;
        margin: 0;
        white-space: nowrap;
    }
    
    .nav-tabs {
        gap: 4px;
        padding: 4px 6px;
        border-radius: 20px;
    }

    .mode-btn {
        padding: 6px 10px;
        font-size: 0.65rem;
        letter-spacing: 1px;
        gap: 4px;
    }
    
    .mode-btn .mode-text {
        display: none;
    }
    
    .mode-btn i {
        font-size: 0.85rem;
    }
    
    .auth-container {
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
    }
    
    .auth-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
        border-width: 1px;
    }
    
    #auth-btn-text {
        display: none;
    }

    /* --- STATS VIEW - Side by side on mobile --- */
    .character-display-area {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr;
        padding: 8px;
        gap: 8px;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        align-items: stretch;
    }

    .character-showcase {
        grid-column: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 8px;
        background: rgba(0, 20, 40, 0.4);
        border-radius: 12px;
        border: 1px solid rgba(0, 212, 255, 0.3);
        min-width: 140px;
        max-width: 180px;
    }

    .stats-panel-left {
        grid-column: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow: hidden;
        padding: 5px;
    }
    
    .stats-panel-right {
        grid-column: 3;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow: hidden;
        padding: 5px;
    }
    
    /* Compact stat rows for mobile */
    .stat-group-container {
        margin-bottom: 6px;
    }
    
    .stat-row {
        display: flex;
        flex-direction: column;
        gap: 2px;
        margin-bottom: 4px;
    }
    
    .stat-icon {
        display: none;
    }
    
    .stat-name {
        font-size: 0.55rem;
        text-align: center;
        letter-spacing: 1px;
    }
    
    .stat-bar-wrapper {
        width: 100%;
    }
    
    .stat-bar {
        height: 6px;
    }
    
    .stat-value {
        font-size: 0.75rem;
        justify-content: center;
        flex-direction: row;
        gap: 3px;
    }
    
    .stat-tier-badge {
        font-size: 0.45rem;
        padding: 1px 3px;
    }
    
    /* Hide substats on mobile */
    .substat-container {
        display: none;
    }

    /* Character Display */
    .character-model-container {
        max-width: 130px;
        width: 100%;
        margin: 0 auto;
        flex-shrink: 0;
    }
    
    .character-model {
        width: 100%;
        height: auto;
        max-height: 120px;
        object-fit: contain;
    }

    .character-name-display {
        font-size: 0.9rem;
        line-height: 1.2;
        margin-bottom: 4px;
        letter-spacing: 1px;
    }

    .character-scientific-name {
        font-size: 0.55rem;
        margin-bottom: 5px;
    }
    
    .character-mini-info {
        justify-content: center;
        gap: 4px;
        font-size: 0.55rem;
        margin-top: 4px;
        flex-wrap: wrap;
    }
    
    .character-mini-info span {
        padding: 2px 5px;
        background: rgba(0, 212, 255, 0.15);
        border-radius: 4px;
    }

    /* Stats - Compact Vertical Layout */
    .stats-panel {
        padding: 0;
        gap: 2px;
    }
    
    .stat-group {
        gap: 2px;
    }

    .stat-row {
        display: flex;
        flex-direction: column;
        gap: 1px;
        margin-bottom: 2px;
    }
    
    .stat-row > * {
        order: unset !important;
    }

    /* Create a header row for stat */
    .stat-icon {
        display: none; /* Hide icon to save space */
    }
    
    .stat-name {
        font-size: 0.6rem;
        letter-spacing: 1px;
        text-align: center;
        order: 1;
    }
    
    .stat-bar-wrapper {
        order: 2;
        width: 100%;
    }
    
    .stat-bar {
        height: 8px;
    }
    
    .stat-value {
        font-size: 0.85rem;
        justify-content: center !important;
        flex-direction: row !important;
        gap: 3px;
        order: 3;
    }
    
    .stat-tier-badge {
        font-size: 0.5rem;
        padding: 1px 3px;
    }

    /* Right panel same as left */
    .stats-panel-right .stat-row {
        display: flex;
        flex-direction: column;
    }
    
    .stats-panel-right .stat-icon { display: none; }
    .stats-panel-right .stat-name { text-align: center; }
    .stats-panel-right .stat-value { justify-content: center !important; flex-direction: row !important; }

    /* Substats - Hidden on mobile to save space */
    .substat-container {
        display: none;
    }

    /* --- BOTTOM INFO BAR - Simplified for mobile --- */
    .bottom-info-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 12px;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
        overflow: visible;
        min-height: auto;
        background: rgba(0, 20, 40, 0.9);
        border-top: 1px solid rgba(0, 212, 255, 0.3);
    }

    .info-separator { display: none; }

    .info-item-inline {
        display: none; /* Hide abilities/traits on mobile - too long */
    }
    
    .info-label {
        display: none;
    }

    .expand-details-btn, .toggle-grid-btn, .stats-comments-btn {
        padding: 8px 12px;
        font-size: 0.7rem;
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 36px;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    /* When grid is hidden, expand main content */
    .character-grid-container.hidden {
        display: none !important;
    }
    
    .character-grid-container.hidden + .character-display-area,
    .view-container:has(.character-grid-container.hidden) .character-display-area {
        flex: 1;
    }

    /* --- CHARACTER GRID - Bottom dock style --- */
    .character-grid-container {
        flex-shrink: 0;
        min-height: 130px;
        max-height: 150px;
        padding: 6px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        background: rgba(0, 10, 20, 0.95);
        border-top: 1px solid rgba(0, 212, 255, 0.2);
        transition: all 0.3s ease;
    }
    
    .character-grid-container.hidden {
        min-height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }
    
    .grid-controls {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 5px;
        margin-bottom: 8px;
        overflow-x: auto;
        justify-content: flex-start;
    }
    
    .search-box {
        flex: 1;
        min-width: 120px;
        max-width: 180px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .filter-select {
        flex: 0 0 auto;
        width: auto;
        min-width: 80px;
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    .filter-group {
        display: flex;
        gap: 6px;
        flex: 0 0 auto;
    }
    
    .character-grid {
        gap: 10px;
        padding: 5px 8px;
        flex: 1;
        height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        align-items: center;
        -webkit-overflow-scrolling: touch;
    }
    
    .character-card {
        min-width: 80px;
        width: 80px;
        height: 90px;
        flex-shrink: 0;
    }
    
    /* Grid navigation responsive */
    .grid-row-wrapper {
        padding: 0 44px;
    }
    
    .grid-arrow {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 0.9rem;
    }
    
    .grid-arrow-left {
        left: 2px;
    }
    
    .grid-arrow-right {
        right: 2px;
    }
    
    .grid-fade-mask {
        width: 25px;
    }
    
    .grid-fade-left {
        left: 44px;
    }
    
    .grid-fade-right {
        right: 44px;
    }
    
    .grid-scrollbar-container {
        padding: 0 50px;
    }
    
    .grid-scrollbar-track {
        height: 5px;
    }
    
    .character-card-image {
        height: 55px;
    }
    
    .character-card-name {
        font-size: 0.6rem;
        padding: 4px 2px;
    }

    /* --- COMPARE VIEW - Bigger elements --- */
    .fight-screen {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: 1fr auto;
        padding: 15px 10px;
        gap: 8px;
        flex: 1;
        min-height: 0;
        overflow: hidden;
        align-items: center;
    }

    .fighter-section {
        flex-direction: column !important;
        gap: 8px;
        justify-content: center;
        align-items: center;
    }
    
    .fighter-left {
        grid-column: 1;
        grid-row: 1;
    }
    
    .fighter-right {
        grid-column: 3;
        grid-row: 1;
    }

    .fight-center {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .fighter-display {
        width: 120px;
        height: 120px;
        border-width: 3px;
    }

    .fighter-placeholder i {
        font-size: 2rem;
    }
    
    .fighter-placeholder p {
        font-size: 0.7rem;
    }
    
    .fighter-name {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }
    
    .fighter-info-overlay {
        padding: 10px 6px 6px;
    }

    .view-stats-btn {
        padding: 4px 8px;
        font-size: 0.65rem;
    }

    .vs-badge { 
        font-size: 1.5rem; 
        margin: 0;
    }
    
    /* Show radar chart on mobile - bigger size */
    .radar-chart-container {
        display: block !important;
        width: 140px;
        height: 140px;
        max-width: 140px;
        margin: 0;
    }

    .fight-btn {
        grid-column: 1 / -1;
        grid-row: 2;
        padding: 12px 30px;
        font-size: 1.2rem;
        justify-self: center;
    }
    
    /* Hide compare stats panels on mobile */
    .compare-stats-panel {
        display: none;
    }

    /* --- DETAILS PANEL --- */
    .details-grid {
        grid-template-columns: 1fr;
    }

    .details-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: rgba(5, 8, 16, 0.98);
        border-top: 2px solid var(--primary-color);
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    
    .details-panel.expanded {
        transform: translateY(0);
        max-height: 75vh;
        overflow-y: auto;
    }
    
    /* Close button for details panel on mobile */
    .details-close-btn {
        display: flex !important;
        position: sticky;
        top: 0;
        background: rgba(5, 8, 16, 0.95);
        padding: 12px;
        justify-content: center;
        border-bottom: 1px solid rgba(0, 212, 255, 0.3);
        z-index: 10;
    }
    
    .details-close-btn button {
        padding: 10px 30px;
        font-family: 'Bebas Neue', sans-serif;
        font-size: 1rem;
        letter-spacing: 2px;
        background: linear-gradient(135deg, rgba(255, 60, 60, 0.2), rgba(255, 60, 60, 0.1));
        border: 2px solid #ff4444;
        border-radius: 6px;
        color: #ff4444;
        cursor: pointer;
    }
}

/* New Battle Profile Styles */
.main-battle-profile {
    width: 100%;
    max-width: 500px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.battle-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    padding: 5px;
    border-radius: 4px;
}

.battle-group-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 2px;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
}

.battle-substat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.substat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 0 2px;
}

.substat-val {
    color: #fff;
    font-weight: bold;
}

.substat-bar-bg {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.substat-bar-fill {
    height: 100%;
    border-radius: 2px;
}

/* Mobile adjustments for battle profile */
@media (max-width: 1024px) {
    .main-battle-profile {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }
}


/* --- NEW SUBSTAT STYLES --- */
.stat-group-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2px;
}

.substat-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    padding-left: 28px;
    padding-right: 0;
    margin-top: -2px;
}

.substat-container.right-align {
    padding-left: 0;
    padding-right: 28px;
    justify-content: flex-end;
}

.substat-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.substat-container.right-align .substat-row {
    flex-direction: row-reverse;
}

.substat-label {
    font-family: var(--font-body);
    font-size: 0.55rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.substat-value {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: none;
}

/* Hide substat bars - just show label + value */
.substat-bar-bg {
    display: none;
}

/* Hide the old battle profile grid since we moved it */
.main-battle-profile {
    display: none !important;
}

/* --- COMPACT SUBSTAT STYLES --- */
.substat-row.compact {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    padding: 1px 0;
}

.substat-container.right-align .substat-row.compact {
    justify-content: flex-end;
}

.substat-row.compact .substat-label {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 24px;
}

.substat-row.compact .substat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.substat-container.right-align .substat-row.compact .substat-label {
    order: 2;
    text-align: left;
}

.substat-container.right-align .substat-row.compact .substat-value {
    order: 1;
}

/* --- ABILITIES & TRAITS CARDS --- */
.abilities-card,
.traits-card {
    margin-top: 6px;
    background: linear-gradient(135deg, rgba(15, 20, 30, 0.9), rgba(5, 10, 20, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: visible;
    flex-shrink: 0;
}

.abilities-card .card-header,
.traits-card .card-header {
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.15), transparent);
    padding: 4px 8px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 600;
    color: #ff6b00;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255, 107, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 5px;
}

.traits-card .card-header {
    background: linear-gradient(90deg, transparent, rgba(255, 204, 0, 0.15));
    border-bottom-color: rgba(255, 204, 0, 0.15);
    color: #ffcc00;
    justify-content: flex-end;
}

.abilities-list,
.traits-list {
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    /* No max-height or overflow - all items visible */
}

.ability-item,
.trait-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.25);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    transition: all var(--transition-fast);
    cursor: default;
}

.ability-item:hover {
    background: rgba(255, 107, 0, 0.2);
    border-color: rgba(255, 107, 0, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.trait-item {
    background: rgba(255, 204, 0, 0.1);
    border-color: rgba(255, 204, 0, 0.25);
}

.trait-item:hover {
    background: rgba(255, 204, 0, 0.2);
    border-color: rgba(255, 204, 0, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.3);
}

.ability-item i {
    font-size: 0.5rem;
    color: #ff6b00;
}

.trait-item i {
    font-size: 0.5rem;
    color: #ffcc00;
}

.ability-item.placeholder,
.trait-item.placeholder {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}
.trait-item {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ability-item i,
.trait-item i {
    font-size: 0.6rem;
    color: #ff6b00;
}

.trait-item i {
    color: #ffcc00;
}

.ability-item.placeholder,
.trait-item.placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    justify-content: center;
}

/* --- BATTLE RECORD BADGE --- */
.battle-record-badge {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    background: linear-gradient(180deg, 
        rgba(40, 45, 55, 0.95) 0%, 
        rgba(20, 25, 35, 0.95) 50%,
        rgba(30, 35, 45, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0;
    margin: 4px auto;
    max-width: 260px;
    flex-shrink: 0;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

/* Metallic shine effect */
.battle-record-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.battle-record-badge:hover::before {
    left: 100%;
}

.battle-record-badge .record-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 6px 14px;
    position: relative;
    transition: all var(--transition-fast);
}

.battle-record-badge .record-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.battle-record-badge .record-item i {
    font-size: 0.7rem;
    margin-bottom: 1px;
    transition: all var(--transition-fast);
}

.battle-record-badge .record-item.rank i {
    color: #ffcc00;
    text-shadow: 0 0 6px rgba(255, 204, 0, 0.5);
}

.battle-record-badge .record-item.rank:hover i {
    text-shadow: 0 0 12px rgba(255, 204, 0, 0.8);
    transform: scale(1.1);
}

.battle-record-badge .record-item.battles i {
    color: #00d4ff;
    text-shadow: 0 0 6px rgba(0, 212, 255, 0.5);
}

.battle-record-badge .record-item.winrate i {
    color: #00ff88;
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

.battle-record-badge .record-item.winrate:hover i {
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.8);
    transform: scale(1.1);
}

.battle-record-badge .record-value {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.battle-record-badge .record-label {
    font-family: var(--font-body);
    font-size: 0.45rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.record-divider {
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    align-self: stretch;
}

/* Adjust mobile layout for new substats */
@media (max-width: 1024px) {
    .substat-container {
        padding-left: 0;
        padding-right: 0;
        margin-top: -5px;
        margin-bottom: 10px;
    }
    
    .substat-container.right-align {
        padding-left: 0;
        padding-right: 0;
    }
    
    .substat-row {
        grid-template-columns: 80px 1fr 30px;
    }
    
    .substat-container.right-align .substat-row {
        grid-template-columns: 30px 1fr 80px;
    }
}

/* --- SMALL PHONE OPTIMIZATIONS --- */
@media (max-width: 480px) {
    /* Header stays compact */
    .game-header {
        padding: 6px 10px;
        gap: 4px;
        padding-right: 50px;
    }

    .game-header h1 {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
    
    .nav-tabs {
        gap: 2px;
        padding: 3px 5px;
    }

    .mode-btn {
        padding: 5px 8px;
        font-size: 0.6rem;
    }
    
    .mode-btn i {
        font-size: 0.75rem;
    }
    
    .auth-container {
        right: 6px;
    }
    
    .auth-btn {
        padding: 6px 10px;
        font-size: 0.65rem;
    }

    /* Stats area */
    .character-display-area {
        padding: 8px;
        gap: 8px;
    }

    .character-showcase {
        padding: 12px 8px;
    }

    .character-model-container {
        max-width: 160px;
    }
    
    .character-model {
        max-height: 140px;
    }

    .character-name-display {
        font-size: 1.2rem;
    }

    .character-scientific-name {
        font-size: 0.65rem;
    }

    .character-mini-info {
        font-size: 0.6rem;
        gap: 4px;
    }
    
    .character-mini-info span {
        padding: 3px 6px;
    }

    /* Bottom bar */
    .bottom-info-bar {
        padding: 8px 10px;
        gap: 6px;
    }

    .expand-details-btn, .toggle-grid-btn, .stats-comments-btn {
        padding: 8px 12px;
        font-size: 0.7rem;
        min-height: 36px;
    }

    /* Grid */
    .character-grid-container {
        min-height: 120px;
        max-height: 130px;
        padding: 6px;
    }

    .grid-controls {
        gap: 5px;
        margin-bottom: 6px;
    }
    
    .search-box {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 100px;
        max-width: 140px;
    }

    .filter-select {
        padding: 6px 8px;
        font-size: 0.65rem;
        min-width: 65px;
    }

    .character-grid {
        gap: 8px;
        padding: 4px;
    }

    .character-card {
        min-width: 65px;
        width: 65px;
        height: 75px;
    }

    .character-card-image {
        height: 45px;
    }

    .character-card-name {
        font-size: 0.5rem;
        padding: 3px 2px;
    }

    /* Compare View */
    .fight-screen {
        padding: 8px;
        gap: 8px;
    }

    .fighter-display {
        width: 100px;
        height: 100px;
    }

    .fighter-placeholder i {
        font-size: 1.8rem;
    }

    .fighter-placeholder p {
        font-size: 0.6rem;
    }

    .fighter-name {
        font-size: 0.75rem;
    }

    .view-stats-btn {
        padding: 4px 8px;
        font-size: 0.55rem;
    }

    .vs-badge {
        font-size: 1.2rem;
    }

    .fight-btn {
        padding: 8px 20px;
        font-size: 1rem;
    }
    
    .radar-chart-container {
        width: 100px;
        height: 100px;
    }
}

/* --- LAPTOP/DESKTOP FIXES --- */
@media (min-width: 1025px) {
    .fight-screen {
        height: 100%;
        max-height: calc(100vh - 240px - 60px); /* Subtract grid and header height */
        overflow-y: auto;
        align-items: center;
        justify-content: center; /* Center content vertically */
        padding-bottom: 20px;
        gap: 20px; /* Restore gap */
    }

    .fight-center {
        gap: 20px; /* Restore gap */
    }

    .radar-chart-container {
        width: 300px; /* Restore size */
        height: 300px;
        margin: 10px 0;
    }

    .fighter-display {
        width: 280px; /* Restore size */
        height: 280px;
    }
}

/* Compare Controls Bar */
.compare-controls-bar {
    justify-content: space-between;
    padding: 8px 20px; /* Match standard bar padding */
    height: auto;
    min-height: 50px; /* Ensure consistent height */
    align-items: center;
}

.compare-controls-bar .fight-btn {
    padding: 6px 24px; /* Smaller padding to fit in bar */
    font-size: 1.2rem; /* Smaller font */
    margin: 0;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.4);
    border-width: 2px; /* Thinner border */
}

.compare-controls-bar .fight-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 107, 0, 0.8);
}

/* Ensure Compare Screen fits vertically */
@media (min-width: 1025px) {
    .fight-screen {
        /* Calculate height: 100vh - Header(60px) - Grid(240px) - ControlBar(50px) */
        max-height: calc(100vh - 60px - 240px - 50px);
        padding: 10px;
        gap: 10px;
        justify-content: center;
        overflow: hidden; /* Prevent scroll if possible */
    }

    .radar-chart-container {
        width: 260px; /* Slightly smaller to ensure fit */
        height: 260px;
        margin: 5px 0;
    }

    .fighter-display {
        width: 240px; /* Slightly smaller to ensure fit */
        height: 240px;
    }
    
    .fighter-placeholder i {
        font-size: 3rem;
    }
}

/* =====================================================
   AUTHENTICATION STYLES
   ===================================================== */

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(10, 14, 26, 0.98);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.user-avatar {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.user-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--text-light);
}

.user-dropdown-menu {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(0, 212, 255, 0.1);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--primary-color);
}

.dropdown-item.logout {
    color: #ff4444;
}

.dropdown-item.logout i {
    color: #ff4444;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 212, 255, 0.2);
    margin: 5px 0;
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.auth-modal.show {
    opacity: 1;
    visibility: visible;
}

.auth-modal-content {
    background: linear-gradient(180deg, #0f1929 0%, #050810 100%);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.auth-modal.show .auth-modal-content {
    transform: scale(1);
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.auth-modal-close:hover {
    opacity: 1;
}

/* Auth Forms */
.auth-form h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 3px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

.auth-form h2 i {
    margin-right: 10px;
}

.auth-error {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid #ff4444;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    color: #ff6b6b;
    font-size: 0.85rem;
    display: none;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

.form-group label i {
    margin-right: 6px;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 20, 40, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), #0088aa);
    border: none;
    border-radius: 8px;
    color: #000;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Toast Notification */
.auth-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
    padding: 12px 25px;
    border-radius: 25px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.auth-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile Auth Styles */
@media (max-width: 1024px) {
    .auth-container {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        order: 10;
        margin-left: auto;
    }

    .auth-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .auth-btn i {
        font-size: 0.8rem;
    }

    #auth-btn-text {
        display: none;
    }

    .auth-container.logged-in #auth-btn-text {
        display: inline;
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-dropdown {
        right: -10px;
        min-width: 160px;
    }

    .auth-modal-content {
        padding: 25px 20px;
        max-width: 340px;
    }

    .auth-form h2 {
        font-size: 1.5rem;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .auth-submit-btn {
        padding: 12px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .auth-btn {
        padding: 4px 8px;
    }

    .auth-modal-content {
        width: 95%;
        padding: 20px 15px;
    }
}

/* ========================================
   RANKINGS VIEW STYLES
   ======================================== */

#rankings-view {
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.95) 0%, rgba(5, 8, 16, 0.98) 100%);
    height: 100%;
    overflow: hidden;
}

.rankings-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    overflow-y: hidden;
}

.rankings-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: clip;
    -webkit-overflow-scrolling: touch;
    padding: 20px 20px 20px 25px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 0, 0.3) transparent;
    position: relative;
}

.rankings-list::-webkit-scrollbar {
    width: 6px;
}

.rankings-list::-webkit-scrollbar-track {
    background: transparent;
}

.rankings-list::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

.rankings-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

.rankings-header {
    text-align: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.rankings-title-section {
    margin-bottom: 10px;
}

.rankings-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rankings-title i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

.rankings-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #ffd700, #ff6b00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    margin-bottom: 10px;
}

.rankings-header h2 i {
    -webkit-text-fill-color: #ffd700;
    margin-right: 10px;
}

.rankings-subtitle {
    color: #888;
    font-size: 0.9rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.4;
}

.rankings-login-prompt {
    background: rgba(255, 107, 0, 0.15);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 8px;
    padding: 10px 20px;
    margin-top: 15px;
    display: inline-block;
    color: #ff9944;
    font-size: 0.9rem;
}

.rankings-login-prompt i {
    margin-right: 8px;
}

.rankings-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.rankings-controls .search-box {
    flex: 1;
}

.rankings-controls .filter-select {
    min-width: 180px;
}

.rankings-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.rankings-loading {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 1.1rem;
}

.rankings-loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
    color: var(--primary-color);
}

/* Individual Ranking Card */
.ranking-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 10px;
    transition: background 0.2s ease, border-color 0.2s ease;
    min-width: 0;
}

.ranking-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ranking-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 10px;
}

.ranking-card-btns {
    display: flex;
    gap: 8px;
}

.ranking-card:hover {
    background: rgba(20, 28, 50, 0.9);
    border-color: rgba(0, 212, 255, 0.4);
}

.ranking-card.top-3 {
    border: 2px solid;
}

.ranking-card.rank-1 {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(15, 20, 35, 0.9));
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.ranking-card.rank-2 {
    border-color: #c0c0c0;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), rgba(15, 20, 35, 0.9));
}

.ranking-card.rank-3 {
    border-color: #cd7f32;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), rgba(15, 20, 35, 0.9));
}

/* Rank Number */
.rank-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    color: #888;
    min-width: 45px;
}

.rank-1 .rank-number {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-2 .rank-number {
    color: #c0c0c0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.rank-3 .rank-number {
    color: #cd7f32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

/* Animal Image in Rankings */
.ranking-animal-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 212, 255, 0.3);
    flex-shrink: 0;
}

/* Animal Info */
.ranking-animal-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    overflow: hidden;
    flex: 1;
}

.ranking-animal-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-animal-stats {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: #888;
}

.ranking-animal-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ranking-animal-stats i {
    font-size: 0.7rem;
    color: var(--primary-color);
}

/* Vote Buttons */
.vote-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.vote-btn {
    width: 36px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-btn.upvote {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.vote-btn.upvote:hover,
.vote-btn.upvote.active {
    background: rgba(0, 255, 136, 0.4);
}

.vote-btn.downvote {
    background: rgba(255, 51, 102, 0.2);
    color: #ff3366;
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.vote-btn.downvote:hover,
.vote-btn.downvote.active {
    background: rgba(255, 51, 102, 0.4);
}

.vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.vote-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    min-width: 30px;
    text-align: center;
}

.vote-score.positive {
    color: #00ff88;
}

.vote-score.negative {
    color: #ff3366;
}

/* View Stats Button */
.view-stats-ranking-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: rgba(255, 107, 0, 0.15);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 6px;
    color: #ff9944;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.view-stats-ranking-btn:hover {
    background: rgba(255, 107, 0, 0.25);
}

/* Comments Button */
.comments-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.comments-btn:hover {
    background: rgba(0, 212, 255, 0.25);
}

.comments-btn i {
    font-size: 0.9rem;
}

.comments-btn .count {
    background: rgba(0, 212, 255, 0.3);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75rem;
}

/* ========================================
   POWER RANKINGS - NEW DESIGN
   ======================================== */

/* Trend Indicators */
.rank-trend {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.rank-trend.rising {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.15);
}

.rank-trend.falling {
    color: #ff3366;
    background: rgba(255, 51, 102, 0.15);
}

.rank-trend.stable {
    color: #888;
    background: rgba(136, 136, 136, 0.15);
}

.rank-trend i {
    font-size: 0.65rem;
}

/* Power Score Display */
.power-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 65px;
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 107, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    flex-shrink: 0;
}

.power-score-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: #ffd700;
    line-height: 1;
}

.power-score-label {
    font-size: 0.6rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Win Rate Display */
.win-rate {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.win-rate-value {
    color: #00ff88;
    font-weight: 600;
}

.win-rate-value.low {
    color: #ff9944;
}

.win-rate-value.poor {
    color: #ff3366;
}

/* Vote Counts Display */
.vote-counts {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    margin-top: 4px;
}

.vote-count {
    display: flex;
    align-items: center;
    gap: 3px;
}

.vote-count.up {
    color: #00ff88;
}

.vote-count.down {
    color: #ff3366;
}

/* Rank with Trend */
.rank-display {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* XP Popup Toast */
.xp-popup {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.9), rgba(0, 200, 100, 0.9));
    color: #000;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    z-index: 10000;
    animation: xpPopup 2s ease-out forwards;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
}

.xp-popup i {
    font-size: 1.2rem;
}

@keyframes xpPopup {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    85% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* Level Up Popup */
.level-up-popup {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    animation: levelUpPopup 3s ease-out forwards;
}

.level-up-content {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    padding: 20px 40px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: 0 8px 40px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 140, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.level-up-content i {
    font-size: 2rem;
    color: #ff3366;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

.level-up-content .new-level {
    font-size: 2rem;
    color: #ff3366;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

.level-up-content .level-up-reward {
    font-size: 1.2rem;
    color: #2ecc40;
    text-shadow: 0 0 8px rgba(46, 204, 64, 0.5);
    margin-top: 4px;
}

@keyframes levelUpPopup {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.5);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) scale(1.1);
    }
    25% {
        transform: translateX(-50%) scale(1);
    }
    75% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0.8) translateY(-30px);
    }
}

/* Voted Today State - Buttons locked until tomorrow */
.row-vote-up.voted-today,
.row-vote-down.voted-today,
.vote-button.voted-today {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.row-vote-up.voted-today.active,
.row-vote-down.voted-today.active,
.vote-button.voted-today.active {
    opacity: 1;
}

.row-vote-up.voted-today::after,
.row-vote-down.voted-today::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.6rem;
    background: var(--accent);
    color: #000;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ranking card with trend glow */
.ranking-card.trend-rising {
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

.ranking-card.trend-falling {
    border-color: rgba(255, 51, 102, 0.3);
}

/* Updated ranking card layout */
.ranking-card-middle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex: 1;
}

.ranking-animal-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Vote meaning tooltips */
.vote-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 100;
}

/* ========================================
   RANKINGS CONSOLE - REDESIGNED LAYOUT
   ======================================== */

.rankings-console {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    overflow: hidden;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ========================================
   RANKINGS HERO BANNER - Persona/Comic Panel Style
   ======================================== */

.rankings-hero-banner {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.08) 0%, 
        rgba(20, 25, 45, 0.95) 30%,
        rgba(20, 25, 45, 0.95) 70%,
        rgba(255, 107, 0, 0.08) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    overflow: visible; /* Allow accent bars to "break out" */
    flex-shrink: 0;
    transition: padding 0.3s ease, margin-bottom 0.3s ease;
}

/* Animated light sweep across the banner */
.hero-light-sweep {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 215, 0, 0.08) 30%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 215, 0, 0.08) 70%,
        transparent 100%
    );
    transform: skewX(-20deg);
    animation: heroLightSweep 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroLightSweep {
    0% { left: -100%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 150%; opacity: 0; }
}

/* Angled accent bars breaking out of banner */
.hero-accent-bar {
    position: absolute;
    width: 8px;
    height: 60px;
    background: linear-gradient(180deg, #ffd700, #ff6b00);
    transform: skewX(-15deg);
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.hero-accent-bar.left {
    left: -12px;
    top: 50%;
    transform: translateY(-50%) skewX(-15deg);
}

.hero-accent-bar.right {
    right: -12px;
    top: 50%;
    transform: translateY(-50%) skewX(-15deg);
}

.rankings-hero-banner.compact .hero-accent-bar {
    height: 40px;
    width: 5px;
}

.rankings-hero-banner.compact .hero-light-sweep {
    animation-duration: 6s;
}

/* Compact hero banner when scrolling */
.rankings-hero-banner.compact {
    padding: 10px 20px;
    margin-bottom: 10px;
}

.rankings-hero-banner.compact .hero-top-row {
    gap: 12px;
}

.rankings-hero-banner.compact .hero-trophy-badge {
    width: 28px;
    height: 28px;
}

.rankings-hero-banner.compact .hero-trophy-badge i {
    font-size: 0.85rem;
}

.rankings-hero-banner.compact .hero-title {
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.rankings-hero-banner.compact .hero-content-centered {
    flex-direction: row;
    gap: 20px;
}

.rankings-hero-banner.compact .hero-play-btn-big {
    padding: 10px 28px;
    border-radius: 10px;
}

.rankings-hero-banner.compact .hero-play-btn-big .btn-inner {
    gap: 8px;
}

.rankings-hero-banner.compact .hero-play-btn-big .btn-inner i {
    font-size: 1rem;
}

.rankings-hero-banner.compact .hero-play-btn-big .btn-inner span {
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.rankings-hero-banner.compact .hero-subtitle {
    display: none;
}

.rankings-hero-banner.compact .hero-bg-glow,
.rankings-hero-banner.compact .hero-bg-pulse {
    opacity: 0.3;
}

.hero-bg-glow {
    position: absolute;
    top: -60%;
    left: 10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.25) 0%, transparent 70%);
    pointer-events: none;
    animation: heroPulse 4s ease-in-out infinite;
}

.hero-bg-pulse {
    position: absolute;
    top: -60%;
    right: 10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.2) 0%, transparent 70%);
    pointer-events: none;
    animation: heroPulse 4s ease-in-out infinite 2s;
}

.hero-bg-lines {
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 40px,
            rgba(255, 215, 0, 0.03) 40px,
            rgba(255, 215, 0, 0.03) 41px
        );
    pointer-events: none;
}

@keyframes heroPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

.hero-content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-trophy-badge {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 107, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 8px;
}

.hero-trophy-badge.mirror {
    transform: scaleX(-1);
}

.hero-trophy-badge i {
    font-size: 1.1rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #ffd700, #ff6b00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 400px;
}

/* Big centered PLAY button - focal point */
.hero-play-btn-big {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 14px;
    padding: 16px 48px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.5),
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.hero-play-btn-big .btn-pulse-ring {
    position: absolute;
    inset: -4px;
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 18px;
    animation: playBtnPulse 2s ease-in-out infinite;
}

/* Light sweep animation on PLAY button */
.hero-play-btn-big .btn-light-sweep {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: btnLightSweep 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btnLightSweep {
    0%, 75% { left: -100%; }
    100% { left: 100%; }
}

@keyframes playBtnPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.08); opacity: 0; }
}

.hero-play-btn-big .btn-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.hero-play-btn-big .btn-inner i {
    font-size: 1.2rem;
    color: #000;
}

.hero-play-btn-big .btn-inner span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: #000;
}

.hero-play-btn-big:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 50px rgba(255, 215, 0, 0.7),
        0 6px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hero-play-btn-big:active {
    transform: scale(0.98);
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.4),
        0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Legacy styles for backwards compatibility */
.hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.hero-icon-container {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-icon-ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    animation: ringPulse 2s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0; }
}

.hero-icon-container i {
    font-size: 1.6rem;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #ffd700, #ff6b00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.hero-play-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ffd700, #ff6b00);
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    color: #000;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    overflow: hidden;
    flex-shrink: 0;
}

.hero-play-btn .btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    animation: btnGlowSweep 3s ease-in-out infinite;
}

@keyframes btnGlowSweep {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.hero-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.hero-play-btn:active {
    transform: scale(0.98);
}

.hero-play-btn i,
.hero-play-btn span {
    position: relative;
    z-index: 1;
}

/* Main Two-Column Content */
.rankings-main-content {
    flex: 1;
    display: flex;
    gap: 20px;
    min-height: 0;
    overflow-x: clip;
    overflow-y: visible;
}

/* Left Column - Rankings List */
.rankings-list-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: rgba(5, 10, 20, 0.85);
    border: 2px solid rgba(255, 45, 45, 0.2);
    border-radius: 4px;
    overflow: visible;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
}

/* Integrated Toolbar with title & search */
.rankings-list-toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: linear-gradient(95deg, rgba(20, 25, 40, 0.95) 0%, rgba(30, 35, 55, 0.9) 100%);
    border-bottom: 2px solid rgba(255, 45, 45, 0.3);
    flex-shrink: 0;
    position: relative;
}

/* Accent triangles in toolbar */
.rankings-list-toolbar::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(15deg);
    width: 0;
    height: 0;
    border-left: 12px solid rgba(255, 45, 45, 0.2);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.rankings-list-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 20px 6px 12px;
    transform: skewX(-8deg);
    position: relative;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.rankings-list-title > * {
    transform: skewX(8deg);
}

.rankings-list-title i {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Decorative burst triangles around title */
.rankings-list-title::before {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid rgba(255, 255, 255, 0.15);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.rankings-search-wrapper {
    flex: 1;
    max-width: 200px;
    position: relative;
}

.rankings-search-wrapper i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
}

.rankings-search-inline {
    width: 100%;
    padding: 6px 10px 6px 28px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    outline: none;
    transition: all 0.2s ease;
}

.rankings-search-inline:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.25);
}

.rankings-search-inline::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.rankings-console .rankings-login-prompt {
    padding: 4px 10px;
    background: rgba(255, 107, 0, 0.15);
    border: 1px solid rgba(255, 107, 0, 0.25);
    border-radius: 5px;
    color: #ff9944;
    font-size: 0.7rem;
    white-space: nowrap;
}

.rankings-list-header {
    display: grid;
    grid-template-columns: 70px 1fr 110px 160px;
    gap: 10px;
    padding: 8px 15px 8px 20px;
    background: linear-gradient(95deg, rgba(255, 45, 45, 0.1) 0%, rgba(15, 20, 35, 0.95) 30%);
    border-bottom: 2px solid rgba(255, 45, 45, 0.25);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
    text-transform: uppercase;
}

.rankings-list-header span {
    transform: skewX(-3deg);
}

.rankings-console .rankings-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 45, 45, 0.3) transparent;
}

.rankings-console .rankings-list::-webkit-scrollbar {
    width: 6px;
}

.rankings-console .rankings-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.rankings-console .rankings-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff2d2d, #ff6b00);
    border-radius: 3px;
}

/* ============================================
   PERSONA 5 DYNAMIC RANKING ROWS
   ============================================ */

/* Scattered background triangles for rankings list */
.rankings-list {
    position: relative;
}

.rankings-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpolygon points='30,5 55,50 5,50' fill='%23ff2d2d'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpolygon points='20,3 37,33 3,33' fill='%2300d4ff'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cpolygon points='25,4 46,42 4,42' fill='%23ffd700'/%3E%3C/svg%3E");
    background-position: 10% 15%, 85% 40%, 50% 75%;
    background-repeat: no-repeat;
    background-size: 40px, 25px, 30px;
    z-index: 0;
}

/* ============================================
   ELO BADGE STYLING
   ============================================ */
.row-elo-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: 600;
    transform: skewX(-5deg);
    display: inline-block;
}

.row-elo-badge.elite {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    animation: eloPulse 2s ease-in-out infinite;
}

.row-elo-badge.high {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.4);
}

.row-elo-badge.mid {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.row-elo-badge.low {
    background: rgba(255, 51, 102, 0.2);
    color: #ff6688;
    border: 1px solid rgba(255, 51, 102, 0.3);
}

@keyframes eloPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.8); }
}

/* ============================================
   ANIMAL IMAGE CONTAINER - LARGER & BREAKOUT READY
   ============================================ */
.row-animal-img-container {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.row-animal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 212, 255, 0.25);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Prevent blur on scale */
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

/* ============================================
   PODIUM CARDS - TOP 3 BREAKOUT DESIGN
   ============================================ */

/* Container needs overflow visible for breakout effect */
.rankings-list {
    overflow-y: auto;
    overflow-x: clip;
    padding: 20px;
    position: relative;
}

/* Base podium card styling */
.ranking-row.podium-card {
    position: relative;
    z-index: 10;
    margin-bottom: 20px;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* #1 - CHAMPION - Largest, most dynamic */
.ranking-row.rank-1.podium-card {
    transform: rotate(-1.5deg) scale(1.08);
    margin-left: -15px;
    margin-right: -5px;
    padding: 16px 20px;
    z-index: 15;
    background: linear-gradient(105deg, 
        rgba(255, 215, 0, 0.2) 0%, 
        rgba(255, 180, 0, 0.12) 20%,
        rgba(15, 20, 35, 0.98) 50%);
    border: 3px solid rgba(255, 215, 0, 0.6);
    border-left: 6px solid #ffd700;
    box-shadow: 
        6px 6px 0 rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.25),
        inset 0 0 30px rgba(255, 215, 0, 0.05);
    animation: rank1Float 4s ease-in-out infinite;
}

.ranking-row.rank-1.podium-card::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.3) 0%, 
        transparent 30%,
        transparent 70%,
        rgba(255, 215, 0, 0.2) 100%);
    border-radius: 8px;
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

.ranking-row.rank-1.podium-card .row-animal-img-container {
    width: 75px;
    height: 75px;
    transform: translateY(-12px) translateX(-8px) rotate(3deg);
    z-index: 100;
}

.ranking-row.rank-1.podium-card .row-animal-img {
    border: 3px solid rgba(255, 215, 0, 0.7);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.5);
}

.ranking-row.rank-1.podium-card .row-animal-name {
    font-size: 1.25rem;
}

.ranking-row.rank-1.podium-card .row-rank-num {
    font-size: 2rem;
}

@keyframes rank1Float {
    0%, 100% { transform: rotate(-1.5deg) scale(1.08) translateY(0); }
    50% { transform: rotate(-1.5deg) scale(1.08) translateY(-3px); }
}

/* #2 - RUNNER UP - Medium size, slight tilt */
.ranking-row.rank-2.podium-card {
    transform: rotate(1deg) scale(1.04);
    margin-left: -8px;
    margin-right: -8px;
    padding: 14px 18px;
    z-index: 12;
    background: linear-gradient(105deg, 
        rgba(192, 192, 192, 0.15) 0%, 
        rgba(192, 192, 192, 0.08) 20%,
        rgba(15, 20, 35, 0.98) 50%);
    border: 2px solid rgba(192, 192, 192, 0.5);
    border-left: 5px solid #c0c0c0;
    box-shadow: 
        5px 5px 0 rgba(0, 0, 0, 0.45),
        0 0 25px rgba(192, 192, 192, 0.15);
    animation: rank2Float 4.5s ease-in-out infinite;
}

.ranking-row.rank-2.podium-card .row-animal-img-container {
    width: 65px;
    height: 65px;
    transform: translateY(-8px) translateX(-4px) rotate(-2deg);
    z-index: 100;
}

.ranking-row.rank-2.podium-card .row-animal-img {
    border: 2px solid rgba(192, 192, 192, 0.6);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(192, 192, 192, 0.4);
}

.ranking-row.rank-2.podium-card .row-animal-name {
    font-size: 1.15rem;
}

.ranking-row.rank-2.podium-card .row-rank-num {
    font-size: 1.8rem;
}

@keyframes rank2Float {
    0%, 100% { transform: rotate(1deg) scale(1.04) translateY(0); }
    50% { transform: rotate(1deg) scale(1.04) translateY(-2px); }
}

/* #3 - BRONZE - Smaller than #2, opposite tilt */
.ranking-row.rank-3.podium-card {
    transform: rotate(-0.8deg) scale(1.02);
    margin-left: -5px;
    margin-right: -10px;
    padding: 12px 16px;
    z-index: 11;
    background: linear-gradient(105deg, 
        rgba(205, 127, 50, 0.12) 0%, 
        rgba(205, 127, 50, 0.06) 20%,
        rgba(15, 20, 35, 0.98) 50%);
    border: 2px solid rgba(205, 127, 50, 0.45);
    border-left: 5px solid #cd7f32;
    box-shadow: 
        4px 4px 0 rgba(0, 0, 0, 0.4),
        0 0 20px rgba(205, 127, 50, 0.12);
    animation: rank3Float 5s ease-in-out infinite;
}

.ranking-row.rank-3.podium-card .row-animal-img-container {
    width: 60px;
    height: 60px;
    transform: translateY(-5px) translateX(-2px) rotate(2deg);
    z-index: 100;
}

.ranking-row.rank-3.podium-card .row-animal-img {
    border: 2px solid rgba(205, 127, 50, 0.6);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5), 0 0 12px rgba(205, 127, 50, 0.35);
}

.ranking-row.rank-3.podium-card .row-animal-name {
    font-size: 1.1rem;
}

.ranking-row.rank-3.podium-card .row-rank-num {
    font-size: 1.65rem;
}

@keyframes rank3Float {
    0%, 100% { transform: rotate(-0.8deg) scale(1.02) translateY(0); }
    50% { transform: rotate(-0.8deg) scale(1.02) translateY(-1.5px); }
}

/* ============================================
   SELECTED/EXPANDED ROW - IMAGE BREAKOUT
   ============================================ */
.ranking-row.selected,
.ranking-row.comments-expanded {
    z-index: 50;
    background: linear-gradient(95deg, rgba(35, 40, 60, 0.98) 0%, rgba(45, 50, 75, 0.95) 100%);
    box-shadow: 
        6px 6px 0 rgba(0, 0, 0, 0.5), 
        0 0 30px rgba(255, 215, 0, 0.2),
        0 0 60px rgba(255, 215, 0, 0.1);
}

/* Non-podium selected - scale up */
.ranking-row.selected:not(.podium-card),
.ranking-row.comments-expanded:not(.podium-card) {
    transform: scale(1.02) translateX(8px);
}

.ranking-row.selected .row-animal-img-container,
.ranking-row.comments-expanded .row-animal-img-container {
    width: 70px;
    height: 70px;
    transform: translateY(-15px) translateX(-12px) rotate(-5deg);
    z-index: 200;
}

.ranking-row.selected .row-animal-img,
.ranking-row.comments-expanded .row-animal-img {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(255, 215, 0, 0.4);
    animation: selectedImagePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes selectedImagePop {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Top 3 selected - even bigger breakout */
.ranking-row.rank-1.podium-card.selected .row-animal-img-container,
.ranking-row.rank-1.podium-card.comments-expanded .row-animal-img-container {
    width: 90px;
    height: 90px;
    transform: translateY(-20px) translateX(-15px) rotate(-8deg);
    z-index: 200;
}

.ranking-row.rank-1.podium-card.selected .row-animal-img,
.ranking-row.rank-1.podium-card.comments-expanded .row-animal-img {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 215, 0, 0.5);
}

.ranking-row.rank-2.podium-card.selected .row-animal-img-container,
.ranking-row.rank-2.podium-card.comments-expanded .row-animal-img-container {
    width: 80px;
    height: 80px;
    transform: translateY(-18px) translateX(-12px) rotate(-6deg);
    z-index: 200;
}

.ranking-row.rank-2.podium-card.selected .row-animal-img,
.ranking-row.rank-2.podium-card.comments-expanded .row-animal-img {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 30px rgba(192, 192, 192, 0.4);
}

.ranking-row.rank-3.podium-card.selected .row-animal-img-container,
.ranking-row.rank-3.podium-card.comments-expanded .row-animal-img-container {
    width: 75px;
    height: 75px;
    transform: translateY(-15px) translateX(-10px) rotate(-5deg);
    z-index: 200;
}

.ranking-row.rank-3.podium-card.selected .row-animal-img,
.ranking-row.rank-3.podium-card.comments-expanded .row-animal-img {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 25px rgba(205, 127, 50, 0.35);
}

/* ============================================
   HOVER STATES - SUBTLE PREVIEW
   ============================================ */
.ranking-row:hover .row-animal-img-container {
    transform: translateY(-5px) scale(1.08);
}

.ranking-row:hover .row-animal-img {
    border-color: rgba(255, 107, 0, 0.5);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.25);
}

/* Podium hover overrides */
.ranking-row.rank-1.podium-card:hover .row-animal-img-container {
    transform: translateY(-18px) translateX(-10px) rotate(5deg) scale(1.05);
}

.ranking-row.rank-2.podium-card:hover .row-animal-img-container {
    transform: translateY(-12px) translateX(-6px) rotate(-4deg) scale(1.05);
}

.ranking-row.rank-3.podium-card:hover .row-animal-img-container {
    transform: translateY(-8px) translateX(-4px) rotate(3deg) scale(1.05);
}

/* Ranking Row - Persona 5 Dynamic Card Style */
.ranking-row {
    display: grid;
    grid-template-columns: 70px 1fr 110px 160px;
    gap: 10px;
    padding: 10px 14px 10px 16px;
    background: linear-gradient(95deg, rgba(15, 20, 35, 0.95) 0%, rgba(20, 25, 45, 0.9) 100%);
    border: 2px solid rgba(255, 45, 45, 0.25);
    border-left: 4px solid #ff2d2d;
    border-radius: 4px 0 0 4px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: center;
    position: relative;
    overflow: visible;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Chamfered corner accent */
.ranking-row::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 17px;
    height: 17px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 45, 45, 0.6) 50%);
    pointer-events: none;
}

/* Left accent bar removed - using border-left instead */
.ranking-row::before {
    display: none;
}

.ranking-row:hover {
    background: linear-gradient(95deg, rgba(25, 30, 50, 0.98) 0%, rgba(35, 40, 65, 0.95) 100%);
    border-color: rgba(255, 45, 45, 0.6);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 45, 45, 0.15);
    z-index: 2;
}

/* Non-podium rows hover - slight movement */
.ranking-row:not(.podium-card):hover {
    transform: translateX(6px) skewX(-1deg);
}

.ranking-row:hover::after {
    background: linear-gradient(135deg, transparent 50%, rgba(255, 45, 45, 0.9) 50%);
}

/* Selected state - handled in new podium system above */
.ranking-row.selected:not(.podium-card) {
    background: linear-gradient(95deg, rgba(30, 35, 55, 0.98) 0%, rgba(40, 45, 70, 0.95) 100%);
    border-color: rgba(255, 215, 0, 0.7);
    border-left-color: #ffd700;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 215, 0, 0.2);
}

.ranking-row.selected::after {
    background: linear-gradient(135deg, transparent 50%, rgba(255, 215, 0, 0.8) 50%);
}

/* Top 3 special styling - legacy, overridden by podium-card system */
.ranking-row.top-3:not(.podium-card) {
    border-width: 2px;
    border-left-width: 5px;
}

/* Legacy rank colors - for non-podium fallback only */
.ranking-row.rank-1:not(.podium-card) {
    border-color: rgba(255, 215, 0, 0.5);
    border-left-color: #ffd700;
    background: linear-gradient(95deg, rgba(255, 215, 0, 0.12) 0%, rgba(15, 20, 35, 0.95) 30%);
}

.ranking-row.rank-1:not(.podium-card)::after {
    background: linear-gradient(135deg, transparent 50%, rgba(255, 215, 0, 0.8) 50%);
}

.ranking-row.rank-1:not(.podium-card):hover {
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 215, 0, 0.3);
}

.ranking-row.rank-2:not(.podium-card) {
    border-color: rgba(192, 192, 192, 0.4);
    border-left-color: #c0c0c0;
    background: linear-gradient(95deg, rgba(192, 192, 192, 0.08) 0%, rgba(15, 20, 35, 0.95) 30%);
}

.ranking-row.rank-2:not(.podium-card)::after {
    background: linear-gradient(135deg, transparent 50%, rgba(192, 192, 192, 0.7) 50%);
}

.ranking-row.rank-3:not(.podium-card) {
    border-color: rgba(205, 127, 50, 0.4);
    border-left-color: #cd7f32;
    background: linear-gradient(95deg, rgba(205, 127, 50, 0.08) 0%, rgba(15, 20, 35, 0.95) 30%);
}

.ranking-row.rank-3:not(.podium-card)::after {
    background: linear-gradient(135deg, transparent 50%, rgba(205, 127, 50, 0.7) 50%);
}

/* Row - Rank Cell - Persona 5 Style */
.row-rank {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: relative;
}

.row-rank-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: #888;
    min-width: 40px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

/* Yellow slash behind rank number */
.ranking-row.rank-1 .row-rank-num,
.ranking-row.rank-2 .row-rank-num,
.ranking-row.rank-3 .row-rank-num {
    position: relative;
}

.ranking-row.rank-1 .row-rank-num::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%) skewX(-15deg);
    width: 45px;
    height: 22px;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1));
    z-index: -1;
    border-left: 3px solid #ffd700;
}

.ranking-row.rank-1 .row-rank-num { color: #ffd700; }
.ranking-row.rank-2 .row-rank-num { color: #c0c0c0; }
.ranking-row.rank-3 .row-rank-num { color: #cd7f32; }

/* Rank icons - Trophy for 1st, Medal for 2nd/3rd */
.row-rank-icon {
    font-size: 1rem;
    position: absolute;
    top: -8px;
    left: 25px;
    transform: rotate(-15deg);
    filter: drop-shadow(0 0 6px currentColor);
}

.row-rank-icon.gold {
    color: #ffd700;
}

.row-rank-icon.silver {
    color: #c0c0c0;
}

.row-rank-icon.bronze {
    color: #cd7f32;
}

/* Legacy crown class - keep for compatibility */
.row-crown {
    font-size: 1rem;
    color: #ffd700;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
    position: absolute;
    top: -8px;
    left: 25px;
    transform: rotate(-15deg);
}

/* ============================================
   DIAGONAL CORNER RIBBON BADGES - Persona 5 Style
   ============================================ */

/* Container for diagonal badge - positioned on the ranking row */
.ranking-row .row-diagonal-badge {
    position: absolute;
    top: -3px;
    left: -3px;
    width: 60px;
    height: 60px;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}

/* The diagonal ribbon itself */
.ranking-row .row-diagonal-badge .ribbon {
    position: absolute;
    top: 12px;
    left: -22px;
    width: 80px;
    padding: 4px 0;
    transform: rotate(-45deg);
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.ranking-row .row-diagonal-badge .ribbon i {
    font-size: 0.5rem;
}

/* Ribbon fold effect */
.ranking-row .row-diagonal-badge .ribbon::before,
.ranking-row .row-diagonal-badge .ribbon::after {
    content: '';
    position: absolute;
    bottom: -4px;
    border: 4px solid transparent;
}

.ranking-row .row-diagonal-badge .ribbon::before {
    left: 0;
}

.ranking-row .row-diagonal-badge .ribbon::after {
    right: 0;
}

/* HOT ribbon - Red/Orange fire */
.ranking-row .row-diagonal-badge .ribbon.hot {
    background: linear-gradient(90deg, #ff2d2d, #ff6b00);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    animation: ribbonGlow 1.5s ease-in-out infinite;
}

.ranking-row .row-diagonal-badge .ribbon.hot::before {
    border-top-color: #aa1500;
    border-right-color: #aa1500;
}

.ranking-row .row-diagonal-badge .ribbon.hot::after {
    border-top-color: #aa1500;
    border-left-color: #aa1500;
}

/* MVP ribbon - Gold */
.ranking-row .row-diagonal-badge .ribbon.mvp {
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    color: #000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ranking-row .row-diagonal-badge .ribbon.mvp::before {
    border-top-color: #b8860b;
    border-right-color: #b8860b;
}

.ranking-row .row-diagonal-badge .ribbon.mvp::after {
    border-top-color: #b8860b;
    border-left-color: #b8860b;
}

/* NEW/ROOKIE ribbon - Cyan/Green */
.ranking-row .row-diagonal-badge .ribbon.rookie {
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    color: #000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ranking-row .row-diagonal-badge .ribbon.rookie::before {
    border-top-color: #009999;
    border-right-color: #009999;
}

.ranking-row .row-diagonal-badge .ribbon.rookie::after {
    border-top-color: #009999;
    border-left-color: #009999;
}

/* CHAMPION ribbon - Gold with glow */
.ranking-row .row-diagonal-badge .ribbon.champion {
    background: linear-gradient(90deg, #ffd700, #fff5aa, #ffd700);
    color: #000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: championRibbonPulse 1.5s ease-in-out infinite;
}

.ranking-row .row-diagonal-badge .ribbon.champion::before {
    border-top-color: #b8860b;
    border-right-color: #b8860b;
}

.ranking-row .row-diagonal-badge .ribbon.champion::after {
    border-top-color: #b8860b;
    border-left-color: #b8860b;
}

@keyframes ribbonGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

@keyframes championRibbonPulse {
    0%, 100% { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.8); }
}

/* Legacy inline status badges - keep for fallback but hide when diagonal exists */
.ranking-row:has(.row-diagonal-badge) .row-status-badge {
    display: none;
}

/* Status Badges - Inline fallback style */
.row-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px 3px 8px;
    border-radius: 2px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    flex-shrink: 0;
    position: relative;
    transform: skewX(-5deg);
}

.row-status-badge > * {
    transform: skewX(5deg);
}

.row-status-badge i {
    font-size: 0.55rem;
}

.row-status-badge.hot {
    background: linear-gradient(90deg, rgba(255, 80, 0, 0.9), rgba(255, 107, 0, 0.7));
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.4);
}

.row-status-badge.hot::before {
    background: #ff4500;
    box-shadow: 0 0 8px #ff4500;
}

.row-status-badge.hot i {
    color: #ffdd00;
    filter: drop-shadow(0 0 3px #ff4500);
}

.row-status-badge.mvp {
    background: linear-gradient(90deg, rgba(255, 200, 0, 0.9), rgba(255, 180, 0, 0.7));
    color: #000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.row-status-badge.mvp::before {
    background: #ffd700;
    box-shadow: 0 0 8px #ffd700;
}

.row-status-badge.mvp i {
    color: #000;
}

.row-status-badge.rookie {
    background: linear-gradient(90deg, rgba(0, 200, 100, 0.9), rgba(0, 180, 80, 0.7));
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.3);
}

.row-status-badge.rookie::before {
    background: #00ff88;
    box-shadow: 0 0 8px #00ff88;
}

.row-status-badge.rookie i {
    color: #aaffcc;
}

.row-status-badge.champion {
    background: linear-gradient(90deg, rgba(255, 215, 0, 1), rgba(255, 180, 0, 0.9));
    color: #000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.6);
    animation: championPulse 1.5s ease-in-out infinite;
}

@keyframes championPulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(255, 215, 0, 0.6); }
    50% { box-shadow: 0 2px 20px rgba(255, 215, 0, 0.9); }
}

.row-status-badge.champion::before {
    background: #fff;
    box-shadow: 0 0 10px #ffd700;
}

.row-status-badge.champion i {
    color: #000;
    animation: crownBounce 1s ease-in-out infinite;
}

@keyframes crownBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1px); }
}

/* Row Streak Badge - Hot/Cold indicator */
.row-streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

.row-streak-badge.hot {
    background: linear-gradient(135deg, rgba(255, 100, 50, 0.3), rgba(255, 50, 50, 0.2));
    border: 1px solid rgba(255, 100, 50, 0.6);
    color: #ff6b35;
    animation: streakPulse 1.5s ease-in-out infinite;
}

.row-streak-badge.hot i {
    color: #ff4500;
    animation: fireFlicker 0.3s ease-in-out infinite alternate;
}

.row-streak-badge.cold {
    background: linear-gradient(135deg, rgba(100, 180, 255, 0.3), rgba(50, 150, 255, 0.2));
    border: 1px solid rgba(100, 180, 255, 0.6);
    color: #5bb5ff;
}

.row-streak-badge.cold i {
    color: #00bfff;
}

@keyframes streakPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 100, 50, 0.3); }
    50% { box-shadow: 0 0 10px rgba(255, 100, 50, 0.6); }
}

@keyframes fireFlicker {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* Row Animal Name Line */
.row-animal-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Tournament Chips - Angled Pennant/Flag Style */
.row-tournament-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.tournament-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px 3px 6px;
    font-size: 0.6rem;
    font-weight: 700;
    font-family: 'Bebas Neue', sans-serif;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    position: relative;
    transform: skewX(-8deg);
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%);
}

.tournament-chip > * {
    transform: skewX(8deg);
}

.tournament-chip i {
    font-size: 0.55rem;
}

.tournament-chip span {
    min-width: 10px;
    text-align: center;
}

.tournament-chip.gold {
    border-color: rgba(255, 215, 0, 0.5);
    border-left: 2px solid #ffd700;
    color: #ffd700;
    background: linear-gradient(95deg, rgba(255, 215, 0, 0.25), rgba(0, 0, 0, 0.5));
}

.tournament-chip.gold:hover {
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 215, 0, 0.4);
    transform: skewX(-8deg) translateY(-1px);
}

.tournament-chip.silver {
    border-color: rgba(192, 192, 192, 0.5);
    border-left: 2px solid #c0c0c0;
    color: #c0c0c0;
    background: linear-gradient(95deg, rgba(192, 192, 192, 0.2), rgba(0, 0, 0, 0.5));
}

.tournament-chip.silver:hover {
    border-color: rgba(192, 192, 192, 0.8);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4), 0 0 10px rgba(192, 192, 192, 0.4);
    transform: skewX(-8deg) translateY(-1px);
}

.tournament-chip.bronze {
    border-color: rgba(205, 127, 50, 0.5);
    border-left: 2px solid #cd7f32;
    color: #cd7f32;
    background: linear-gradient(95deg, rgba(205, 127, 50, 0.2), rgba(0, 0, 0, 0.5));
}

.tournament-chip.bronze:hover {
    border-color: rgba(205, 127, 50, 0.7);
    box-shadow: 0 0 8px rgba(205, 127, 50, 0.3);
}

/* Legacy Tournament Mini Badges */
.row-tournament-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.tournament-mini {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.tournament-mini i {
    font-size: 0.55rem;
}

.tournament-mini.gold {
    border-color: rgba(255, 215, 0, 0.5);
    color: #ffd700;
}

.tournament-mini.gold i {
    color: #ffd700;
}

.tournament-mini.silver {
    border-color: rgba(192, 192, 192, 0.5);
    color: #c0c0c0;
}

.tournament-mini.silver i {
    color: #c0c0c0;
}

.tournament-mini.bronze {
    border-color: rgba(205, 127, 50, 0.5);
    color: #cd7f32;
}

.tournament-mini.bronze i {
    color: #cd7f32;
}

/* Win Rate Progress Bar - Dynamic Angled Style */
.winrate-display {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.winrate-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: skewX(-10deg);
    position: relative;
}

/* Speed line stripes overlay */
.winrate-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 4px,
        rgba(0, 0, 0, 0.4) 4px,
        rgba(0, 0, 0, 0.4) 6px
    );
    z-index: 2;
    pointer-events: none;
}

.winrate-fill {
    height: 100%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Glow edge on fill */
.winrate-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.6);
    filter: blur(2px);
}

.winrate-fill.excellent {
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, #00ff88 20%, #00dd66 80%, rgba(0,0,0,0.3) 100%);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.winrate-fill.good {
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, #00d4ff 20%, #0099cc 80%, rgba(0,0,0,0.3) 100%);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.winrate-fill.average {
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, #ffd700 20%, #ff9900 80%, rgba(0,0,0,0.3) 100%);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.winrate-fill.poor {
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, #ff3366 20%, #cc2244 80%, rgba(0,0,0,0.3) 100%);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
}

/* Row - Animal Cell */
.row-animal {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow: visible;
    position: relative;
    padding: 5px 0;
}

.row-animal-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.row-animal-info .row-animal-name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* row-animal-img is now defined with new podium system above */

.row-animal-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: font-size 0.3s ease;
}

.row-animal-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Row - Win Rate Cell */
.row-winrate {
    font-size: 0.85rem;
    color: #888;
}

.row-winrate-value {
    font-weight: 600;
    color: #00ff88;
}

.row-winrate-value.low { color: #ff9944; }
.row-winrate-value.poor { color: #ff3366; }

.row-battles {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Row - Votes Cell with Control Pad Styling */
.row-votes {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
}

/* Control Pad Cluster - Groups vote buttons like game controller */
.row-votes.control-pad {
    gap: 8px;
}

.vote-pad-cluster {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2px;
    position: relative;
}

.vote-pad-cluster::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
    height: 60%;
    background: rgba(255, 255, 255, 0.1);
}

.vote-pad-cluster .row-vote-btn {
    border-radius: 4px;
}

.vote-pad-cluster .row-vote-btn.row-vote-up {
    border-top-right-radius: 6px;
    border-top-left-radius: 6px;
}

.vote-pad-cluster .row-vote-btn.row-vote-down {
    border-bottom-right-radius: 6px;
    border-bottom-left-radius: 6px;
}

/* Inline Vote Buttons - Game Chip Style */
.row-vote-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    background: rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.row-vote-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.row-vote-btn.row-vote-up {
    color: #00ff88;
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: inset 0 -2px 0 rgba(0, 255, 136, 0.3);
}

.row-vote-btn.row-vote-up::before {
    background: linear-gradient(180deg, rgba(0, 255, 136, 0.2), transparent);
}

.row-vote-btn.row-vote-up:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.7);
    transform: translateY(-1px);
    box-shadow: 
        inset 0 -2px 0 rgba(0, 255, 136, 0.5),
        0 4px 12px rgba(0, 255, 136, 0.25);
}

.row-vote-btn.row-vote-up:hover::before {
    opacity: 1;
}

.row-vote-btn.row-vote-up.active {
    background: linear-gradient(180deg, rgba(0, 255, 136, 0.35), rgba(0, 255, 136, 0.2));
    border-color: #00ff88;
    box-shadow: 
        inset 0 -2px 0 rgba(0, 200, 100, 0.6),
        0 0 12px rgba(0, 255, 136, 0.4);
}

.row-vote-btn.row-vote-down {
    color: #ff3366;
    border-color: rgba(255, 51, 102, 0.4);
    box-shadow: inset 0 -2px 0 rgba(255, 51, 102, 0.3);
}

.row-vote-btn.row-vote-down::before {
    background: linear-gradient(180deg, rgba(255, 51, 102, 0.2), transparent);
}

.row-vote-btn.row-vote-down:hover {
    background: rgba(255, 51, 102, 0.2);
    border-color: rgba(255, 51, 102, 0.7);
    transform: translateY(-1px);
    box-shadow: 
        inset 0 -2px 0 rgba(255, 51, 102, 0.5),
        0 4px 12px rgba(255, 51, 102, 0.25);
}

.row-vote-btn.row-vote-down:hover::before {
    opacity: 1;
}

.row-vote-btn.row-vote-down.active {
    background: linear-gradient(180deg, rgba(255, 51, 102, 0.35), rgba(255, 51, 102, 0.2));
    border-color: #ff3366;
    box-shadow: 
        inset 0 -2px 0 rgba(200, 40, 80, 0.6),
        0 0 12px rgba(255, 51, 102, 0.4);
}

.row-vote-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.3);
}

/* Vote click animation */
@keyframes voteClickPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.row-vote-btn.vote-clicked {
    animation: voteClickPulse 0.18s ease;
}

.row-vote-btn .vote-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.row-vote-btn i {
    font-size: 0.9rem;
}

/* Inline Comments Button - Game Chip Style */
.row-comments-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 6px;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    box-shadow: inset 0 -2px 0 rgba(0, 212, 255, 0.3);
}

.row-comments-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.7);
    transform: translateY(-1px);
    box-shadow: 
        inset 0 -2px 0 rgba(0, 212, 255, 0.5),
        0 4px 12px rgba(0, 212, 255, 0.2);
}

.row-comments-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.3);
}

.row-comments-btn i {
    font-size: 0.7rem;
}

.row-comments-btn .comment-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
}

/* ========================================
   INLINE COMMENTS PANEL - Expandable
   ======================================== */

.ranking-row.comments-expanded {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

.inline-comments-panel {
    background: rgba(10, 15, 30, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-bottom: 4px;
    margin-top: -4px;
    padding: 12px;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; padding: 0 12px; }
    to { opacity: 1; max-height: 400px; padding: 12px; }
}

.inline-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    margin-bottom: 10px;
}

.inline-comments-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    color: #00d4ff;
}

.inline-comments-title i {
    font-size: 0.9rem;
}

.inline-comments-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-view-all-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #00d4ff;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.inline-view-all-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.inline-comments-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 6px;
    color: #ff6666;
    cursor: pointer;
    transition: all 0.15s ease;
}

.inline-comments-close:hover {
    background: rgba(255, 100, 100, 0.25);
    border-color: #ff6666;
}

.inline-comments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inline-comments-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 15px;
    font-size: 0.85rem;
}

.inline-no-comments {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
}

.inline-comment-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.inline-comment-item.anonymous {
    border-color: rgba(128, 128, 128, 0.2);
}

.inline-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b00, #ff9944);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.inline-comment-item.anonymous .inline-comment-avatar {
    background: linear-gradient(135deg, #444, #666);
}

.inline-comment-content {
    flex: 1;
    min-width: 0;
}

.inline-comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.inline-comment-author {
    font-weight: 600;
    font-size: 0.8rem;
    color: #ff9944;
}

.inline-comment-item.anonymous .inline-comment-author {
    color: #888;
}

.inline-comment-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
}

.inline-comment-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
}

.inline-more-comments {
    text-align: center;
    padding: 8px;
    font-size: 0.75rem;
    color: rgba(0, 212, 255, 0.7);
    background: rgba(0, 212, 255, 0.05);
    border-radius: 6px;
}

/* Inline avatar with profile animal image */
.inline-comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.inline-comment-avatar.small {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
}

/* Inline replies */
.inline-comment-replies {
    margin-top: 8px;
    padding-left: 10px;
    border-left: 2px solid rgba(0, 212, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.inline-reply-item {
    display: flex;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 6px;
}

.inline-reply-content {
    flex: 1;
    min-width: 0;
}

.inline-reply-content .inline-comment-author {
    font-size: 0.7rem;
}

.inline-reply-content .inline-comment-time {
    font-size: 0.6rem;
    margin-left: 6px;
}

.inline-reply-content .inline-comment-text {
    font-size: 0.75rem;
    margin-top: 2px;
}

.inline-more-replies {
    font-size: 0.7rem;
    color: rgba(0, 212, 255, 0.6);
    padding: 4px 8px;
}

/* Inline panel comment input */
.inline-comment-input-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inline-panel-comment-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
}

.inline-panel-comment-input:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.05);
}

.inline-panel-send-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 6px;
    color: #00d4ff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.inline-panel-send-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    border-color: #00d4ff;
}

.inline-panel-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.inline-panel-login-prompt {
    text-align: center;
    padding: 10px;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

.inline-panel-login-prompt i {
    margin-right: 5px;
}

/* Right Column - Selected Animal Detail Panel */
.rankings-right-column {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    padding-top: 8px;
}

/* Tournament CTA Banner - Legacy (hidden when using hero banner) */
.tournament-cta-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 107, 0, 0.08) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    padding: 14px;
    overflow: hidden;
    flex-shrink: 0;
    display: none; /* Hidden - using hero banner instead */
}

.tournament-cta-banner .cta-glow {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    pointer-events: none;
    animation: ctaGlow 3s ease-in-out infinite;
}

@keyframes ctaGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.tournament-cta-banner .cta-content {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.tournament-cta-banner .cta-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tournament-cta-banner .cta-icon i {
    font-size: 1.3rem;
    color: #000;
}

.tournament-cta-banner .cta-text {
    flex: 1;
    min-width: 0;
}

.tournament-cta-banner .cta-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: #ffd700;
    display: block;
}

.tournament-cta-banner .cta-desc {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    display: block;
    line-height: 1.3;
}

.tournament-cta-banner .cta-play-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 8px;
    color: #000;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tournament-cta-banner .cta-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.tournament-cta-banner .cta-play-btn i {
    font-size: 0.85rem;
}

/* Detail Panel - Compact */
.rankings-detail-panel {
    background: linear-gradient(180deg, rgba(10, 15, 30, 0.95), rgba(5, 8, 18, 0.98));
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    flex-shrink: 0;
}

.detail-panel-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.25);
    text-align: center;
    padding: 30px;
}

.detail-panel-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.detail-panel-empty p {
    font-size: 0.85rem;
}

.detail-panel-content {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 10px;
    overflow: visible;
}

/* Compact Header with inline portrait */
.detail-header-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

.detail-portrait-sm {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 212, 255, 0.3);
    flex-shrink: 0;
}

.detail-identity {
    flex: 1;
    min-width: 0;
}

.detail-identity .detail-rank-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 2px;
}

.detail-identity .detail-animal-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-identity .detail-scientific {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    display: block;
}

.detail-header-compact .detail-grade-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    padding: 4px 10px;
    border-radius: 4px;
    background: #ffd700;
    color: #000;
    font-weight: bold;
    flex-shrink: 0;
}

/* Compact Stats Grid */
.detail-stats-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.stat-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.stat-mini i {
    font-size: 0.8rem;
}

.stat-mini[data-stat="attack"] i { color: #ff4444; }
.stat-mini[data-stat="defense"] i { color: #4488ff; }
.stat-mini[data-stat="agility"] i { color: #44ff88; }
.stat-mini[data-stat="stamina"] i { color: #ff88cc; }
.stat-mini[data-stat="intelligence"] i { color: #aa88ff; }
.stat-mini[data-stat="special"] i { color: #ffcc44; }

.stat-mini .stat-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    color: #fff;
}

/* Battle Stats Row */
.detail-battle-row {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.battle-metric {
    text-align: center;
}

.battle-metric .metric-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: #00d4ff;
    display: block;
}

.battle-metric .metric-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   TOURNAMENT DASHBOARD - Persona/Comic Style
   ======================================== */

/* Legacy selector for backwards compatibility */
.detail-tournament-history {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

/* New Persona-style Tournament Dashboard */
.detail-tournament-dashboard {
    margin: 10px 0;
    background: linear-gradient(135deg, rgba(20, 25, 45, 0.9), rgba(10, 15, 30, 0.95));
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.detail-tournament-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ff6b00, #ffd700);
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 215, 0, 0.08);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.dashboard-accent-left,
.dashboard-accent-right {
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffd700);
}

.dashboard-accent-right {
    background: linear-gradient(90deg, #ffd700, transparent);
}

.dashboard-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-title i {
    font-size: 0.75rem;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.dashboard-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.medal-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.medal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 50px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.medal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.medal-card.gold {
    border-color: rgba(255, 215, 0, 0.4);
}

.medal-card.gold::before {
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
}

.medal-card.gold:hover {
    border-color: rgba(255, 215, 0, 0.7);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.medal-card.silver {
    border-color: rgba(192, 192, 192, 0.4);
}

.medal-card.silver::before {
    background: linear-gradient(90deg, transparent, #c0c0c0, transparent);
}

.medal-card.silver:hover {
    border-color: rgba(192, 192, 192, 0.7);
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.3);
}

.medal-card.bronze {
    border-color: rgba(205, 127, 50, 0.4);
}

.medal-card.bronze::before {
    background: linear-gradient(90deg, transparent, #cd7f32, transparent);
}

.medal-card.bronze:hover {
    border-color: rgba(205, 127, 50, 0.7);
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.3);
}

.medal-icon-wrap {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 4px;
}

.medal-card.gold .medal-icon-wrap {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1));
}

.medal-card.gold .medal-icon-wrap i {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.medal-card.silver .medal-icon-wrap {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.3), rgba(192, 192, 192, 0.1));
}

.medal-card.silver .medal-icon-wrap i {
    color: #c0c0c0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.6);
}

.medal-card.bronze .medal-icon-wrap {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.3), rgba(205, 127, 50, 0.1));
}

.medal-card.bronze .medal-icon-wrap i {
    color: #cd7f32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.6);
}

.medal-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.medal-card .medal-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    line-height: 1;
}

.medal-card .medal-label {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

.dashboard-total {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 6px;
}

.total-icon {
    color: #00d4ff;
    font-size: 0.75rem;
}

.total-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    color: #00d4ff;
}

.total-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

.dashboard-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 15px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
}

.dashboard-empty i {
    font-size: 1.2rem;
    opacity: 0.5;
}

/* Legacy tournament history styles for backwards compat */
.tournament-history-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.tournament-history-header i {
    color: #ffd700;
    font-size: 0.75rem;
}

.tournament-history-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tournament-medals {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.medal-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.medal-stat.gold {
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
}

.medal-stat.gold i {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.medal-stat.silver {
    border-color: rgba(192, 192, 192, 0.4);
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05));
}

.medal-stat.silver i {
    color: #c0c0c0;
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.5);
}

.medal-stat.bronze {
    border-color: rgba(205, 127, 50, 0.4);
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05));
}

.medal-stat.bronze i {
    color: #cd7f32;
    text-shadow: 0 0 8px rgba(205, 127, 50, 0.5);
}

.medal-stat .medal-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    color: #fff;
}

.tournament-played {
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.tournament-played .played-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    color: #00d4ff;
}

.tournament-history-empty {
    text-align: center;
    padding: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
}

/* Actions Row */
.detail-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.vote-btns {
    display: flex;
    gap: 6px;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vote-btn.up {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

.vote-btn.up:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

.vote-btn.down {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: #ff3366;
}

.vote-btn.down:hover {
    background: rgba(255, 51, 102, 0.2);
    border-color: #ff3366;
}

.action-btn-sm {
    padding: 6px 10px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 6px;
    color: #00d4ff;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn-sm:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

/* ================================
   INLINE COMMENTS IN DETAIL PANEL
   ================================ */
.detail-comments-section {
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 10px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
}

.detail-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.detail-comments-header i {
    color: #00d4ff;
    margin-right: 4px;
}

.detail-comments-count {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
}

.detail-comments-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.detail-comment-item {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.detail-comment-item.is-reply {
    margin-left: 24px;
    background: rgba(0, 212, 255, 0.05);
    border-left: 2px solid rgba(0, 212, 255, 0.3);
}

.detail-comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #00d4ff;
    flex-shrink: 0;
    overflow: hidden;
}

.detail-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-comment-avatar i {
    font-size: 0.7rem;
}

.detail-comment-item.anonymous .detail-comment-avatar {
    background: rgba(128, 128, 128, 0.2);
    color: #888;
}

.detail-comment-body {
    flex: 1;
    min-width: 0;
}

.detail-comment-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 2px;
}

.detail-comment-author {
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

.detail-comment-time {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
}

.detail-comment-text {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
    margin: 0;
    word-wrap: break-word;
}

.detail-comment-replies {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.detail-comment-input-area {
    display: flex;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-comment-input-area input {
    flex: 1;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 0.75rem;
}

.detail-comment-input-area input:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.05);
}

.detail-comment-send {
    padding: 8px 12px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 6px;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-comment-send:hover {
    transform: scale(1.05);
}

.detail-comment-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.detail-comments-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.detail-comments-login i {
    color: #ffd700;
}

.inline-comments-loading,
.inline-no-comments {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

.inline-more-comments {
    text-align: center;
    padding: 8px;
    color: #00d4ff;
    font-size: 0.7rem;
    cursor: pointer;
}

/* Comments Modal - Minimal Header */
.comments-header-minimal {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
}

.comments-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #fff;
}

.comments-count-badge {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.comments-animal-img-hidden {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .rankings-main-content {
        flex-direction: column;
    }
    
    .rankings-right-column {
        width: 100%;
        flex-direction: row;
        gap: 12px;
    }
    
    .tournament-cta-banner {
        flex: 1;
    }
    
    .rankings-detail-panel {
        flex: 1;
        min-height: 200px;
    }
}

@media (max-width: 600px) {
    .rankings-list-toolbar {
        flex-wrap: wrap;
    }
    
    .rankings-search-wrapper {
        order: 3;
        flex: 0 0 100%;
        max-width: none;
        margin-top: 8px;
    }
    
    .rankings-right-column {
        flex-direction: column;
    }
}

.battle-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.battle-stat i {
    font-size: 1rem;
    color: #ffd700;
    margin-bottom: 4px;
}

.battle-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: #fff;
}

.battle-stat-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Detail Vote Section */
.detail-vote-section {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 12px 0;
}

.detail-vote-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-vote-btn.upvote {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.4);
    color: #00ff88;
}

.detail-vote-btn.upvote:hover,
.detail-vote-btn.upvote.active {
    background: rgba(0, 255, 136, 0.25);
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.detail-vote-btn.downvote {
    background: rgba(255, 51, 102, 0.1);
    border-color: rgba(255, 51, 102, 0.4);
    color: #ff3366;
}

.detail-vote-btn.downvote:hover,
.detail-vote-btn.downvote.active {
    background: rgba(255, 51, 102, 0.25);
    border-color: #ff3366;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.3);
}

.detail-vote-btn .vote-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
}

.detail-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Detail Action Buttons */
.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.detail-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
}

.detail-action-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
}

.detail-action-btn.primary {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.3), rgba(255, 60, 0, 0.2));
    border-color: rgba(255, 107, 0, 0.5);
    color: #ff9944;
}

.detail-action-btn.primary:hover {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.45), rgba(255, 60, 0, 0.35));
    border-color: #ff9944;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
}

/* Loading Animation for Rankings */
.rankings-console .rankings-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.rankings-console .rankings-loading i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Slide-in animation for ranking rows */
@keyframes slideInRow {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ranking-row {
    animation: slideInRow 0.3s ease forwards;
}

/* Stagger animation delays */
.ranking-row:nth-child(1) { animation-delay: 0.02s; }
.ranking-row:nth-child(2) { animation-delay: 0.04s; }
.ranking-row:nth-child(3) { animation-delay: 0.06s; }
.ranking-row:nth-child(4) { animation-delay: 0.08s; }
.ranking-row:nth-child(5) { animation-delay: 0.10s; }
.ranking-row:nth-child(6) { animation-delay: 0.12s; }
.ranking-row:nth-child(7) { animation-delay: 0.14s; }
.ranking-row:nth-child(8) { animation-delay: 0.16s; }
.ranking-row:nth-child(9) { animation-delay: 0.18s; }
.ranking-row:nth-child(10) { animation-delay: 0.20s; }

/* ========================================
   COMMENTS MODAL STYLES
   ======================================== */

.comments-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.comments-modal.show {
    display: flex;
}

.comments-modal-content {
    background: linear-gradient(180deg, #0f1929 0%, #0a0e1a 100%);
    border: 2px solid var(--primary-color);
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
    position: relative;
}

.comments-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.comments-modal-close:hover {
    color: #ff3366;
}

.comments-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    flex-shrink: 0;
}

.comments-animal-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.comments-animal-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 212, 255, 0.3);
}

.comments-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 5px;
}

.comments-count {
    color: #888;
    font-size: 0.9rem;
}

/* Add Comment Form */
.add-comment-form {
    padding: 15px 25px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    flex-shrink: 0;
}

.add-comment-form textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s;
}

.add-comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.add-comment-form textarea::placeholder {
    color: #666;
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.char-count {
    color: #666;
    font-size: 0.85rem;
}

.comment-submit-btn {
    background: linear-gradient(135deg, var(--primary-color), #00ff88);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Comments Login Prompt */
.comments-login-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px 25px;
    background: rgba(255, 107, 0, 0.1);
    border-bottom: 1px solid rgba(255, 107, 0, 0.2);
    color: #ff9944;
    flex-shrink: 0;
}

.comments-login-prompt i {
    font-size: 1.2rem;
}

.login-prompt-btn {
    background: linear-gradient(135deg, #ff6b00, #ff9944);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-prompt-btn:hover {
    transform: scale(1.05);
}

/* Comments List */
.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
}

.comment-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), #00ff88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #000;
    font-weight: bold;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img,
.comment-avatar .user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author-name {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-date {
    color: #666;
    font-size: 0.8rem;
}

.comment-content {
    color: #ddd;
    line-height: 1.5;
    margin-bottom: 12px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.comment-action-btn:hover {
    color: var(--primary-color);
}

.comment-action-btn.upvoted {
    color: #00ff88;
}

.comment-action-btn.downvoted {
    color: #ff4444;
}

.comment-action-btn.liked {
    color: #ff3366;
}

.comment-action-btn.liked i {
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* No Comments State */
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-comments i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    color: #444;
}

/* Reply Section */
.replies-container {
    margin-top: 15px;
    padding-left: 20px;
    border-left: 2px solid rgba(0, 212, 255, 0.2);
}

.reply-item {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

/* ========================================
   RESPONSIVE RANKINGS STYLES
   ======================================== */

@media (max-width: 768px) {
    .rankings-view {
        padding: 10px;
    }
    
    .rankings-container {
        padding: 15px;
    }
    
    .rankings-header h2 {
        font-size: 1.6rem;
    }
    
    .rankings-header p {
        font-size: 0.8rem;
    }

    .ranking-card {
        padding: 12px;
        gap: 10px;
    }
    
    .ranking-card-top {
        gap: 10px;
    }

    .rank-number {
        font-size: 1.4rem;
        min-width: 40px;
    }

    .ranking-animal-img {
        width: 50px;
        height: 50px;
    }

    .ranking-animal-name {
        font-size: 1.1rem;
    }
    
    .ranking-animal-stats {
        font-size: 0.7rem;
        gap: 8px;
    }
    
    .ranking-card-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .vote-buttons {
        flex-direction: row;
        gap: 8px;
    }
    
    .vote-btn {
        width: 40px;
        height: 36px;
    }

    .view-stats-ranking-btn,
    .comments-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    .rankings-controls {
        flex-direction: column;
        gap: 10px;
    }

    .rankings-controls .filter-select,
    .rankings-search {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rankings-container {
        padding: 10px;
    }
    
    .rankings-header {
        margin-bottom: 15px;
    }
    
    .rankings-header h2 {
        font-size: 1.4rem;
    }
    
    .rankings-header p {
        font-size: 0.7rem;
    }

    .ranking-card {
        padding: 10px;
        gap: 8px;
    }
    
    .ranking-card-top {
        gap: 8px;
    }

    .rank-number {
        font-size: 1.2rem;
        min-width: 32px;
    }

    .ranking-animal-img {
        width: 45px;
        height: 45px;
    }

    .ranking-animal-name {
        font-size: 0.95rem;
    }

    .ranking-animal-stats {
        display: none;
    }
    
    .ranking-card-actions {
        padding-top: 8px;
        gap: 8px;
    }

    .vote-buttons {
        gap: 6px;
    }
    
    .vote-btn {
        width: 36px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .vote-score {
        font-size: 1rem;
        min-width: 25px;
    }
    
    .ranking-card-btns {
        gap: 6px;
    }

    .view-stats-ranking-btn,
    .comments-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    /* Hide text labels on very small screens */
    .view-stats-ranking-btn span {
        display: none;
    }

    .comments-modal-content {
        width: 95%;
        max-height: 85vh;
        margin: 10px;
    }
    
    .comments-modal-header {
        padding: 12px 15px;
    }
    
    .comments-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .comment-input-area {
        padding: 10px;
    }
    
    .comment-input {
        font-size: 0.85rem;
        min-height: 60px;
    }
}





/* Comment Form Enhancements */
.comment-options {
    display: flex;
    align-items: center;
}

.anonymous-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
}

.anonymous-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.comment-form-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reply-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.reply-indicator .reply-text {
    color: var(--primary-color);
}

.replying-to {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #aaa;
}

.replying-to strong {
    color: var(--primary-color);
}

.cancel-reply-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
}

.cancel-reply-btn:hover {
    color: #ff4444;
}

/* Comment Voting */
.comment-vote-btns {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vote-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.vote-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.vote-btn.upvote:hover,
.vote-btn.upvote.active {
    color: #00ff88;
}

.vote-btn.downvote:hover,
.vote-btn.downvote.active {
    color: #ff4444;
}

.comment-item .vote-score {
    color: #888;
    font-size: 0.85rem;
    min-width: 20px;
    text-align: center;
}

.comment-item .vote-score.positive {
    color: #00ff88;
}

.comment-item .vote-score.negative {
    color: #ff4444;
}

/* Nested Replies */
.comment-replies {
    margin-top: 12px;
    margin-left: 20px;
    padding-left: 15px;
    border-left: 2px solid rgba(0, 212, 255, 0.2);
}

.comment-replies .comment-item {
    background: rgba(0, 0, 0, 0.15);
    margin-bottom: 8px;
}

/* Anonymous comment styling */
.comment-item.anonymous .comment-avatar {
    background: linear-gradient(135deg, #666, #888);
}

.comment-item.anonymous .comment-author-name {
    color: #888;
    font-style: italic;
}

/* ========================================
   COMMUNITY TAB STYLES
   ======================================== */

.community-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 40px;
    height: calc(100vh - 120px);
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    overflow: hidden;
}

/* Main column (left/center) with scrollable content */
.community-main-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding-right: 10px;
}

.community-main-column::-webkit-scrollbar {
    width: 6px;
}

.community-main-column::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.community-main-column::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.4);
    border-radius: 3px;
}

/* Chat column (right) - fixed width, full height */
.community-chat-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
}

/* ========================================
   DAILY MATCHUP SECTION
   ======================================== */

.daily-matchup-section {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.15), rgba(255, 215, 0, 0.1));
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.daily-matchup-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b00, #ffd700, #ff6b00);
}

.daily-matchup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.daily-matchup-badge {
    background: linear-gradient(135deg, #ff6b00, #ffd700);
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.daily-matchup-badge i {
    font-size: 1rem;
}

.daily-matchup-timer {
    color: #888;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.daily-matchup-timer span {
    color: #ffd700;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
}

/* Arena Layout */
.daily-matchup-arena {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 20px;
}

.matchup-fighter {
    flex: 1;
    max-width: 280px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color 0.3s, transform 0.2s;
}

.matchup-fighter:hover {
    border-color: rgba(0, 212, 255, 0.4);
}

.matchup-fighter.voted {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.fighter-image-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.fighter-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fighter-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 8px;
}

.fighter-stats {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 15px;
}

.vote-fighter-btn {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vote-fighter-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
}

.vote-fighter-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

.vote-fighter-btn.selected {
    background: linear-gradient(135deg, #ffd700, #ff9900);
}

.fighter-votes {
    width: 100%;
    margin-top: 15px;
    position: relative;
    height: 24px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    overflow: hidden;
}

.vote-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    transition: width 0.5s ease;
    border-radius: 12px;
}

.vote-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.matchup-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.matchup-vs span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: #ff6b00;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.5);
}

/* Matchup Comments Preview */
.matchup-comments-preview {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.matchup-comments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #888;
}

.matchup-comments-count {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.matchup-comments-list {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.matchup-comment-input {
    display: flex;
    gap: 10px;
}

.matchup-comment-input input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px 15px;
    color: #fff;
    font-size: 0.9rem;
}

.matchup-comment-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.matchup-comment-input button {
    background: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.matchup-comment-input button:hover {
    transform: scale(1.1);
}

/* ========================================
   RANKINGS PREVIEW SECTION
   ======================================== */

.rankings-preview-section {
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 2px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h3 i {
    color: rgba(255, 255, 255, 0.6);
}

.view-all-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, color 0.2s;
}

.view-all-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.rankings-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rankings-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    transition: background 0.2s;
}

.rankings-preview-item:hover {
    background: rgba(0, 0, 0, 0.5);
}

.preview-rank {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: #888;
    min-width: 35px;
}

.preview-rank.gold { color: #ffd700; }
.preview-rank.silver { color: #c0c0c0; }
.preview-rank.bronze { color: #cd7f32; }

.preview-animal-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.preview-animal-info {
    flex: 1;
    min-width: 0;
}

.preview-animal-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.preview-trend.rising {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.15);
}

.preview-trend.falling {
    color: #ff3366;
    background: rgba(255, 51, 102, 0.15);
}

.preview-trend.stable {
    color: #888;
}

.preview-power-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: #ffd700;
}

/* ========================================
   TOURNAMENTS SECTION
   ======================================== */

.tournaments-section {
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
}

.tournaments-section .section-header h3 {
    color: var(--primary-color);
}

.tournaments-section .section-header h3 i {
    color: var(--primary-color);
}

.tournament-content {
    text-align: center;
}

.tournament-prompt {
    color: #888;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.bracket-size-options {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.bracket-size-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.bracket-size-btn:hover {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

.bracket-size-btn .size-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.bracket-size-btn .size-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.active-tournament-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(0, 150, 200, 0.1));
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.active-tournament-info {
    text-align: left;
}

.tournament-round {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.tournament-progress {
    font-size: 0.85rem;
    color: #888;
}

.continue-tournament-btn {
    background: linear-gradient(135deg, var(--primary-color), #0099cc);
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.continue-tournament-btn:hover {
    transform: scale(1.05);
}

/* ========================================
   COMMUNITY CHAT SECTION (Updated)
   ======================================== */

.community-chat-section {
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.community-chat-section .community-tabs {
    margin-bottom: 15px;
}

.community-header {
    text-align: center;
    margin-bottom: 20px;
}

.community-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: #00d4ff;
    margin-bottom: 5px;
}

.community-header h2 i {
    margin-right: 10px;
}

.community-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Community Login Prompt - matches rankings style */
.community-login-prompt {
    background: rgba(255, 107, 0, 0.15);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 8px;
    padding: 10px 20px;
    margin-top: 15px;
    display: inline-block;
    color: #ff9944;
    font-size: 0.9rem;
    text-align: center;
    width: fit-content;
    margin: 0 auto;
}

.community-login-prompt i {
    margin-right: 8px;
}

/* Community Tabs */
.community-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.community-tab {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-tab:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
}

.community-tab.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 180, 220, 0.1));
    border-color: #00d4ff;
    color: #00d4ff;
}

/* Community Sections */
.community-section {
    display: none;
    flex: 1;
    min-height: 0;
}

.community-section.active {
    display: flex;
    flex-direction: column;
}

/* Chat Container */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

.chat-loading {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
}

/* Chat Message */
.chat-message {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.chat-message:hover {
    background: rgba(255, 255, 255, 0.06);
}

.chat-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
    overflow: hidden;
}

.chat-message-avatar img,
.chat-message-avatar .user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-message-content {
    flex: 1;
    min-width: 0;
}

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.chat-message-author {
    font-weight: 600;
    color: #00d4ff;
    font-size: 0.85rem;
}

.chat-message-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.chat-message-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Chat Input */
.chat-input-container {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.chat-login-prompt {
    text-align: center;
    padding: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.chat-login-prompt a {
    color: #00d4ff;
    text-decoration: none;
}

.chat-login-prompt a:hover {
    text-decoration: underline;
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 12px 20px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#chat-input:focus {
    border-color: #00d4ff;
}

#chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-send-btn {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Feed Container */
.feed-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
}

.feed-container::-webkit-scrollbar {
    width: 6px;
}

.feed-container::-webkit-scrollbar-track {
    background: transparent;
}

.feed-container::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

.feed-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

.feed-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 20px;
}

.feed-loading {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
}

/* Feed Item (Comment Card) */
.feed-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    transition: border-color 0.3s ease;
}

.feed-item:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

.feed-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-animal-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.2);
}

.feed-animal-info {
    flex: 1;
}

.feed-animal-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: #00d4ff;
    cursor: pointer;
    transition: color 0.2s ease;
}

.feed-animal-name:hover {
    color: #66e0ff;
}

.feed-comment-type {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.feed-comment-main {
    display: flex;
    gap: 12px;
}

.feed-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b00, #cc5500);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
    overflow: hidden;
}

.feed-comment-avatar img,
.feed-comment-avatar .user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-comment-body {
    flex: 1;
    min-width: 0;
}

.feed-comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.feed-comment-author-name {
    font-weight: 600;
    color: #ff9500;
    font-size: 0.85rem;
}

.feed-comment-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.feed-comment-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.feed-comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.feed-comment-actions span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.feed-comment-actions .positive {
    color: #44ff88;
}

.feed-comment-actions .negative {
    color: #ff4444;
}

/* Feed Vote/Reply Buttons */
.feed-upvote-btn,
.feed-downvote-btn,
.feed-reply-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 4px 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
}

.feed-upvote-btn:hover {
    background: rgba(68, 255, 136, 0.15);
    border-color: rgba(68, 255, 136, 0.3);
    color: #44ff88;
}

.feed-downvote-btn:hover {
    background: rgba(255, 68, 68, 0.15);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

.feed-reply-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

.feed-upvote-btn.active {
    background: rgba(68, 255, 136, 0.2);
    border-color: #44ff88;
    color: #44ff88;
}

.feed-downvote-btn.active {
    background: rgba(255, 68, 68, 0.2);
    border-color: #ff4444;
    color: #ff4444;
}

.feed-vote-score {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.feed-vote-score.positive {
    color: #44ff88;
}

.feed-vote-score.negative {
    color: #ff4444;
}

/* Feed View Button */
.feed-view-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    color: #00d4ff;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.feed-view-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

/* Feed Replies */
.feed-replies {
    margin-top: 15px;
    margin-left: 52px;
    padding-left: 15px;
    border-left: 2px solid rgba(0, 212, 255, 0.2);
}

.feed-reply {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.feed-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.feed-reply-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.6rem;
    overflow: hidden;
}

.feed-reply-avatar img,
.feed-reply-avatar .user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-reply-author {
    font-weight: 600;
    color: #00d4ff;
    font-size: 0.8rem;
}

.feed-reply-time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
}

.feed-reply-content {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-left: 32px;
}

.feed-more-replies {
    font-size: 0.8rem;
    color: #00d4ff;
    cursor: pointer;
    padding: 8px 0;
    margin-left: 32px;
}

.feed-more-replies:hover {
    text-decoration: underline;
}

/* Load More Button */
.load-more-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 12px 24px;
    color: #00d4ff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.load-more-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

/* Empty State */
.feed-empty, .chat-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.feed-empty i, .chat-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

.feed-empty p, .chat-empty p {
    font-size: 1rem;
}

/* Tablet - stack columns */
@media (max-width: 1024px) {
    .community-container {
        grid-template-columns: 1fr;
        height: auto;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .community-main-column {
        overflow-y: visible;
        padding-right: 0;
    }
    
    .community-chat-column {
        height: auto;
        min-height: 500px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .community-container {
        padding: 15px 10px;
        grid-template-columns: 1fr;
    }
    
    .community-chat-column {
        min-height: 400px;
    }
    
    .community-header h2 {
        font-size: 1.5rem;
    }
    
    .community-tabs {
        gap: 8px;
    }
    
    .community-tab {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .chat-message {
        padding: 8px 10px;
    }
    
    .chat-message-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .feed-item {
        padding: 12px;
    }
    
    .feed-animal-image {
        width: 40px;
        height: 40px;
    }
    
    .feed-replies {
        margin-left: 0;
        padding-left: 12px;
    }
}

/* ========================================
   TOURNAMENT STYLES
   ======================================== */

/* Tournament Button in Rankings Header */
.tournament-btn {
    padding: 12px 28px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: 3px solid #ffd700;
    border-radius: 10px;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    animation: tournamentGlow 2s ease-in-out infinite;
}

@keyframes tournamentGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 35px rgba(255, 215, 0, 0.7); }
}

.tournament-btn:hover {
    background: linear-gradient(135deg, #ffec80, #ffaa33);
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
}

.tournament-btn i {
    font-size: 1.2rem;
}

/* ============================================
   TOURNAMENT MODAL - Compact Console Design
   ============================================ */

.tournament-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    overflow: hidden;
}

.tournament-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Setup Screen ---- */
.tournament-setup {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tournament-setup-compact,
.tournament-setup-content {
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.98) 0%, rgba(5, 8, 16, 0.98) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 12px;
    padding: 20px 25px;
    max-width: 620px;
    width: 100%;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
}

.setup-close-btn,
.tournament-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.setup-close-btn:hover,
.tournament-close-btn:hover {
    color: #ff6666;
    transform: scale(1.1);
}

.setup-header,
.tournament-setup-header {
    text-align: center;
    margin-bottom: 14px;
}

.setup-header i.fa-trophy,
.tournament-setup-header i.fa-crown,
.tournament-logo i {
    font-size: 1.8rem;
    color: #ffd700;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
    margin-bottom: 6px;
    display: block;
    animation: trophyFloat 2s ease-in-out infinite;
}

@keyframes trophyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.setup-header h2,
.tournament-setup-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Bracket Size Selection - Horizontal */
.bracket-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.bracket-btn {
    flex: 1;
    max-width: 90px;
    padding: 12px 8px;
    background: rgba(0, 212, 255, 0.08);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.bracket-btn:hover {
    border-color: rgba(0, 212, 255, 0.6);
    background: rgba(0, 212, 255, 0.12);
    transform: translateY(-2px);
}

.bracket-btn.selected {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
}

.bracket-btn .size {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    color: #fff;
    line-height: 1;
    display: block;
}

.bracket-btn.selected .size {
    color: #ffd700;
}

.bracket-btn .label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
    display: block;
}

/* Type Filter Grid */
.type-section {
    margin-bottom: 16px;
}

.type-section-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.type-section-label span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0;
}

.type-filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.type-chip {
    padding: 5px 10px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.type-chip:hover {
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(0, 212, 255, 0.1);
    color: #fff;
}

.type-chip.active {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.25);
}

.type-chip i {
    font-size: 0.85rem;
}

/* Preview Summary Bar */
.preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.08) 0%, rgba(255, 215, 0, 0.08) 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
}

.preview-stats {
    display: flex;
    gap: 25px;
}

.preview-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.preview-stat i {
    color: #00d4ff;
}

.preview-stat strong {
    color: #fff;
}

.start-btn {
    padding: 8px 20px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 6px;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.start-btn:hover:not(:disabled) {
    transform: scale(1.03);
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.5);
}

.start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #666, #444);
    box-shadow: none;
}

/* ---- Battle Screen ---- */
.tournament-battle {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    background: radial-gradient(ellipse at center, rgba(10, 20, 40, 0.98) 0%, rgba(0, 0, 0, 0.99) 100%);
    overflow: hidden;
}

.tournament-battle.active {
    display: flex;
}

/* Battle Header */
.battle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 25px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    flex-shrink: 0;
}

.battle-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.round-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: #ffd700;
    padding: 4px 12px;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
}

.progress-track {
    width: 120px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #ffd700);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.match-counter {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.battle-question {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.quit-battle-btn,
.quit-btn {
    padding: 8px 16px;
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff6666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.quit-battle-btn:hover,
.quit-btn:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: #ff6666;
}

/* Battle Arena - Full Screen 3-Column */
.battle-arena-full {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    padding: 20px 30px;
    align-items: stretch;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
}

/* Fighter Cards - Full Detail */
.fighter-full-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
}

.fighter-full-card:hover {
    transform: scale(1.02);
    border-color: #ffd700;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.4);
}

.fighter-full-card.selected {
    border-color: #00ff88;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.5);
}

.fighter-portrait {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    position: relative;
    overflow: hidden;
}

.fighter-portrait img {
    max-height: 180px;
    max-width: 90%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.7));
    transition: transform 0.3s ease;
}

.fighter-full-card:hover .fighter-portrait img {
    transform: scale(1.08);
}

.fighter-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fighter-identity {
    text-align: center;
}

.fighter-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 8px;
}

.fighter-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.rank-badge {
    padding: 4px 12px;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 6px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.95rem;
    color: #ffd700;
    letter-spacing: 1px;
}

.winrate-badge {
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 6px;
    font-size: 0.85rem;
    color: #00d4ff;
}

/* Fighter Mini Stats - Compact Grid */
.fighter-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.mini-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    font-size: 0.8rem;
}

.mini-stat i {
    font-size: 0.7rem;
}

.mini-stat.attack i { color: #ff4444; }
.mini-stat.defense i { color: #4488ff; }
.mini-stat.agility i { color: #44ff88; }
.mini-stat.stamina i { color: #ff8844; }
.mini-stat.intelligence i { color: #aa44ff; }
.mini-stat.special i { color: #ffd700; }

.mini-stat span {
    color: #fff;
    font-weight: 600;
}

/* Fighter Actions */
.fighter-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vote-btn, .comments-btn {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vote-btn.up {
    background: rgba(68, 255, 136, 0.1);
    border: 1px solid rgba(68, 255, 136, 0.3);
    color: #44ff88;
}

.vote-btn.up:hover {
    background: rgba(68, 255, 136, 0.2);
    border-color: #44ff88;
}

.vote-btn.down {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

.vote-btn.down:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: #ff4444;
}

.comments-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

.comments-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

/* Stats Comparison Column - Center */
.stats-compare-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 300px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vs-badge {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ff6b00, #ff4400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 0 35px rgba(255, 107, 0, 0.6);
    margin-bottom: 20px;
    animation: vsPulse 2s ease-in-out infinite;
}

@keyframes vsPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.stat-compare-rows {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-compare-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
}

.stat-compare-row .left-val,
.stat-compare-row .right-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    transition: all 0.3s ease;
}

.stat-compare-row .left-val { text-align: right; }
.stat-compare-row .right-val { text-align: left; }

.stat-compare-row.left-wins .left-val {
    color: #00ff88;
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
    font-size: 1.6rem;
}

.stat-compare-row.right-wins .right-val {
    color: #00ff88;
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
    font-size: 1.6rem;
}

.stat-compare-row.left-wins .right-val,
.stat-compare-row.right-wins .left-val {
    color: rgba(255, 255, 255, 0.35);
    font-size: 1.2rem;
}

.stat-icon-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 50px;
}

.stat-icon-label i {
    font-size: 1rem;
}

.stat-icon-label span {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Stat Icon Colors */
.stat-compare-row[data-stat="attack"] .stat-icon-label i { color: #ff4444; }
.stat-compare-row[data-stat="defense"] .stat-icon-label i { color: #4488ff; }
.stat-compare-row[data-stat="agility"] .stat-icon-label i { color: #44ff88; }
.stat-compare-row[data-stat="stamina"] .stat-icon-label i { color: #ff8844; }
.stat-compare-row[data-stat="intelligence"] .stat-icon-label i { color: #aa44ff; }
.stat-compare-row[data-stat="special"] .stat-icon-label i { color: #ffd700; }

/* ---- Results Screen ---- */
.tournament-results {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(ellipse at center, rgba(50, 30, 0, 0.9) 0%, rgba(0, 0, 0, 0.98) 100%);
    overflow-y: auto;
}

.tournament-results.active {
    display: flex;
}

.tournament-results-content {
    text-align: center;
    max-width: 600px;
    width: 100%;
    padding: 30px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
}

.champion-crown {
    font-size: 3rem;
    color: #ffd700;
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.9));
    animation: crownBounce 1s ease-in-out infinite;
    margin-bottom: 8px;
}

.tournament-results-content h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.champion-display {
    margin-bottom: 20px;
}

.champion-display img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 16px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.champion-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 3px;
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.tournament-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

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

.tournament-stats .stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: #00d4ff;
    display: block;
}

.tournament-stats .stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.runner-ups {
    margin-bottom: 20px;
}

.runner-ups h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.runner-up-list {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.runner-up-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.runner-up-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid rgba(192, 192, 192, 0.5);
    background: rgba(0, 0, 0, 0.3);
}

.runner-up-item span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.results-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.results-crown {
    font-size: 4rem;
    color: #ffd700;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.9));
    animation: crownBounce 1s ease-in-out infinite;
    margin-bottom: 10px;
}

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

.results-content h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 5px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
}

.champion-showcase {
    margin-bottom: 25px;
}

.champion-showcase img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ffd700;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.6);
    margin-bottom: 15px;
}

.champion-showcase h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 3px;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.results-stats {
    display: flex;
    justify-content: center;
    gap: 35px;
    margin-bottom: 25px;
}

.results-stats .stat {
    text-align: center;
}

.results-stats .stat .value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: #00d4ff;
    display: block;
}

.results-stats .stat .label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.results-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.play-again-btn {
    padding: 14px 30px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 10px;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-again-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.close-results-btn {
    padding: 14px 30px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-results-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Tournament Mobile Responsive */
@media (max-width: 1100px) {
    .tournament-setup-compact {
        padding: 25px;
        max-width: 95%;
    }
    
    .bracket-row {
        flex-wrap: wrap;
    }
    
    .bracket-btn {
        flex: 0 0 calc(50% - 6px);
    }
    
    .battle-arena-full {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .stats-compare-column {
        order: -1;
        min-width: unset;
    }
    
    .fighter-portrait {
        height: 150px;
    }
    
    .fighter-portrait img {
        max-height: 130px;
    }
    
    .fighter-name {
        font-size: 1.5rem;
    }
    
    .vs-badge {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .setup-header h2 {
        font-size: 1.6rem;
    }
    
    .bracket-btn {
        padding: 14px 10px;
    }
    
    .bracket-btn .size {
        font-size: 1.8rem;
    }
    
    .type-filter-grid {
        justify-content: center;
    }
    
    .preview-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .preview-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .start-btn {
        width: 100%;
        justify-content: center;
    }
    
    .battle-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .battle-question {
        font-size: 1.2rem;
        order: -1;
        width: 100%;
        text-align: center;
    }
    
    .fighter-full-card {
        flex-direction: row;
        align-items: center;
    }
    
    .fighter-portrait {
        width: 120px;
        height: 120px;
        flex-shrink: 0;
    }
    
    .fighter-portrait img {
        max-height: 100px;
    }
    
    .fighter-body {
        padding: 15px;
    }
    
    .fighter-mini-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-compare-row .left-val,
    .stat-compare-row .right-val {
        font-size: 1.2rem;
    }
    
    .stat-compare-row.left-wins .left-val,
    .stat-compare-row.right-wins .right-val {
        font-size: 1.4rem;
    }
    
    .champion-showcase img {
        width: 120px;
        height: 120px;
    }
    
    .champion-showcase h3 {
        font-size: 1.6rem;
    }
    
    .results-buttons {
        flex-direction: column;
    }
}

/* Fighter Card Entrance Animations */
@keyframes slideInLeft {
    from { transform: translateX(-40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

.fighter-full-card:first-child {
    animation: slideInLeft 0.3s ease-out;
}

.fighter-full-card:last-child {
    animation: slideInRight 0.3s ease-out;
}

.stats-compare-column {
    animation: fadeInUp 0.3s ease-out 0.1s both;
}

/* ============================================
   TOURNAMENT BATTLE ARENA V3
   Stats-page inspired layout for clarity
   ============================================ */

.battle-arena-v3 {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 320px 1fr;
    gap: 16px;
    padding: 12px 24px;
    align-items: stretch;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
    overflow-y: auto;
}

/* Fighter Card V3 - Stats-page inspired */
.fighter-card-v3 {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(10, 15, 30, 0.95), rgba(5, 10, 25, 0.98));
    border: 2px solid rgba(0, 212, 255, 0.35);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.fighter-card-v3.left {
    border-color: rgba(0, 212, 255, 0.4);
}

.fighter-card-v3.right {
    border-color: rgba(255, 107, 0, 0.4);
}

.fighter-card-v3:hover {
    transform: scale(1.01);
}

.fighter-card-v3.left:hover {
    border-color: #00d4ff;
    box-shadow: 0 0 35px rgba(0, 212, 255, 0.4);
}

.fighter-card-v3.right:hover {
    border-color: #ff6b00;
    box-shadow: 0 0 35px rgba(255, 107, 0, 0.4);
}

.fighter-card-v3.selected {
    border-color: #00ff88 !important;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.5) !important;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(5, 10, 25, 0.98));
}

.fighter-card-v3.eliminated {
    opacity: 0.3;
    filter: grayscale(60%);
    pointer-events: none;
}

/* Fighter Header V3 */
.fighter-header-v3 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.fighter-portrait-v3 {
    width: 100px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fighter-portrait-v3 img {
    max-height: 75px;
    max-width: 95px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s ease;
}

.fighter-card-v3:hover .fighter-portrait-v3 img {
    transform: scale(1.08);
}

.fighter-identity-v3 {
    flex: 1;
}

.fighter-name-v3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: #fff;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.fighter-badges-v3 {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rank-badge-v3 {
    padding: 3px 8px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #00d4ff;
}

.winrate-badge-v3 {
    padding: 3px 8px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    font-size: 0.7rem;
    color: rgba(255, 215, 0, 0.9);
}

/* ELO Badge */
.elo-badge-v3 {
    padding: 3px 8px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(75, 0, 130, 0.2));
    border: 1px solid rgba(138, 43, 226, 0.5);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #da70d6;
    display: flex;
    align-items: center;
    gap: 4px;
}

.elo-badge-v3 i {
    font-size: 0.65rem;
}

.fighter-card-v3.left .elo-badge-v3 {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(0, 100, 200, 0.15));
    border-color: rgba(0, 212, 255, 0.5);
    color: #00d4ff;
}

.fighter-card-v3.right .elo-badge-v3 {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.15), rgba(200, 50, 0, 0.15));
    border-color: rgba(255, 107, 0, 0.5);
    color: #ff6b00;
}

/* Fighter Specs Row (Weight, Speed, Bite) */
.fighter-specs-v3 {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
}

.fighter-specs-v3 .spec-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.fighter-specs-v3 .spec-item i {
    font-size: 0.65rem;
    color: rgba(0, 212, 255, 0.7);
}

.fighter-card-v3.right .fighter-specs-v3 .spec-item i {
    color: rgba(255, 107, 0, 0.7);
}

/* Fighter Extra Info (Medals & Votes) */
.fighter-extra-v3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    margin-bottom: 6px;
}

.fighter-medals-v3 {
    display: flex;
    gap: 6px;
}

.mini-medal {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 600;
}

.mini-medal.gold {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
}

.mini-medal.silver {
    background: rgba(192, 192, 192, 0.15);
    color: #c0c0c0;
}

.mini-medal.bronze {
    background: rgba(205, 127, 50, 0.15);
    color: #cd7f32;
}

.mini-medal i {
    font-size: 0.55rem;
}

.fighter-votes-v3 {
    display: flex;
    gap: 6px;
}

.fighter-votes-v3 .vote-up,
.fighter-votes-v3 .vote-down {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 3px;
}

.fighter-votes-v3 .vote-up {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
}

.fighter-votes-v3 .vote-down {
    background: rgba(255, 100, 100, 0.1);
    color: #ff6666;
}

.fighter-votes-v3 i {
    font-size: 0.55rem;
}

/* Click Zone */
.fighter-click-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 8px;
    color: rgba(255, 215, 0, 0.8);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.6;
    transition: all 0.3s ease;
    margin-top: auto;
}

.fighter-card-v3:hover .fighter-click-zone {
    opacity: 1;
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
}

/* Battle Center V3 */
.battle-center-v3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.battle-center-v3 .vs-section-v3 {
    margin: 0;
}

.battle-center-v3 .stats-comparison-v3 {
    width: 100%;
}

.vs-badge-v3 {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    border-radius: 50%;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 25px rgba(255, 107, 0, 0.5);
    flex-shrink: 0;
}

/* Stats Comparison V3 */
.stats-comparison-v3 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.stat-row-v3 {
    display: grid;
    grid-template-columns: 1fr 32px 28px 32px 1fr;
    gap: 6px;
    align-items: center;
    padding: 4px 0;
    transition: background 0.2s ease;
}

.stat-row-v3.left-wins {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.1), transparent 40%, transparent 60%, transparent);
}

.stat-row-v3.right-wins {
    background: linear-gradient(90deg, transparent, transparent 40%, transparent 60%, rgba(255, 107, 0, 0.1));
}

.stat-bar-v3 {
    height: 14px;
    background: linear-gradient(180deg, #0a0a0a 0%, #151515 50%, #0a0a0a 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Segment lines overlay */
.stat-bar-v3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 6px,
        rgba(0, 0, 0, 0.6) 6px,
        rgba(0, 0, 0, 0.6) 8px
    );
    z-index: 2;
    pointer-events: none;
}

.stat-bar-v3.left {
    direction: rtl;
}

.stat-bar-v3 .bar-fill-v3 {
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        #00d4ff 15%, 
        #00ff88 85%, 
        rgba(0, 0, 0, 0.3) 100%);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-bar-v3.right .bar-fill-v3 {
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        #ff8c00 15%, 
        #ff6b00 85%, 
        rgba(0, 0, 0, 0.3) 100%);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.stat-val-v3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    text-align: center;
    min-width: 28px;
}

.stat-val-v3.left {
    color: #00d4ff;
}

.stat-val-v3.right {
    color: #ff8c00;
}

.stat-row-v3.left-wins .stat-val-v3.left {
    color: #00ff88;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.stat-row-v3.right-wins .stat-val-v3.right {
    color: #ff6b00;
    text-shadow: 0 0 8px rgba(255, 107, 0, 0.5);
}

.stat-icon-v3 {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* Responsive adjustments for V3 */
@media (max-width: 1200px) {
    .battle-arena-v3 {
        grid-template-columns: 1fr 280px 1fr;
        gap: 12px;
        padding: 10px 16px;
    }
    
    .fighter-name-v3 {
        font-size: 1.1rem;
    }
    
    .fighter-portrait-v3 {
        width: 80px;
        height: 65px;
    }
    
    .fighter-portrait-v3 img {
        max-height: 60px;
        max-width: 75px;
    }
}

@media (max-width: 900px) {
    .battle-arena-v3 {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 10px;
    }
    
    .fighter-card-v3 {
        flex-direction: row;
        padding: 12px;
    }
    
    .fighter-header-v3 {
        margin-bottom: 0;
    }
    
    .fighter-specs-v3 {
        display: none;
    }
    
    .battle-center-v3 {
        order: -1;
        padding: 8px;
    }
    
    .stats-comparison-v3 {
        display: none;
    }
}

/* ============================================
   TOURNAMENT BATTLE ARENA V2 (Legacy)
   ============================================ */

.battle-arena-v2 {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 280px 1fr;
    gap: 20px;
    padding: 15px 30px;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
    overflow-y: auto;
}

/* Fighter Card V2 */
.fighter-card-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 16px;
    padding: 20px 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.fighter-card-v2.left {
    border-color: rgba(0, 212, 255, 0.4);
}

.fighter-card-v2.right {
    border-color: rgba(255, 107, 0, 0.4);
}

.fighter-card-v2:hover {
    transform: scale(1.02);
}

.fighter-card-v2.left:hover {
    border-color: #00d4ff;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.5);
    background: rgba(0, 212, 255, 0.06);
}

.fighter-card-v2.right:hover {
    border-color: #ff6b00;
    box-shadow: 0 0 50px rgba(255, 107, 0, 0.5);
    background: rgba(255, 107, 0, 0.06);
}

.fighter-card-v2.selected {
    border-color: #00ff88 !important;
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.6) !important;
    background: rgba(0, 255, 136, 0.1);
}

.fighter-card-v2.eliminated {
    opacity: 0.35;
    filter: grayscale(50%);
    pointer-events: none;
}

/* Fighter Portrait V2 */
.fighter-card-v2 .fighter-portrait {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 15px;
}

.fighter-card-v2 .fighter-portrait img {
    max-height: 150px;
    max-width: 90%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.7));
    transition: transform 0.3s ease;
}

.fighter-card-v2:hover .fighter-portrait img {
    transform: scale(1.1);
}

.fighter-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.fighter-card-v2.right .fighter-glow {
    background: radial-gradient(circle, rgba(255, 107, 0, 0.15) 0%, transparent 70%);
}

/* Fighter Info V2 */
.fighter-info-v2 {
    text-align: center;
    margin-bottom: 10px;
}

.fighter-info-v2 .fighter-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.fighter-meta {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Vote Hint */
.fighter-vote-hint {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    color: rgba(255, 215, 0, 0.8);
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fighter-card-v2:hover .fighter-vote-hint {
    opacity: 1;
}

/* Battle Center V2 */
.battle-center-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* VS Orb */
.vs-orb {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b00, #ff4400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(255, 107, 0, 0.6);
    animation: vsOrbPulse 2s ease-in-out infinite;
}

.vs-orb span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: #fff;
    letter-spacing: 2px;
}

@keyframes vsOrbPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(255, 107, 0, 0.6); }
    50% { transform: scale(1.08); box-shadow: 0 0 60px rgba(255, 107, 0, 0.8); }
}

/* Stats Comparison V2 */
.stats-comparison-v2 {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-row-v2 {
    display: grid;
    grid-template-columns: 1fr 40px 40px 1fr;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
}

.stat-row-v2 .stat-bar-left,
.stat-row-v2 .stat-bar-right {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.stat-row-v2 .stat-bar-left {
    direction: rtl;
}

.stat-row-v2 .bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.stat-row-v2 .stat-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: #fff;
    text-align: center;
    min-width: 40px;
    transition: all 0.3s ease;
}

.stat-row-v2 .stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-row-v2 .stat-icon i {
    font-size: 0.95rem;
}

/* Stat Icon Colors V2 */
.stat-row-v2[data-stat="attack"] .bar-fill { background: linear-gradient(90deg, #ff4444, #ff6666); }
.stat-row-v2[data-stat="defense"] .bar-fill { background: linear-gradient(90deg, #4488ff, #66aaff); }
.stat-row-v2[data-stat="agility"] .bar-fill { background: linear-gradient(90deg, #44ff88, #66ffaa); }
.stat-row-v2[data-stat="stamina"] .bar-fill { background: linear-gradient(90deg, #ff8844, #ffaa66); }
.stat-row-v2[data-stat="intelligence"] .bar-fill { background: linear-gradient(90deg, #aa44ff, #cc66ff); }
.stat-row-v2[data-stat="special"] .bar-fill { background: linear-gradient(90deg, #ffd700, #ffee66); }

.stat-row-v2[data-stat="attack"] .stat-icon i { color: #ff4444; }
.stat-row-v2[data-stat="defense"] .stat-icon i { color: #4488ff; }
.stat-row-v2[data-stat="agility"] .stat-icon i { color: #44ff88; }
.stat-row-v2[data-stat="stamina"] .stat-icon i { color: #ff8844; }
.stat-row-v2[data-stat="intelligence"] .stat-icon i { color: #aa44ff; }
.stat-row-v2[data-stat="special"] .stat-icon i { color: #ffd700; }

/* Stat Winner Highlighting V2 */
.stat-row-v2.left-wins .stat-val.left {
    color: #00ff88;
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
    font-size: 1.5rem;
}

.stat-row-v2.right-wins .stat-val.right {
    color: #00ff88;
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
    font-size: 1.5rem;
}

.stat-row-v2.left-wins .stat-val.right,
.stat-row-v2.right-wins .stat-val.left {
    color: rgba(255, 255, 255, 0.35);
    font-size: 1.1rem;
}

.stat-row-v2.left-wins .stat-bar-left {
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.stat-row-v2.right-wins .stat-bar-right {
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

/* Battle Instructions */
.battle-instructions {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Mobile Responsive - Battle Arena V2 */
@media (max-width: 1200px) {
    .battle-arena-v2 {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .battle-center-v2 {
        order: -1;
    }
    
    .fighter-card-v2 {
        flex-direction: row;
        padding: 20px;
        gap: 20px;
    }
    
    .fighter-card-v2 .fighter-portrait {
        width: 140px;
        height: 140px;
        margin-bottom: 0;
    }
    
    .fighter-card-v2 .fighter-portrait img {
        max-height: 120px;
    }
    
    .fighter-info-v2 {
        flex: 1;
        text-align: left;
        margin-bottom: 0;
    }
    
    .fighter-info-v2 .fighter-name {
        font-size: 1.6rem;
    }
    
    .fighter-meta {
        justify-content: flex-start;
    }
    
    .fighter-vote-hint {
        position: static;
        transform: none;
        margin-top: 15px;
    }
    
    .vs-orb {
        width: 60px;
        height: 60px;
    }
    
    .vs-orb span {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .battle-arena-v2 {
        padding: 10px 15px;
    }
    
    .fighter-card-v2 {
        flex-direction: column;
        padding: 15px;
    }
    
    .fighter-card-v2 .fighter-portrait {
        width: 100%;
        height: 150px;
        margin-bottom: 15px;
    }
    
    .fighter-card-v2 .fighter-portrait img {
        max-height: 130px;
    }
    
    .fighter-info-v2 {
        text-align: center;
    }
    
    .fighter-meta {
        justify-content: center;
    }
    
    .stat-row-v2 .stat-val {
        font-size: 1.1rem;
    }
    
    .stat-row-v2.left-wins .stat-val.left,
    .stat-row-v2.right-wins .stat-val.right {
        font-size: 1.3rem;
    }
}

/* Tournament Setup V2 */
.tournament-setup-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.setup-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.setup-section h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #00d4ff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-num {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #000;
    font-weight: bold;
}

.optional-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0;
}

/* Bracket Options Grid */
.tournament-setup-body .bracket-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.tournament-setup-body .bracket-option {
    padding: 8px;
    background: rgba(0, 212, 255, 0.08);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.tournament-setup-body .bracket-option:hover {
    border-color: rgba(0, 212, 255, 0.6);
    background: rgba(0, 212, 255, 0.12);
}

.tournament-setup-body .bracket-option.selected {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.tournament-setup-body .bracket-option .bracket-size {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    line-height: 1;
    display: block;
}

.tournament-setup-body .bracket-option.selected .bracket-size {
    color: #ffd700;
}

.tournament-setup-body .bracket-option .bracket-info {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* Type Filter Options */
.type-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-height: 140px;
    overflow-y: auto;
}

.type-filter-btn {
    padding: 4px 8px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.type-filter-btn:hover {
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(0, 212, 255, 0.1);
    color: #fff;
}

.type-filter-btn.active {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
}

.type-filter-btn i {
    font-size: 0.85rem;
}

/* Setup Footer */
.tournament-setup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.08) 0%, rgba(255, 215, 0, 0.08) 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
}

.setup-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.summary-item i {
    color: #00d4ff;
    font-size: 0.7rem;
}

.summary-divider {
    color: rgba(255, 255, 255, 0.3);
}

/* Mobile Responsive - Setup */
@media (max-width: 700px) {
    .tournament-setup-body {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tournament-setup-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .start-tournament-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   PERSONA 5 TOURNAMENT SCREENS
   Dynamic angled style with motion/3D effects
   ============================================ */

/* ==== SETUP SCREEN - PERSONA 5 STYLE ==== */
.tournament-setup-content {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.98) 0%, rgba(5, 8, 16, 0.98) 100%);
    border: 3px solid rgba(255, 45, 45, 0.4);
    border-left: 5px solid #ff2d2d;
    border-radius: 4px;
    padding: 16px 20px;
    max-width: 580px;
    max-height: calc(100vh - 100px);
    width: 100%;
    position: relative;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 45, 45, 0.15);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

/* Chamfered corner accent */
.tournament-setup-content::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 45, 45, 0.7) 50%);
    pointer-events: none;
}

/* Scattered triangle background */
.tournament-setup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpolygon points='30,5 55,50 5,50' fill='%23ff2d2d'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpolygon points='20,3 37,33 3,33' fill='%2300d4ff'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cpolygon points='25,4 46,42 4,42' fill='%23ffd700'/%3E%3C/svg%3E");
    background-position: 15% 20%, 80% 60%, 50% 85%;
    background-repeat: no-repeat;
    background-size: 50px, 30px, 40px;
    z-index: 0;
}

/* Setup Header - Angled Banner */
.tournament-setup-header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.tournament-setup-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    letter-spacing: 5px;
    color: #000;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    padding: 8px 40px;
    display: inline-block;
    transform: skewX(-5deg);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
    -webkit-text-fill-color: #000;
    position: relative;
}

.tournament-setup-header h2::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid #ffaa00;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.tournament-logo i {
    font-size: 2rem;
    color: #ffd700;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    margin-bottom: 8px;
    display: block;
}

/* Setup Sections - Angled Panels */
.setup-section {
    background: linear-gradient(95deg, rgba(20, 25, 40, 0.95) 0%, rgba(15, 20, 35, 0.9) 100%);
    border: 2px solid rgba(255, 45, 45, 0.25);
    border-left: 4px solid #ff2d2d;
    border-radius: 4px;
    padding: 18px;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.setup-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 45, 45, 0.5) 50%);
}

.setup-section h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: #fff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: skewX(-3deg);
}

.setup-section h3 > * {
    transform: skewX(3deg);
}

.step-num {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #ff2d2d, #ff6b00);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    font-weight: bold;
    transform: skewX(-8deg) !important;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

/* Bracket Options - Angled Cards */
.tournament-setup-body .bracket-option {
    padding: 18px 15px;
    background: linear-gradient(95deg, rgba(25, 30, 50, 0.95) 0%, rgba(20, 25, 45, 0.9) 100%);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-left: 4px solid #00d4ff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.tournament-setup-body .bracket-option::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 212, 255, 0.5) 50%);
}

.tournament-setup-body .bracket-option:hover {
    border-color: rgba(0, 212, 255, 0.7);
    background: linear-gradient(95deg, rgba(35, 40, 60, 0.95) 0%, rgba(25, 30, 50, 0.9) 100%);
    transform: translateX(4px) skewX(-2deg);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
}

.tournament-setup-body .bracket-option.selected {
    border-color: rgba(255, 215, 0, 0.7);
    border-left-color: #ffd700;
    background: linear-gradient(95deg, rgba(255, 215, 0, 0.15) 0%, rgba(20, 25, 45, 0.95) 30%);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 215, 0, 0.2);
}

.tournament-setup-body .bracket-option.selected::after {
    background: linear-gradient(135deg, transparent 50%, rgba(255, 215, 0, 0.7) 50%);
}

/* Bracket Size Number - with diagonal slash */
.tournament-setup-body .bracket-option .bracket-size {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.4rem;
    color: #fff;
    line-height: 1;
    display: block;
    position: relative;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.tournament-setup-body .bracket-option.selected .bracket-size {
    color: #ffd700;
}

/* Selected Ribbon for bracket option */
.tournament-setup-body .bracket-option.selected::before {
    content: 'Γ£ô';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-10deg);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Type Filter Buttons - Angled Pills */
.type-filter-btn {
    padding: 10px 16px;
    background: linear-gradient(95deg, rgba(25, 30, 50, 0.9) 0%, rgba(20, 25, 45, 0.85) 100%);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-left: 3px solid rgba(0, 212, 255, 0.4);
    border-radius: 2px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    transform: skewX(-5deg);
    display: flex;
    align-items: center;
    gap: 6px;
}

.type-filter-btn > * {
    transform: skewX(5deg);
}

.type-filter-btn:hover {
    border-color: rgba(0, 212, 255, 0.5);
    background: linear-gradient(95deg, rgba(35, 40, 60, 0.95) 0%, rgba(25, 30, 50, 0.9) 100%);
}

.type-filter-btn.active {
    border-color: rgba(255, 215, 0, 0.6);
    border-left-color: #ffd700;
    background: linear-gradient(95deg, rgba(255, 215, 0, 0.15) 0%, rgba(20, 25, 45, 0.95) 50%);
    color: #ffd700;
}

/* Setup Footer - Angled Bar */
.tournament-setup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(95deg, rgba(255, 45, 45, 0.1) 0%, rgba(20, 25, 40, 0.95) 30%);
    border: 2px solid rgba(255, 45, 45, 0.25);
    border-left: 4px solid #ff2d2d;
    border-radius: 4px;
    margin-bottom: 15px;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    position: relative;
}

.tournament-setup-footer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 17px;
    height: 17px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 45, 45, 0.5) 50%);
}

/* Start Tournament Button - Big Angled Banner */
.start-tournament-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    border: none;
    border-radius: 2px;
    color: #000;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.25s ease;
    transform: skewX(-8deg);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.start-tournament-btn > * {
    transform: skewX(8deg);
}

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

.start-tournament-btn:hover::before {
    left: 100%;
}

.start-tournament-btn:hover {
    transform: skewX(-8deg) translateY(-2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.4);
}

.start-tournament-btn:disabled {
    background: linear-gradient(90deg, #555, #444);
    color: #888;
    cursor: not-allowed;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.start-tournament-btn:disabled:hover {
    transform: skewX(-8deg);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.start-tournament-btn:disabled::before {
    display: none;
}

/* ==== BATTLE ARENA - PERSONA 5 STYLE ==== */
.tournament-battle {
    position: relative;
}

/* Battle Arena Container */
.battle-arena-v3 {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.98) 0%, rgba(5, 8, 16, 0.98) 100%);
    border: 3px solid rgba(255, 45, 45, 0.4);
    border-left: 6px solid #ff2d2d;
    border-radius: 4px;
    padding: 25px;
    max-width: 950px;
    margin: 0 auto;
    position: relative;
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.5), 0 0 80px rgba(255, 45, 45, 0.15);
    clip-path: polygon(0 0, calc(100% - 25px) 0, 100% 25px, 100% 100%, 25px 100%, 0 calc(100% - 25px));
}

/* Speed lines background */
.battle-arena-v3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.03;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(255, 45, 45, 0.5) 8px,
        rgba(255, 45, 45, 0.5) 9px
    );
    z-index: 0;
}

/* Corner chamfer accents */
.battle-arena-v3::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 45, 45, 0.7) 50%);
    pointer-events: none;
}

/* Battle Arena Header */
.battle-arena-header-v3 {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.battle-arena-header-v3 .match-info {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 3px;
    color: #fff;
    background: linear-gradient(90deg, rgba(255, 45, 45, 0.2) 0%, transparent 100%);
    padding: 8px 20px;
    border-left: 3px solid #ff2d2d;
    display: inline-block;
    transform: skewX(-5deg);
}

.battle-arena-header-v3 .match-info > * {
    transform: skewX(5deg);
    display: inline-block;
}

/* Fighter Cards - Persona 5 Style */
.fighter-card-v3 {
    background: linear-gradient(95deg, rgba(20, 25, 45, 0.95) 0%, rgba(15, 20, 35, 0.9) 100%);
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-left: 5px solid #00d4ff;
    border-radius: 4px;
    padding: 20px;
    flex: 1;
    max-width: 300px;
    position: relative;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%);
    transition: all 0.3s ease;
}

/* Left fighter different color */
.battle-combatants-v3 > .fighter-card-v3:first-child {
    border-left-color: #ff2d2d;
    border-color: rgba(255, 45, 45, 0.4);
}

.battle-combatants-v3 > .fighter-card-v3:first-child::after {
    background: linear-gradient(135deg, transparent 50%, rgba(255, 45, 45, 0.5) 50%);
}

/* Chamfer accent */
.fighter-card-v3::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 212, 255, 0.5) 50%);
}

/* Image container with diagonal frame */
.fighter-card-v3 .fighter-image-container-v3 {
    position: relative;
    margin-bottom: 15px;
}

.fighter-card-v3 .fighter-image-v3 {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: linear-gradient(145deg, rgba(15, 20, 35, 0.9), rgba(10, 15, 25, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

/* Fighter Name Banner - Diagonal */
.fighter-card-v3 .fighter-name-v3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 2px;
    color: #fff;
    background: linear-gradient(90deg, rgba(255, 45, 45, 0.9), rgba(255, 45, 45, 0.7));
    padding: 8px 15px;
    margin: 0 -20px 15px;
    transform: skewX(-5deg);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    text-align: center;
}

.fighter-card-v3 .fighter-name-v3 span {
    display: block;
    transform: skewX(5deg);
}

/* Right fighter has cyan name banner */
.battle-combatants-v3 > .fighter-card-v3:last-child .fighter-name-v3 {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.8), rgba(0, 212, 255, 0.6));
}

/* Fighter Stats - Angled Bars */
.fighter-card-v3 .fighter-quick-stats-v3 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fighter-card-v3 .stat-row-v3 {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.fighter-card-v3 .stat-row-v3 .stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 80px;
    flex-shrink: 0;
}

.fighter-card-v3 .stat-row-v3 .stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    color: #ffd700;
    min-width: 50px;
}

/* VS Section - Diamond Burst */
.vs-section-v3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.vs-badge-v3 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff2d2d, #ff6b00);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(255, 45, 45, 0.5), 5px 5px 0 rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
}

.vs-badge-v3 span {
    transform: rotate(-45deg);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    letter-spacing: 3px;
    color: #fff;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

/* Burst triangles around VS */
.vs-section-v3::before,
.vs-section-v3::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    z-index: 1;
}

.vs-section-v3::before {
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid rgba(255, 215, 0, 0.3);
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.vs-section-v3::after {
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 40px solid rgba(0, 212, 255, 0.3);
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

/* Action Buttons Row */
.battle-arena-actions-v3 {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.battle-arena-actions-v3 button {
    padding: 12px 30px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transform: skewX(-8deg);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.battle-arena-actions-v3 button > * {
    display: inline-block;
    transform: skewX(8deg);
}

.battle-arena-actions-v3 button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

.battle-arena-actions-v3 button:hover::before {
    left: 100%;
}

.battle-arena-actions-v3 button:hover {
    transform: skewX(-8deg) translateY(-2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
}

/* Primary action button (Vote) */
.battle-arena-actions-v3 .btn-vote,
.battle-arena-actions-v3 .btn-primary {
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    color: #000;
}

/* Skip/secondary button */
.battle-arena-actions-v3 .btn-skip,
.battle-arena-actions-v3 .btn-secondary {
    background: linear-gradient(90deg, rgba(60, 65, 80, 0.9), rgba(50, 55, 70, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.battle-arena-actions-v3 .btn-skip:hover,
.battle-arena-actions-v3 .btn-secondary:hover {
    border-color: rgba(0, 212, 255, 0.5);
}

/* ==== RESULTS SCREEN - PERSONA 5 STYLE ==== */
.tournament-results-v3 {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.98) 0%, rgba(5, 8, 16, 0.98) 100%);
    border: 3px solid rgba(255, 215, 0, 0.5);
    border-left: 6px solid #ffd700;
    border-radius: 4px;
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.5), 0 0 100px rgba(255, 215, 0, 0.2);
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
}

/* Victory burst background */
.tournament-results-v3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: 
        radial-gradient(ellipse at center top, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(255, 215, 0, 0.02) 20px,
            rgba(255, 215, 0, 0.02) 22px
        );
    z-index: 0;
}

/* Corner accents */
.tournament-results-v3::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 215, 0, 0.7) 50%);
    pointer-events: none;
}

/* Champion Header - Explosive Banner */
.champion-header-v3 {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.champion-title-v3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 8px;
    color: #000;
    background: linear-gradient(90deg, #ffd700, #ffaa00, #ffd700);
    padding: 12px 50px;
    display: inline-block;
    transform: skewX(-6deg);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4);
    position: relative;
    -webkit-text-fill-color: #000;
}

.champion-title-v3::before,
.champion-title-v3::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
}

.champion-title-v3::before {
    left: -20px;
    border-right: 20px solid #ffd700;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
}

.champion-title-v3::after {
    right: -20px;
    border-left: 20px solid #ffd700;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
}

/* Champion Card - Burst Frame */
.champion-card-v3 {
    background: linear-gradient(95deg, rgba(255, 215, 0, 0.1) 0%, rgba(20, 25, 45, 0.95) 30%);
    border: 3px solid rgba(255, 215, 0, 0.5);
    border-left: 5px solid #ffd700;
    border-radius: 4px;
    padding: 25px;
    margin: 0 auto 30px;
    max-width: 400px;
    position: relative;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4);
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
    z-index: 1;
}

.champion-card-v3::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 215, 0, 0.7) 50%);
}

/* Champion Image - with burst lines */
.champion-image-v3 {
    width: 200px;
    height: 200px;
    object-fit: contain;
    background: linear-gradient(145deg, rgba(15, 20, 35, 0.9), rgba(10, 15, 25, 0.95));
    border: 3px solid rgba(255, 215, 0, 0.5);
    border-radius: 4px;
    margin: 0 auto 15px;
    display: block;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
    position: relative;
}

/* Champion Name - Gold Angled Banner */
.champion-name-v3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 4px;
    color: #fff;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    padding: 10px 25px;
    margin: 0 -25px 15px;
    transform: skewX(-5deg);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    text-align: center;
    -webkit-text-fill-color: #000;
}

.champion-name-v3 span {
    display: block;
    transform: skewX(5deg);
}

/* Champion Stats Row */
.champion-stats-row-v3 {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.champion-stat-v3 {
    text-align: center;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #ff2d2d;
    border-radius: 2px;
    transform: skewX(-3deg);
}

.champion-stat-v3 > * {
    transform: skewX(3deg);
    display: block;
}

.champion-stat-v3 .stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.champion-stat-v3 .stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: #ffd700;
}

/* Tournament Stats Panel */
.tournament-stats-panel-v3 {
    background: linear-gradient(95deg, rgba(20, 25, 45, 0.95) 0%, rgba(15, 20, 35, 0.9) 100%);
    border: 2px solid rgba(255, 45, 45, 0.3);
    border-left: 4px solid #ff2d2d;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 25px;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.tournament-stats-panel-v3::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 45, 45, 0.5) 50%);
}

.tournament-stats-panel-v3 h4 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: #fff;
    margin-bottom: 15px;
    transform: skewX(-3deg);
    border-bottom: 1px solid rgba(255, 45, 45, 0.3);
    padding-bottom: 10px;
}

.tournament-stats-grid-v3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.tournament-stat-item-v3 {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 2px;
}

.tournament-stat-item-v3 .value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: #00d4ff;
    display: block;
}

.tournament-stat-item-v3 .label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Runner-ups Section */
.runner-ups-section-v3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.runner-up-card-v3 {
    background: linear-gradient(95deg, rgba(25, 30, 50, 0.9) 0%, rgba(20, 25, 45, 0.85) 100%);
    border: 2px solid rgba(192, 192, 192, 0.3);
    border-left: 4px solid #c0c0c0;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    position: relative;
}

.runner-up-card-v3::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, transparent 50%, rgba(192, 192, 192, 0.5) 50%);
}

/* 2nd place - Silver */
.runner-up-card-v3:nth-child(1) {
    border-left-color: #c0c0c0;
}

/* 3rd place - Bronze */
.runner-up-card-v3:nth-child(2) {
    border-left-color: #cd7f32;
}

.runner-up-card-v3:nth-child(2)::after {
    background: linear-gradient(135deg, transparent 50%, rgba(205, 127, 50, 0.5) 50%);
}

/* 4th place */
.runner-up-card-v3:nth-child(3) {
    border-left-color: #00d4ff;
}

.runner-up-card-v3:nth-child(3)::after {
    background: linear-gradient(135deg, transparent 50%, rgba(0, 212, 255, 0.5) 50%);
}

.runner-up-position-v3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.runner-up-name-v3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    letter-spacing: 1px;
}

.runner-up-image-v3 {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin: 0 auto 10px;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

/* Results Action Buttons */
.results-actions-v3 {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.results-actions-v3 button {
    padding: 14px 35px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 3px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transform: skewX(-8deg);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.results-actions-v3 button > * {
    display: inline-block;
    transform: skewX(8deg);
}

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

.results-actions-v3 button:hover::before {
    left: 100%;
}

.results-actions-v3 button:hover {
    transform: skewX(-8deg) translateY(-3px);
    box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.5);
}

/* Play Again - Primary Gold */
.results-actions-v3 .btn-play-again {
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    color: #000;
}

/* View Bracket - Secondary */
.results-actions-v3 .btn-view-bracket {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.8), rgba(0, 180, 220, 0.8));
    color: #fff;
}

/* Share - Tertiary */
.results-actions-v3 .btn-share {
    background: linear-gradient(90deg, rgba(60, 65, 80, 0.9), rgba(50, 55, 70, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ==== TOURNAMENT MODAL CONTAINER ==== */
.tournament-modal-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ==== RESPONSIVE - TOURNAMENT PERSONA 5 ==== */
@media (max-width: 850px) {
    .battle-arena-v3 {
        padding: 15px;
    }
    
    .battle-combatants-v3 {
        flex-direction: column;
        gap: 20px;
    }
    
    .fighter-card-v3 {
        max-width: 100%;
    }
    
    .vs-section-v3 {
        transform: rotate(90deg);
        margin: -10px 0;
    }
    
    .vs-badge-v3 {
        width: 60px;
        height: 60px;
    }
    
    .vs-badge-v3 span {
        font-size: 1.6rem;
    }
}

@media (max-width: 600px) {
    .tournament-setup-content {
        padding: 20px 15px;
    }
    
    .tournament-setup-header h2 {
        font-size: 1.6rem;
        padding: 6px 25px;
    }
    
    .start-tournament-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 1.1rem;
    }
    
    .champion-title-v3 {
        font-size: 1.8rem;
        letter-spacing: 4px;
        padding: 8px 30px;
    }
    
    .champion-title-v3::before,
    .champion-title-v3::after {
        display: none;
    }
    
    .champion-card-v3 {
        padding: 15px;
    }
    
    .champion-image-v3 {
        width: 150px;
        height: 150px;
    }
    
    .champion-name-v3 {
        font-size: 1.4rem;
        margin: 0 -15px 15px;
    }
    
    .runner-ups-section-v3 {
        grid-template-columns: 1fr;
    }
    
    .results-actions-v3 {
        flex-direction: column;
    }
    
    .results-actions-v3 button {
        width: 100%;
        justify-content: center;
    }
}

/* ==== BATTLE HEADER - PERSONA 5 STYLE ==== */
.battle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(95deg, rgba(255, 45, 45, 0.1) 0%, rgba(20, 25, 40, 0.95) 30%);
    border: 2px solid rgba(255, 45, 45, 0.3);
    border-left: 4px solid #ff2d2d;
    border-radius: 4px;
    margin-bottom: 20px;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    position: relative;
}

.battle-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 45, 45, 0.5) 50%);
}

.battle-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.round-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 3px;
    color: #ffd700;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.progress-track {
    width: 120px;
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: skewX(-10deg);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff2d2d, #ff6b00);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 45, 45, 0.5);
}

.match-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

.quit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: linear-gradient(90deg, rgba(60, 65, 80, 0.9), rgba(50, 55, 70, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    cursor: pointer;
    transform: skewX(-8deg);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.quit-btn > * {
    transform: skewX(8deg);
}

.quit-btn:hover {
    border-color: rgba(255, 45, 45, 0.5);
    background: linear-gradient(90deg, rgba(255, 45, 45, 0.3), rgba(50, 55, 70, 0.9));
}

/* ==== STATS COMPARISON PERSONA 5 ==== */
.stats-comparison-v3 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: linear-gradient(180deg, rgba(10, 15, 25, 0.95) 0%, rgba(5, 10, 20, 0.9) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 15px 0;
}

.stats-comparison-v3 .stat-row-v3 {
    display: grid;
    grid-template-columns: 1fr 40px 35px 35px 40px 1fr;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.stats-comparison-v3 .stat-bar-v3 {
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-comparison-v3 .stat-bar-v3.left {
    transform: skewX(10deg);
}

.stats-comparison-v3 .stat-bar-v3.right {
    transform: skewX(-10deg);
}

.stats-comparison-v3 .stat-bar-v3 .bar-fill-v3 {
    height: 100%;
    transition: width 0.3s ease;
}

.stats-comparison-v3 .stat-bar-v3.left .bar-fill-v3 {
    background: linear-gradient(90deg, #ff6b00, #ff2d2d);
    float: right;
}

.stats-comparison-v3 .stat-bar-v3.right .bar-fill-v3 {
    background: linear-gradient(90deg, #00d4ff, #0088cc);
}

.stats-comparison-v3 .stat-val-v3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    color: #fff;
    text-align: center;
}

.stats-comparison-v3 .stat-val-v3.left {
    color: #ff6b00;
}

.stats-comparison-v3 .stat-val-v3.right {
    color: #00d4ff;
}

.stats-comparison-v3 .stat-icon-v3 {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 3px;
    color: #ffd700;
    font-size: 0.85rem;
    transform: rotate(45deg);
}

.stats-comparison-v3 .stat-icon-v3 i {
    transform: rotate(-45deg);
}

/* ==== FIGHTER CARDS ENHANCED ==== */
.battle-combatants-v3 {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
}

.fighter-header-v3 {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.fighter-portrait-v3 {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.fighter-portrait-v3 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: linear-gradient(145deg, rgba(15, 20, 35, 0.9), rgba(10, 15, 25, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.fighter-identity-v3 {
    flex: 1;
}

.fighter-identity-v3 .fighter-name-v3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: #fff;
    margin: 0 0 8px;
    background: none;
    padding: 0;
    transform: none;
    box-shadow: none;
}

.fighter-badges-v3 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rank-badge-v3 {
    padding: 3px 10px;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    color: #000;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-radius: 2px;
    transform: skewX(-5deg);
}

.winrate-badge-v3 {
    padding: 3px 8px;
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: #00d4ff;
    font-size: 0.7rem;
    border-radius: 2px;
}

.fighter-specs-v3 {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.fighter-specs-v3 .spec-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 2px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.fighter-specs-v3 .spec-item i {
    color: #ffd700;
    font-size: 0.7rem;
}

.fighter-click-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(90deg, rgba(255, 45, 45, 0.2), rgba(255, 45, 45, 0.1));
    border: 2px dashed rgba(255, 45, 45, 0.4);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fighter-click-zone:hover {
    background: linear-gradient(90deg, rgba(255, 45, 45, 0.4), rgba(255, 45, 45, 0.2));
    border-color: rgba(255, 45, 45, 0.7);
    color: #fff;
}

.fighter-click-zone i {
    color: #ff2d2d;
    font-size: 1rem;
}

/* Right fighter alternate colors */
.fighter-card-v3.right .fighter-click-zone {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.1), rgba(0, 212, 255, 0.2));
    border-color: rgba(0, 212, 255, 0.4);
}

.fighter-card-v3.right .fighter-click-zone:hover {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.4));
    border-color: rgba(0, 212, 255, 0.7);
}

.fighter-card-v3.right .fighter-click-zone i {
    color: #00d4ff;
}

/* Winner animation effect */
.fighter-card-v3.winner {
    border-color: rgba(255, 215, 0, 0.7) !important;
    border-left-color: #ffd700 !important;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4), 0 0 40px rgba(255, 215, 0, 0.3) !important;
    transform: scale(1.03);
}

.fighter-card-v3.loser {
    opacity: 0.5;
    filter: grayscale(0.5);
    transform: scale(0.97);
}

/* ==================== ELO Change Animation Overlay ==================== */
.elo-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 30px;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.elo-animation-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

/* Hide overflow on elo images */
.elo-animation-overlay img {
    max-width: 100%;
    max-height: 100%;
}

.elo-change-card {
    position: relative;
    background: linear-gradient(145deg, rgba(20, 25, 35, 0.98), rgba(10, 15, 25, 0.98));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transform: translateY(50px) scale(0.8);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.elo-animation-overlay.active .elo-change-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.elo-animation-overlay.active .elo-change-card.left {
    transition-delay: 0.1s;
}

.elo-animation-overlay.active .elo-change-card.right {
    transition-delay: 0.2s;
}

.elo-change-card.left {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.2), inset 0 0 20px rgba(0, 212, 255, 0.05);
}

.elo-change-card.right {
    border-color: rgba(255, 107, 0, 0.4);
    box-shadow: 0 0 40px rgba(255, 107, 0, 0.2), inset 0 0 20px rgba(255, 107, 0, 0.05);
}

.elo-change-card.winner {
    border-color: rgba(46, 204, 64, 0.6) !important;
    box-shadow: 0 0 60px rgba(46, 204, 64, 0.4), inset 0 0 30px rgba(46, 204, 64, 0.1) !important;
}

.elo-change-card.loser {
    border-color: rgba(255, 65, 54, 0.4) !important;
    box-shadow: 0 0 40px rgba(255, 65, 54, 0.2), inset 0 0 20px rgba(255, 65, 54, 0.05) !important;
    opacity: 0.8;
}

.elo-change-portrait {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.elo-change-card.winner .elo-change-portrait {
    border-color: #2ecc40;
    animation: winnerGlow 1s ease-in-out infinite alternate;
}

@keyframes winnerGlow {
    from { box-shadow: 0 0 20px rgba(46, 204, 64, 0.4); }
    to { box-shadow: 0 0 40px rgba(46, 204, 64, 0.8); }
}

.elo-change-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.elo-change-content {
    text-align: center;
}

.elo-change-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.elo-change-delta {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 0 0 20px currentColor;
    transform: scale(0);
    animation: deltaPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.5s;
}

.elo-change-card.winner .elo-change-delta {
    color: #2ecc40;
}

.elo-change-card.loser .elo-change-delta {
    color: #ff4136;
}

@keyframes deltaPopIn {
    0% { transform: scale(0) rotate(-10deg); }
    50% { transform: scale(1.3) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.elo-change-calculation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
    animation-delay: 0.8s;
}

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

.elo-change-calculation .elo-old {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
}

.elo-change-calculation .elo-new {
    font-weight: 700;
    font-size: 1.1rem;
}

.elo-change-card.winner .elo-change-calculation .elo-new {
    color: #2ecc40;
}

.elo-change-card.loser .elo-change-calculation .elo-new {
    color: #ff4136;
}

.elo-change-calculation i {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.elo-vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b00, #ff3366);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 107, 0, 0.5);
    transform: scale(0);
    animation: vsBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
}

@keyframes vsBounce {
    0% { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Crown icon for winner - using HTML element instead of pseudo-element */
.elo-winner-crown {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    font-size: 2rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    opacity: 0;
    pointer-events: none;
}

.elo-change-card.winner .elo-winner-crown {
    animation: crownDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.7s;
}

.elo-change-card.loser .elo-winner-crown {
    display: none;
}

@keyframes crownDrop {
    0% { 
        transform: translateX(-50%) translateY(-30px) scale(0); 
        opacity: 0;
    }
    100% { 
        transform: translateX(-50%) translateY(0) scale(1); 
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .elo-animation-overlay {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .elo-change-card {
        min-width: 180px;
        padding: 20px;
    }
    
    .elo-change-portrait {
        width: 80px;
        height: 80px;
    }
    
    .elo-change-delta {
        font-size: 2rem;
    }
    
    .elo-vs-divider {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
}
