/* ==========================================================================
   K-Savant Design System: Industrial Luminescence (Stitch MCP Inspired)
   ========================================================================== */

/* Font & Core Variables */
:root {
  --font-display: 'Manrope', 'Pretendard', -apple-system, sans-serif;
  --font-body: 'Inter', 'Pretendard', -apple-system, sans-serif;

  /* Color Palette (Deep Earth & Neon Precision) */
  --bg-color: #0b1326;                /* Earth Depth (Deep Navy) */
  --surface-base: #0b1326;           /* Base Surface */
  --surface-low: #131b2e;            /* Sidebar / Background card */
  --surface-container: rgba(23, 31, 51, 0.45); /* Glass card base */
  --surface-high: #222a3d;           /* Active / Selected items */
  --surface-highest: #2d3449;        /* Tooltips / Float panels */
  --surface-lowest: #060e20;         /* Recessed inputs */
  
  /* Accent Colors */
  --color-primary: #9bcbff;          /* High Polish Blue */
  --color-primary-container: #004877;/* Metallic Base */
  --color-secondary: #b6c8e0;        /* Cool Slate */
  --color-outline: rgba(255, 255, 255, 0.08); /* Ghost border edge-light */
  --color-outline-active: rgba(155, 203, 255, 0.4); /* Glow outline */

  /* BFI Status Neon Colors */
  --bfi-fresh: #10b981;              /* Neon Green */
  --bfi-fresh-bg: rgba(16, 185, 129, 0.15);
  --bfi-caution: #eab308;            /* Warning Yellow */
  --bfi-caution-bg: rgba(234, 179, 8, 0.15);
  --bfi-warning: #f97316;            /* Alert Orange */
  --bfi-warning-bg: rgba(249, 115, 22, 0.15);
  --bfi-rest: #ef4444;               /* Critical Red */
  --bfi-rest-bg: rgba(239, 68, 68, 0.15);

  /* Spacing & Radii */
  --radius-xl: 24px;                 /* Main containers */
  --radius-lg: 16px;                 /* Inner cards */
  --radius-md: 8px;                  /* Small chips/buttons */
  
  --shadow-ambient: 0 16px 36px rgba(0, 0, 0, 0.35);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Aesthetics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--color-secondary);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Lights */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
}

.bg-glow-1 {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, #004877 0%, transparent 70%);
  top: -10vw;
  right: -5vw;
}

.bg-glow-2 {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, #2d3449 0%, transparent 70%);
  bottom: -15vw;
  left: -10vw;
}

/* Layout Wrapper */
.dashboard-wrapper {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Header Component
   ========================================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: var(--surface-container);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 24px;
  box-shadow: var(--shadow-ambient);
}

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

.header-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 0 8px rgba(0, 149, 255, 0.5));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 12px rgba(0, 149, 255, 0.85));
}

.logo-area h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.sub-logo {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  background: rgba(155, 203, 255, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-md);
  margin-left: 8px;
}

/* Navigation Tabs */
.tab-navigation {
  display: flex;
  gap: 8px;
  background: var(--surface-lowest);
  padding: 6px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-inner);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--color-secondary);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #ffffff;
  background: var(--surface-high);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-outline);
}

.current-date-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(23, 31, 51, 0.6);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-outline);
}

/* ==========================================================================
   Panel Containers (No-Line Philosophy)
   ========================================================================== */
.dashboard-panel {
  background: var(--surface-container);
  border: 1px solid var(--color-outline);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-ambient);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.xl-panel {
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
}

.lg-panel {
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.panel-header {
  padding: 20px 24px 12px 24px;
}

.panel-header.flex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.panel-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-subtitle {
  font-size: 12px;
  color: rgba(182, 200, 224, 0.65);
  margin-top: 4px;
  display: block;
}

.panel-body {
  padding: 12px 24px 24px 24px;
}

/* Hover lift on main grid panels */
.dashboard-panel:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   TAB 1: HOME (TODAY SUMMARY)
   ========================================================================== */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Schedule Card (Today's slate) */
.schedule-card {
  background: var(--surface-low);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--color-outline);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.schedule-card:last-child {
  margin-bottom: 0;
}

.schedule-card:hover {
  background: var(--surface-high);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  border-color: var(--color-primary);
}

.match-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(155, 203, 255, 0.1);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  text-align: center;
}

.matchup-teams {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: center;
  padding: 0 16px;
}

.team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
}

