/* ==========================================================================
   IPL CRUNCH '26 — DESIGN SYSTEM & VISUAL ARCHITECTURE
   ========================================================================== */

/* 1. Global Reset & Variables */
:root {
  /* Color Tokens */
  --bg-deep: #060a13;
  --bg-card: rgba(13, 20, 38, 0.65);
  --bg-card-hover: rgba(20, 30, 56, 0.8);
  --border-glow: rgba(99, 102, 241, 0.15);
  --border-glow-hover: rgba(99, 102, 241, 0.35);
  
  --primary: #6366f1;         /* Indigo Glow */
  --primary-light: #818cf8;
  --secondary: #a855f7;       /* Purple Spark */
  
  --accent-cyan: #06b6d4;     /* Cyber Cyan */
  --accent-emerald: #10b981;  /* Emerald Success */
  --accent-rose: #f43f5e;     /* Rose Danger */
  --accent-warning: #f59e0b;  /* Gold Risk */
  --accent-info: #3b82f6;     /* Royal Blue */
  
  /* Text System */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-glow-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
  
  /* Layout Metrics */
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
}

/* Background Ambient Glows */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.3;
  pointer-events: none;
  animation: float-glow 15s infinite ease-in-out alternate;
}

.blob-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--primary) 0%, rgba(99,102,241,0) 70%);
  top: 10%;
  left: -100px;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--secondary) 0%, rgba(168,85,247,0) 70%);
  bottom: 15%;
  right: -150px;
  animation-delay: -5s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, rgba(6,182,212,0) 70%);
  top: 45%;
  left: 35%;
  animation-delay: -8s;
}

@keyframes float-glow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(50px, 30px) scale(1.15);
  }
}

/* Main Layout Grid */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 10;
}

/* Header Design */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  font-size: 32px;
  color: var(--primary-light);
  filter: drop-shadow(0 0 8px var(--primary));
  animation: pulse-icon 3s infinite ease-in-out;
}

.logo-area h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-area .subtitle {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 14px;
  border-radius: 50px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-active 1.5s infinite;
}

.badge-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

/* Stats Banner section */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow-hover);
  box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.15);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--primary-light);
  font-size: 20px;
  transition: var(--transition-fast);
}

.stat-card:hover .stat-icon {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px var(--primary);
}

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

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

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

/* Navigation Tabs */
.navigation-tabs {
  display: flex;
  background: rgba(13, 20, 38, 0.8);
  backdrop-filter: blur(16px);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glow);
  gap: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.tab-button:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary);
}

.tab-button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px 0 rgba(99, 102, 241, 0.4);
}

/* Tab panes layout */
.tab-pane {
  display: none;
  animation: fadeIn var(--transition-smooth);
}

.tab-pane.active {
  display: block;
}

/* Dashboard Columns Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.grid-col-12 { grid-column: span 12; }
.grid-col-8  { grid-column: span 8; }
.grid-col-7  { grid-column: span 7; }
.grid-col-6  { grid-column: span 6; }
.grid-col-5  { grid-column: span 5; }
.grid-col-4  { grid-column: span 4; }

/* Glass Cards styling */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--border-glow-hover);
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.card-title i {
  color: var(--primary-light);
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: -12px;
  margin-bottom: 20px;
}

/* Rich texts typography */
.highlight-text {
  font-size: 16px;
  line-height: 1.6;
  color: #fff;
  font-weight: 500;
  border-left: 3px solid var(--primary);
  padding-left: 16px;
  margin-bottom: 20px;
}

.summary-paragraph p {
  color: var(--text-secondary);
  font-size: 14.5px;
  margin-bottom: 16px;
}

.summary-paragraph p strong {
  color: var(--text-primary);
}

.summary-paragraph p:last-child {
  margin-bottom: 0;
}

/* Custom Table design */
.table-card {
  padding: 20px 0;
}

