/* ============================================
   Chess Observer Professional Design System
   Theme: Neon Dark (Purple/Pink/Blue)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette - Deep Neon Theme */
  --bg-primary: #0F0F16;
  /* Deepest Black-Blue */
  --bg-secondary: #181824;
  /* Slightly lighter for sidebar */
  --bg-card: rgba(24, 24, 36, 0.7);
  /* Glassy card */
  --bg-elevated: #232334;
  --bg-hover: rgba(217, 70, 239, 0.1);
  /* Pink-tinted hover */

  /* Accent Colors (Neon Gradient Pawn) */
  --accent-primary: #D946EF;
  /* Fuchsia 500 */
  --accent-secondary: #8B5CF6;
  /* Violet 500 */
  --accent-gradient: linear-gradient(135deg, #D946EF 0%, #8B5CF6 100%);

  --success: #10B981;
  /* Emerald 500 */
  --warning: #F59E0B;
  /* Amber 500 */
  --danger: #EF4444;
  /* Red 500 */
  --info: #3B82F6;
  /* Blue 500 */

  /* Text Colors */
  --text-primary: #F3F4F6;
  /* Cool Gray 100 */
  --text-secondary: #9CA3AF;
  /* Cool Gray 400 */
  --text-muted: #6B7280;
  /* Cool Gray 500 */

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(217, 70, 239, 0.3);
  /* Pinkish border */

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(217, 70, 239, 0.15);
  /* Pink glow */

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  /* Vivid mesh gradient background */
  background-image:
    radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(217, 70, 239, 0.08), transparent 25%);
}

/* ============================================
   Layout & Container (Mobile First Fixes)
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 2rem;
  }
}

/* ============================================
   Header & Navigation
   ============================================ */

header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.logo-img {
  height: 140px;
  width: auto;
  filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.4));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 50px rgba(99, 102, 241, 0.6));
}

header h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 500;
}

/* Logout button - positioned top right */
#logout-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

#logout-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-highlight);
}

/* ============================================
   Cards - Glassmorphism Style
   ============================================ */

.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: var(--border-default);
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card h2::before {
  content: '';
  width: 4px;
  height: 1.25rem;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* ============================================
   Form Elements
   ============================================ */

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background: var(--bg-secondary);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
}

.field small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.field small a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.field small a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* ============================================
   Buttons - Modern with Gradients
   ============================================ */

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;

  /* Primary button style */
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Secondary button */
button.secondary,
#logout-btn,
#sync-games,
.controls button {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  box-shadow: none;
}

button.secondary:hover,
#sync-games:hover,
.controls button:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Danger button */
button.danger {
  background: var(--danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

button.danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* ============================================
   Tables - Clean Modern Style
   ============================================ */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  background: rgba(0, 0, 0, 0.3);
}

th {
  padding: 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-hover);
}

/* Table cell actions */
td button {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

/* ============================================
   Status Messages
   ============================================ */

.status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
}

.status:empty {
  display: none;
}

.status.error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status.success {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status.info {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ============================================
   Controls & Inline Elements
   ============================================ */

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.controls input[type="number"] {
  width: 100px;
  padding: 0.75rem 1rem;
}

.controls label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ============================================
   Player Status Banners
   ============================================ */

#player-status-banner {
  border-radius: var(--radius-md);
  margin: 1rem 0 1.5rem;
  animation: fadeIn 0.3s ease;
}

#player-status-banner h4 {
  font-size: 1rem;
  font-weight: 600;
}

#player-status-banner p {
  font-size: 0.875rem;
  opacity: 0.9;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Dividers
   ============================================ */

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
  margin: 0 1rem;
}

/* ============================================
   Social Login Buttons
   ============================================ */

