:root {
    --bg-dark: #0a0f18;
    --panel-bg: rgba(18, 25, 40, 0.85);
    --panel-border: rgba(255, 255, 255, 0.12);
    --text-main: #ffffff;
    --text-muted: #b0b8c5;
    --brawl-yellow: #ffc107;
    --brawl-yellow-hover: #ffca28;
    --brawl-blue: #00a8ff;
    --brawl-red: #ff4757;
    --power-color: #e84393;
    --glass-bg: rgba(18, 25, 40, 0.8);
    --prestige-gold: #ffd700;
    --glow-yellow: 0 0 20px rgba(255, 193, 7, 0.5);
}

/* ══════════ CUSTOM SCROLLBAR ══════════ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffc107, #ff9f43);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.4);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffca28, #ffb347);
}

* {
    scrollbar-width: thin;
    scrollbar-color: #ffc107 rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    background: linear-gradient(135deg, #0a0f18 0%, #1a1f2e 100%);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.bg-particles {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle cx="30" cy="40" r="2" fill="%23ffffff" opacity="0.08"/><circle cx="170" cy="80" r="1.5" fill="%23ffffff" opacity="0.1"/><circle cx="90" cy="160" r="1" fill="%23ffc107" opacity="0.15"/><circle cx="150" cy="20" r="2.5" fill="%23ffffff" opacity="0.05"/><circle cx="50" cy="130" r="1.8" fill="%23ffc107" opacity="0.1"/></svg>');
    background-size: 300px 300px;
    animation: drift 60s linear infinite;
}
@keyframes drift {
    from { background-position: 0 0; }
    to { background-position: 300px 300px; }
}

h1, h2, h3, button, .brawler-name, .power-level, .stat-box strong, .progress-bar {
    font-family: 'Lilita One', cursive;
    letter-spacing: 0.5px;
}

header {
    background: rgba(10,15,24,0.9);
    backdrop-filter: blur(15px);
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 193, 7, 0.5);
    box-shadow: 0 4px 30px rgba(0,0,0,0.7);
    position: relative;
    z-index: 10;
}
.logo h1 {
    font-size: 2.8rem;
    cursor: pointer;
    transition: transform 0.3s, text-shadow 0.3s;
}
.logo h1:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px var(--brawl-yellow);
}
.badge {
    background: linear-gradient(135deg, #ffc107, #ff9f43);
    color: #000;
    font-size: 0.4em;
    padding: 4px 12px;
    border-radius: 20px;
    vertical-align: middle;
    border: 2px solid #000;
    margin-left: 10px;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,193,7,0.5); }
    50% { box-shadow: 0 0 0 8px rgba(255,193,7,0); }
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 60px;
    width: 100%;
}

/* ══════════ HERO ══════════ */
.hero-section {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    width: 100%;
    max-width: 850px;
}
.hero-glow {
    position: absolute;
    top: -80px; left: 50%; transform: translateX(-50%);
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,193,7,0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
}
.hero-content h1 {
    font-size: 4.2rem;
    color: #fff;
    text-shadow: 3px 3px 0 #000, 0 0 40px rgba(255,193,7,0.5);
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    word-break: break-word;
}
.hero-content h1 .highlight {
    color: var(--brawl-yellow);
    text-shadow: 3px 3px 0 #000, 0 0 60px rgba(255,193,7,0.8);
}
.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
    word-break: break-word;
}
.hero-stats-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.hero-stat-mini {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 25px 35px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    min-width: 160px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.hero-stat-mini::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
}
.hero-stat-mini:hover::after { left: 100%; }
.hero-stat-mini:hover {
    transform: translateY(-8px);
    box-shadow: var(--glow-yellow);
    border-color: var(--brawl-yellow);
}
.hero-stat-mini i { font-size: 2.2rem; color: var(--brawl-yellow); margin-bottom: 10px; display: block; }
.hero-stat-mini span { font-size: 2.8rem; display: block; color: #fff; }
.hero-stat-mini small { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }

/* ══════════ FEATURE CARDS ══════════ */
.info-banner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1150px;
    margin-bottom: 70px;
}
.info-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    padding: 40px 25px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    flex: 1 1 200px;
    max-width: 260px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}
