/* ==================== ANALYTICS DASHBOARD CSS - COMPLETE ==================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #0a0a0f;
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

html { scroll-behavior: smooth; }

/* ==================== WATERMARK ==================== */
.ranktria-watermark {
  position: fixed;
  bottom: -5%;
  left: -10%;
  transform: rotate(-45deg);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 900;
  color: rgba(139, 92, 246, 0.03);
  pointer-events: none;
  z-index: 0;
  user-select: none;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

/* ==================== PURPLE PYRAMID LOADER ==================== */
.pyramid-loader {
  position: relative;
  width: 100px;
  height: 100px;
  display: block;
  transform-style: preserve-3d;
  transform: rotateX(-20deg);
  margin: 0 auto;
}

.pyramid-loader .wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: spin 4s linear infinite;
}

@keyframes spin {
  100% { transform: rotateY(360deg); }
}

.pyramid-loader .wrapper .side {
  width: 70px;
  height: 70px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  transform-origin: center top;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.pyramid-loader .wrapper .side1 {
  transform: rotateZ(-30deg) rotateY(90deg);
  background: conic-gradient(#a78bfa, #8b5cf6, #6d28d9, #a78bfa);
}

.pyramid-loader .wrapper .side2 {
  transform: rotateZ(30deg) rotateY(90deg);
  background: conic-gradient(#6d28d9, #a78bfa, #8b5cf6, #6d28d9);
}

.pyramid-loader .wrapper .side3 {
  transform: rotateX(30deg);
  background: conic-gradient(#8b5cf6, #a78bfa, #6d28d9, #8b5cf6);
}

.pyramid-loader .wrapper .side4 {
  transform: rotateX(-30deg);
  background: conic-gradient(#a78bfa, #6d28d9, #8b5cf6, #a78bfa);
}

.pyramid-loader .wrapper .shadow {
  width: 60px;
  height: 60px;
  background: #8b5cf6;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  transform: rotateX(90deg) translateZ(-40px);
  filter: blur(12px);
  opacity: 0.8;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  min-height: 300px;
}

.loading-container p {
  color: #a78bfa;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2rem;
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ==================== HERO SECTION ==================== */
.analytics-hero {
  background: linear-gradient(180deg, #0f0f14 0%, #0a0a0f 100%);
  padding: clamp(88px, 11vh, 112px) 2rem clamp(28px, 5vh, 48px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  position: relative;
  z-index: 10;
}

.hero-container {
  width: min(100%, 1400px);
  max-width: 1400px;
  margin: 0 auto;
}

.btn-back {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  margin-bottom: 2rem;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  transform: translateX(-3px);
}

.hero-main {
  text-align: center;
  margin-bottom: 2rem;
}

.hero-left {
  margin: 0 auto;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  padding: 0.375rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.hero-left h1 {
  max-width: 12ch;
  margin: 0 auto 0.75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

.hero-left p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  margin: 0;
  font-weight: 500;
}

.hero-quick-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

@media (min-width: 769px) and (max-width: 1440px) {
  .analytics-hero {
    padding-top: clamp(80px, 9vh, 96px);
    padding-bottom: clamp(24px, 4vh, 40px);
  }

  .hero-left {
    max-width: 720px;
  }

  .hero-left h1 {
    font-size: clamp(2rem, 4.2vw, 2.6rem);
  }
}

@media (min-width: 769px) and (max-height: 860px) {
  .analytics-hero {
    padding-top: 78px;
    padding-bottom: 24px;
  }

  .btn-back {
    margin-bottom: 1.25rem;
  }

  .hero-main {
    margin-bottom: 1.5rem;
  }

  .hero-left {
    max-width: 680px;
  }

  .hero-left h1 {
    font-size: clamp(1.9rem, 4vw, 2.4rem);
  }

  .hero-quick-stats {
    margin-top: 1.5rem;
  }
}

.quick-stat {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  min-width: 140px;
}

.quick-stat:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.quick-stat-icon {
  font-size: 1.5rem;
}

.quick-stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

/* ==================== SECTION NAVIGATION ==================== */
.section-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 2rem 0 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-tab {
  background: transparent;
  border: 2px solid rgba(139, 92, 246, 0.2);
  color: rgba(255, 255, 255, 0.7);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.nav-tab span {
  font-size: 1rem;
}

.nav-tab:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  transform: translateY(-2px);
}

.nav-tab.active {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

/* ==================== MAIN CONTAINER ==================== */
.analytics-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 10;
}

/* ==================== GUIDANCE BOX ==================== */
.section-guide {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(109, 40, 217, 0.05));
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  display: none;
}

.guide-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.guide-close:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
  transform: scale(1.1);
}

.guide-main-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #a78bfa);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.guide-section {
  margin-bottom: 1.5rem;
}

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

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

.guide-section-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #a78bfa;
  margin: 0;
}

.guide-text {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 0;
}

.guide-subheading {
  font-size: 1rem;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 0.75rem;
}

.guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-list li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.guide-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #8b5cf6;
  font-weight: 700;
}

/* ==================== SECTION ==================== */
.ana-section {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  scroll-margin-top: 120px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.head-left {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.gradient-bar {
  width: 4px;
  height: 44px;
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.section-head h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 800;
  margin: 0 0 0.375rem;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff, #a78bfa);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-head p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-weight: 500;
}

.context-tag {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-size: 0.813rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-block;
}

/* ==================== FILTER ROW ==================== */
.filter-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.filter-select {
  width: 100%;
  background: #0a0a0f;
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #fff;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-select:hover,
.filter-select:focus {
  background: rgba(15, 15, 20, 1);
  border-color: rgba(139, 92, 246, 0.5);
  outline: none;
}

/* ==================== ANIMATED PURPLE SEARCH ==================== */
.grid {
  height: 800px;
  width: 800px;
  background-image: linear-gradient(to right, #0f0f10 1px, transparent 1px), linear-gradient(to bottom, #0f0f10 1px, transparent 1px);
  background-size: 1rem 1rem;
  background-position: center center;
  position: absolute;
  z-index: -1;
  filter: blur(1px);
}

.white, .border, .darkBorderBg, .glow {
  max-height: 70px;
  max-width: 314px;
  height: 100%;
  width: 100%;
  position: absolute;
  overflow: hidden;
  z-index: -1;
  border-radius: 12px;
  filter: blur(3px);
}

.input {
  background-color: #010201;
  border: none;
  width: 301px;
  height: 56px;
  border-radius: 10px;
  color: white;
  padding-inline: 59px;
  font-size: 18px;
}

#poda {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 2rem;
}

.input::placeholder {
  color: #c0b9c0;
}

.input:focus {
  outline: none;
}

#main:focus-within > #input-mask {
  display: none;
}

#input-mask {
  pointer-events: none;
  width: 100px;
  height: 20px;
  position: absolute;
  background: linear-gradient(90deg, transparent, black);
  top: 18px;
  left: 70px;
}

#purple-mask {
  pointer-events: none;
  width: 30px;
  height: 20px;
  position: absolute;
  background: #8b5cf6;
  top: 10px;
  left: 5px;
  filter: blur(20px);
  opacity: 0;
  transition: all 0.3s;
}

#main:hover > #purple-mask {
  opacity: 0.8;
}

#main:focus-within > #purple-mask {
  opacity: 0;
}

.white {
  max-height: 63px;
  max-width: 307px;
  border-radius: 10px;
  filter: blur(2px);
}

.white::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(83deg);
  position: absolute;
  width: 600px;
  height: 600px;
  background-repeat: no-repeat;
  background-position: 0 0;
  filter: brightness(1.4);
  background-image: conic-gradient(rgba(0, 0, 0, 0) 0%, #a099d8, rgba(0, 0, 0, 0) 8%, rgba(0, 0, 0, 0) 50%, #a78bfa, rgba(0, 0, 0, 0) 58%);
  transition: all 2s;
}

.border {
  max-height: 59px;
  max-width: 303px;
  border-radius: 11px;
  filter: blur(0.5px);
}

.border::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(70deg);
  position: absolute;
  width: 600px;
  height: 600px;
  filter: brightness(1.3);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(#1c191c, #6d28d9 5%, #1c191c 14%, #1c191c 50%, #8b5cf6 60%, #1c191c 64%);
  transition: all 2s;
}

.darkBorderBg {
  max-height: 65px;
  max-width: 312px;
}

.darkBorderBg::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(82deg);
  position: absolute;
  width: 600px;
  height: 600px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(rgba(0, 0, 0, 0), #5c3a9e, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0) 50%, #7c4ab8, rgba(0, 0, 0, 0) 60%);
  transition: all 2s;
}

#poda:hover > .darkBorderBg::before {
  transform: translate(-50%, -50%) rotate(262deg);
}

#poda:hover > .glow::before {
  transform: translate(-50%, -50%) rotate(240deg);
}