.team-logo-sm {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-block;
  object-fit: contain;
  background: #ffffff; /* Unified white background */
  padding: 6px;        /* Internal padding to align emblem size */
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  vertical-align: middle;
}

.team-logo-xs {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-block;
  object-fit: contain;
  background: #ffffff; /* Unified white background */
  padding: 4px;        /* Internal padding for fitting */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  vertical-align: middle;
  margin-right: 8px;   /* Margin to name */
}

.team-badge-large-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff; /* Unified white background */
  border: 1px solid var(--color-outline);
  border-radius: 50%;
  width: 100px;          /* Uniform container size */
  height: 100px;         /* Uniform container size */
  padding: 12px;
  box-shadow: var(--shadow-ambient);
  vertical-align: middle;
  overflow: hidden;      /* Prevent square corners leaking outside circular container */
}

.team-badge-large-img img {
  border-radius: 50%;
  display: block;
  mix-blend-mode: multiply; /* Absorb any image-level white backgrounds into the parent container */
}

.team-block .starter-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(220, 235, 255, 0.9);
  margin-top: 2px;
}

.match-vs {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: rgba(182, 200, 224, 0.4);
}

.stadium-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: 140px;
}

.stadium-name {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 140px;
}

/* Team Colors Mapping */
.team-KIA { background: #c8102e; }
.team-삼성 { background: #0066b2; }
.team-LG { background: #c60c30; }
.team-두산 { background: #131230; }
.team-SSG { background: #ce0e2d; }
.team-한화 { background: #ff6600; }
.team-NC { background: #072c53; }
.team-롯데 { background: #041e42; }
.team-KT { background: #000000; border: 1px solid #333; }
.team-키움 { background: #570514; }

/* Team Text Colors for Leaderboard Table */
.team-text-KIA { color: #ff5252 !important; }
.team-text-삼성 { color: #5398ff !important; }
.team-text-LG { color: #ff6b8b !important; }
.team-text-두산 { color: #4b7bec; }
.team-text-SSG { color: #ff7675 !important; }
.team-text-한화 { color: #ff9f43 !important; }
.team-text-NC { color: #00d2d3 !important; }
.team-text-롯데 { color: #ff5252 !important; }
.team-text-KT { color: #ff7f50 !important; }
.team-text-키움 { color: #a55eea !important; }

/* Park Factor Chip */
.pf-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-md);
}

.pf-hitter {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.pf-pitcher {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.pf-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-secondary);
}

/* Home List Rows (Top 5 & Abuse alerts) */
.home-list-row {
  background: var(--surface-low);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.home-list-row:last-child {
  margin-bottom: 0;
}

.home-list-row:hover {
  background: var(--surface-high);
  border-color: rgba(255, 255, 255, 0.12);
}

.player-info-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-chip {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  color: #ffffff;
}

.player-name-bold {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.player-role-tag {
  font-size: 11px;
  color: rgba(182, 200, 224, 0.5);
  margin-left: 6px;
}

/* Linear Progress Bar (Luminous) */
.progress-bar-container {
  width: 160px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow-inner);
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease-out;
}

.progress-value-text {
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

/* BFI Color States mapping */
.fill-fresh { background: var(--bfi-fresh); box-shadow: 0 0 8px var(--bfi-fresh); }
.fill-caution { background: var(--bfi-caution); box-shadow: 0 0 8px var(--bfi-caution); }
.fill-warning { background: var(--bfi-warning); box-shadow: 0 0 8px var(--bfi-warning); }
.fill-rest { background: var(--bfi-rest); box-shadow: 0 0 8px var(--bfi-rest); }

.text-fresh { color: var(--bfi-fresh); }
.text-caution { color: var(--bfi-caution); }
.text-warning { color: var(--bfi-warning); }
.text-rest { color: var(--bfi-rest); }

.bg-fresh { background: var(--bfi-fresh-bg); color: var(--bfi-fresh); }
.bg-caution { background: var(--bfi-caution-bg); color: var(--bfi-caution); }
.bg-warning { background: var(--bfi-warning-bg); color: var(--bfi-warning); }
.bg-rest { background: var(--bfi-rest-bg); color: var(--bfi-rest); }

/* Pulses only on hover to avoid clutter */
@keyframes bfi-danger-pulse {
  0% { box-shadow: 0 0 2px var(--bfi-rest); }
  50% { box-shadow: 0 0 12px var(--bfi-rest); }
  100% { box-shadow: 0 0 2px var(--bfi-rest); }
}

.home-list-row.bg-rest:hover {
  animation: bfi-danger-pulse 1.2s ease-in-out infinite;
}

/* Weekly Abuse Card special border glow */
.alert-danger-panel {
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.05) 0%, rgba(23, 31, 51, 0.45) 100%);
}

.alert-danger-panel:hover {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.1);
}

.weekly-abuse-detail {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.pitch-count-highlight {
  font-size: 14px;
  font-weight: 800;
  color: var(--bfi-rest);
}

.warning-desc {
  font-size: 11px;
  color: rgba(239, 68, 68, 0.7);
}

/* Team rankings horizontal bar */
.team-rank-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  transition: background-color 0.2s ease, transform 0.15s ease, padding-left 0.2s ease;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}

.team-rank-row:hover {
  background-color: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

.team-rank-row:last-child {
  margin-bottom: 0;
}

.team-rank-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  width: 50px;
}

.team-rank-bar-bg {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.team-rank-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease-out;
}

.team-rank-val {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  width: 40px;
  text-align: right;
}

/* ==========================================================================
   TAB 2: BULLPEN FATIGUE & HEATMAP & SIMULATOR
   ========================================================================== */
.bullpen-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}

.bullpen-main {
  display: flex;
  flex-direction: column;
}

/* Team Filter Buttons */
.team-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--surface-low);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-outline);
  margin-bottom: 20px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-outline);
  color: var(--color-secondary);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.filter-btn.active {
  background: var(--color-primary-container);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(155, 203, 255, 0.2);
}

/* Reliever Grid cards */
.reliever-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.reliever-card {
  background: var(--surface-container);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.reliever-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: var(--color-primary);
}

.reliever-card.border-rest:hover {
  animation: bfi-danger-pulse 1.2s ease-in-out infinite;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.card-top h3 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.meta-sub-row {
  display: flex;
  gap: 6px;
  font-size: 11px;
  color: rgba(182, 200, 224, 0.5);
  margin-top: 2px;
}

.role-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-md);
  color: #ffffff;
}

.role-closer { background: #6d3700; color: #ffb780; }
.role-setup { background: #132a13; color: #a3b18a; }
.role-middle { background: #1f3a52; color: #9ebcd0; }

.card-gauge-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}

.card-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--surface-lowest);
  padding: 12px;
  border-radius: 12px;
  box-shadow: var(--shadow-inner);
}

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

.stat-label {
  font-size: 11px;
  color: rgba(182, 200, 224, 0.4);
}

.stat-val {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

/* Workload Heatmap grid */
.heatmap-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
}

.heatmap-names-col {
  display: flex;
  flex-direction: column;
}

.heatmap-names-spacer {
  height: 24px;
  margin-bottom: 8px;
}

.heatmap-names {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heatmap-name-item {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
}

.heatmap-timeline-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heatmap-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}

.heatmap-cell {
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-outline);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.heatmap-cell:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.03);
}

.cell-pitches {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

.cell-date {
  font-size: 9px;
  color: rgba(182, 200, 224, 0.4);
}

.heatmap-header-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin-bottom: 8px;
  text-align: center;
}

.heatmap-header-cell {
  font-size: 10px;
  font-weight: 700;
  color: rgba(182, 200, 224, 0.6);
}

.heatmap-today {
  color: var(--color-accent);
  font-weight: 800;
}

/* Heatmap pitch loads colors */
.load-none { background: rgba(255, 255, 255, 0.02); }
.load-low { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.2); }
.load-med { background: rgba(234, 179, 8, 0.15); border-color: rgba(234, 179, 8, 0.25); }
.load-high { background: rgba(249, 115, 22, 0.2); border-color: rgba(249, 115, 22, 0.35); }
.load-extreme { background: rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.45); }

/* Manager Simulator panel */
.simulator-panel {
  position: sticky;
  top: 24px;
}

.sim-selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.sim-slider-group {
  margin-bottom: 20px;
  background: var(--surface-low);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-outline);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.slider-val {
  color: var(--color-primary);
}

.sim-li-select-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
}

.sim-chart-container {
  height: 180px;
  margin-top: 20px;
  position: relative;
}

.sim-alert-box {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(155, 203, 255, 0.05);
  border: 1px solid rgba(155, 203, 255, 0.15);
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-secondary);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.sim-alert-box.alert-red {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.sim-alert-box.alert-orange {
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.25);
  color: #f97316;
}

.sim-alert-box.alert-green {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #10b981;
}

/* Glass Input Controls */
.glass-select {
  width: 100%;
  background: var(--surface-lowest);
  border: 1px solid var(--color-outline);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
}

.glass-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(155, 203, 255, 0.15);
}

.glass-select-sm {
  background: var(--surface-lowest);
  border: 1px solid var(--color-outline);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
  outline: none;
}

.glass-select-sm:focus {
  border-color: var(--color-primary);
}

.glass-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.glass-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(155, 203, 255, 0.6);
  transition: transform 0.1s;
}

.glass-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* ==========================================================================
   TAB 3: LEADERBOARD TAB
   ========================================================================== */
.table-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-low);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-outline);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.filters-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.glass-input-sm {
  background: var(--surface-lowest);
  border: 1px solid var(--color-outline);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 12px;
  outline: none;
  transition: var(--transition-smooth);
}

.glass-input-sm:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(155, 203, 255, 0.15);
}

.glass-btn-sm {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-outline);
  color: var(--color-secondary);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
}

.glass-btn-sm:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Leaderboard Switcher Buttons */
.leaderboard-switcher {
  display: flex;
  background: var(--surface-lowest);
  padding: 4px;
  border-radius: 10px;
  box-shadow: var(--shadow-inner);
}

.switch-btn {
  background: transparent;
  border: none;
  color: var(--color-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.switch-btn:hover {
  color: #ffffff;
}

.switch-btn.active {
  background: var(--surface-high);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Dynamic Column Selector Dropdown */
.dropdown-wrapper {
  position: relative;
}

.col-selector-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface-highest);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px;
  min-width: 180px;
  box-shadow: var(--shadow-ambient);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: var(--transition-smooth);
}

.col-selector-dropdown.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item-cb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-secondary);
  cursor: pointer;
}