.info-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,193,7,0.15), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}
.info-card:hover::before { opacity: 1; }
.info-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--brawl-yellow);
    box-shadow: 0 25px 50px rgba(255,193,7,0.25);
}
.info-card-icon {
    width: 75px; height: 75px;
    background: rgba(255,193,7,0.2);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 1px solid rgba(255,193,7,0.3);
    transition: transform 0.3s;
}
.info-card:hover .info-card-icon { transform: rotate(5deg) scale(1.1); }
.info-card i { font-size: 2.2rem; color: var(--brawl-yellow); }
.info-card h3 { font-size: 1.6rem; margin-bottom: 10px; color: #fff; }
.info-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }

/* ══════════ SEARCH ══════════ */
.search-section {
    text-align: center;
    margin-bottom: 70px;
    width: 100%;
    max-width: 650px;
    z-index: 5;
}
.input-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}
.hashtag-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.6);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    box-shadow: inset 0 4px 10px rgba(0,0,0,0.5);
    transition: all 0.3s;
}
.hashtag-wrapper:focus-within {
    border-color: var(--brawl-yellow);
    box-shadow: 0 0 25px rgba(255,193,7,0.5);
}
.hashtag { padding: 16px 5px 16px 22px; color: var(--brawl-yellow); font-size: 1.8rem; }
input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 16px 22px 16px 5px;
    font-size: 1.6rem;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Lilita One', cursive;
    outline: none;
    text-transform: uppercase;
}
button {
    padding: 16px 40px;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #ffc107, #ff9f43);
    color: #000;
    border: 3px solid #000;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 0 #000, 0 8px 20px rgba(255,193,7,0.5);
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
    white-space: nowrap;
}
button:active { transform: translateY(6px); box-shadow: 0 0px 0 #000; }
button:hover {
    background: linear-gradient(135deg, #ffca28, #ffb347);
    box-shadow: 0 6px 0 #000, 0 12px 25px rgba(255,193,7,0.7);
}

/* ══════════ RECENT SEARCHES ══════════ */
.recent-searches {
    margin-top: 35px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.15);
    text-align: left;
    animation: fadeInUp 0.4s ease;
}
.recent-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.recent-header h4 { color: var(--text-muted); font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.recent-header h4 i { color: var(--brawl-yellow); }
.clear-recent-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--brawl-red);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    box-shadow: none;
}
.clear-recent-btn:hover { background: rgba(255,71,87,0.2); border-color: var(--brawl-red); }
.recent-tags-container { display: flex; flex-wrap: wrap; gap: 10px; }
.recent-tag {
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 30px;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #fff;
    white-space: nowrap;
}
.recent-tag:hover {
    background: rgba(255,193,7,0.25);
    border-color: var(--brawl-yellow);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255,193,7,0.25);
}
.recent-tag .recent-tag-name { font-weight: 700; color: var(--brawl-yellow); font-family: 'Lilita One', cursive; }
.recent-tag .recent-tag-trophies { color: var(--text-muted); font-size: 0.8rem; display: flex; align-items: center; gap: 3px; }
.recent-tag .remove-tag {
    background: transparent; border: none; color: var(--text-muted); cursor: pointer;
    padding: 2px 4px; font-size: 0.75rem; box-shadow: none; transition: color 0.2s;
}
.recent-tag .remove-tag:hover { color: var(--brawl-red); }