.table-card .card-title {
  padding: 0 24px 10px 24px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-container {
  overflow-x: auto;
  width: 100%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 14px 24px;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
  font-family: 'Outfit', sans-serif;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
  background: rgba(0, 0, 0, 0.15);
}

.data-table tbody tr {
  transition: var(--transition-fast);
}

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

/* Highlight specific rows */
.highlight-row-emerald {
  background: rgba(16, 185, 129, 0.05) !important;
}
.highlight-row-emerald:hover {
  background: rgba(16, 185, 129, 0.1) !important;
}

.highlight-row-rose {
  background: rgba(244, 63, 94, 0.05) !important;
}
.highlight-row-rose:hover {
  background: rgba(244, 63, 94, 0.1) !important;
}

.highlight-row-cyan {
  background: rgba(6, 182, 212, 0.05) !important;
}
.highlight-row-cyan:hover {
  background: rgba(6, 182, 212, 0.1) !important;
}

/* Status Badges */
.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-neutral {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.status-danger {
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.1);
}

.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-info);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Stat Highlight Side Card */
.stat-highlight-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.quick-num {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.quick-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-bar-container {
  height: 6px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 50px;
}

.progress-bar.emerald { background: var(--accent-emerald); box-shadow: 0 0 8px var(--accent-emerald); }
.progress-bar.cyan { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.progress-bar.rose { background: var(--accent-rose); box-shadow: 0 0 8px var(--accent-rose); }

.card-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.info-note-card {
  background: rgba(99, 102, 241, 0.03);
  border: 1px dashed rgba(99, 102, 241, 0.3);
}

.info-note-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.small-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Lists and boxes */
.styled-list {
  list-style: none;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.styled-list li {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.styled-list li strong {
  color: var(--text-primary);
}

.text-success { color: var(--accent-emerald); }
.text-danger { color: var(--accent-rose); }
.text-cyan { color: var(--accent-cyan); }
.text-warning { color: var(--accent-warning); }

.highlight-box {
  background: rgba(99, 102, 241, 0.05);
  border-left: 3px solid var(--primary-light);
  padding: 16px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 16px;
}

/* Calculator & Simulator Styling */
.calculator-card {
  display: flex;
  flex-direction: column;
}

.calculator-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.calc-select {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  padding: 12px;
  border-radius: var(--radius-md);
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.calc-select option {
  background-color: #0d1426; /* Solid dark background to prevent light default popovers */
  color: var(--text-primary); /* High-contrast white text color */
}

.calc-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* Simulator Output Result */
.simulator-result {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition-smooth);
}

.result-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.result-action {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-emerald);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.result-bar-container {
  height: 8px;
  width: 80%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 8px;
}

.result-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-cyan) 100%);
  border-radius: 50px;
  width: 0;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-percentage {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.result-rationale {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 90%;
}

/* Phase Selector Visualizer Node */
.phase-visualizer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.phase-node {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-glow);
  padding: 14px;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.phase-node:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.4);
}

.phase-node.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
  box-shadow: 0 4px 20px 0 rgba(99, 102, 241, 0.15);
}

.phase-node-header {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.phase-node-overs {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.phase-node-stat {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary-light);
  margin-top: 6px;
}

.phase-details-box {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 16px;
  animation: fadeIn 0.4s ease-out;
}

.phase-details-box h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.phase-details-box p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.phase-scores {
  display: flex;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
  gap: 12px;
}

.score-item {
  display: flex;
  flex-direction: column;
}

.score-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  font-weight: 500;
}

.score-num {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.score-impact-badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Original Formula box */
.formula-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
}

.formula-title {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 700;
  letter-spacing: 1px;
}

.formula-equation {
  font-family: 'Outfit', sans-serif;
  font-size: 14.5px;
  color: #fff;
  font-weight: 600;
  margin: 6px 0;
  word-break: break-word;
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.formula-note {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.text-glow {
  text-shadow: var(--text-glow-shadow);
}

/* Range Sliders custom styles */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-label {
  font-family: 'Outfit', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.slider-value {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.calc-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50px;
  outline: none;
  transition: var(--transition-fast);
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-cyan);
  transition: var(--transition-fast);
}

.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 14px var(--accent-cyan);
}

.slider-desc {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* PPI Gauge */
.ppi-meter-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.ppi-gauge {
  position: relative;
  width: 140px;
  height: 70px; /* Semi-circle */
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 12px;
}

.ppi-gauge-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 14px solid rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.ppi-gauge-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 14px solid transparent;
  border-top-color: var(--accent-cyan);
  border-right-color: var(--accent-cyan);
  box-sizing: border-box;
  transform: rotate(0.25turn); /* Rotates based on formula score */
  transform-origin: center center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 6px var(--accent-cyan));
}