.dropdown-item-cb input {
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Savant styled table */
.table-scroll-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-outline);
}

.savant-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.savant-table th {
  background: var(--surface-low);
  padding: 14px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  border-bottom: 1px solid var(--color-outline);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.savant-table th:hover {
  background: var(--surface-high);
  color: var(--color-primary);
}

.savant-table th i {
  margin-left: 4px;
  font-size: 11px;
}

.savant-table td {
  padding: 14px 18px;
  color: var(--color-secondary);
  border-bottom: 1px solid var(--color-outline);
  white-space: nowrap;
}

.savant-table tbody tr {
  transition: var(--transition-smooth);
}

.savant-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

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

.table-player-name {
  font-weight: 800;
  color: #ffffff;
}

.table-team-badge {
  font-weight: 700;
  color: var(--color-primary);
}

/* ==========================================================================
   TAB 4: PLAYER PROFILE TAB
   ========================================================================== */
.profile-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.profile-search-card {
  width: 100%;
  padding: 24px 32px;
  overflow: visible !important;
  position: relative;
  z-index: 300;
}

.search-desc {
  font-size: 13px;
  color: rgba(182, 200, 224, 0.55);
  margin-top: 6px;
  margin-bottom: 20px;
  text-align: left;
}

/* 3-tier Search Controls Grid */
.profile-search-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 16px;
  width: 100%;
  text-align: left;
}

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

