/* ==========================================================================
   LA GRIETA DE LOS PIBES — MASTER HEXTECH ESPORTS THEME
   Design System Tokens & Component Library
   ========================================================================== */

:root {
  /* Color Palette */
  --bg: #080D19;
  --surface: #0D1525;
  --surface-elevated: #121E32;
  --surface-hover: #192943;
  --surface-card: #0F1A2D;
  --gold: #C8AA6E;
  --gold-bright: #E8C982;
  --gold-glow: rgba(200, 170, 110, 0.25);
  --cyan: #39C5F5;
  --ice-blue: #79DEFF;
  --text-primary: #F1F5FC;
  --text-secondary: #9AAAC1;
  --text-muted: #64748B;
  --success: #37D995;
  --danger: #F16C78;
  --border: #24334B;
  --border-light: rgba(200, 170, 110, 0.35);

  /* Tier Colors */
  --tier-iron: #8b8580;
  --tier-bronze: #b07a5c;
  --tier-silver: #a9b4c2;
  --tier-gold: #e3b453;
  --tier-platinum: #4fc1b4;
  --tier-emerald: #2fcf7a;
  --tier-diamond: #7b9bff;
  --tier-master: #c06bf0;
  --tier-grandmaster: #f05a4f;
  --tier-challenger: #f6d27a;

  /* Typography */
  --font-heading: "Space Grotesk", "Sora", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Roboto, sans-serif;

  color-scheme: dark;
}

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

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(57, 197, 245, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(200, 170, 110, 0.05) 0%, transparent 45%);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   APP SHELL LAYOUT
   ========================================================================== */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar (Desktop 250px) */
.sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--gold);
  box-shadow: 0 0 14px var(--gold-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.nav-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding-left: 10px;
  margin-bottom: 8px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

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

.nav-link.active {
  background: rgba(200, 170, 110, 0.12);
  color: var(--gold);
  font-weight: 600;
  border-left: 3px solid var(--gold);
}

.nav-link .nav-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
}

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  background: rgba(8, 13, 25, 0.6);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.region-tag {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header */
.top-header {
  height: 72px;
  background: rgba(13, 21, 37, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--text-primary);
  cursor: pointer;
}

.breadcrumb-group {
  display: flex;
  flex-direction: column;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px 8px 34px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  width: 200px;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--gold);
  width: 240px;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
}

.btn-primary {
  background: linear-gradient(135deg, #c8aa6e 0%, #e8c982 100%);
  color: #0b1020;
  border-color: var(--gold);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(200, 170, 110, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d8bc80 0%, #f0d594 100%);
  box-shadow: 0 4px 16px rgba(200, 170, 110, 0.35);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

/* Main Body Views */
.content-body {
  padding: 28px 32px 64px;
  max-width: 1500px;
  width: 100%;
  margin-inline: auto;
}

.view-section {
  display: none;
}

.view-section.active-view {
  display: block;
}

/* ==========================================================================
   STATUS & SYNC BANNER
   ========================================================================== */

.sync-banner {
  background: rgba(13, 21, 37, 0.95);
  border: 1px solid var(--cyan);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 24px;
  box-shadow: 0 0 16px rgba(57, 197, 245, 0.15);
}

.sync-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.sync-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--ice-blue) 100%);
  transition: width 0.3s ease;
}

/* ==========================================================================
   MVP OF THE WEEK CARD (EXACT MOCKUP MATCH)
   ========================================================================== */

.mvp-banner-card {
  background: linear-gradient(135deg, rgba(18, 30, 50, 0.95) 0%, rgba(13, 21, 37, 0.98) 100%);
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 24px var(--gold-glow);
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}

.mvp-banner-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
}

.mvp-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(200, 170, 110, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.mvp-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.mvp-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mvp-portrait-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
  flex-shrink: 0;
}

.mvp-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.mvp-rank-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mvp-rank-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--ice-blue);
  background: rgba(57, 197, 245, 0.12);
  border: 1px solid rgba(57, 197, 245, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
}

.mvp-name {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.mvp-substats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.mvp-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mvp-score-emblem {
  background: radial-gradient(circle, rgba(200, 170, 110, 0.2) 0%, rgba(15, 26, 45, 0.8) 100%);
  border: 1px solid var(--gold);
  border-radius: 50%;
  width: 84px;
  height: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--gold-glow);
}

.mvp-score-num {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--gold-bright);
  line-height: 1;
}

.mvp-score-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold);
  text-transform: uppercase;
}