#poda:hover > .white::before {
  transform: translate(-50%, -50%) rotate(263deg);
}

#poda:hover > .border::before {
  transform: translate(-50%, -50%) rotate(250deg);
}

#poda:focus-within > .darkBorderBg::before {
  transform: translate(-50%, -50%) rotate(442deg);
  transition: all 4s;
}

#poda:focus-within > .glow::before {
  transform: translate(-50%, -50%) rotate(420deg);
  transition: all 4s;
}

#poda:focus-within > .white::before {
  transform: translate(-50%, -50%) rotate(443deg);
  transition: all 4s;
}

#poda:focus-within > .border::before {
  transform: translate(-50%, -50%) rotate(430deg);
  transition: all 4s;
}

.glow {
  overflow: hidden;
  filter: blur(30px);
  opacity: 0.4;
  max-height: 130px;
  max-width: 354px;
}

.glow:before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(60deg);
  position: absolute;
  width: 999px;
  height: 999px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(#000, #6d28d9 5%, #000 38%, #000 50%, #8b5cf6 60%, #000 87%);
  transition: all 2s;
}

#main {
  position: relative;
}

.team-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 301px;
  max-height: 300px;
  overflow-y: auto;
  background: #0a0a0f;
  border: 2px solid rgba(139, 92, 246, 0.5);
  border-radius: 12px;
  margin-top: 0.5rem;
  z-index: 1000;
  display: none;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.team-search-results::-webkit-scrollbar {
  width: 8px;
}