.search-control-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hybrid Dropdown Input style */
.search-input-wrapper-hybrid {
  position: relative;
  width: 100%;
  display: flex;
  z-index: 310;
}

.glass-input-hybrid {
  width: 100%;
  background: var(--surface-lowest);
  border: 1px solid var(--color-outline);
  color: #ffffff;
  padding: 10px 40px 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}

.glass-input-hybrid:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(155, 203, 255, 0.2);
}

.glass-dropdown-btn {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--color-secondary);
  padding: 0 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.glass-dropdown-btn:hover {
  color: #ffffff;
}

.search-suggestions-hybrid {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: var(--surface-highest);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-ambient);
  z-index: 320;
  max-height: 220px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
}

/* Profile Display Results */
.profile-results-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  width: 100%;
  margin-top: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.profile-results-container.show {
  opacity: 1;
  transform: translateY(0);
}

.profile-card-bio {
  grid-column: 1;
  padding: 24px; /* Spacious padding to prevent elements hitting borders */
}

.profile-stats-card {
  grid-column: 2;
}

.profile-card-chart {
  grid-column: 1 / -1; /* 하단 전체 가로폭 차지 */
}

/* Detailed Stats Dashboard Grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  width: 100%;
}

.profile-stat-box {
  background: var(--surface-lowest);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: var(--transition-smooth);
}

.profile-stat-box:hover {
  border-color: var(--color-outline-active);
  background: rgba(255, 255, 255, 0.02);
}

.stat-box-label {
  font-size: 11px;
  color: rgba(182, 200, 224, 0.4);
  margin-bottom: 6px;
  white-space: nowrap;
}

.stat-box-val {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-display);
}

.stat-box-val.highlight {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

/* Heatmap-like color states for BFI inside stats box */
.stat-box-val.bfi-fresh { color: #ffffff; }
.stat-box-val.bfi-caution { color: var(--bfi-caution); }
.stat-box-val.bfi-warning { color: var(--bfi-warning); }
.stat-box-val.bfi-rest { color: var(--bfi-rest); }

/* Suggestions hybrid item styling */
.search-suggestions-hybrid .suggestion-item {
  padding: 12px 20px;
  text-align: left;
  font-size: 13px;
  color: var(--color-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.search-suggestions-hybrid .suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestions-hybrid .suggestion-item:hover {
  background: var(--surface-high);
  color: #ffffff;
}

.search-suggestions-hybrid .suggestion-item.no-match {
  color: rgba(182, 200, 224, 0.4);
  justify-content: center;
  cursor: default;
}

.search-suggestions-hybrid .suggestion-team {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
}

/* Stat average comparison diff badges */
.stat-diff-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-md);
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.stat-diff-badge.diff-better {
  background: rgba(16, 185, 129, 0.12);
  color: var(--bfi-fresh);
}

.stat-diff-badge.diff-worse {
  background: rgba(239, 68, 68, 0.12);
  color: var(--bfi-rest);
}

.stat-diff-badge.diff-neutral {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-secondary);
}

.player-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-outline);
}

