    :root {
      --bg: #0a0a0a;
      --bg-elevated: #141414;
      --accent: #FFB800;
      --accent-dim: #806000;
      --text: #f5f5f5;
      --text-dim: #8a8a8a;
      --border: #262626;
      --hot: #FFB800;
      --warm: #B88600;
      --cold: #DC2626;
    }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: 'DM Sans', sans-serif;
      background-image:
        radial-gradient(circle at 20% 0%, rgba(255, 184, 0, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 100%, rgba(220, 38, 38, 0.05) 0%, transparent 40%);
      min-height: 100vh;
    }

    .font-display {
      font-family: 'Bebas Neue', sans-serif;
      letter-spacing: 0.02em;
    }

    .font-mono {
      font-family: 'JetBrains Mono', monospace;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
      opacity: 0.04;
      pointer-events: none;
      z-index: 1;
    }

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

    /* ===== Top Navigation ===== */
    .top-nav {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(10, 10, 10, 0.85);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
    }

    .nav-tabs {
      display: flex;
      overflow-x: auto;
      scrollbar-width: none;
    }

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

    .nav-tab {
      flex-shrink: 0;
      padding: 14px 16px;
      cursor: pointer;
      font-family: 'Bebas Neue', sans-serif;
      font-size: 14px;
      letter-spacing: 0.1em;
      color: var(--text-dim);
      border-bottom: 2px solid transparent;
      transition: all 0.2s;
      white-space: nowrap;
      user-select: none;
    }

    .nav-tab:hover {
      color: var(--text);
    }

    .nav-tab.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
    }

    .nav-tab .num {
      font-size: 11px;
      color: var(--text-dim);
      margin-right: 6px;
      font-family: 'JetBrains Mono', monospace;
    }

    .nav-tab.active .num {
      color: var(--accent);
    }

    /* ===== Player Header ===== */
    .jersey-number {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 160px;
      line-height: 0.85;
      color: transparent;
      -webkit-text-stroke: 2px var(--accent);
      opacity: 0;
      position: absolute;
      top: -10px;
      right: -20px;
      pointer-events: none;
      user-select: none;
      animation: slideInRight 0.8s ease-out forwards;
    }

    @keyframes slideInRight {
      from { opacity: 0; transform: translateX(30px); }
      to { opacity: 0.25; transform: translateX(0); }
    }

    /* ===== Player Avatar ===== */
    .player-avatar {
      position: absolute;
      right: 0px;
      bottom: -5px;
      width: 140px;
      height: 140px;
      object-fit: contain;
      object-position: bottom;
      z-index: 5;
      pointer-events: none;
      mix-blend-mode: lighten;
      mask-image: radial-gradient(ellipse 55% 55% at 50% 50%, black 10%, transparent 70%);
      -webkit-mask-image: radial-gradient(ellipse 55% 55% at 50% 50%, black 10%, transparent 70%);
      opacity: 0;
      animation: avatarIn 0.6s ease-out forwards, avatarBreathe 4s ease-in-out infinite 0.6s;
    }

    @keyframes avatarIn {
      from { opacity: 0; transform: scale(0.92); }
      to { opacity: 0.55; transform: scale(1); }
    }

    @keyframes avatarBreathe {
      0%, 100% { opacity: 0.6; }
      50% { opacity: 0.7; }
    }

    .tier-badge {
      width: 46px;
      height: 46px;
      border: 2px solid var(--accent);
      background: var(--bg);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Bebas Neue', sans-serif;
      font-size: 30px;
      color: var(--accent);
      box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--accent);
      transform: rotate(-3deg);
    }

    .pr-bar {
      height: 6px;
      background: var(--border);
      position: relative;
      overflow: hidden;
    }

    .pr-bar-fill {
      height: 100%;
      background: var(--accent);
      transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .pr-bar-fill.low {
      background: #4a4a4a;
    }

    .pr-bar-fill.mid {
      background: #B88600;
    }

    .divider {
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
    }

    .stat-row {
      transition: background 0.2s;
    }

    .stat-row:hover {
      background: var(--bg-elevated);
    }

    .header-band {
      background: var(--accent);
      color: var(--bg);
      font-family: 'Bebas Neue', sans-serif;
      letter-spacing: 0.15em;
    }

    .pr-ring-bg {
      stroke: var(--border);
      fill: none;
      stroke-width: 6;
    }

    .pr-ring-fill {
      stroke: var(--accent);
      fill: none;
      stroke-width: 6;
      stroke-linecap: round;
      transform: rotate(-90deg);
      transform-origin: center;
      transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .tag {
      border: 1px solid var(--border);
      color: var(--text-dim);
      padding: 4px 10px;
      font-size: 11px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      font-family: 'JetBrains Mono', monospace;
    }

    /* ===== Page Transitions ===== */
    .page-content {
      animation: fadeIn 0.4s ease-out;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(8px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .detail-page-anim {
      animation: detailFadeIn 0.65s ease-out forwards !important;
    }

    @keyframes detailFadeIn {
      from {
        opacity: 0;
        transform: translateY(16px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .stagger-in {
      opacity: 0;
      animation: staggerFadeIn 0.5s ease-out forwards;
    }

    @keyframes staggerFadeIn {
      from { opacity: 0; transform: translateY(12px); }
      to { opacity: 1; transform: translateY(0); }
    }

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

    .reveal-on-scroll {
      opacity: 0;
      transform: translateY(16px);
      transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .reveal-on-scroll.is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    .stat-row-wait {
      opacity: 0;
    }

    /* ===== Shot Chart ===== */
    .court-svg {
      width: 100%;
      height: auto;
      background: var(--bg-elevated);
      border: 1px solid var(--border);
    }

    .court-line {
      stroke: var(--accent);
      stroke-opacity: 0.4;
      fill: none;
      stroke-width: 1.5;
    }

    .court-baseline {
      stroke: var(--accent);
      stroke-opacity: 0.6;
      fill: none;
      stroke-width: 2;
    }

    .basket {
      fill: var(--accent);
    }

    .zone {
      cursor: pointer;
      transition: opacity 0.2s;
    }

    .zone:hover {
      opacity: 0.85;
    }

    .zone-label {
      font-family: 'Bebas Neue', sans-serif;
      font-size: 16px;
      fill: var(--text);
      text-anchor: middle;
      dominant-baseline: middle;
      pointer-events: none;
      text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    }

    .zone-label-small {
      font-family: 'JetBrains Mono', monospace;
      font-size: 9px;
      fill: #e5e5e5;
      text-anchor: middle;
      dominant-baseline: middle;
      pointer-events: none;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    }

    .shot-line {
      fill: none;
      stroke-width: 1.5;
      opacity: 0.7;
    }

    .shot-made {
      stroke: var(--accent);
    }

    .shot-miss {
      stroke: #555;
      stroke-dasharray: 2 2;
    }

    .shot-dot {
      stroke: none;
    }

    .shot-dot.made {
      fill: var(--accent);
    }

    .shot-dot.miss {
      fill: #555;
    }

    .shot-ball {
      fill: var(--accent);
      filter: drop-shadow(0 0 4px rgba(255, 184, 0, 0.6));
      transition: none;
    }

    .shot-ball.miss-ball {
      fill: #888;
      filter: drop-shadow(0 0 3px rgba(136, 136, 136, 0.4));
    }

    .play-btn {
      background: var(--accent);
      color: var(--bg);
      font-family: 'Bebas Neue', sans-serif;
      letter-spacing: 0.1em;
      padding: 12px 24px;
      font-size: 16px;
      border: none;
      cursor: pointer;
      transition: all 0.2s;
      width: 100%;
    }

    .play-btn:hover {
      filter: brightness(1.1);
    }

    .play-btn:disabled {
      background: var(--border);
      color: var(--text-dim);
      cursor: not-allowed;
    }

    /* ===== Team Color Header ===== */
    .team-header-glow {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 220px;
      pointer-events: none;
      z-index: 0;
      opacity: 0.18;
      background: radial-gradient(ellipse at 30% 10%, var(--team-color1) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 60%, var(--team-color2, var(--team-color1)) 0%, transparent 50%);
    }

    /* ===== Legend ===== */
    .legend-dot {
      display: inline-block;
      width: 12px;
      height: 12px;
      margin-right: 6px;
      vertical-align: middle;
    }

    /* ===== Small Player Card ===== */
    .mini-card {
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      padding: 16px;
      position: relative;
      cursor: pointer;
      transition: border-color 0.2s, background 0.2s;
    }

    .mini-card:hover {
      border-color: var(--accent);
      background: #1a1a1a;
    }

    .mini-card .add-btn {
      position: absolute;
      top: 16px;
      right: 16px;
      width: 32px;
      height: 32px;
      border: 1px solid var(--border);
      background: var(--bg);
      color: var(--text-dim);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      cursor: pointer;
      transition: all 0.2s;
      z-index: 10;
    }

    .mini-card .add-btn:hover:not(:disabled) {
      border-color: var(--accent);
      color: var(--accent);
    }

    .mini-card .add-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    /* ===== Compare Slots ===== */
    .compare-slot {
      background: var(--bg-elevated);
      border: 1px dashed var(--border);
      height: 80px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 16px;
    }

    .compare-slot.filled {
      border: 1px solid var(--accent);
      border-style: solid;
    }

    .remove-btn {
      color: var(--text-dim);
      cursor: pointer;
      font-size: 12px;
      text-decoration: underline;
      font-family: 'JetBrains Mono', monospace;
    }

    .remove-btn:hover {
      color: var(--cold);
    }

    .back-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--text-dim);
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      cursor: pointer;
      margin-bottom: 20px;
      transition: color 0.2s;
    }

    .back-btn:hover {
      color: var(--accent);
    }

    /* ===== Compare Page ===== */
    .tug-row {
      display: grid;
      grid-template-columns: 1fr 70px 1fr;
      align-items: center;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }

    .tug-side {
      transition: opacity 0.3s, filter 0.3s;
    }

    .tug-side.loser {
      opacity: 0.35;
      filter: grayscale(100%) brightness(0.8);
    }

    .winner-badge {
      font-family: 'JetBrains Mono', monospace;
      font-size: 9px;
      padding: 2px 4px;
      border-radius: 2px;
      display: inline-block;
      margin-top: 4px;
      line-height: 1;
      opacity: 0;
      transform: scale(0.85);
    }
    
    .compare-tape-row.is-visible .winner-badge {
      animation: badgePop 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .winner-badge.win-a {
      background: rgba(255, 184, 0, 0.2);
      color: var(--accent);
    }

    .winner-badge.win-b {
      background: rgba(0, 229, 255, 0.2);
      color: #00E5FF;
    }

    .winner-badge.even {
      background: rgba(255, 255, 255, 0.1);
      color: var(--text-dim);
    }

    .tug-value {
      font-family: 'JetBrains Mono', monospace;
      font-size: 14px;
      margin-bottom: 4px;
    }

    .tug-bar-wrap {
      height: 6px;
      background: var(--border);
      position: relative;
      width: 100%;
      overflow: hidden;
    }

    .tug-bar-fill {
      height: 100%;
      position: absolute;
      top: 0;
      transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .tug-bar-fill.left {
      right: 0;
      background: var(--accent);
    }

    .tug-bar-fill.right {
      left: 0;
      background: #00E5FF;
    }

    .compare-tab {
      flex: 1;
      text-align: center;
      padding: 12px 0;
      font-family: 'Bebas Neue', sans-serif;
      font-size: 18px;
      letter-spacing: 0.05em;
      color: var(--text-dim);
      border-bottom: 2px solid var(--border);
      cursor: pointer;
      transition: all 0.2s;
    }

    .compare-tab.active-a {
      color: var(--accent);
      border-bottom-color: var(--accent);
    }

    .compare-tab.active-b {
      color: #00E5FF;
      border-bottom-color: #00E5FF;
    }

    /* ===== Compare Entry Animations ===== */
    .compare-player-a {
      animation: slideInLeftCompare 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
      opacity: 0;
      transform: translateX(-24px);
    }
    .compare-player-b {
      animation: slideInRightCompare 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
      opacity: 0;
      transform: translateX(24px);
    }
    .compare-vs {
      animation: popInCompare 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
      opacity: 0;
      transform: scale(0.8);
    }

    @keyframes slideInLeftCompare {
      to { opacity: 1; transform: translateX(0); }
    }
    @keyframes slideInRightCompare {
      to { opacity: 1; transform: translateX(0); }
    }
    @keyframes popInCompare {
      50% { transform: scale(1.08); opacity: 1; }
      100% { opacity: 1; transform: scale(1); }
    }

    /* ===== Compare Tape Stagger ===== */
    .compare-tape-row {
      opacity: 0;
      transform: translateY(10px);
    }
    .compare-tape-row.is-visible {
      animation: tapeRowSlideUp 0.5s ease-out forwards;
      animation-delay: var(--delay);
    }

    @keyframes tapeRowSlideUp {
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes badgePop {
      50% { transform: scale(1.08); opacity: 1; }
      100% { transform: scale(1); opacity: 1; }
    }

    /* ===== Pulse Glow Once ===== */
    @keyframes pulseGlowA {
      0% { box-shadow: 0 0 0px var(--accent); }
      50% { box-shadow: 0 0 15px var(--accent); }
      100% { box-shadow: 0 0 0px var(--accent); }
    }
    @keyframes pulseGlowB {
      0% { box-shadow: 0 0 0px #00E5FF; }
      50% { box-shadow: 0 0 15px #00E5FF; }
      100% { box-shadow: 0 0 0px #00E5FF; }
    }

    .compare-tape-row.is-visible .pulse-a.winner .tug-bar-fill.left {
      animation: pulseGlowA 0.8s ease-out forwards;
      animation-delay: calc(var(--delay) + 300ms);
    }
    .compare-tape-row.is-visible .pulse-b.winner .tug-bar-fill.right {
      animation: pulseGlowB 0.8s ease-out forwards;
      animation-delay: calc(var(--delay) + 300ms);
    }

    /* ===== Shot Zones Transition ===== */
    #compareShotChartContainer {
      transition: opacity 0.15s ease-in-out;
    }
    #compareShotChartContainer.fade-out {
      opacity: 0;
    }

    /* ===== Reduced Motion ===== */
    @media (prefers-reduced-motion: reduce) {
      * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
    }