/* ══════════ GLOBAL TOP (scroll horizontal en móvil) ══════════ */
.top-players-section {
    width: 100%;
    max-width: 900px;
    margin-bottom: 80px;
    animation: fadeInUp 0.6s ease;
}
.ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.ranking-header h2 {
    font-size: 2.4rem;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    display: flex;
    align-items: center;
    gap: 12px;
    word-break: break-word;
}
.table-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.15);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    max-width: 100%;
}
#topPlayersTable {
    width: 100%;
    min-width: 500px;
    border-collapse: separate;
    border-spacing: 0;
    color: #fff;
}
#topPlayersTable th {
    padding: 18px 24px;
    background: rgba(0,0,0,0.4);
    text-align: left;
    font-family: 'Lilita One', cursive;
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--brawl-yellow);
}
#topPlayersTable th:first-child { border-top-left-radius: 20px; }
#topPlayersTable th:last-child { border-top-right-radius: 20px; }
#topPlayersTable td {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 1rem;
    white-space: nowrap;
}
#topPlayersTable tr:last-child td:first-child { border-bottom-left-radius: 20px; }
#topPlayersTable tr:last-child td:last-child { border-bottom-right-radius: 20px; }
#topPlayersTable tr:hover td { background: rgba(255,193,7,0.08); }
.rank-number {
    background: var(--brawl-yellow);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-family: 'Lilita One', cursive;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ══════════ CUSTOM SELECT ══════════ */
.custom-select-wrapper { position: relative; user-select: none; }
.custom-select { position: relative; width: 220px; max-width: 100%; }
.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}
.custom-select-trigger:hover {
    border-color: var(--brawl-yellow);
    box-shadow: 0 0 15px rgba(255,193,7,0.3);
}
.custom-select-trigger i:first-child { color: var(--brawl-yellow); margin-right: 8px; }
.custom-select-trigger .fa-chevron-down { margin-left: 8px; transition: transform 0.3s; }
.custom-select.open .custom-select-trigger .fa-chevron-down { transform: rotate(180deg); }
.custom-select-options {
    position: absolute; top: 110%; left: 0; right: 0;
    background: var(--glass-bg); backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15); border-radius: 12px;
    padding: 8px 0; z-index: 20; max-height: 200px; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}
.custom-select.open .custom-select-options { opacity: 1; visibility: visible; transform: translateY(0); }
.custom-option {
    display: block; padding: 8px 16px; color: #fff; cursor: pointer;
    font-size: 0.9rem; transition: background 0.2s; white-space: nowrap;
}
.custom-option:hover { background: rgba(255,193,7,0.2); color: var(--brawl-yellow); }
.custom-option.selected { background: rgba(255,193,7,0.1); font-weight: 600; }

/* ══════════ UTILS ══════════ */
.hidden { display: none !important; }
.error {
    color: var(--brawl-red); margin-top: 25px; font-size: 1.2rem;
    background: rgba(0,0,0,0.5); padding: 12px 24px; border-radius: 10px; display: inline-block;
}
#loading { margin-top: 25px; color: var(--brawl-blue); font-size: 1.2rem; font-family: 'Lilita One'; text-shadow: 0 0 10px rgba(0,168,255,0.5); }

/* ══════════ PROFILE LAYOUT ══════════ */
.profile-layout {
    width: 100%; max-width: 1300px; display: grid; grid-template-columns: 1fr;
    gap: 40px; animation: fadeInUp 0.6s ease; margin-top: 10px;
}
@media (min-width: 950px) {
    .profile-layout { grid-template-columns: 390px 1fr; }
}
.profile-content { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.content-panel, .profile-sidebar {
    background: var(--glass-bg); backdrop-filter: blur(20px);
    padding: 35px; border-radius: 28px; border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    min-width: 0;
}
.profile-sidebar { height: fit-content; text-align: center; }

.player-header { margin-bottom: 25px; }
.player-header h2 {
    color: var(--brawl-yellow); font-size: 2.8rem;
    text-shadow: 3px 3px 0 #000, 0 0 15px rgba(255,193,7,0.6);
    margin-bottom: 10px; word-break: break-word;
}
.club-badge {
    background: linear-gradient(135deg, #00a8ff, #0077cc);
    padding: 10px 22px; border-radius: 20px; font-size: 1rem; color: #fff;
    border: 2px solid #000; box-shadow: 0 4px 0 #000, 0 0 15px rgba(0,168,255,0.5);
    display: inline-block; font-weight: bold; margin-top: 10px;
    word-break: break-word;
}
.championship-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00); color: #000;
    padding: 14px 24px; border-radius: 18px; font-weight: 700; font-size: 0.95rem;
    margin-bottom: 25px; border: 2px solid #000; display: flex; align-items: center;
    justify-content: center; gap: 10px; animation: pulseGlow 2s infinite;
    word-break: break-word;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255,215,0,0.3); }
    50% { box-shadow: 0 0 25px rgba(255,215,0,0.9); }
}