.team-badge-large {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--surface-high);
  border: 1px solid var(--color-outline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
}

.player-title-box {
  display: flex;
  flex-direction: column;
}

.player-position-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.player-title-box h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0;
}

.player-team-full {
  font-size: 12px;
  color: rgba(182, 200, 224, 0.5);
}

.player-bio-table {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-outline);
}

.bio-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
}

.bio-label {
  color: rgba(182, 200, 224, 0.4);
}

.bio-value {
  color: #ffffff;
  font-weight: 600;
}

.player-desc-box {
  padding-top: 16px;
}

.player-desc-box h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.player-desc-box p {
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(182, 200, 224, 0.75);
}

.profile-chart-wrapper {
  height: 300px;
  position: relative;
  margin-top: 10px;
}

/* ==========================================================================
   Tooltips, Switchers, Footers
   ========================================================================== */
.savant-tooltip {
  position: absolute;
  background: var(--surface-highest);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 11px;
  color: #ffffff;
  box-shadow: var(--shadow-ambient);
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-out;
  max-width: 280px;
  line-height: 1.4;
}

.app-footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--color-outline);
  text-align: center;
  font-size: 11px;
  color: rgba(182, 200, 224, 0.35);
}

/* Tab display togglers */
.tab-content {
  display: none;
}

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

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1100px) {
  .bullpen-layout {
    grid-template-columns: 1fr;
  }
  
  .bullpen-sidebar {
    position: static;
  }
}

