@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

body {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== CHAT BACKGROUND ===== */
.chat-bg {
  background-color: hsl(220, 28%, 7%);
  background-image:
    radial-gradient(ellipse 70% 40% at 50% 100%, hsl(19 89% 54% / 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 10% 0%, hsl(220 50% 50% / 0.03) 0%, transparent 60%);
}

/* ===== USER MESSAGE BUBBLE ===== */
.chat-bubble-user {
  padding: 12px 16px;
  border-radius: 16px;
  background-color: hsl(220, 20%, 18%);
  color: hsl(210, 20%, 98%);
}

/* ===== DATA CARD ===== */
.data-card {
  border-radius: 12px;
  border: 1px solid hsl(220, 18%, 18% / 0.6);
  overflow: hidden;
  background: linear-gradient(145deg, hsl(220, 25%, 12%) 0%, hsl(220, 22%, 10%) 100%);
  box-shadow:
    0 2px 8px hsl(0 0% 0% / 0.3),
    0 8px 24px hsl(0 0% 0% / 0.2);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.data-card:hover {
  border-color: hsl(19 89% 54% / 0.15);
  box-shadow:
    0 2px 8px hsl(0 0% 0% / 0.3),
    0 8px 24px hsl(0 0% 0% / 0.2),
    0 0 20px hsl(19 89% 54% / 0.06);
}

/* ===== CHAT TABLE ===== */
.chat-table {
  width: 100%;
  font-size: 0.875rem;
}

.chat-table thead tr {
  border-bottom: 2px solid hsl(19 89% 54% / 0.2);
  background: linear-gradient(90deg, hsl(19 89% 54% / 0.05) 0%, transparent 50%, hsl(19 89% 54% / 0.05) 100%);
}

.chat-table thead th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(19, 89%, 54%);
}

.chat-table tbody tr {
  border-bottom: 1px solid hsl(220, 20%, 20% / 0.3);
  transition: background-color 0.15s;
}

.chat-table tbody tr:hover {
  background: hsl(19 89% 54% / 0.05);
}

.chat-table tbody td {
  padding: 10px 12px;
}

/* ===== MESSAGE ANIMATIONS ===== */
@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-animate {
  animation: message-in 0.3s ease-out forwards;
}

/* ===== THINKING INDICATOR ===== */
@keyframes thinking-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.thinking-pulse {
  animation: thinking-pulse 1.2s ease-in-out infinite;
}

.thinking-text {
  transition: opacity 0.2s ease;
}

/* ===== STREAMING CURSOR ===== */
@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.streaming-cursor::after {
  content: '\2588';
  display: inline-block;
  margin-left: 2px;
  color: hsl(19, 89%, 54%);
  animation: cursor-blink 0.8s step-end infinite;
}

/* ===== LOADING SHIMMER ===== */
@keyframes data-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.data-loading {
  background: linear-gradient(
    90deg,
    hsl(220, 20%, 18%) 0%,
    hsl(220, 15%, 55% / 0.1) 50%,
    hsl(220, 20%, 18%) 100%
  );
  background-size: 200% 100%;
  animation: data-shimmer 1.5s ease-in-out infinite;
}

/* ===== THIN SCROLLBAR ===== */
.pv-thin-scrollbar-x {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.pv-thin-scrollbar-x:hover,
.pv-thin-scrollbar-x:active {
  scrollbar-color: hsl(220, 15%, 55% / 0.3) transparent;
}
.pv-thin-scrollbar-x::-webkit-scrollbar {
  height: 4px;
}
.pv-thin-scrollbar-x::-webkit-scrollbar-track {
  background: transparent;
}
.pv-thin-scrollbar-x::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 9999px;
}
.pv-thin-scrollbar-x:hover::-webkit-scrollbar-thumb,
.pv-thin-scrollbar-x:active::-webkit-scrollbar-thumb {
  background-color: hsl(220, 15%, 55% / 0.3);
}

/* ===== DROPDOWN ===== */
.dropdown-menu {
  background-color: hsl(220, 25%, 12%);
  border: 1px solid hsl(220, 20%, 20%);
  border-radius: 8px;
  padding: 4px;
  min-width: 176px;
  box-shadow: 0 10px 38px hsl(0 0% 0% / 0.35), 0 10px 20px hsl(0 0% 0% / 0.2);
  z-index: 50;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.875rem;
  color: hsl(210, 20%, 98%);
  cursor: pointer;
  transition: background-color 0.1s;
}

.dropdown-item:hover {
  background-color: hsl(220, 20%, 18% / 0.5);
}

.dropdown-item-active {
  background-color: hsl(220, 20%, 18% / 0.5);
}

/* ===== PROMPT CHIPS ===== */
.prompt-chip {
  position: relative;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  background-color: hsl(220, 25%, 12%);
  border: 1px solid hsl(220, 18%, 18% / 0.5);
  cursor: pointer;
  user-select: none;
  color: hsl(215, 14%, 78%);
}

.prompt-chip:hover {
  background-color: hsl(220, 22%, 15%);
  border-color: hsl(19 89% 54% / 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px hsl(19 89% 54% / 0.1);
  color: hsl(210, 20%, 98%);
}

/* ===== ACTION CHIPS (parlay error recovery) ===== */
.action-chip {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  background-color: hsl(220, 25%, 12%);
  border: 1px solid hsl(220, 18%, 18% / 0.5);
  cursor: pointer;
  user-select: none;
  color: hsl(215, 14%, 78%);
}

.action-chip:hover {
  background-color: hsl(220, 22%, 15%);
  border-color: hsl(19 89% 54% / 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px hsl(19 89% 54% / 0.1);
  color: hsl(210, 20%, 98%);
}

/* ===== SIDEBAR SCROLLBAR ===== */
.sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: hsl(220, 15%, 55% / 0.2) transparent;
}
.sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}
.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background-color: hsl(220, 15%, 55% / 0.2);
  border-radius: 9999px;
}

/* ===== PANEL ANIMATIONS ===== */
@keyframes panel-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes panel-slide-out {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}
@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ===== BADGE + LEG ANIMATIONS ===== */
@keyframes badge-pop-in {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.badge-pop-in {
  animation: badge-pop-in 0.25s ease-out forwards;
}

@keyframes leg-slide-in {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
.leg-slide-in {
  animation: leg-slide-in 0.2s ease-out forwards;
}

@keyframes count-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.count-bump {
  animation: count-bump 0.3s ease-out;
}

@keyframes check-pop {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.check-pop {
  animation: check-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ===== SHOT CHART DOT ===== */
@keyframes shot-dot-in {
  from { opacity: 0; r: 0; }
  to { opacity: 1; }
}

/* ===== INPUT GLOW ===== */
.chat-input-glow:focus-within {
  box-shadow: 0 0 16px 2px hsl(19 89% 54% / 0.12);
  border-color: hsl(19 89% 54% / 0.3);
  transition: box-shadow 0.3s, border-color 0.3s;
}

/* ===== FLOATING LOGO ===== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* ===== FADE-UP (for staggered chip animation) ===== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fade-up 0.4s ease-out forwards;
  opacity: 0;
}

/* ===== SCALE IN ===== */
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.animate-scale-in {
  animation: scale-in 0.2s ease-out forwards;
}

/* ===== COURT LINE AESTHETICS (shot chart) ===== */
:root {
  --court-bg: hsl(220, 28%, 7%);
  --court-line: hsl(220, 15%, 30%);
  --court-line-dim: hsl(220, 15%, 20%);
  --shot-made: hsl(145, 70%, 45%);
  --shot-missed: hsl(0, 75%, 55%);
}