.social-login {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-btn {
  width: 100%;
  padding: 0.875rem;
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 0.875rem;
  box-shadow: none;
}

.social-btn:hover {
  background: var(--bg-hover);
  transform: none;
}

.social-btn.google {
  border-color: #DB4437;
  color: #DB4437;
}

.social-btn.google:hover {
  background: rgba(219, 68, 55, 0.1);
}

.social-btn.apple {
  border-color: #fff;
}

.social-btn.apple:hover {
  background: rgba(255, 255, 255, 0.1);
}

.social-btn.meta {
  border-color: #1877F2;
  color: #1877F2;
}

.social-btn.meta:hover {
  background: rgba(24, 119, 242, 0.1);
}

/* ============================================
   Scrollbar Styling
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================
   Utility Classes
   ============================================ */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* ============================================
   Metric Cards (for Analysis Results)
   ============================================ */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.metric {
  background: var(--bg-elevated);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.metric strong {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.metric span,
.metric:not(:has(span)) {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }

  .card {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }

  .logo-img {
    height: 100px;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .controls input[type="number"] {
    width: 100%;
  }

  button {
    width: 100%;
  }
}

/* ============================================
   Pricing Section
   ============================================ */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.pricing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  border-color: var(--border-default);
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--accent-primary);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pricing-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
}

.pricing-amount .price {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-amount .period {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.625rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-card button {
  width: 100%;
}

.pricing-card.featured button {
  background: var(--accent-gradient);
}

/* ============================================
   Animation Keyframes
   ============================================ */

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.loading {
  animation: pulse 1.5s infinite;
}

/* ============================================
   Compact Pricing Cards (Login Page)
   ============================================ */

.pricing-grid-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pricing-card-sm {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.pricing-card-sm:hover {
  border-color: var(--border-default);
}

.pricing-card-sm.featured {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
}

.pricing-card-sm h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.pricing-card-sm .price-tag {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.pricing-card-sm .price-tag span {
  font-size: 0.75rem;
  font-weight: 400;
}

.pricing-card-sm ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-card-sm li {
  font-size: 0.6875rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
}

.mini-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  color: white;
  font-size: 0.5rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  letter-spacing: 0.1em;
}

/* ============================================
   Progress Bar (Batch Analysis)
   ============================================ */

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-header span:first-child {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.progress-header #progress-percentage {
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.progress-bar-container {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.3) 50%,
      transparent 100%);
  animation: shimmer 1.5s infinite;
  background-size: 200% 100%;
}

.progress-details {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .pricing-grid-compact {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Investigation Report
   ============================================ */

.investigation-report {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(20px);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.report-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.share-x-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #000;
  border: 1px solid #333;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.share-x-btn:hover {
  background: #1a1a1a;
  border-color: #fff;
}

/* Player Info */
.player-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.player-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.platform-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.platform-badge.lichess {
  background: rgba(78, 138, 89, 0.2);
  color: #4e8a59;
}

.platform-badge.chesscom {
  background: rgba(129, 182, 76, 0.2);
  color: #81b64c;
}

.title-badge {
  padding: 0.25rem 0.75rem;
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Risk Gauge */
.risk-gauge-container {
  margin-bottom: 1.5rem;
}

.risk-gauge {
  height: 12px;
  background: var(--bg-elevated);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.risk-gauge-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
  position: relative;
}

.risk-gauge-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
  background-size: 200% 100%;
}

.risk-gauge-marker {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 20px;
  background: #fff;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.risk-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.risk-value {
  font-weight: 700;
  font-size: 0.875rem;
}

.risk-level {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Metrics Grid */
.investigation-report .metrics-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 1.5rem;
}

.metric-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.metric-card.flagged {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.metric-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-card.flagged .metric-value {
  color: var(--danger);
}

/* Title Context */
.title-context {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Flagged Section */
.flagged-section {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

/* Analysis Dashboard & Quick Search Updates */
.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #333;
  transition: background 0.2s;
}

.search-result-item.is-running {
  background: rgba(30, 64, 175, 0.1);
  border-left: 3px solid #3b82f6;
}

.search-progress {
  width: 100%;
  height: 4px;
  background: #333;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.search-progress-fill {
  height: 100%;
  background: #3b82f6;
  transition: width 0.3s ease;
}

.live-stats {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-left: 10px;
  font-weight: normal;
}

.status-badge.running {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  animation: pulse-border 2s infinite;
}

.status-badge.queued {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

@keyframes pulse-border {
  0% {
    border-color: rgba(59, 130, 246, 0.4);
  }

  50% {
    border-color: rgba(59, 130, 246, 1.0);
  }

  100% {
    border-color: rgba(59, 130, 246, 0.4);
  }
}

/* Ensure platform dot animation works */
.platform-dot.running {
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
   App Shell & Dashboard Layout (Sidebar Refactor)
   ============================================ */

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 1rem 0.5rem;
  text-align: center;
}

.sidebar-logo {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.logout-btn:hover {
  background: rgba(239, 64, 64, 0.1);
  color: var(--danger);
  border-color: rgba(239, 64, 64, 0.4);
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 2.5rem;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
}

.content-section {
  max-width: 1000px;
  margin: 0 auto;
  animation: fade-in 0.4s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Auditor Card & Form Grid */
.auditor-card {
  padding: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
}

.primary-btn {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.secondary-btn {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.secondary-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-highlight);
}

/* Login Layout */
.login-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a0f 100%);
}

.login-container {
  width: 100%;
  max-width: 420px;
  animation: slide-up 0.5s ease-out;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-logo {
  height: 120px;
  width: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.4));
}

.login-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-hero p {
  color: var(--text-muted);
  font-weight: 500;
}

.wide-btn {
  width: 100%;
  margin-top: 1rem;
}

/* Mobile Responsiveness for Layout */
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    bottom: 0;
    z-index: 100;
    transition: left 0.3s ease;
  }

  .sidebar.open {
    left: 0;
  }
}

.flagged-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: background 0.2s ease;
}

.flagged-header:hover {
  background: var(--bg-hover);
}

.flagged-header h4 {
  margin: 0;
  font-size: 1rem;
}

.toggle-icon {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.flagged-games-list {
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

/* Flagged Game Card */
.flagged-game-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.flagged-game-card:last-child {
  margin-bottom: 0;
}

.flagged-game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.flagged-game-title {
  font-weight: 600;
  font-size: 0.875rem;
}

.flagged-game-score {
  padding: 0.25rem 0.5rem;
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.flagged-moves {
  margin-top: 0.75rem;
}

.flagged-move {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
}

.flagged-move:last-child {
  margin-bottom: 0;
}

.move-number {
  font-weight: 600;
  color: var(--accent-primary);
  min-width: 50px;
}

.move-details {
  flex: 1;
}

.move-san {
  font-weight: 600;
  color: var(--text-primary);
}

.move-reason {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.show-more-moves {
  display: block;
  width: 100%;
  padding: 0.5rem;
  background: transparent;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.show-more-moves:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.action-btn.danger {
  background: var(--danger);
  color: white;
}

.action-btn.danger:hover {
  background: #dc2626;
}

.action-btn.info {
  background: #0ea5e9;
  color: white;
}

.action-btn.info:hover {
  background: #0284c7;
}

.action-btn.secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
}

.action-btn.secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.action-btn.share {
  background: #000;
  color: #fff;
  border: 1px solid #333;
}

.action-btn.share:hover {
  background: #1a1a1a;
  border-color: #fff;
}

/* Email Draft */
.email-draft {
  margin-top: 1rem;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .investigation-report .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .player-info {
    flex-wrap: wrap;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   Analysis Dashboard
   ============================================ */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.dashboard-header h3 {
  margin: 0;
  font-size: 1rem;
}

.dashboard-header span {
  color: var(--text-muted);
  font-weight: 400;
}

/* Active Analyses Grid */
.active-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.active-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
  transition: all 0.2s ease;
}

.active-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.active-card.placeholder {
  border-style: dashed;
  text-align: center;
  padding: 2rem 1rem;
}

.active-card.placeholder p {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
}

.active-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.active-card .username {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.active-card .platform-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 0.5rem;
}

.active-card .platform-dot.lichess {
  background: #4e8a59;
}

.active-card .platform-dot.chesscom {
  background: #81b64c;
}

.active-card .platform-dot.running {
  animation: pulse 1s infinite;
}

.active-card .status-badge {
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  font-weight: 600;
}

.active-card .status-badge.running {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
}

.active-card .status-badge.queued {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.active-card .progress-row {
  margin: 0.75rem 0;
}

.active-card .progress-bar {
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.active-card .progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.active-card .progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.active-card .progress-percent {
  font-weight: 600;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.active-card .stats-row {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
}

.active-card .stat {
  color: var(--text-muted);
}

.active-card .stat strong {
  color: var(--text-primary);
}

.active-card .stat.flagged strong {
  color: var(--warning);
}

.active-card .eta {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* History Section */
.history-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
}

.history-section h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.history-item:hover {
  border-color: var(--border-default);
  background: var(--bg-hover);
}

.history-item .player-info {
  flex: 1;
  min-width: 0;
}

.history-item .player-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.history-item .player-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-item .risk-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.history-item .risk-badge.low {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.history-item .risk-badge.medium {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.history-item .risk-badge.high {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

.history-item .risk-badge.critical {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.history-item .actions {
  display: flex;
  gap: 0.5rem;
}

.history-item .small-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-item .small-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ============================================
   Quick Search
   ============================================ */

.quick-search {
  margin-bottom: 1.5rem;
}

.search-input-wrapper {
  position: relative;
}

.quick-search input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.quick-search input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.quick-search input::placeholder {
  color: var(--text-muted);
}

.search-hint {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--border-subtle);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-item .player-info {
  flex: 1;
}

.search-result-item .player-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.search-result-item .player-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-result-item .risk-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.search-no-results {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.search-no-results .analyze-btn {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

/* ============================================
   Streak Analysis Section
   ============================================ */

.streak-analysis-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: var(--radius-md);
}

.streak-analysis-section h4 {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.streak-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.streak-metric {
  flex: 1;
  min-width: 120px;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
}

.streak-metric.flagged {
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.1);
}

.streak-metric.improbable {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.streak-label {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.streak-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.streak-value.highlight {
  color: #f97316;
}

.streak-value.warning {
  color: var(--warning);
}

.streak-warning {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.8125rem;
  text-align: center;
}

/* ============================================
   COA (Certificate of Analysis) Cards
   ============================================ */

.coa-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 0.75rem 0;
}

.coa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.coa-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.coa-findings {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.coa-findings ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.coa-findings li {
  margin: 0.25rem 0;
}

.coa-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.recommendation-report {
  color: var(--danger);
}

.recommendation-investigate {
  color: var(--warning);
}

.recommendation-monitor {
  color: var(--text-muted);
}

.text-danger {
  color: var(--danger) !important;
}

.text-success {
  color: var(--success) !important;
}

/* ============================================
   Move-by-Move Visualization
   ============================================ */

.move-viz-section {
  margin: 0.75rem 0;
}

.move-viz-toggle {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  cursor: pointer;
  box-shadow: none;
}

.move-viz-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  transform: none;
}

.move-viz-container {
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.move-viz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.move-viz-header h4 {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.move-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
}

.move-stats .stat {
  background: var(--bg-elevated);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.move-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.move-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.move-bar {
  width: 24px;
  height: 32px;
  background: var(--bg-elevated);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease;
  display: flex;
  align-items: flex-end;
}

.move-bar:hover {
  transform: scale(1.2);
  z-index: 10;
}

.move-number {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  color: var(--text-muted);
}

.move-accuracy-bar {
  width: 100%;
  background: currentColor;
  border-radius: 0 0 3px 3px;
  min-height: 2px;
}

/* Move quality colors */
.move-excellent {
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
}

.move-excellent .legend-color {
  background: #10b981;
}

.move-good {
  color: #6ee7b7;
  background: rgba(110, 231, 183, 0.1);
}

.move-good .legend-color {
  background: #6ee7b7;
}

.move-okay {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.move-okay .legend-color {
  background: #fbbf24;
}

.move-poor {
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
}

.move-poor .legend-color {
  background: #f97316;
}

.move-flagged {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid var(--danger);
}

.move-flagged .legend-color {
  background: #ef4444;
}

.move-white {
  border-top: 2px solid rgba(255, 255, 255, 0.5);
}

.move-black {
  border-top: 2px solid rgba(100, 100, 100, 0.5);
}

.move-legend-hint {
  margin: 0.5rem 0 0;
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-style: italic;
}

.loading-text,
.no-data,
.error-text {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.error-text {
  color: var(--danger);
}

/* ============================================
   Mobile Responsive - Sidebar Collapse
   ============================================ */

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .app-shell {
    display: block !important;
  }

  .main-content {
    margin-left: 0;
    padding: 4rem 1rem 1rem;
  }

  /* Better touch targets */
  .nav-item {
    padding: 1rem 1.25rem;
    min-height: 48px;
  }

  button {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
  }

  .field input,
  .field select,
  .field textarea {
    padding: 0.875rem;
    font-size: 1rem;
  }

  /* Investigation report adjustments */
  .investigation-report {
    padding: 1rem;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .coa-info-grid {
    grid-template-columns: 1fr;
  }

  .move-bar {
    width: 20px;
    height: 28px;
  }

  /* Section header adjustments */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .section-header h2 {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .move-grid {
    gap: 2px;
  }

  .move-bar {
    width: 16px;
    height: 24px;
  }

  .move-number {
    display: none;
  }

  .streak-metrics {
    flex-direction: column;
  }
}

/* ============================================
   Risk Explanation Section
   ============================================ */

.risk-explanation {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border-left: 4px solid;
}

.risk-explanation h5 {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.risk-explanation ul {
  margin: 0;
  padding-left: 1.25rem;
}

.risk-explanation li {
  margin: 0.375rem 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.risk-explanation .conclusion {
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  font-weight: 500;
}

.risk-explanation.low {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success);
}

.risk-explanation.low h5 {
  color: var(--success);
}

.risk-explanation.medium {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
}

.risk-explanation.medium h5 {
  color: var(--warning);
}

.risk-explanation.high {
  background: rgba(249, 115, 22, 0.1);
  border-color: #f97316;
}

.risk-explanation.high h5 {
  color: #f97316;
}

.risk-explanation.critical {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
}

.risk-explanation.critical h5 {
  color: var(--danger);
}

/* ============================================
   Metrics Breakdown (Bar Chart)
   ============================================ */

.metrics-breakdown {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.metrics-breakdown h4 {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.metric-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.metric-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.metric-bar-label {
  min-width: 140px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.metric-bar-container {
  flex: 1;
  height: 24px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 0.5s ease;
}

.metric-bar-value {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Expandable Sections
   ============================================ */

.expandable-section {
  margin: 1rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.expandable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1rem;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: background 0.2s ease;
  font-weight: 500;
  font-size: 0.9375rem;
}

.expandable-header:hover {
  background: var(--bg-hover);
}

.expand-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.expandable-content {
  padding: 1rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

/* ============================================
   Landing Page Styles
   ============================================ */

.landing-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.landing-hero {
  text-align: center;
  padding: 3rem 0 4rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 3rem;
}

.landing-logo {
  height: 120px;
  width: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.4));
}

.landing-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.landing-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.landing-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.landing-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.landing-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

/* Feature Grid (How It Works) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}

.feature-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* What We Detect Section */
.dark-section {
  background: var(--bg-secondary);
  margin: 0 -1.5rem;
  padding: 3rem 2.5rem;
  border-radius: var(--radius-lg);
}

.detect-list {
  list-style: none;
  max-width: 600px;
  margin: 0 auto;
}

.detect-list li {
  padding: 0.875rem 0;
  font-size: 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.detect-list li:last-child {
  border-bottom: none;
}

.detect-list strong {
  color: var(--text-primary);
}

/* Pricing Card */
.pricing-card-container {
  display: flex;
  justify-content: center;
}

.pricing-card {
  background: var(--bg-card);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  position: relative;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 1.5rem 0 1rem;
}

.pricing-amount .currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pricing-amount .price {
  font-size: 4rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.pricing-amount .cents {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.pricing-amount .period {
  font-size: 1rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.pricing-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.625rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.cta-button {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.pricing-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Sign In Section */
.sign-in-section {
  border-bottom: none;
  padding-bottom: 2rem;
}

.sign-in-section .login-card {
  max-width: 400px;
  margin: 0 auto;
}

/* Landing Footer */
.landing-footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.landing-footer a {
  color: var(--accent-primary);
  text-decoration: none;
}

.landing-footer a:hover {
  text-decoration: underline;
}

/* ============================================
   Player Card Modal (Digital Baseball Card)
   ============================================ */

.player-card-content {
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  border: 1px solid var(--border-highlight);
  box-shadow: var(--shadow-glow);
  max-width: 600px;
  width: 90%;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.card-header {
  background: linear-gradient(to right, rgba(99, 102, 241, 0.1), transparent);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.player-identity h2 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.verdict-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #10b98120;
  color: #10b981;
  border: 1px solid #10b98140;
}

.verdict-badge.high-risk {
  background: #ef444420;
  color: #ef4444;
  border-color: #ef444440;
}

.verdict-badge.suspicious {
  background: #f59e0b20;
  color: #f59e0b;
  border-color: #f59e0b40;
}

.risk-score-display {
  text-align: center;
}

.risk-score-display .label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 3px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.card-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border-subtle);
  /* Gaps effect */
}

.metric-category {
  background: var(--bg-primary);
  padding: 1.5rem;
}

.metric-category.highlight {
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent);
}

.metric-category h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.metric-value {
  font-weight: 600;
  font-family: var(--font-mono);
}

.card-footer {
  padding: 1.5rem 2rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
}

.card-footer h4 {
  font-size: 0.8rem;
  color: var(--accent-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.card-footer p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* ============================================
   Landing Page Styling (Polished Overrides)
   ============================================ */

.landing-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.9;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   Landing Page Styling (Polished Overrides)
   ============================================ */

.landing-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  /* Removed invert filter - using new transparent white logo */
  opacity: 1.0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* === FORCE 3-COLUMN FEATURE GRID === */
.feature-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.5rem !important;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
  }
}



/* Mobile Spacing Fixes */
@media (max-width: 768px) {
  .landing-hero {
    margin-top: 1rem !important;
    padding: 0 1rem !important;
    min-height: auto !important;
  }
  .landing-logo {
    height: 80px !important;
    width: auto !important;
    margin-bottom: 0.5rem !important;
  }
}


/* Aggressive Mobile Layout Reset */
@media (max-width: 768px) {
    .login-layout, .landing-page {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        padding-top: 1rem !important;
        margin-top: 0 !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }
}


/* Robust Fix for Mobile Zombie App Shell */
/* Ensure App Shell is HIDDEN on landing page (logged out) even on mobile */
body:not(.logged-in) .app-shell {
    display: none !important;
}