@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-results-container {
    grid-template-columns: 1fr;
  }
  
  .app-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    text-align: center;
  }
  
  .logo-area {
    justify-content: center;
  }
  
  .tab-navigation {
    justify-content: center;
  }
  
  .current-date-badge {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  /* Global Content Padding Reductions */
  .main-content {
    padding: 10px !important;
  }
  
  .dashboard-panel {
    padding: 14px 12px !important;
  }
  
  /* Header Compact Mode */
  .app-header {
    padding: 10px 12px !important;
    gap: 10px !important;
  }
  
  .logo-area h1 {
    font-size: 18px !important;
  }
  
  .logo-area .header-logo {
    width: 26px !important;
    height: 26px !important;
  }
  
  /* Tab Navigation Compressed */
  .tab-navigation {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 2px !important;
  }
  
  .tab-btn {
    padding: 6px 6px !important;
    font-size: 10.5px !important;
    flex: 1;
    justify-content: center;
  }
  
  .tab-btn i {
    font-size: 12px !important;
    margin-right: 2px !important;
  }
  
  /* Enable horizontal scroll on tables to prevent overflow-x cutoff */
  .table-responsive,
  .panel-body,
  .leaderboard-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  table.savant-table {
    font-size: 11px !important;
    min-width: 600px; /* Ensure columns don't squeeze too tight */
  }
  
  table.savant-table th, 
  table.savant-table td {
    padding: 6px 6px !important;
  }
  
  /* Reliever Cards Grid optimized for small viewports */
  .reliever-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 6px !important;
  }
  
  .reliever-card {
    padding: 8px !important;
  }
  
  /* Workload Heatmap cells scaling */
  .heatmap-row {
    font-size: 9.5px !important;
  }
  
  .day-cell {
    width: 20px !important;
    height: 20px !important;
    font-size: 9.5px !important;
  }
  
  /* Share Modal Popup */
  .share-modal-content {
    width: 96% !important;
  }
}

/* cross-tab linkage interactive effects */
.clickable-player {
  transition: color 0.15s ease;
}

.clickable-player:hover {
  color: var(--color-primary) !important;
}

/* ==========================================================================
   SNS Share Modal & Infographic Templates
   ========================================================================== */
.share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease-out;
}

.share-modal-content {
  width: 480px;
  max-width: 90%;
  border-radius: var(--radius-xl);
  background: rgba(19, 27, 46, 0.9);
  border: 1px solid var(--color-outline);
  box-shadow: var(--shadow-ambient);
  overflow: hidden;
  position: relative;
}

.share-modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--color-secondary);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.share-modal-close:hover {
  color: var(--bfi-rest);
}

.share-preview-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #060e20;
  border-radius: var(--radius-lg);
  padding: 12px;
  border: 1px solid var(--color-outline);
  min-height: 250px;
}

.share-preview-container img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Offscreen Share Cards Templates */
.share-card-template {
  width: 1080px;
  height: 1080px;
  box-sizing: border-box;
  padding: 60px 45px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 80% 20%, var(--team-color-secondary, #050505) 0%, #050505 100%) !important;
  border: 3px solid var(--team-color-primary, #3b82f6) !important;
  box-shadow: inset 0 0 80px var(--team-color-primary-alpha-35, rgba(59, 130, 246, 0.35)) !important;
  color: #ffffff;
  font-family: var(--font-body);
  overflow: hidden;
  position: relative;
}

.share-card-template::before {
  display: none !important;
}

/* Real overlay div for canvas capture compatibility */
.share-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1;
}

.share-card-glow-border {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border: 1px solid var(--team-color-primary-alpha-15, rgba(255, 255, 255, 0.05));
  pointer-events: none;
  z-index: 1;
}

.share-card-template * {
  position: relative;
  z-index: 2;
}

.share-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 24px;
}

.share-card-header .logo-box {
  display: flex;
  align-items: center;
  gap: 20px;
}

.share-card-header .logo-box img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.share-card-header .title-box {
  text-align: right;
}

.share-card-header .title-box h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.share-card-header .title-box span {
  font-size: 16px;
  color: rgba(182, 200, 224, 0.65);
}

.share-card-body {
  flex: 1;
  margin: 40px 0;
  display: flex;
  align-items: center;
}