.section-title {
    font-size: 2rem; color: #fff; text-shadow: 2px 2px 0 #000;
    margin-bottom: 25px; border-bottom: 2px solid rgba(255,255,255,0.2);
    padding-bottom: 12px; display: flex; align-items: center; gap: 10px;
    word-break: break-word;
}
.prestige-legend { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; margin-left: auto; white-space: nowrap; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px; }
.vertical-stats { display: flex; flex-direction: column; gap: 15px; }
.stat-box {
    background: rgba(0,0,0,0.5); padding: 25px 15px; border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.1); text-align: center; transition: all 0.3s;
}
.stat-box:hover { border-color: var(--brawl-yellow); transform: translateY(-5px); }
.stat-box span {
    color: var(--text-muted); font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.stat-box strong { font-size: 2.8rem; text-shadow: 2px 2px 0 #000; display: block; margin-top: 10px; }

.stat-icon { width: 32px; height: 32px; object-fit: contain; vertical-align: middle; margin-right: 8px; filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5)); }
.club-icon { width: 22px; height: 22px; vertical-align: middle; margin-right: 8px; }

.extra-stats { display: flex; flex-direction: column; gap: 12px; margin-top: 25px; }
.extra-stat-row {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(0,0,0,0.4); padding: 16px 20px; border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08); font-size: 0.9rem;
    word-break: break-word;
}
.extra-stat-label { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-weight: 600; min-width: 0; }
.extra-stat-value { font-family: 'Lilita One', cursive; font-size: 1.3rem; white-space: nowrap; }

.progress-container {
    width: 100%; background: rgba(0,0,0,0.7); border-radius: 25px; border: 2px solid #000;
    height: 40px; overflow: hidden; margin-bottom: 12px; box-shadow: inset 0 4px 10px rgba(0,0,0,0.6);
}
.progress-bar {
    height: 100%; background: linear-gradient(90deg, var(--brawl-yellow), #ff9f43);
    color: #000; text-align: center; line-height: 40px; font-size: 1.3rem;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1); width: 0%;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,0.3);
}
.progress-text { color: var(--text-muted); font-size: 0.95rem; text-align: center; font-weight: 600; }

/* ══════════ SHARE BUTTON ══════════ */
.share-btn {
    background: transparent;
    border: 2px solid var(--brawl-yellow);
    color: var(--brawl-yellow);
    font-size: 1.4rem;
    border-radius: 14px;
    padding: 14px 28px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(255,193,7,0.4);
    font-family: 'Lilita One', cursive;
}
.share-btn:hover {
    background: rgba(255,193,7,0.2);
    box-shadow: 0 0 20px rgba(255,193,7,0.6);
}
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 12px 28px;
    border-radius: 40px;
    font-size: 0.95rem;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid var(--brawl-yellow);
}
.toast.show {
    opacity: 1;
}

/* ══════════ BATTLE LOG ══════════ */
.battle-log-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}
.battle-card {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    transition: all 0.3s;
}
.battle-card:hover {
    border-color: var(--brawl-yellow);
    background: rgba(0,0,0,0.7);
}
.battle-result {
    font-family: 'Lilita One', cursive;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}