.ppi-gauge-cover {
  position: absolute;
  bottom: 0;
  width: 112px;
  height: 56px;
  background: var(--bg-card);
  border-radius: 56px 56px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 2px;
}

.ppi-calculated-num {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.ppi-calculated-label {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.ppi-verdict {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.ppi-comparisons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.ppi-comp-pill {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 50px;
  color: var(--text-secondary);
  display: flex;
  gap: 4px;
}

.ppi-comp-pill .pill-lbl {
  font-weight: 600;
  color: var(--text-muted);
}

.ppi-comp-pill.danger {
  border-color: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
}

/* Tab 4: Search & Leaderboards styling */
.select-legends-header {
  padding: 20px 24px;
}

.search-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.search-filter-row h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.search-wrapper {
  position: relative;
  width: 300px;
  max-width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  padding: 10px 14px 10px 40px;
  border-radius: var(--radius-md);
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.sub-instructions {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.interactive-table tbody tr {
  cursor: pointer;
}

.interactive-table tbody tr.active-row {
  background: rgba(99, 102, 241, 0.1) !important;
  border-left: 3px solid var(--primary);
}

/* Detailed profiles modal panel */
.legend-card-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
}

.legend-avatar-col {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  position: relative;
}

.player-big-icon {
  font-size: 54px;
  color: var(--primary-light);
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px var(--primary));
}

.player-name-badge h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.player-role-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 6px;
  display: inline-block;
  letter-spacing: 0.5px;
}

.legend-stats-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.stats-grid-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mini-stat {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-glow);
  padding: 12px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.mini-lbl {
  font-size: 9.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mini-num {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}

.legend-bio-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 16px;
  border-radius: var(--radius-md);
}

.legend-bio-box h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-bio-box p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Tab 5: Stacked Advantage Playground */
.compounding-rules {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.03);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.compounding-rules h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 6px;
}

.advantage-stack-playground {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.advantage-layer-checkbox {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-glow);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.advantage-layer-checkbox:hover {
  background: rgba(99, 102, 241, 0.03);
  border-color: rgba(99, 102, 241, 0.3);
}

.advantage-layer-checkbox.active {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 4px 15px 0 rgba(99, 102, 241, 0.05);
}

/* Custom Checkbox styles */
.checkbox-action {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.checkbox-action input {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  cursor: pointer;
  z-index: 10;
}

.custom-chk {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--text-muted);
  transition: var(--transition-fast);
}

.checkbox-action input:checked ~ .custom-chk {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-chk:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-action input:checked ~ .custom-chk:after {
  display: block;
}

.layer-details {
  flex-grow: 1;
}

.layer-title {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.layer-description {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.layer-impact-val {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Playground Output progress section */
.playground-output {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.probability-display {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radial-progress {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.radial-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 6px;
}

.radial-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 6px;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 6px var(--primary));
}

.radial-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.radial-percentage {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.radial-label {
  font-size: 8px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.playground-status-log {
  flex-grow: 1;
  min-width: 180px;
}

.playground-status-log h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 6px;
}

.playground-status-log p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Footer elements */
.main-footer {
  margin-top: 48px;
  padding: 24px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: var(--glass-shadow);
}

.footer-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

.footer-info .small-muted {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  max-width: 700px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-light);
}

/* Helpers */
.margin-top { margin-top: 20px; }

/* Animations Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-active {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px var(--primary)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 14px var(--primary)); }
}

/* ==========================================================================
   2. Media Queries — Adaptive Design
   ========================================================================== */

@media (max-width: 1024px) {
  .dashboard-grid {
    display: flex;
    flex-direction: column;
  }
  
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .header-badge {
    align-self: flex-end;
  }
  
  .stats-banner {
    grid-template-columns: 1fr;
  }
  
  .navigation-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  
  .tab-button {
    font-size: 13px;
    padding: 10px 12px;
  }
  
  .legend-card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .legend-avatar-col {
    padding: 16px;
  }
  
  .stats-grid-mini {
    grid-template-columns: 1fr;
  }
  
  .playground-output {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .main-footer {
    flex-direction: column;
    text-align: center;
  }
}