/* Player Template styling */
.share-player-left {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 20px;
}

.share-player-left .large-back-num {
  font-family: var(--font-display);
  font-size: 240px;
  font-weight: 900;
  line-height: 0.9;
  color: rgba(255, 255, 255, 0.06);
  margin-bottom: -40px;
  margin-left: -15px;
}

.share-player-left h2 {
  font-family: var(--font-display);
  font-size: 84px;
  font-weight: 850;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.03em;
}

.share-player-left .player-team {
  font-size: 24px;
  color: var(--color-primary);
  font-weight: 700;
  margin-top: 6px;
}

.share-player-left .player-desc {
  font-size: 20px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 35px;
  background: rgba(255, 255, 255, 0.04);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  word-break: keep-all;
  text-align: justify;
}

.share-player-right {
  flex: 1.2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.share-player-right .chart-wrapper {
  width: 580px;
  height: 580px;
}

/* Bullpen Template styling */
.share-bullpen-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.share-bullpen-row {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 28px;
  border-radius: var(--radius-lg);
  justify-content: space-between;
}

.share-bullpen-row .p-info {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 280px;
}

.share-bullpen-row .p-info .p-hand {
  font-size: 13px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.share-bullpen-row .p-name {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
}

.share-bullpen-row .p-bfi-bar {
  flex: 1;
  margin: 0 30px;
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.share-bullpen-row .p-bfi-fill {
  height: 100%;
  border-radius: 6px;
}

.share-bullpen-row .p-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 200px;
}

.share-bullpen-row .bfi-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  margin-right: 15px;
}

.share-bullpen-row .bfi-badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  text-align: center;
  min-width: 80px;
}

/* Rank Template styling */
.share-rank-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.share-rank-row {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  padding: 12px 28px;
  gap: 20px;
}

.share-rank-row .rank-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  width: 60px;
  color: rgba(182, 200, 224, 0.35);
}

.share-rank-row.top3 .rank-num {
  color: var(--color-primary);
  font-size: 42px;
  text-shadow: 0 0 10px rgba(155, 203, 255, 0.3);
}

.share-rank-row .team-symbol {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 50%;
  padding: 4px;
}

.share-rank-row .player-name {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  width: 160px;
}

.share-rank-row .stat-bar-container {
  flex: 1;
  height: 18px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  overflow: hidden;
}

.share-rank-row .stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #3b82f6);
  border-radius: 9px;
}

.share-rank-row .stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  width: 180px;
  text-align: right;
}

/* Card Footer styling */
.share-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  font-size: 16px;
  color: rgba(182, 200, 224, 0.4);
}

.share-card-footer .brand-text {
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Dynamic Team Theming for web player profile dashboard panels */
#profile-results-container {
  --player-theme-border: var(--player-team-point-alpha-30, var(--color-outline));
  --player-theme-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37), 0 0 15px var(--player-team-glow-alpha-15, var(--player-team-point-alpha-15, transparent));
}

#profile-results-container .profile-card-bio {
  border-color: var(--player-theme-border) !important;
  box-shadow: var(--player-theme-shadow) !important;
  background: radial-gradient(circle at 100% 0%, var(--player-team-glow-alpha-15, var(--player-team-point-alpha-15, rgba(59, 130, 246, 0.15))) 0%, rgba(13, 20, 35, 0.45) 100%) !important;
}

#profile-results-container .profile-stats-card {
  border-color: var(--player-theme-border) !important;
  box-shadow: var(--player-theme-shadow) !important;
  background: radial-gradient(circle at 100% 0%, var(--player-team-glow-alpha-15, var(--player-team-point-alpha-15, rgba(59, 130, 246, 0.15))) 0%, rgba(13, 20, 35, 0.45) 100%) !important;
}

#profile-results-container .profile-recent-games-card {
  border-color: var(--player-theme-border) !important;
  box-shadow: var(--player-theme-shadow) !important;
  background: radial-gradient(circle at 100% 0%, var(--player-team-glow-alpha-15, var(--player-team-point-alpha-15, rgba(59, 130, 246, 0.15))) 0%, rgba(13, 20, 35, 0.45) 100%) !important;
}