.team-search-results::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.team-search-results::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.5);
  border-radius: 4px;
}

.search-result-item {
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
  font-weight: 500;
  transition: all 0.2s ease;
}

.search-result-item:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  padding-left: 1.5rem;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item-empty {
  padding: 1rem 1.25rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  font-size: 0.875rem;
}

#search-icon {
  position: absolute;
  left: 20px;
  top: 15px;
}

/* ==================== TABLE SCROLL ==================== */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  width: 100%;
}

.table-scroll::-webkit-scrollbar {
  height: 8px;
}

.table-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
}

/* ==================== STANDINGS ==================== */
.standings-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  min-width: 700px;
}

.standings-header {
  display: grid;
  grid-template-columns: 70px 1fr 80px 80px 90px 90px 100px;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.7);
}

.standings-header span {
  text-align: center;
}

.standings-header span:first-child,
.standings-header span:nth-child(2) {
  text-align: left;
}

.standings-row {
  display: grid;
  grid-template-columns: 70px 1fr 80px 80px 90px 90px 100px;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  align-items: center;
  transition: all 0.2s ease;
}

.standings-row:hover {
  background: rgba(139, 92, 246, 0.06);
  border-left: 3px solid #8b5cf6;
  padding-left: calc(1.25rem - 3px);
}

