/* =========================================================================
   CORE VARIABLES & AUTHENTIC FPLGAMEWEEK.COM STYLING
   ========================================================================= */
:root {
  --bg-app: #181a1d;
  --bg-nav: #111317;
  --bg-panel: #2b2e33;
  --bg-panel-header: #23262b;
  --bg-row-alt: #31353b;
  --bg-row-hover: #393e46;
  --bg-active-blue: #155785;
  --border-subtle: #3d424a;
  --border-dark: #1d1f23;
  --text-main: #e4e7eb;
  --text-muted: #9da3ae;
  --accent-blue: #007acc;
  --accent-blue-hover: #0066ad;
  --accent-green: #2e8b3c;
  --accent-red: #b83b3b;
  --track-gray: #555960;
  --bar-blue: #2b7bba;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars for Dense Data Panels */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #1f2226;
}
::-webkit-scrollbar-thumb {
  background: #4b5058;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #636973;
}

/* =========================================================================
   HERO LANDING SCREEN
   ========================================================================= */
.hero-landing {
  min-height: 100vh;
  background:
    radial-gradient(circle at 52% 45%, rgba(217, 136, 8, 0.45) 0%, rgba(181, 110, 4, 0.9) 70%, rgba(145, 88, 5, 0.97) 100%),
    repeating-radial-gradient(circle at 50% 40%, rgba(255, 210, 120, 0.14) 0px, rgba(255, 210, 120, 0.14) 2px, transparent 3px, transparent 9px);
  background-color: #c97d07;
  position: relative;
  overflow: hidden;
}

.hero-diagonal-shapes {
  position: absolute;
  right: -60px;
  bottom: -50px;
  width: 440px;
  height: 280px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.16;
}

.crowd-bokeh {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 232, 165, 0.22) 1.5px, transparent 1.5px),
    radial-gradient(rgba(120, 68, 4, 0.25) 2px, transparent 2px);
  background-size: 26px 26px, 38px 38px;
  background-position: 0 0, 13px 17px;
  filter: blur(1.4px);
  pointer-events: none;
}

/* FPL GAMEWEEK Logo Badge */
.fpl-logo-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  cursor: pointer;
}
.fpl-logo-ball {
  width: 48px;
  height: 24px;
  margin-bottom: -2px;
  z-index: 2;
}
.fpl-logo-banner {
  background: #ff9d00;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.06em;
  border: 2.5px solid #111111;
  padding: 4px 12px;
  font-size: 15px;
  line-height: 1.1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.fpl-logo-banner-sm {
  background: #ff9d00;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.05em;
  border: 2px solid #111111;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.1;
}

/* =========================================================================
   DASHBOARD TABLE & BADGE COMPONENTS
   ========================================================================= */
.panel-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-dark);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
}

.panel-header {
  background-color: var(--bg-panel-header);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
}

.dense-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.dense-table th {
  color: #b7bec8;
  font-weight: 600;
  font-size: 11.5px;
  padding: 6px 6px;
  border-bottom: 1px solid var(--border-subtle);
  background-color: #26292e;
  white-space: nowrap;
}

.dense-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #353941;
  vertical-align: middle;
}

.dense-table tbody tr:nth-child(even) {
  background-color: #2f3339;
}

.dense-table tbody tr:hover {
  background-color: #3a3f47;
}

.dense-table tbody tr.active-manager-row {
  background-color: #155785 !important;
  color: #ffffff;
}

.dense-table tbody tr.opponent-selected-row {
  background-color: #2d4c3e !important;
  outline: 1px solid #3ea86b;
}

/* Badges */
.chip-pill {
  display: inline-block;
  background-color: #6b717a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.chip-pill-red {
  background-color: #c93b3b;
}

.cap-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: #111316;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  border: 1px solid #5c626c;
  vertical-align: middle;
}

.status-done-pill {
  display: inline-block;
  background-color: #2e9e44;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

/* Impact Progress Bars */
.imp-track {
  width: 64px;
  height: 15px;
  background-color: #555960;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
}

.imp-fill-pos {
  height: 100%;
  background-color: #2b7bba;
  transition: width 0.3s ease;
}

.imp-fill-neg {
  height: 100%;
  background-color: #b83b3b;
  transition: width 0.3s ease;
}

.imp-label {
  position: absolute;
  left: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
  z-index: 2;
  line-height: 1;
}

/* Toggle Switch */
.toggle-pill {
  width: 38px;
  height: 20px;
  background-color: #6b7078;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: inline-block;
  vertical-align: middle;
}
.toggle-pill.active {
  background-color: #007acc;
}
.toggle-knob {
  width: 16px;
  height: 16px;
  background-color: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.toggle-pill.active .toggle-knob {
  transform: translateX(18px);
}

/* Football Pitch View */
.pitch-surface {
  background: repeating-linear-gradient(
    to bottom,
    #2d7a36 0px,
    #2d7a36 36px,
    #266b2e 36px,
    #266b2e 72px
  );
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  position: relative;
  padding: 12px 6px;
  overflow: hidden;
}
.pitch-center-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.45);
}
.pitch-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 68px;
  transform: translate(-50%, -50%);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}
.pitch-box-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-top: none;
}
.pitch-box-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-bottom: none;
}

/* Tooltip Styling */
.q-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #9da3ae;
  color: #d1d5db;
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  position: relative;
}

#floating-tooltip {
  position: fixed;
  z-index: 9999;
  background: #111317;
  color: #f3f4f6;
  border: 1px solid #4b5563;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  max-width: 240px;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  display: none;
}