#profile-results-container .profile-card-chart {
  border-color: var(--player-theme-border) !important;
  box-shadow: var(--player-theme-shadow) !important;
  background: radial-gradient(circle at 100% 0%, var(--player-team-glow-alpha-15, var(--player-team-point-alpha-15, rgba(59, 130, 246, 0.15))) 0%, rgba(13, 20, 35, 0.45) 100%) !important;
}

#profile-results-container #profile-name {
  text-shadow: 0 0 10px var(--player-team-point-alpha-50, transparent);
}

#profile-results-container .player-position-tag {
  color: var(--player-team-point, var(--color-primary)) !important;
  border-color: var(--player-team-point-alpha-30, var(--color-outline)) !important;
  background: var(--player-team-point-alpha-15, rgba(155, 203, 255, 0.1)) !important;
}

#profile-results-container .profile-stat-box .stat-box-val.highlight {
  color: #ffffff !important;
  text-shadow: 0 0 12px var(--player-team-point-alpha-50, rgba(255, 255, 255, 0.25)) !important;
}

#profile-results-container .profile-stat-box:hover {
  border-color: var(--player-team-point-alpha-50, var(--color-outline-active)) !important;
  box-shadow: 0 0 8px var(--player-team-point-alpha-15, transparent);
}

/* Stylized Text-based Team Badges (Legal Replacement for Emblems) */
.team-logo-text-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', 'Pretendard', sans-serif;
  font-weight: 800;
  border-radius: 50%;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--team-color-primary, #3b82f6);
  user-select: none;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0 !important;
  white-space: nowrap;
  word-break: keep-all;
}

.team-logo-text-badge.team-logo-xs {
  width: 24px;
  height: 24px;
  font-size: 9px;
  border-width: 0.5px;
}

.team-logo-text-badge.team-logo-sm {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

.team-logo-text-badge.team-logo-md {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.team-logo-text-badge.team-logo-lg {
  width: 76px;
  height: 76px;
  font-size: 22px;
  font-weight: 900;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 2px 2px rgba(255, 255, 255, 0.3);
}

/* Team-specific color backgrounds & shadows */
.team-logo-text-badge.team-bg-KIA { background: linear-gradient(135deg, #c70931 0%, #8c0622 100%); box-shadow: 0 0 10px rgba(199, 9, 49, 0.3); }
.team-logo-text-badge.team-bg-삼성 { background: linear-gradient(135deg, #074ca1 0%, #05336c 100%); box-shadow: 0 0 10px rgba(7, 76, 161, 0.3); }
.team-logo-text-badge.team-bg-LG { background: linear-gradient(135deg, #c30452 0%, #820336 100%); box-shadow: 0 0 10px rgba(195, 4, 82, 0.3); }
.team-logo-text-badge.team-bg-두산 { background: linear-gradient(135deg, #131230 0%, #0d0c20 100%); border-color: rgba(210, 16, 61, 0.3); box-shadow: 0 0 10px rgba(19, 18, 48, 0.3); }
.team-logo-text-badge.team-bg-SSG { background: linear-gradient(135deg, #ce0e2d 0%, #900a20 100%); box-shadow: 0 0 10px rgba(206, 14, 45, 0.3); }
.team-logo-text-badge.team-bg-한화 { background: linear-gradient(135deg, #ff6600 0%, #b34700 100%); box-shadow: 0 0 10px rgba(255, 102, 0, 0.3); }
.team-logo-text-badge.team-bg-NC { background: linear-gradient(135deg, #071d3d 0%, #041022 100%); border-color: rgba(190, 148, 89, 0.4); box-shadow: 0 0 10px rgba(7, 29, 61, 0.3); }
.team-logo-text-badge.team-bg-롯데 { background: linear-gradient(135deg, #041e42 0%, #03142c 100%); border-color: rgba(220, 74, 36, 0.4); box-shadow: 0 0 10px rgba(4, 30, 66, 0.3); }
.team-logo-text-badge.team-bg-KT { background: linear-gradient(135deg, #111111 0%, #000000 100%); border-color: rgba(189, 162, 99, 0.4); box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); }
.team-logo-text-badge.team-bg-키움 { background: linear-gradient(135deg, #570514 0%, #3d030e 100%); box-shadow: 0 0 10px rgba(87, 5, 20, 0.3); }