.rank-num {
  font-weight: 800;
  font-size: 1.125rem;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.team-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-logo-placeholder {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.688rem;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 6px;
  flex-shrink: 0;
}

.team-name-sm {
  font-weight: 600;
  color: #fff;
  font-size: 0.938rem;
}

.stat-val {
  text-align: center;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.938rem;
}

.stat-val.wwcd {
  color: #fbbf24;
  font-weight: 700;
}

.stat-val.total {
  color: #a78bfa;
  font-weight: 800;
  font-size: 1rem;
}

/* ==================== CHARTS ==================== */
.chart-container {
  position: relative;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  width: 100%;
  overflow: hidden;
}

.chart-scroll {
  position: relative;
  width: 100%;
  height: 400px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.chart-scroll canvas {
  display: block;
  max-width: 100%;
  height: 400px !important;
}

/* ==================== COMPARISON SELECTORS ==================== */
.comparison-selector {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.team-pick {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.team-pick label {
  font-size: 0.813rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.team-pick select,
.single-selector select {
  background: #0a0a0f;
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 0.938rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.team-pick select:hover,
.team-pick select:focus,
.single-selector select:hover,
.single-selector select:focus {
  background: rgba(15, 15, 20, 1);
  border-color: rgba(139, 92, 246, 0.5);
  outline: none;
}

.vs-divider {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-top: 1.5rem;
}

.single-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.single-selector label {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.single-selector select {
  flex: 1;
  max-width: 400px;
  min-width: 200px;
}

/* ==================== STATS BOXES ==================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-box:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.75rem;
}

.stat-vs {
  display: block;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==================== MATCH HISTORY ==================== */
.match-history {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 100%;
}

.match-row-compact {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.875rem;
}

.match-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  margin-bottom: 0.625rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.match-compact-grid {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.match-compact-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.25rem 0;
}

.match-compact-row .team-label {
  font-weight: 600;
  font-size: 0.813rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

.match-compact-row .team-pts {
  font-size: 0.75rem;
  color: #a78bfa;
  font-weight: 600;
}

.match-compact-row .team-stats {
  font-size: 0.75rem;
  color: #a78bfa;
  font-weight: 600;
}

/* ==================== STAGE PROGRESSION TABLE ==================== */
.stage-progression-table {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

.stage-progression-header {
  display: grid;
  grid-template-columns: 2fr repeat(6, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.7);
}

.stage-progression-header span {
  text-align: center;
}

.stage-progression-header span:first-child {
  text-align: left;
}

.stage-progression-row {
  display: grid;
  grid-template-columns: 2fr repeat(6, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  align-items: center;
  transition: all 0.2s ease;
}

.stage-progression-row:hover {
  background: rgba(139, 92, 246, 0.06);
  border-left: 3px solid #8b5cf6;
  padding-left: calc(1.5rem - 3px);
}

.stage-progression-row .stage-name {
  font-weight: 700;
  color: #a78bfa;
  font-size: 0.938rem;
  text-align: left;
}

.stage-progression-row span {
  text-align: center;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
}

.stage-progression-row .highlight {
  color: #fbbf24;
  font-weight: 700;
}

.subsection-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #a78bfa;
  margin: 2rem 0 1rem;
}

/* ==================== DAY BREAKDOWN ==================== */
.day-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.day-stat-card-compact {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.day-stat-card-compact:hover {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.compact-header {
  font-size: 0.938rem;
  font-weight: 700;
  color: #a78bfa;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 1rem;
}

.compact-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.compact-row span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.compact-row strong {
  font-size: 0.875rem;
  color: #fff;
  font-weight: 600;
}

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

.compact-stat-mini {
  text-align: center;
}

.compact-stat-mini span {
  display: block;
  font-size: 0.688rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.compact-stat-mini strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

/* ==================== MATCH TABLE ==================== */
.match-table-card {
  background: transparent;
  border: none;
  overflow: visible;
}

@media (min-width: 769px) {
  #matchTableBody {
    display: grid;
    grid-template-columns: 1fr 2px 1fr;
    gap: 1.5rem;
    position: relative;
  }

  #matchTableBody::after {
    content: '';
    grid-column: 2;
    grid-row: 1;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0) 0%, rgba(139, 92, 246, 0.5) 50%, rgba(139, 92, 246, 0) 100%);
  }

  .match-col-left {
    grid-column: 1;
    grid-row: 1;
  }

  .match-col-right {
    grid-column: 3;
    grid-row: 1;
  }

  .match-col {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
  }

  .match-table-header-inner {
    display: grid;
    grid-template-columns: 80px 90px 90px 80px 100px;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(139, 92, 246, 0.08);
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  }

  .match-table-header-inner span {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
  }

  .match-table-row {
    display: grid;
    grid-template-columns: 80px 90px 90px 80px 100px;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
  }

  .match-table-row:hover {
    background: rgba(139, 92, 246, 0.06);
  }

  .match-table-row span {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
  }

  .match-table-header-mobile {
    display: none !important;
  }
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
  .ranktria-watermark {
    font-size: clamp(4rem, 12vw, 8rem);
    bottom: -8%;
    left: -15%;
  }

  .analytics-hero {
    padding: 2rem 1rem;
  }

  .btn-back {
    margin-bottom: 1.5rem;
  }

  .hero-left h1 {
    font-size: 2rem;
  }

  .hero-quick-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .quick-stat {
    flex-direction: column;
    padding: 0.875rem;
    text-align: center;
    min-width: unset;
  }

  .section-nav {
    gap: 0.375rem;
    padding: 1rem 0;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .section-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    padding: 0.625rem 1.125rem;
    font-size: 0.813rem;
    flex-shrink: 0;
  }

  .analytics-main {
    padding: 1.5rem 1rem;
  }

  .ana-section {
    padding: 1rem;
  }

  .filter-row {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
    min-width: unset;
  }

  .table-scroll {
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
  }

  .standings-card {
    min-width: 650px;
  }

  .standings-header,
  .standings-row {
    grid-template-columns: 45px 150px 50px 50px 60px 60px 70px;
    gap: 0.5rem;
    padding: 0.875rem;
  }

  .standings-header {
    font-size: 0.7rem;
  }

  .rank-num {
    font-size: 0.938rem;
  }

  .team-logo-img,
  .team-logo-placeholder {
    width: 28px;
    height: 28px;
  }

  .team-name-sm {
    font-size: 0.813rem;
  }

  .stat-val {
    font-size: 0.75rem;
  }

  .chart-container {
    padding: 0.75rem;
    overflow: visible;
    position: relative;
  }

  .chart-container::before {
    content: '← Swipe to view full chart →';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(139, 92, 246, 0.8);
    font-weight: 600;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
  }

  .chart-scroll {
    min-width: 100%;
    width: 100%;
    height: 450px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
  }

  .chart-scroll canvas {
    min-width: 700px !important;
    width: 700px !important;
    height: 450px !important;
  }

  .comparison-selector {
    flex-direction: column;
  }

  .vs-divider {
    padding-top: 0;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .single-selector {
    flex-direction: column;
    align-items: flex-start;
  }

  .single-selector select {
    width: 100%;
    max-width: unset;
  }

  .match-table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #matchTableBody {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow-x: auto;
    min-width: 100%;
  }

  .match-col {
    display: contents;
  }

  .match-col .match-table-header-inner {
    display: none !important;
  }

  .match-table-header-mobile {
    display: grid !important;
    grid-template-columns: 60px 70px 70px 60px 80px;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.08);
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    position: sticky;
    top: 0;
    z-index: 10;
    min-width: 420px;
  }

  .match-table-header-mobile span {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
  }

  .match-table-row {
    display: grid;
    grid-template-columns: 60px 70px 70px 60px 80px;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    min-width: 420px;
  }

  .match-table-row span {
    text-align: center;
    font-size: 0.813rem;
    font-weight: 600;
    color: #fff;
  }

  .stage-progression-table {
    min-width: 750px;
  }

  .stage-progression-header,
  .stage-progression-row {
    grid-template-columns: 1.5fr repeat(6, 0.9fr);
    gap: 0.5rem;
    padding: 0.875rem;
    font-size: 0.7rem;
  }

  .day-breakdown {
    grid-template-columns: 1fr;
  }

  .compact-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #poda {
    transform: scale(0.9);
  }

  .input {
    width: 280px;
  }
  
  .team-search-results {
    width: 280px;
  }
}

@media (min-width: 1500px) {
  .hero-container,
  .analytics-main {
    max-width: 1600px;
  }

  .hero-left {
    max-width: 980px;
  }

  .stats-row {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .match-history {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .day-breakdown {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
}