/* ==========================================================================
   COMPETITIVE STATISTICS CARDS (4 GRIDS)
   ========================================================================== */

.stat-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon-gold { background: rgba(200, 170, 110, 0.12); color: var(--gold); }
.stat-icon-cyan { background: rgba(57, 197, 245, 0.12); color: var(--cyan); }
.stat-icon-green { background: rgba(55, 217, 149, 0.12); color: var(--success); }
.stat-icon-purple { background: rgba(192, 107, 240, 0.12); color: var(--tier-master); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-lbl {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   PODIUM SECTION (TOP 3)
   ========================================================================== */

.podium-container {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 32px;
}

.podium-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: all 0.2s ease;
}

.podium-card.first {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(200, 170, 110, 0.12) 0%, var(--surface-card) 100%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--gold-glow);
  padding: 28px 20px;
}

.podium-card.second {
  border-color: rgba(169, 180, 194, 0.4);
}

.podium-card.third {
  border-color: rgba(176, 122, 92, 0.4);
}

.podium-crown {
  font-size: 26px;
  margin-bottom: -6px;
}

.podium-avatar-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
}

.podium-card.first .podium-avatar-wrap {
  width: 82px;
  height: 82px;
  border-color: var(--gold);
  box-shadow: 0 0 16px var(--gold-glow);
}

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