.battle-result.victory { color: #2ecc71; }
.battle-result.defeat { color: #e74c3c; }
.battle-result.draw { color: #f39c12; }
.battle-mode {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.battle-trophies {
    font-family: 'Lilita One', cursive;
    font-size: 1.2rem;
    color: var(--brawl-yellow);
    display: flex;
    align-items: center;
    gap: 5px;
}
.battle-time {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}
.battle-brawler {
    display: flex;
    align-items: center;
    gap: 8px;
}
.battle-brawler img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

/* ══════════ BRAWLERS (2 por fila en móvil) ══════════ */
.brawler-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 20px;
}
@media (max-width: 600px) {
    .brawler-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .brawler-card {
        padding: 18px 10px;
    }
    .brawler-img {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }
    .brawler-name {
        font-size: 0.95rem;
    }
    .brawler-trophies {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    .brawler-trophies img {
        width: 20px;
        height: 20px;
    }
    .power-level {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
        top: -10px;
        left: -10px;
        border-radius: 10px;
    }
    .brawler-items {
        gap: 12px;
        padding-top: 10px;
    }
    .item-badge {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
    .item-badge img {
        width: 16px !important;
    }
}
.brawler-card {
    background: linear-gradient(145deg, rgba(30,38,55,0.9), rgba(15,20,35,0.95));
    border-radius: 20px; padding: 25px 12px; text-align: center;
    border: 1px solid rgba(255,255,255,0.15); box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: all 0.3s; position: relative; display: flex; flex-direction: column; align-items: center;
    min-width: 0;
}
.brawler-card:hover {
    transform: translateY(-10px) scale(1.02); border-color: var(--brawl-yellow);
    box-shadow: 0 20px 35px rgba(255,193,7,0.35);
}
.brawler-card.prestige {
    border-color: var(--prestige-gold); box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
}
.brawler-card.prestige:hover { box-shadow: 0 20px 50px rgba(255, 215, 0, 0.7); }
.brawler-img { width: 100px; height: 100px; margin-bottom: 14px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,0.6)); }
.brawler-name { font-size: 1.3rem; color: #fff; text-shadow: 2px 2px 0 #000; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.brawler-trophies {
    font-size: 1.4rem; font-family: 'Lilita One'; margin-bottom: 14px;
    display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--brawl-yellow);
}
.brawler-trophies img { width: 24px; height: 24px; }
.power-level {
    position: absolute; top: -12px; left: -12px;
    background: var(--power-color); width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
    border: 2px solid #000; box-shadow: 0 4px 0 #000, 0 0 15px rgba(232,67,147,0.6); z-index: 2;
}
.brawler-card.prestige .power-level {
    background: linear-gradient(135deg, #ffd700, #ff8c00); border-color: #fff;
    box-shadow: 0 4px 0 #000, 0 0 20px rgba(255,215,0,0.9);
}
.brawler-items { display: flex; justify-content: center; gap: 15px; width: 100%; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 14px; }
.item-badge {
    display: flex; align-items: center; gap: 6px; font-size: 1rem; font-weight: bold;
    color: #fff; background: rgba(0,0,0,0.6); padding: 6px 12px; border-radius: 10px;
}

/* ══════════ BUTTONS ══════════ */
.btn-secondary {
    background: transparent; padding: 14px 28px; font-size: 1.4rem; border-radius: 16px;
    margin-bottom: 15px; transition: all 0.3s; display: inline-flex; align-items: center;
    gap: 10px; cursor: pointer; font-family: 'Lilita One', cursive; letter-spacing: 0.5px;
    color: var(--brawl-yellow); border: 2px solid var(--brawl-yellow);
    box-shadow: 0 0 10px rgba(255,193,7,0.4);
}
.btn-secondary:hover { background: rgba(255,193,7,0.2); box-shadow: 0 0 20px rgba(255,193,7,0.6); }

.profile-actions-bar {
    grid-column: 1 / -1; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 15px; align-items: center;
}

/* ══════════ PÁGINAS DE TEXTO (about, privacy, tos) ══════════ */
.text-page-container {
    background: var(--glass-bg); backdrop-filter: blur(20px); padding: 40px; border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    max-width: 900px; width: 100%; margin: 0 auto 40px auto; animation: fadeInUp 0.6s ease;
    word-break: break-word;
}
.text-page-container h1 { color: var(--brawl-yellow); font-size: 2.5rem; text-shadow: 2px 2px 0 #000; margin-bottom: 20px; }
.text-page-container h2 { color: #fff; font-size: 1.6rem; margin: 30px 0 10px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 5px; }
.text-page-container p { margin-bottom: 16px; line-height: 1.7; color: #d1d8e0; }
.text-page-container ul { margin-left: 25px; margin-bottom: 20px; color: #d1d8e0; }
.text-page-container li { margin-bottom: 8px; }
.text-page-container strong { color: var(--brawl-yellow); }

.text-page-container .info-card-plain {
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px; padding: 30px; margin: 30px 0; backdrop-filter: blur(10px);
}
.text-page-container .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 25px 0; }
.text-page-container .feature-item {
    background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px; padding: 25px 20px; text-align: left; transition: transform 0.3s, border-color 0.3s;
}
.text-page-container .feature-item:hover { transform: translateY(-5px); border-color: var(--brawl-yellow); }
.text-page-container .feature-item i { font-size: 2rem; color: var(--brawl-yellow); margin-bottom: 12px; display: block; }
.text-page-container .feature-item h3 { font-size: 1.3rem; margin-bottom: 8px; color: #fff; }
.text-page-container .feature-item p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; line-height: 1.4; }

/* ══════════ FOOTER ══════════ */
footer {
    background: rgba(10,15,24,0.95); backdrop-filter: blur(15px); padding: 45px 20px;
    text-align: center; border-top: 2px solid var(--brawl-yellow); margin-top: auto;
}
.footer-content { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; align-items: center; }
.footer-links { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.x-link {
    color: #fff; text-decoration: none; font-weight: bold; font-size: 1.1rem;
    background: rgba(255,255,255,0.1); padding: 10px 22px; border-radius: 25px;
    display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s;
}
.x-link:hover { color: #000; background: #fff; box-shadow: 0 0 15px rgba(255,255,255,0.4); }
.discord-btn {
    background: #5865F2; color: white; padding: 14px 32px; border-radius: 14px;
    text-decoration: none; font-weight: 800; display: inline-flex; align-items: center; gap: 12px;
    transition: all 0.3s; box-shadow: 0 4px 0 #4752C4, 0 10px 20px rgba(88,101,242,0.5);
}
.discord-btn:active { transform: translateY(4px); box-shadow: 0 0px 0 #4752C4; }
.discord-btn:hover { background: #4752C4; }
.disclaimer { font-size: 0.8rem; color: var(--text-muted); max-width: 600px; line-height: 1.5; }
.disclaimer a { color: var(--text-muted); text-decoration: underline; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px; margin-top: 10px; }
.footer-nav a { color: var(--text-muted); text-decoration: none; font-size: 1rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--brawl-yellow); }
.donate-btn { color: #FFDD00 !important; font-weight: 600; }

/* ══════════ ANIMATIONS ══════════ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 900px) {
    .hero-content h1 { font-size: 2.8rem; }
    .profile-layout { grid-template-columns: 1fr; }
    .text-page-container { padding: 30px; }
}
@media (max-width: 600px) {
    .info-banner { flex-direction: column; align-items: stretch; }
    .info-card { max-width: 100%; flex: 1 1 100%; }
    .input-group { flex-direction: column; }
    .input-group button { width: 100%; margin-top: 10px; }
    .stats-grid { grid-template-columns: 1fr; }
    .hero-stats-row { gap: 15px; }
    .hero-stat-mini { min-width: 130px; padding: 20px 25px; }
    .hero-stat-mini span { font-size: 2rem; }
    .player-header h2 { font-size: 2.2rem; }
    .hero-content h1 { font-size: 2.2rem; }
    .hashtag-wrapper { min-width: 0; }
    input { font-size: 1.2rem; padding: 14px 12px 14px 5px; }
    .hashtag { padding: 14px 5px 14px 16px; font-size: 1.4rem; }
}
@media (max-width: 400px) {
    .hero-content h1 { font-size: 2rem; }
    .ranking-header h2 { font-size: 1.8rem; }
    .player-header h2 { font-size: 1.8rem; }
    .section-title { font-size: 1.6rem; }
}
/* ══════════ PLAYER AVATAR ══════════ */
.player-avatar {
    margin: 0 auto 10px;
    width: 110px;
    height: 110px;
    border-radius: 10px;
    background: rgba(0,0,0,0.5);
    border: 3px solid var(--brawl-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255,193,7,0.4);
}
#playerAvatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ══════════ CLUB DETAILS ══════════ */
.club-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}
.club-badge-large {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    border: 2px solid var(--brawl-yellow);
    background: rgba(0,0,0,0.5);
    object-fit: contain;
}
.club-tag {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 5px 0 0;
}
.club-description {
    background: rgba(0,0,0,0.4);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-style: italic;
}
.club-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}
.club-stat {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 15px;
    text-align: center;
}
.club-stat span {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.club-stat strong {
    font-size: 1.8rem;
    font-family: 'Lilita One', cursive;
    color: var(--brawl-yellow);
}
/* ══════════ TOP BRAWLER CARD (sidebar) ══════════ */
.top-brawler-card {
    margin-top: 25px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
}
.top-brawler-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}
/* ══════════ TOP CLUBS ══════════ */
.top-clubs-section {
    width: 100%;
    max-width: 900px;
    margin-bottom: 80px;
    animation: fadeInUp 0.6s ease;
}
#topClubsTable {
    width: 100%;
    min-width: 500px;
    border-collapse: separate;
    border-spacing: 0;
    color: #fff;
}
#topClubsTable th {
    padding: 18px 24px;
    background: rgba(0,0,0,0.4);
    text-align: left;
    font-family: 'Lilita One', cursive;
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--brawl-yellow);
}
#topClubsTable th:first-child { border-top-left-radius: 20px; }
#topClubsTable th:last-child { border-top-right-radius: 20px; }
#topClubsTable td {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 1rem;
    white-space: nowrap;
}
#topClubsTable tr:last-child td:first-child { border-bottom-left-radius: 20px; }
#topClubsTable tr:last-child td:last-child { border-bottom-right-radius: 20px; }
#topClubsTable tr:hover td { background: rgba(255,193,7,0.08); }

/* ══════════ CLUB MEMBERS TABLE ══════════ */
.club-members-table {
    background: rgba(0,0,0,0.4);
    border-radius: 16px;
    padding: 15px;
    margin-top: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.club-members-table table {
    min-width: 400px;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    white-space: nowrap;
}

.club-members-table th {
    text-align: left;
    color: var(--brawl-yellow);
    padding: 8px 12px;
    font-family: 'Lilita One', cursive;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.club-members-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #fff;
}

.club-members-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 600px) {
    .club-members-table table {
        font-size: 0.8rem;
    }
    .club-members-table th,
    .club-members-table td {
        padding: 6px 10px;
    }
}
/* ══════════ MAPS & EVENTS ══════════ */
.home-section {
    width: 100%;
    max-width: 900px;
    margin-bottom: 70px;
    animation: fadeInUp 0.6s ease;
}
.maps-grid, .events-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}
.maps-grid > * {
    scroll-snap-align: start;
}
.map-card, .event-card, .skeleton-card {
    min-width: 200px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    transition: transform 0.3s;
}
.map-card:hover, .event-card:hover {
    transform: translateY(-5px);
    border-color: var(--brawl-yellow);
}
.map-card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 12px;
}
.map-card h3, .event-card h3 {
    color: #fff;
    margin-bottom: 5px;
    font-family: 'Lilita One', cursive;
}
.map-card p, .event-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.event-modifier {
    color: var(--brawl-yellow);
    font-weight: bold;
}