.podium-rank-pill {
  position: absolute;
  bottom: -4px;
  background: var(--surface-elevated);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.podium-name {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
}

.podium-tier {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.podium-score-pill {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   FILTER PILLS & TABLE CONTROLS
   ========================================================================== */

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.pill-group {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn:hover {
  color: var(--text-primary);
}

.pill-btn.active {
  background: var(--surface-elevated);
  color: var(--gold);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   LEADERBOARD ROWS & TABLE (EXACT MATCH OF MOBILE MOCKUP & DESKTOP)
   ========================================================================== */

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-table-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 20px;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.leaderboard-table-header .col-pos {
  width: 28px;
  text-align: center;
}

.leaderboard-table-header .col-identity {
  flex: 1.5;
  min-width: 160px;
  padding-left: 60px;
}

.leaderboard-table-header .col-winrate {
  min-width: 90px;
  text-align: center;
}

.leaderboard-table-header .col-delta {
  min-width: 100px;
  text-align: right;
}

.leaderboard-table-header .col-spark {
  width: 70px;
  text-align: center;
}

.leaderboard-table-header .col-score {
  min-width: 50px;
  text-align: right;
}

.row-stats-group {
  display: contents;
}

.player-row-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.player-row-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
  transform: translateX(3px);
}

.player-row-card.gold-leader {
  border-color: var(--gold);
  background: linear-gradient(90deg, rgba(200, 170, 110, 0.1) 0%, var(--surface-card) 60%);
  box-shadow: 0 2px 14px rgba(200, 170, 110, 0.15);
}

.row-pos {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  width: 28px;
  text-align: center;
  color: var(--text-muted);
}

.gold-leader .row-pos {
  color: var(--gold-bright);
}

.row-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.gold-leader .row-avatar-wrap {
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

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

.row-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
  flex: 1.5;
}

.row-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.row-nickname-badge {
  font-size: 11px;
  color: var(--gold);
  font-style: italic;
}

.row-tier-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.row-winrate {
  min-width: 90px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.row-wr-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.row-wr-sub {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.row-delta {
  min-width: 100px;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-weight: 700;
  font-size: 14px;
}

.row-delta.positive { color: var(--success); }
.row-delta.negative { color: var(--danger); }

.row-sparkline {
  width: 70px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sparkline-svg {
  width: 100%;
  height: 100%;
}

.row-score {
  min-width: 50px;
  text-align: right;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}

/* ==========================================================================
   1V1 DUELS ARENA
   ========================================================================== */

.duels-arena {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  margin-bottom: 28px;
}

.duel-selectors {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.duel-player-box {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.duel-avatar-wrap {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 16px rgba(57, 197, 245, 0.25);
}

.duel-select-dropdown {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  width: 100%;
  max-width: 220px;
}

.duel-select-dropdown:focus {
  border-color: var(--gold);
}

.duel-vs-badge {
  background: radial-gradient(circle, var(--gold) 0%, #8c6a2c 100%);
  color: #080D19;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px var(--gold-glow);
  letter-spacing: 1px;
}

.duel-bars-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.duel-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.duel-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.duel-bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  display: flex;
  overflow: hidden;
}

.duel-bar-left {
  background: linear-gradient(90deg, var(--cyan) 0%, var(--ice-blue) 100%);
  height: 100%;
  transition: width 0.4s ease;
}

.duel-bar-right {
  background: linear-gradient(90deg, #e8c982 0%, var(--gold) 100%);
  height: 100%;
  transition: width 0.4s ease;
  margin-left: auto;
}

/* ==========================================================================
   SYNERGY & PLAYING TOGETHER
   ========================================================================== */

.synergy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.synergy-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.synergy-card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.duo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.duo-names {
  font-weight: 600;
  color: var(--text-primary);
}

.duo-record {
  font-weight: 700;
}

.duo-record.winning { color: var(--success); }
.duo-record.losing { color: var(--danger); }

/* ==========================================================================
   DEDICATED PLAYER PROFILE VIEW
   ========================================================================== */

.profile-header-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.profile-avatar-big {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
}

.profile-tier-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ice-blue);
  margin-top: 4px;
}

.profile-match-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.profile-match-card.win {
  border-left: 4px solid var(--cyan);
}

.profile-match-card.loss {
  border-left: 4px solid var(--danger);
}

.match-champ-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR (EXACT MATCH OF MOCKUP)
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(13, 21, 37, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
}

.mobile-nav-item .nav-icon {
  font-size: 18px;
}

.mobile-nav-item.active {
  color: var(--gold);
}

/* ==========================================================================
   MODAL DIALOGS (HEXTECH MODAL WITH NATIVE DIALOG OVERRIDE)
   ========================================================================== */

dialog.modal-dialog {
  display: none;
  position: fixed;
  inset: 0;
  margin: auto;
  border: none;
  padding: 0;
  background: transparent;
  max-width: 92vw;
  width: 620px;
  max-height: 88vh;
  overflow: visible;
  z-index: 1000;
}

dialog.modal-dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog.modal-dialog::backdrop {
  background: rgba(4, 7, 15, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 24px var(--gold-glow);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow: hidden;
  color: var(--text-primary);
  width: 100%;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-elevated);
}

.modal-head h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  margin: 0;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

#friends-form {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 24px;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-field input,
.form-field select {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

.friends-head h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--ice-blue);
  margin-bottom: 4px;
}

.friends-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.friend-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 38px;
  gap: 8px;
  align-items: center;
  background: var(--surface-card);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 8px;
}

.friend-input, .friend-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}

.friend-input:focus, .friend-select:focus {
  border-color: var(--gold);
}

.friend-del-btn {
  background: rgba(241, 108, 120, 0.12);
  border: 1px solid rgba(241, 108, 120, 0.3);
  color: var(--danger);
  border-radius: 6px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.friend-del-btn:hover {
  background: rgba(241, 108, 120, 0.25);
}

.add-row-btn {
  align-self: flex-start;
  padding: 8px 16px;
  font-size: 13px;
  background: var(--surface-elevated);
  border: 1px dashed var(--gold);
  color: var(--gold);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.add-row-btn:hover {
  background: rgba(200, 170, 110, 0.15);
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1024px) {
  .stat-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .synergy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .top-header {
    padding: 0 14px;
    height: 56px;
  }
  .header-right {
    gap: 8px;
  }
  .header-right #header-manage-btn,
  .header-right #header-share-btn {
    display: none !important;
  }
  .header-right #header-refresh-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  .breadcrumb-group .section-title {
    font-size: 16px;
  }
  .breadcrumb-group .section-subtitle {
    font-size: 11px;
  }
  .content-body {
    padding: 14px 14px 84px;
  }
  .stat-grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .podium-container {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
  }
  .podium-card.first {
    order: -1;
  }
  .mvp-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  .mvp-left {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .mvp-details {
    align-items: center;
  }
  .mvp-rank-line {
    justify-content: center;
  }
  .mvp-substats {
    justify-content: center;
  }
  .mvp-right {
    justify-content: center;
    width: 100%;
  }
  .mvp-score-emblem {
    margin: 0 auto;
  }
  .duel-selectors {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .duel-vs-badge {
    margin: 8px auto;
    justify-self: center;
  }
  .duel-player-box {
    padding: 18px 14px;
  }
  .search-input-wrap {
    display: none;
  }
  .profile-header-card {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
    gap: 16px;
  }
  .profile-header-card .profile-info > div:first-child {
    justify-content: center;
    flex-wrap: wrap;
  }
  .profile-header-card .mvp-score-emblem {
    margin: 8px auto 0;
  }
}

@media (max-width: 600px) {
  .leaderboard-table-header {
    display: none !important;
  }

  .player-row-card {
    display: grid;
    grid-template-columns: 26px 40px 1fr auto;
    gap: 8px 10px;
    padding: 12px 14px;
    align-items: center;
    min-width: 0;
  }

  .row-pos {
    grid-column: 1;
    grid-row: 1;
    font-size: 16px;
    width: auto;
  }

  .row-avatar-wrap {
    grid-column: 2;
    grid-row: 1;
    width: 40px;
    height: 40px;
  }

  .row-identity {
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
  }

  .row-name-line {
    flex-wrap: wrap;
    gap: 4px;
  }

  .row-name {
    font-size: 14px;
    white-space: normal;
  }

  .row-nickname-badge {
    font-size: 10px;
    display: inline-block;
  }

  .row-score {
    grid-column: 4;
    grid-row: 1;
    min-width: auto;
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    background: rgba(200, 170, 110, 0.12);
    border: 1px solid rgba(200, 170, 110, 0.35);
    padding: 2px 8px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
  }

  .row-score::before {
    content: "SCORE";
    font-size: 8px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
  }

  .row-stats-group {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    gap: 6px;
  }

  .row-winrate {
    min-width: auto;
    text-align: left;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
  }

  .row-wr-val {
    font-size: 13px;
  }

  .row-wr-sub {
    font-size: 9px;
  }

  .row-delta {
    min-width: auto;
    font-size: 12px;
  }

  .row-sparkline {
    width: 64px;
    height: 22px;
    flex-shrink: 0;
  }

  .friend-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .friend-del-btn {
    grid-column: span 2;
    height: 30px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #friends-form {
    padding: 14px 16px;
    gap: 14px;
  }

  .modal-head {
    padding: 14px 16px;
  }
}

@media (max-width: 380px) {
  .player-row-card {
    padding: 10px 10px;
    gap: 6px 8px;
  }
  .row-name {
    max-width: 105px;
  }
  .row-sparkline {
    width: 50px;
  }
}


/* ==========================================================================
   HALL OF FAME & RECORDS VIEW
   ========================================================================== */

.records-totals-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: linear-gradient(135deg, rgba(13, 21, 37, 0.9) 0%, rgba(18, 30, 50, 0.9) 100%);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.records-stat-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.records-stat-num {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--gold-bright);
}

.records-stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.record-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.record-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 16px var(--gold-glow);
}

.record-card.highlight {
  border-color: rgba(200, 170, 110, 0.6);
  background: linear-gradient(160deg, rgba(18, 30, 50, 0.9) 0%, rgba(13, 21, 37, 0.95) 100%);
}

.record-badge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.record-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.record-icon {
  font-size: 22px;
}

.record-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-bright);
}

.record-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(57, 197, 245, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(57, 197, 245, 0.3);
  text-transform: uppercase;
}

.record-player-center {
  display: flex;
  align-items: center;
  gap: 14px;
}

.record-champ-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--gold-glow);
}

.record-player-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.record-player-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.record-champ-name {
  font-size: 13px;
  color: var(--text-secondary);
}

.record-value-emblem {
  background: rgba(8, 13, 25, 0.7);
  border: 1px solid rgba(200, 170, 110, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.record-val-big {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--cyan);
}

.record-val-unit {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.record-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid rgba(36, 51, 75, 0.5);
}

.record-match-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.record-match-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ==========================================================================
   DUELS HEAD-TO-HEAD & CIVIL WAR
   ========================================================================== */

.duel-h2h-card {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 20px 24px;
}

.duel-h2h-header {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.duel-h2h-banner {
  background: rgba(8, 13, 25, 0.6);
  border: 1px solid rgba(57, 197, 245, 0.3);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.duel-h2h-pill {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

.duel-h2h-wr {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-bright);
}

/* ==========================================================================
   MATCH BREAKDOWN MODAL
   ========================================================================== */

dialog.match-modal-dialog {
  width: 920px;
  max-width: 96vw;
}

.match-modal-card {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.match-modal-body {
  overflow-y: auto;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.match-team-card {
  background: rgba(8, 13, 25, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.match-team-header {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 13px;
}

.match-team-header.blue {
  background: rgba(57, 197, 245, 0.12);
  border-bottom: 1px solid rgba(57, 197, 245, 0.25);
  color: var(--cyan);
}

.match-team-header.red {
  background: rgba(241, 108, 120, 0.12);
  border-bottom: 1px solid rgba(241, 108, 120, 0.25);
  color: var(--danger);
}

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

.match-player-row {
  border-bottom: 1px solid rgba(36, 51, 75, 0.4);
  font-size: 13px;
  transition: background 0.15s ease;
}

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

.match-player-row.is-friend {
  background: rgba(200, 170, 110, 0.08);
}

.match-player-row td {
  padding: 8px 12px;
  vertical-align: middle;
}

.match-champ-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.match-champ-icon-small {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
}

.match-player-name-wrap {
  display: flex;
  flex-direction: column;
}

.match-friend-badge {
  font-size: 9px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}

.match-damage-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 110px;
}

.match-damage-track {
  width: 100%;
  height: 6px;
  background: rgba(36, 51, 75, 0.6);
  border-radius: 3px;
  overflow: hidden;
}

.match-damage-fill {
  height: 100%;
  border-radius: 3px;
}

.match-damage-fill.blue {
  background: var(--cyan);
}

.match-damage-fill.red {
  background: var(--danger);
}

/* ==========================================================================
   GAMER CARD & PROFILE MATCH CLICKABLE
   ========================================================================== */

dialog.gamer-card-modal-dialog {
  width: 820px;
  max-width: 95vw;
}

.profile-match-card {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.profile-match-card:hover {
  transform: translateX(4px);
  border-color: var(--gold);
}

@media (max-width: 768px) {
  .records-totals-banner {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 14px 16px;
  }
  .records-grid {
    grid-template-columns: 1fr;
  }
  dialog.match-modal-dialog {
    width: 96vw;
  }
  .match-modal-body {
    padding: 10px 12px;
  }
  .match-player-row td {
    padding: 6px 8px;
    font-size: 11px;
  }
  .match-champ-icon-small {
    width: 26px;
    height: 26px;
  }
  .match-damage-wrap {
    width: 70px;
  }
}


/* ==========================================================================
   LIVE GAME TRACKER (SPECTATOR V5)
   ========================================================================== */

.live-card-active {
  background: linear-gradient(135deg, rgba(241, 108, 120, 0.12) 0%, rgba(13, 21, 37, 0.95) 100%);
  border: 1px solid rgba(241, 108, 120, 0.4);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(241, 108, 120, 0.2);
  animation: live-glow 3s infinite alternate;
}

@keyframes live-glow {
  0% { border-color: rgba(241, 108, 120, 0.35); }
  100% { border-color: rgba(241, 108, 120, 0.7); box-shadow: 0 0 20px rgba(241, 108, 120, 0.3); }
}

.live-card-idle {
  background: rgba(13, 21, 37, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.live-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(241, 108, 120, 0.2);
  color: #ff7b89;
  border: 1px solid rgba(241, 108, 120, 0.4);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #ff4d61;
  border-radius: 50%;
  animation: live-pulse 1.6s infinite ease-out;
}

@keyframes live-pulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 77, 97, 0.8); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(255, 77, 97, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 77, 97, 0); }
}

.status-dot.live {
  background-color: #ff4d61;
  box-shadow: 0 0 10px #ff4d61;
  animation: live-pulse 1.6s infinite ease-out;
}

.live-players-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.live-player-chip {
  background: rgba(8, 13, 25, 0.8);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-champ-img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  object-fit: cover;
}

.live-refresh-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.live-refresh-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.live-toggle-teams-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-toggle-teams-btn:hover {
  background: rgba(0, 180, 216, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
}

.live-teams-container {
  margin-top: 10px;
  background: rgba(8, 13, 25, 0.9);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.25s ease-out;
}

.live-teams-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 900px) {
  .live-teams-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.live-team-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.live-team-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.live-team-badge.blue {
  background: rgba(0, 180, 216, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(0, 180, 216, 0.35);
}

.live-team-badge.red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.live-participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.live-participant-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.live-participant-row.friend {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.live-participant-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.live-champ-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.live-participant-row.friend .live-champ-thumb {
  border-color: var(--gold);
}

.live-spells-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.live-spell-thumb {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-participant-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 2px;
}

.live-participant-player {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-participant-champ {
  font-size: 11px;
  color: var(--text-secondary);
}

.live-friend-tag {
  font-size: 9px;
  font-weight: 800;
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.25);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.live-vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
}

.live-vs-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: var(--gold-bright);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.live-bans-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  padding: 4px 6px;
}

.live-ban-thumb {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  filter: grayscale(1) opacity(0.65);
  border: 1px solid rgba(239, 68, 68, 0.3);
  object-fit: cover;
}


/* ==========================================================================
   LP EVOLUTION & ELO CHART (INTERACTIVE SVG)
   ========================================================================== */

.lp-history-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 24px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.lp-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.lp-history-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lp-metric-pill {
  background: rgba(8, 13, 25, 0.7);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.lp-chart-wrap {
  width: 100%;
  position: relative;
  border-radius: 10px;
  background: rgba(4, 7, 15, 0.4);
  border: 1px solid rgba(36, 51, 75, 0.5);
  padding: 10px 4px 6px;
}

.lp-svg-chart {
  width: 100%;
  height: 230px;
  display: block;
  overflow: visible;
}

@media (max-width: 600px) {
  .lp-history-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .lp-history-metrics {
    width: 100%;
    justify-content: space-between;
  }
  .lp-svg-chart {
    height: 180px;
  }
}


/* ==========================================================================
   META & CHAMPION POOL VIEW
   ========================================================================== */

.meta-highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.meta-tier-card {
  background: var(--surface-card);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meta-tier-card.god {
  border: 1px solid rgba(200, 170, 110, 0.5);
  background: linear-gradient(145deg, rgba(200, 170, 110, 0.08) 0%, rgba(13, 21, 37, 0.95) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px var(--gold-glow);
}

.meta-tier-card.cursed {
  border: 1px solid rgba(241, 108, 120, 0.5);
  background: linear-gradient(145deg, rgba(241, 108, 120, 0.08) 0%, rgba(13, 21, 37, 0.95) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(241, 108, 120, 0.2);
}

.meta-tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(36, 51, 75, 0.6);
}

.meta-badge-god {
  background: rgba(200, 170, 110, 0.2);
  color: var(--gold-bright);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.meta-badge-cursed {
  background: rgba(241, 108, 120, 0.2);
  color: #ff6b7a;
  border: 1px solid rgba(241, 108, 120, 0.5);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.meta-champs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-champ-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 13, 25, 0.6);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 10px 14px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.meta-champ-row:hover {
  transform: translateX(4px);
  border-color: var(--gold);
}

.meta-champ-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-champ-avatar {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-light);
}

.meta-champ-avatar.god {
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

.meta-champ-avatar.cursed {
  border-color: var(--danger);
  box-shadow: 0 0 10px rgba(241, 108, 120, 0.3);
}

.meta-champ-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-roles-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.meta-role-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.meta-role-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
}

.meta-role-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}

.meta-specialist-box {
  background: rgba(8, 13, 25, 0.7);
  border: 1px solid rgba(57, 197, 245, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-role-topchamps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-role-champ-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.meta-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-all-champs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.meta-champ-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.meta-champ-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
}

@media (max-width: 900px) {
  .meta-highlights-grid {
    grid-template-columns: 1fr;
  }
  .meta-roles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .meta-roles-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CHAMPION BUILD & RECOMMENDED ITEMS MODAL
   ========================================================================== */

.build-modal-card {
  max-width: 680px;
  width: 95vw;
}

.build-champ-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.build-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 0;
}

.build-overview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.build-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 180, 216, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(0, 180, 216, 0.3);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.build-badge.runes {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-bright);
  border-color: rgba(212, 175, 55, 0.3);
}

.build-badge.skills {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.build-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(10, 15, 28, 0.6);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px 16px;
}

.build-section-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.build-items-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.build-item-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 6px 12px;
  transition: all 0.15s ease;
}

.build-item-chip:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--gold);
}

.build-item-chip.core {
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.05);
}

.build-item-img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.build-item-chip.core .build-item-img {
  border-color: var(--gold);
}

.build-item-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.build-tips-box {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #fef08a;
  display: flex;
  align-items: start;
  gap: 10px;
}

.live-build-btn {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-bright);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.live-build-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}

/* Phone fixes (caught by the end-to-end test): let these wrap instead of widening the page. */
.pill-group { flex-wrap: wrap; max-width: 100%; }
.lp-history-header > div { min-width: 0; }
.lp-history-header .sub { white-space: normal; }
@media (max-width: 760px) {
  /* The whole match row is clickable; the "Ver Detalle" hint doesn't fit next to the stats. */
  .profile-match-card > span.muted.sub:last-child { display: none; }
  .profile-match-card { min-width: 0; }
}
