/* ========================================
   EH.lol - Comprehensive Stylesheet
   ======================================== */

/* CSS Variables — EH In-Game UI Theme */
:root {
  /* Backgrounds */
  --bg: #0d0f14;
  --bg-card: rgba(18, 21, 30, 0.95);
  --bg-card-hover: rgba(22, 26, 36, 0.98);
  --bg-panel: rgba(16, 19, 27, 0.90);
  --bg-tile: rgba(13, 16, 23, 0.85);

  /* EH Brand Colors */
  --eh-green: #22c55e;
  --eh-green-dark: #16a34a;
  --eh-orange: #f97316;
  --eh-orange-dark: #ea6000;
  --eh-blue: #3b82f6;
  --eh-blue-dark: #2563eb;
  --eh-red: #ef4444;
  --eh-purple: #a78bfa;

  /* Primary accent — EH orange */
  --accent: #f97316;
  --accent-dim: rgba(249, 115, 22, 0.12);
  --accent-glow: rgba(249, 115, 22, 0.35);

  /* Text */
  --text-main: #f1f5f9;
  --text-dim: #94a3b8;
  --text-muted: #475569;

  /* Fonts */
  --mono: 'Nunito', system-ui, sans-serif;
  --display: 'Nunito', system-ui, sans-serif;

  /* Shape */
  --radius: 12px;
  --radius-lg: 16px;

  /* Borders */
  --border: 1px solid rgba(255, 255, 255, 0.09);
  --border-bright: 1px solid rgba(255, 255, 255, 0.18);

  /* Shadows */
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.65);

  /* Glass */
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: 1px solid rgba(255, 255, 255, 0.09);
}

/* Base Styles */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  background: #0d0f14;
  color: var(--text-main);
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.5;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.loaded {
  opacity: 1;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  background: rgba(10, 12, 17, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 4px 24px rgba(0,0,0,0.4);
}

.logo {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-box {
  background: var(--accent);
  color: #fff;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.header-icon {
  height: 40px;
  width: auto;
  display: block;
}

.live-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.11);
  transition: background 0.15s, border-color 0.15s;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-stats:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.20);
  color: var(--text-main);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--eh-green);
  box-shadow: 0 0 6px var(--eh-green);
  flex-shrink: 0;
  animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
}

.hamburger-menu span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  transition: all 0.3s;
}

/* Hero Section */
.hero {
  padding: 60px 0 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-family: var(--display);
  font-size: 52px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 20%, var(--eh-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 28px;
  letter-spacing: 0.01em;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent 0%, #0d0f14 100%);
  pointer-events: none;
}

/* Stats Bar */
.stats-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 28px 0;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  padding: 9px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.stat-pill:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

.stat-pill-value {
  font-weight: 900;
  font-size: 16px;
  color: #fff;
}

.stat-pill-icon { margin-right: 2px; }

.stat-pill-green { border-color: rgba(34,197,94,0.28); }
.stat-pill-green .stat-pill-value { color: var(--eh-green); }
.stat-pill-green:hover { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.45); }

.stat-pill-blue { border-color: rgba(59,130,246,0.28); }
.stat-pill-blue .stat-pill-value { color: var(--eh-blue); }
.stat-pill-blue:hover { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.45); }

.stat-pill-orange { border-color: rgba(249,115,22,0.28); }
.stat-pill-orange .stat-pill-value { color: var(--eh-orange); }
.stat-pill-orange:hover { background: rgba(249,115,22,0.08); border-color: rgba(249,115,22,0.45); }

/* What's New Section */
.whats-new {
  max-width: 780px;
  margin: 0 auto 36px;
}

.whats-new-toggle {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-left: 3px solid var(--eh-green);
  padding: 14px 20px;
  border-radius: var(--radius);
  color: var(--text-main);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}

.whats-new-toggle:hover {
  background: rgba(255,255,255,0.07);
}

.whats-new-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}

.whats-new-chevron {
  margin-left: auto;
  transition: transform 0.3s;
}

.whats-new-toggle.active .whats-new-chevron {
  transform: rotate(180deg);
}

.whats-new-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.whats-new-content.active {
  max-height: 500px;
}

.changelog-item {
  padding: 16px 24px;
  border-left: 4px solid transparent;
  margin-top: 8px;
}

.changelog-date {
  font-family: var(--display);
  font-weight: 700;
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.changelog-text {
  color: var(--text-dim);
  font-size: 14px;
}

/* Category Tabs - defined in enhancements block below */

/* Search Bar */
.search-bar {
  max-width: 500px;
  margin: 0 auto 32px;
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--glass);
  border: var(--glass-border);
  color: #fff;
  padding: 14px 20px 14px 48px;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 34, 68, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 16px;
  pointer-events: none;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-size: 16px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 80px;
}

/* Cards */
.card {
  background: rgba(18, 21, 30, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 3px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 22px 22px 18px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.card[data-category="game"]  { border-left-color: var(--eh-orange); }
.card[data-category="tool"]  { border-left-color: var(--eh-green); }
.card[data-category="stats"] { border-left-color: var(--eh-blue); }
.card[data-category="guide"] { border-left-color: var(--eh-blue); }

.card.hidden {
  display: none;
}

.card:hover {
  transform: translateY(-2px);
  background: rgba(22, 25, 35, 0.98);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}

.card[data-category="game"]:hover  { border-left-color: var(--eh-orange); box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(249,115,22,0.15); }
.card[data-category="tool"]:hover  { border-left-color: var(--eh-green);  box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(34,197,94,0.15); }
.card[data-category="stats"]:hover { border-left-color: var(--eh-blue);   box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.15); }
.card[data-category="guide"]:hover { border-left-color: var(--eh-blue);   box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.15); }

.card:active { transform: translateY(-1px) scale(0.995); }

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(255,255,255,0.12);
  padding: 3px 9px;
  border-radius: 5px;
  margin: 14px 20px 0;
  align-self: flex-start;
}

.card-tag.tag-game   { background: var(--eh-orange); }
.card-tag.tag-tool   { background: var(--eh-green); }
.card-tag.tag-stats  { background: var(--eh-blue); }
.card-tag.tag-guide  { background: var(--eh-blue); }
.card-tag.tag-owner  { background: var(--eh-red); }

.card h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.card p {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.55;
  flex-grow: 1;
  margin-bottom: 16px;
}

.card-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  color: var(--text-dim);
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  align-self: flex-start;
}

.card[data-category="game"]:hover .card-btn  { background: rgba(249,115,22,0.15); border-color: rgba(249,115,22,0.45); color: var(--eh-orange); }
.card[data-category="tool"]:hover .card-btn  { background: rgba(34,197,94,0.12);  border-color: rgba(34,197,94,0.40);  color: var(--eh-green); }
.card[data-category="stats"]:hover .card-btn,
.card[data-category="guide"]:hover .card-btn { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.40); color: var(--eh-blue); }

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modals */
.modal-overlay, #modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.modal-overlay.active {
  opacity: 1;
}

.modal, .modal-content {
  background: rgba(14, 17, 25, 0.97);
  border: 1px solid rgba(255,255,255,0.11);
  border-top: 4px solid var(--eh-orange);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 36px;
  margin: auto;
  box-shadow: 0 24px 72px rgba(0,0,0,0.75);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-breadcrumb {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(90deg);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #161b22 25%, #1e242c 50%, #161b22 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 16px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: rgba(18,21,30,0.97);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 14px 18px;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: all;
  transform: translateX(400px);
  animation: slideInToast 0.3s ease forwards;
}

.toast.hiding {
  animation: slideOutToast 0.3s ease forwards;
}

@keyframes slideInToast {
  to { transform: translateX(0); }
}

@keyframes slideOutToast {
  to { transform: translateX(400px); opacity: 0; }
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-message {
  flex-grow: 1;
  font-size: 14px;
  color: var(--text-main);
}

.toast.success { border-left: 3px solid var(--eh-green); }
.toast.error   { border-left: 3px solid var(--eh-red); }
.toast.info    { border-left: 3px solid var(--eh-blue); }

/* Keyboard Shortcuts Helper */
.shortcuts-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 40px;
  height: 40px;
  background: var(--glass);
  border: var(--glass-border);
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all 0.3s;
}

.shortcuts-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

.shortcuts-popup {
  position: fixed;
  bottom: 80px;
  left: 24px;
  background: var(--bg-card);
  border: var(--border);
  border-radius: 12px;
  padding: 20px;
  z-index: 1001;
  min-width: 280px;
  box-shadow: var(--shadow-md);
  display: none;
}

.shortcuts-popup.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.shortcuts-popup h4 {
  font-family: var(--display);
  font-size: 16px;
  color: #fff;
  margin-bottom: 16px;
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.shortcut-item:last-child {
  border-bottom: none;
}

.shortcut-key {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.shortcut-desc {
  font-size: 13px;
  color: var(--text-dim);
}

/* Common Components */
.input-group {
  margin-bottom: 20px;
}

input, select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.11);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

input:focus, select:focus {
  border-color: var(--eh-blue);
  background: rgba(255,255,255,0.08);
}

select option { background: #0d0f14; color: #fff; }

.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 9999px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--display);
  font-size: 14px;
  transition: filter 0.15s, transform 0.1s;
  letter-spacing: 0.02em;
}

.btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.97);
  filter: brightness(0.95);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-dim);
  padding: 10px 20px;
  border-radius: 9999px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--display);
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}

/* Accessibility */
*:focus-visible {
  outline: 2px solid var(--eh-blue);
  outline-offset: 3px;
}

button, a, .card {
  -webkit-tap-highlight-color: transparent;
}

/* Footer */
footer {
  padding: 48px 0 36px;
  border-top: 1px solid rgba(255,255,255,0.07);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-section h4 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.footer-section p {
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: #9ca3b0;
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
  font-size: 14px;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Graph */
.stats-chart-container {
  width: 100%;
  height: 320px;
  margin-bottom: 24px;
  position: relative;
  min-height: 320px;
}

.graph-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.graph-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.graph-area {
  fill: url(#graph-gradient);
  opacity: 0.3;
}

.graph-point {
  fill: var(--accent);
  stroke: var(--bg-card);
  stroke-width: 2;
}

.graph-axis {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.graph-label {
  font-size: 10px;
  fill: var(--text-muted);
  font-family: var(--mono);
}

/* HamburgGuessr Styles */
.hg-menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.hg-mode-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hg-mode-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hg-mode-btn.active {
  background: rgba(255, 34, 68, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.hg-mode-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.hg-countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 100;
  flex-direction: column;
  border-radius: 8px;
}

.hg-countdown-num {
  font-family: var(--display);
  font-size: 80px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(255, 34, 68, 0.5);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.hg-image-wrap {
  position: relative;
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
  border-radius: 8px;
  margin: 10px 0;
  border: var(--border);
}

.hg-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.hg-map-phase-label {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  text-align: center;
  margin: 10px 0;
}

.hg-round-scores {
  display: flex;
  gap: 4px;
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0;
}

.hg-round-score-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.hg-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 34, 68, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 10px 20px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.hg-share-btn:hover {
  background: rgba(255, 34, 68, 0.2);
}

.hg-result-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding: 20px;
  background: var(--glass);
  border: var(--glass-border);
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}

/* Map Trivia Styles */
.mt-map-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin: 20px 0;
  border: var(--border);
}

.mt-map-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: crosshair;
}

.mt-marker {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.mt-marker-guess {
  background: var(--accent);
}

.mt-marker-correct {
  background: #00ff88;
}

.mt-distance-line {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mt-timer {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}

.mt-status {
  font-size: 14px;
  color: var(--text-dim);
}

.mt-prompt {
  margin: 15px 0;
  font-size: 18px;
  text-align: center;
}

.mt-prompt-name {
  font-weight: 800;
  color: #fff;
  border-bottom: 2px solid var(--accent);
}

/* Trivia Styles */
.trv-q {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
}

.trv-ans {
  width: 100%;
  background: #161b22;
  border: var(--border);
  color: #fff;
  padding: 16px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
  font-family: var(--mono);
}

.trv-ans:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateX(4px);
}

.trv-ans.correct {
  background: rgba(0, 255, 136, 0.1) !important;
  border-color: #00ff88 !important;
  color: #00ff88;
}

.trv-ans.wrong {
  background: rgba(255, 34, 68, 0.1) !important;
  border-color: var(--accent) !important;
  color: var(--accent);
}

.trv-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}

.trv-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 100%;
  transition: width 0.1s linear;
}

/* Modern Tuning Styles */
.tuning-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 20px;
  flex-wrap: wrap;
}

.tuning-title-group h2 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.tuning-title-group p {
  color: var(--text-dim);
  font-size: 14px;
}

.tuning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
  animation: fadeIn 0.4s ease-out;
}

.tuning-card {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.tuning-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 34, 68, 0.1);
}

.tuning-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: #000;
  overflow: hidden;
}

.tuning-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tuning-card:hover .tuning-card-img {
  transform: scale(1.05);
}

.tuning-card-info {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tuning-card-name {
  font-weight: 700;
  color: #fff;
  font-size: 16px;
  margin-bottom: 8px;
  font-family: var(--display);
}

.tuning-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tuning-card-price {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
}

.tuning-card-cat {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.tuning-search-wrap {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  background: var(--glass);
  padding: 8px;
  border-radius: 16px;
  border: var(--glass-border);
}

.tuning-search-input {
  flex: 1;
  min-width: 200px;
  background: transparent !important;
  border: none !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
}

.tuning-sort-select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--mono);
  cursor: pointer;
  outline: none;
}

.tuning-sort-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 34, 68, 0.08);
}

.tuning-sort-select option {
  background: #0b0f14;
  color: #fff;
}

.tuning-filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tuning-filter-scroll::-webkit-scrollbar {
  display: none;
}

.tuning-filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  padding: 8px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}

.tuning-filter-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.tuning-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(255, 34, 68, 0.3);
}

/* Workshop Redesign */
.workshop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  animation: slideDown 0.4s ease-out;
}

.workshop-wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
  animation: fadeIn 0.5s ease-out;
}

.workshop-visual {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.workshop-img-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: var(--border-bright);
  box-shadow: var(--shadow-md);
  background: #000;
  aspect-ratio: 16/10;
}

.workshop-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tuning-stats-dashboard {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tuning-stat-card {
  background: var(--glass);
  padding: 20px;
  border-radius: 16px;
  border: var(--glass-border);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}

.tuning-stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0.5;
}

.tuning-stat-card:hover {
  transform: scale(1.02);
}

.tuning-stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 8px;
}

.tuning-stat-value {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  font-family: var(--display);
}

.workshop-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-group-title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.tuning-slider-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 20px;
  border: var(--border);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.tuning-slider-card:focus-within {
  border-color: var(--accent-glow);
  box-shadow: 0 0 0 4px rgba(255, 34, 68, 0.05);
}

.slider-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}

.slider-name {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.slider-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.slider-lvl-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 900;
  font-size: 12px;
  font-family: var(--mono);
}

.slider-price-tag {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.custom-slider-wrap {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
}

.tuning-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  outline: none;
  border: none;
  cursor: pointer;
}

.tuning-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  border: 4px solid var(--accent);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 15px rgba(255, 34, 68, 0.4);
}

.tuning-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(255, 34, 68, 0.6);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  margin-top: 8px;
}

.tick {
  width: 2px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.tick.active {
  background: var(--accent);
}

.gp-lock-overlay {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 34, 68, 0.1));
  border-radius: 0 4px 4px 0;
  border-left: 2px dashed rgba(255, 34, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gp-lock-text {
  font-size: 9px;
  font-weight: 900;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: rotate(-90deg);
  white-space: nowrap;
}

.variant-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.variant-chip {
  background: var(--glass);
  border: var(--glass-border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}

.variant-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.variant-chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: #fff;
}

.variant-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.tuning-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
  animation: fadeIn 0.4s ease-out;
}

.compare-card {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: transform 0.3s;
}

.compare-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-glow);
}

.compare-card h4 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.compare-stat {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 6px;
}

.compare-stat span:first-child {
  color: var(--text-dim);
  font-weight: 600;
}

.compare-stat span:last-child {
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
}

.compare-remove {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 14px;
  transition: all 0.2s;
}

.compare-remove:hover {
  background: var(--accent);
  color: #fff;
}

.tuning-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

/* Tool-specific styles */
.ctx-guess {
  display: flex;
  align-items: center;
  background: #161b22;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.ctx-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  opacity: 0.2;
}

.ctx-word {
  z-index: 1;
  flex-grow: 1;
  font-weight: 600;
}

.ctx-rank {
  z-index: 1;
  font-weight: 800;
  margin-right: 12px;
}

/* Roblox styles */
.profile-box {
  display: flex;
  gap: 20px;
  background: #161b22;
  padding: 24px;
  border-radius: 12px;
  margin-top: 24px;
}

.profile-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #000;
}

.profile-info h4 {
  font-family: var(--display);
  font-size: 20px;
  color: #fff;
}

/* ========================================
   Analytics Card (Homepage)
   ======================================== */
.analytics-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 32px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 34, 68, 0.25);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 32px 36px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.analytics-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(255,34,68,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.analytics-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 24px rgba(255,34,68,0.12);
}

.analytics-card-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.analytics-title {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.analytics-numbers {
  display: flex;
  align-items: center;
  gap: 0;
}

.analytics-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 28px;
}

.analytics-stat-value {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.analytics-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.analytics-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.08);
  margin-right: 28px;
  flex-shrink: 0;
}

.analytics-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.analytics-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.analytics-chart-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  align-self: flex-start;
}

.analytics-trend {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
}

.analytics-trend.positive { color: #00e676; }
.analytics-trend.negative { color: var(--accent); }

.roblox-player-trend.positive { color: #00e676; }
.roblox-player-trend.negative { color: var(--accent); }

/* ========================================
   Stats Panel (Modal)
   ======================================== */
.sp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.sp-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.sp-title {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
}

.sp-view-toggle {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 4px;
  align-self: flex-start;
  margin-top: 8px;
}

.sp-view-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.04em;
}

.sp-view-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.sp-view-btn.active {
  background: var(--accent);
  color: #fff;
}

.sp-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

.sp-kpi {
  background: var(--bg-card);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sp-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sp-kpi-value {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.sp-chart-wrap {
  width: 100%;
  height: 260px;
  position: relative;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  padding: 16px;
  box-sizing: border-box;
}

.sp-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.sp-bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sp-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.sp-version-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sp-version-item {
  display: grid;
  grid-template-columns: 20px 80px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}

.sp-version-item:hover {
  background: rgba(255,255,255,0.05);
}

.sp-version-item.latest {
  background: rgba(255,34,68,0.06);
  border-color: rgba(255,34,68,0.2);
}

.sp-version-badge {
  font-size: 14px;
  color: var(--accent);
  text-align: center;
}

.sp-version-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.sp-version-date {
  font-size: 13px;
  color: var(--text-dim);
}

.sp-version-age {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
  text-align: right;
}

.sp-loading {
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 0;
  text-align: center;
}

#sp-chart-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.sp-chart-notice {
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}

.sp-chart-notice span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Legacy aliases still referenced in older code */
.stats-chart-container { display: none; }
.stats-grid { display: none; }
.stats-item { display: none; }
.update-timeline { display: none; }

.update-timeline {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 16px;
  max-height: 300px;
  overflow-y: auto;
}

.update-item {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
}

.update-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  left: 8px;
  bottom: -8px;
  width: 2px;
  background: var(--accent-dim);
}

.update-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 4px;
}

.update-content {
  flex: 1;
}

.update-date {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.update-desc {
  font-size: 13px;
  color: var(--text-dim);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .workshop-wrap {
    grid-template-columns: 1fr;
  }
  .workshop-visual {
    position: static;
  }
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 40px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .modal {
    padding: 24px;
  }
  .stats-details {
    grid-template-columns: 1fr;
  }
  .stats-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .stats-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 600px) {
  .tuning-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .tuning-stats-dashboard {
    grid-template-columns: 1fr;
  }
  .hamburger-menu {
    display: flex;
  }
  .live-stats {
    display: none;
  }
  .live-stats.mobile-visible {
    display: flex;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: var(--border);
    padding: 16px;
    justify-content: center;
    z-index: 99;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 32px;
  }
  .hero p {
    font-size: 16px;
  }
  .card {
    padding: 24px;
  }
  .modal {
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }
  .modal-overlay {
    padding: 0;
  }
}

/* ========================================
   Phase 1-4 Enhancement Styles
   ======================================== */

/* Hero Canvas Background */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero {
  position: relative;
  text-align: center;
  padding: 80px 0 60px;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent 0%, var(--bg) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff 0%, #ff2244 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* text-shadow removed: incompatible with -webkit-text-fill-color */
  filter: drop-shadow(0 0 30px rgba(255, 34, 68, 0.3));
  margin-bottom: 16px;
}

.hero p {
  font-size: 20px;
  font-weight: 300;
  color: var(--text-dim);
}

/* Stats Bar Pills */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 40px 0 20px;
  flex-wrap: wrap;
}

.stat-pill {
  background: var(--glass);
  border: var(--glass-border);
  backdrop-filter: blur(4px);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 14px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.3s ease;
}

.stat-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.stat-pill-value {
  color: var(--accent);
  font-weight: 700;
  margin-right: 4px;
}

/* What's New Section */
.whats-new {
  margin: 30px 0;
  background: var(--glass);
  border: var(--glass-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  overflow: hidden;
}

.whats-new-toggle {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-main);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.whats-new-toggle:hover {
  background: rgba(255, 255, 255, 0.03);
}

.whats-new-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.whats-new-chevron {
  margin-left: auto;
  transition: transform 0.3s;
}

.whats-new-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.changelog-item {
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.changelog-date {
  color: var(--accent);
  font-weight: 600;
  min-width: 80px;
}

.changelog-text {
  color: var(--text-dim);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 20px 0 16px;
  padding: 5px 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
}

.category-tabs {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.category-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.category-tab:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
}

.category-tab.active {
  background: var(--eh-green);
  color: #fff;
  font-weight: 800;
}

.search-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none;
}

#global-search {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px 7px 34px;
  border-radius: 8px;
  outline: none;
  transition: background 0.15s;
}

#global-search::placeholder {
  color: var(--text-muted);
}

#global-search:focus {
  background: rgba(255,255,255,0.04);
}


/* Card Icons - inline via HTML data attributes, no CSS content emoji */

/* Card Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.card {
  position: relative;
  overflow: hidden;
}

/* No Results Message */
#no-results {
  display: none;
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
  color: var(--text-dim);
}

#no-results::before {
  content: '🔍';
  display: block;
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Keyboard Shortcuts Panel */
.shortcuts-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-card);
  border-left: var(--border);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.shortcuts-panel.visible {
  right: 0;
}

.shortcuts-content {
  padding: 24px;
}

.shortcuts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: var(--border);
}

.shortcuts-header h3 {
  font-family: var(--display);
  font-size: 20px;
  color: #fff;
}

.shortcuts-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.shortcuts-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--glass);
  border: var(--glass-border);
  border-radius: 8px;
}

.shortcut-key {
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  min-width: 40px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.shortcut-desc {
  color: var(--text-dim);
  font-size: 13px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-notification {
  background: rgba(13, 17, 22, 0.95);
  backdrop-filter: blur(12px);
  border: var(--border-bright);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  box-shadow: var(--shadow-md);
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: all;
}

.toast-notification.visible {
  transform: translateX(0);
  opacity: 1;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-message {
  color: var(--text-main);
  font-size: 14px;
  flex: 1;
}

.toast-success {
  border-left: 4px solid #00ff88;
}

.toast-success .toast-icon {
  color: #00ff88;
}

.toast-error {
  border-left: 4px solid var(--accent);
}

.toast-error .toast-icon {
  color: var(--accent);
}

.toast-warning {
  border-left: 4px solid #ffaa00;
}

.toast-warning .toast-icon {
  color: #ffaa00;
}

.toast-info {
  border-left: 4px solid #00aaff;
}

.toast-info .toast-icon {
  color: #00aaff;
}

/* Enhanced Footer */
.site-footer {
  margin-top: 80px;
  padding: 60px 0 30px;
  border-top: var(--border);
  background: linear-gradient(to bottom, transparent 0%, rgba(13, 17, 22, 0.5) 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.footer-section p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a,
.footer-links button {
  color: var(--text-dim);
  font-size: 13px;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--mono);
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 12px;
}

/* Getting Started Guide Styles */
.guide-section {
  margin-bottom: 32px;
}

.guide-section h3 {
  font-family: var(--display);
  font-size: 18px;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-item {
  background: var(--glass);
  border: var(--glass-border);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.guide-item strong {
  color: var(--text-main);
  display: block;
  margin-bottom: 4px;
}

.guide-item kbd {
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Share Score Buttons */
.share-score-btn {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.share-score-btn:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-2px);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #161b22 25%, #1e242c 50%, #161b22 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Shortcuts Help Button in Header */
.shortcuts-help-btn {
  background: var(--glass);
  border: var(--glass-border);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shortcuts-help-btn:hover {
  background: var(--accent);
  color: #000;
  transform: scale(1.1);
}

/* Modal Enhancements */
.modal-content {
  animation: modalFadeIn 0.3s ease;
  border-top: 4px solid var(--accent);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close:hover {
  color: var(--accent);
  transform: scale(1.1);
}

/* ========================================
   Tier List Maker
   ======================================== */
.tl-drop-zone.tl-drag-over {
  background: rgba(255, 34, 68, 0.08) !important;
  border-color: rgba(255, 34, 68, 0.4) !important;
}

#tl-pool.tl-drag-over {
  background: rgba(255, 34, 68, 0.06) !important;
  border-color: rgba(255, 34, 68, 0.3) !important;
}

.tl-chip {
  transition: opacity 0.15s, transform 0.15s;
}

.tl-chip:active {
  opacity: 0.7;
  transform: scale(0.95);
  cursor: grabbing;
}

.tl-chip:hover {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ========================================
   Vehicle Compare bars
   ======================================== */
.vc-stat-bar-left {
  direction: rtl;
}

/* ========================================
   Map Explorer POI markers
   ======================================== */
#me-markers [style*="position:absolute"]:hover > div {
  transform: scale(1.3) !important;
}

/* ========================================
   Price Is Right round score bars
   ======================================== */
.hg-round-scores {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 4px;
}

.hg-round-score-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* ========================================
   Stats cards / My Stats
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.stat-box {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-box-label {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.stat-box-value {
  font-size: 20px;
  font-weight: 800;
  font-family: var(--display);
}

/* ========================================
   Card Customizer — Revamped
   ======================================== */

/* Main layout */
.cc-layout {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 20px;
  min-height: 60vh;
}

.cc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.cc-header-left h2 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2px;
}

.cc-header-left p {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

.cc-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: none;
  transition: filter 0.15s, transform 0.1s, background 0.15s;
}

.cc-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.cc-btn:active { transform: scale(0.97); }

.cc-btn--primary { background: var(--eh-green); color: #fff; }
.cc-btn--secondary { background: rgba(255,255,255,0.08); color: var(--text-dim); border: 1px solid rgba(255,255,255,0.12); }
.cc-btn--secondary:hover { background: rgba(255,255,255,0.12); color: #fff; }
.cc-btn--danger { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.cc-btn--danger:hover { background: rgba(239,68,68,0.25); }
.cc-btn--sm { padding: 5px 12px; font-size: 11px; }

/* Card list panel */
.cc-card-list-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 62vh;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.cc-card-list-panel::-webkit-scrollbar { width: 4px; }
.cc-card-list-panel::-webkit-scrollbar-track { background: transparent; }
.cc-card-list-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.cc-section-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  padding: 0 4px;
}

/* Individual card row */
.cc-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(18,21,30,0.7);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.cc-card-row:hover {
  background: rgba(24,28,40,0.9);
  border-color: rgba(255,255,255,0.12);
}

.cc-card-row--selected {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.35);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.15);
}

.cc-card-row--hidden {
  opacity: 0.5;
}

.cc-card-row--hidden .cc-card-row__name {
  color: var(--text-muted);
  text-decoration: line-through;
}

.cc-card-row--reorder {
  cursor: move;
}

.cc-card-row--reorder:hover {
  border-color: var(--eh-orange);
  background: rgba(249,115,22,0.06);
}

.cc-card-row__index {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 20px;
  text-align: center;
}

.cc-card-row__name {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-card-row__badges {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.cc-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}

.cc-badge--styled { background: rgba(34,197,94,0.2); color: var(--eh-green); }
.cc-badge--hidden { background: rgba(239,68,68,0.2); color: #ef4444; }
.cc-badge--preset { background: rgba(168,85,247,0.2); color: #a855f7; }
.cc-badge--pinned { background: rgba(59,130,246,0.2); color: #3b82f6; }

.cc-card-row__usage {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 1px 7px;
  border-radius: 9999px;
  flex-shrink: 0;
  min-width: 28px;
  text-align: center;
}

.cc-card-row__drag-handle {
  color: var(--text-muted);
  font-size: 16px;
  flex-shrink: 0;
  cursor: grab;
}

.cc-card-row__actions {
  flex-shrink: 0;
}

/* Live preview panel */
.cc-preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: rgba(13,15,20,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  min-height: 300px;
}

.cc-preview-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.cc-preview-card {
  width: 100%;
  max-width: 320px;
  background: rgba(18, 21, 30, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 3px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.cc-preview-card h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.cc-preview-card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 8px;
}

.cc-preview-card__btn {
  align-self: flex-start;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  color: var(--text-dim);
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.15s;
}

.cc-preview-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px 20px;
}

.cc-preview-empty svg {
  opacity: 0.3;
  margin-bottom: 12px;
}

/* Editor panel */
.cc-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 62vh;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.cc-editor::-webkit-scrollbar { width: 4px; }
.cc-editor::-webkit-scrollbar-track { background: transparent; }
.cc-editor::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.cc-editor-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cc-editor-title__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--eh-green);
  flex-shrink: 0;
}

.cc-editor-title__name {
  color: var(--eh-green);
  font-weight: 800;
}

/* Sections in editor */
.cc-editor-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cc-editor-section__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Preset grid */
.cc-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.cc-preset-swatch {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.08);
  transition: all 0.15s;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 4px;
}

.cc-preset-swatch:hover {
  transform: scale(1.08);
  border-color: rgba(255,255,255,0.25);
}

.cc-preset-swatch--active {
  border-color: #fff;
  box-shadow: 0 0 12px rgba(255,255,255,0.2);
}

.cc-preset-swatch__label {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  text-align: center;
  line-height: 1.2;
}

/* Color inputs */
.cc-color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cc-color-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cc-color-field label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cc-color-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 4px 8px 4px 4px;
  transition: border-color 0.15s;
}

.cc-color-input-wrap:focus-within {
  border-color: rgba(255,255,255,0.2);
}

.cc-color-input-wrap input[type="color"] {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  background: transparent;
}

.cc-color-input-wrap input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.cc-color-input-wrap input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 5px;
}

.cc-color-hex {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  text-transform: uppercase;
}

/* Slider */
.cc-slider-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cc-slider-field__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cc-slider-field__label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cc-slider-field__value {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  color: var(--eh-green);
}

.cc-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  outline: none;
  border: none;
  cursor: pointer;
}

.cc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  border: 3px solid var(--eh-green);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(34,197,94,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 14px rgba(34,197,94,0.5);
}

/* Effects toggle buttons */
.cc-effects-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cc-effect-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}

.cc-effect-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.cc-effect-btn--active {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.45);
  color: var(--eh-green);
}

/* Editor action buttons */
.cc-editor-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Card customizer animations */
.cc-pulse {
  animation: ccPulseAnim 2s ease-in-out infinite;
}

@keyframes ccPulseAnim {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.2); }
  50% { box-shadow: 0 0 20px 4px rgba(34,197,94,0.15); }
}

.cc-shine {
  position: relative;
  overflow: hidden;
}

.cc-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.04) 50%,
    transparent 60%
  );
  animation: ccShineAnim 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ccShineAnim {
  0% { transform: translateX(-100%) translateY(-100%); }
  100% { transform: translateX(100%) translateY(100%); }
}

.cc-border-pulse {
  animation: ccBorderPulseAnim 2.5s ease-in-out infinite;
}

@keyframes ccBorderPulseAnim {
  0%, 100% { border-color: rgba(255,255,255,0.08); }
  50% { border-color: rgba(255,255,255,0.25); }
}

/* Widen modal when Card Customizer is open */
.modal-content:has(.cc-layout) {
  max-width: 1100px;
}

/* Responsive */
@media (max-width: 992px) {
  .cc-layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .cc-preview-panel {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 200px;
  }
}

@media (max-width: 640px) {
  .cc-layout {
    grid-template-columns: 1fr;
  }
  .cc-preview-panel {
    grid-column: auto;
    grid-row: auto;
    order: -1;
  }
  .cc-preset-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .cc-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .cc-header-actions {
    width: 100%;
  }
}

/* ========================================
   Analytics Dashboard Panel
   ======================================== */
.an-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Top Bar */
.an-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.an-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.an-tab {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.an-tab:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.an-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.an-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.an-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.an-live-dot.active {
  background: var(--eh-green);
  box-shadow: 0 0 8px var(--eh-green);
  animation: pulse-dot 2s infinite;
}

.an-live-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}

.an-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.an-btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

.an-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.an-btn-primary:hover {
  filter: brightness(1.1);
}

/* Toggle Switch */
.an-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  font-weight: 600;
}

.an-toggle input {
  display: none;
}

.an-toggle-track {
  width: 36px;
  height: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 9999px;
  position: relative;
  transition: background 0.2s;
}

.an-toggle input:checked + .an-toggle-track {
  background: var(--accent);
}

.an-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.an-toggle input:checked + .an-toggle-track .an-toggle-thumb {
  transform: translateX(16px);
}

/* Tab Content */
.an-tab-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* KPI Cards Grid */
.an-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.an-kpi {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.an-kpi-value {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.an-kpi-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.an-kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Charts Row */
.an-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

@media (max-width: 700px) {
  .an-charts-row {
    grid-template-columns: 1fr;
  }
}

.an-chart-panel {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.an-chart-wide {
  grid-column: span 1;
}

.an-chart-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.an-chart-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.an-chart-wrap {
  flex: 1;
  min-height: 200px;
  position: relative;
}

/* Breakdown Panels */
.an-breakdown-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.an-breakdown-panel {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.an-bp-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Bar Lists */
.an-bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.an-bar-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.an-bar-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.an-bar-track {
  grid-column: 1 / -1;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.an-bar-track-sm {
  height: 4px;
}

.an-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.an-bar-blue {
  background: var(--eh-blue);
}

.an-bar-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  font-family: var(--mono);
}

/* Device Grid */
.an-device-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.an-device-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.an-device-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.an-device-row {
  display: grid;
  grid-template-columns: 1fr 60px auto;
  gap: 8px;
  align-items: center;
}

.an-device-name {
  font-size: 12px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Loading & Empty States */
.an-loading-sm,
.an-empty-sm,
.an-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 20px;
  text-align: center;
}

.an-empty {
  padding: 40px;
}

.an-error {
  color: var(--eh-red);
}

/* Visitors Tab */
.an-visitor-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
}

.an-search {
  flex: 1;
  min-width: 200px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

.an-search:focus {
  border-color: var(--accent);
}

.an-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  min-width: 140px;
  cursor: pointer;
}

.an-visitor-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.an-visitor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.an-visitor-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}

.an-visitor-row:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.15);
}

.an-visitor-row.is-named {
  border-left-color: var(--eh-green);
}

.an-vr-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.an-vr-dot.online {
  background: var(--eh-green);
  box-shadow: 0 0 6px var(--eh-green);
}

.an-vr-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.an-vr-name {
  font-weight: 700;
  color: #fff;
  font-size: 14px;
}

.an-vr-id {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
}

.an-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.an-badge-name {
  background: rgba(34,197,94,0.15);
  color: var(--eh-green);
}

.an-badge-online {
  background: rgba(34,197,94,0.15);
  color: var(--eh-green);
}

.an-vr-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.an-vr-device,
.an-vr-browser {
  font-family: var(--mono);
}

.an-vr-stats {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
}

.an-vr-last-action {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

.an-vr-time {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* Events Tab */
.an-events-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
}

.an-events-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.an-event-row {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}

.an-event-row:hover {
  background: var(--bg-card-hover);
}

.an-event-type {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.an-event-green {
  background: rgba(34,197,94,0.15);
  color: var(--eh-green);
}

.an-event-orange {
  background: rgba(249,115,22,0.15);
  color: var(--eh-orange);
}

.an-event-blue {
  background: rgba(59,130,246,0.15);
  color: var(--eh-blue);
}

.an-event-dim {
  background: rgba(255,255,255,0.08);
  color: var(--text-dim);
}

.an-event-user {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.an-event-data {
  font-size: 12px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.an-event-time {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* User Detail Drawer */
.an-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1100;
}

.an-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: var(--bg-card);
  border-left: var(--border);
  z-index: 1101;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(0,0,0,0.5);
}

.an-drawer-loading {
  padding: 40px;
  text-align: center;
  color: var(--text-dim);
}

.an-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
}

.an-drawer-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.an-drawer-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.an-drawer-id {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
}

.an-drawer-close {
  background: rgba(255,255,255,0.05);
  border: none;
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.an-drawer-close:hover {
  background: var(--accent);
  color: #fff;
}

.an-drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.an-drawer-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.an-dkpi {
  text-align: center;
  padding: 16px;
  background: var(--bg-tile);
  border-radius: var(--radius);
}

.an-dkpi-v {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  font-family: var(--display);
}

.an-dkpi-l {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.an-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.an-drawer-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.an-drawer-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--bg-tile);
  border-radius: var(--radius);
}

.an-dg-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.an-dg-row span:first-child {
  color: var(--text-muted);
}

.an-dg-row span:last-child,
.an-dg-row code {
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
}

.an-fp {
  font-size: 11px;
  opacity: 0.7;
}

.an-rename-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.an-rename-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

.an-ua-details {
  font-size: 12px;
  color: var(--text-dim);
}

.an-ua-details summary {
  cursor: pointer;
  user-select: none;
}

.an-ua {
  display: block;
  margin-top: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
  font-family: var(--mono);
}

.an-drawer-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.an-feed-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-tile);
  border-radius: 8px;
}

.an-feed-type {
  font-size: 13px;
  color: #fff;
}

.an-feed-time {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* Responsive */
@media (max-width: 640px) {
  .an-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .an-visitor-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .an-visitor-row .an-vr-meta,
  .an-visitor-row .an-vr-stats {
    grid-column: 1 / -1;
  }
  
  .an-event-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  
  .an-event-row .an-event-time {
    grid-column: 1 / -1;
  }
  
  .an-drawer {
    max-width: 100%;
  }
  
  .an-drawer-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   Version History Panel
   ======================================== */
.vh-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  background: var(--bg-card);
  border: var(--border);
  border-top: 3px solid var(--eh-orange);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  align-items: start;
}

.vh-hero-current {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vh-hero-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--eh-orange);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.vh-hero-version {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
}

.vh-hero-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dim);
}

.vh-hero-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.vh-hero-bullets {
  margin-top: 12px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vh-hero-bullets li {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.vh-hero-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}

.vh-stat {
  text-align: right;
}

.vh-stat-val {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
}

.vh-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.vh-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vh-item {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.vh-item:hover {
  border-color: rgba(255,255,255,0.12);
}

.vh-item.vh-major {
  border-left: 3px solid var(--eh-orange);
}

.vh-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  gap: 12px;
  cursor: pointer;
}

.vh-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.vh-ver {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.vh-item.vh-major .vh-ver {
  color: var(--eh-orange);
}

.vh-desc {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

.vh-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.vh-date {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--display);
}

.vh-gap {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.vh-expand-icon {
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.2s;
  line-height: 1;
}

.vh-item.open .vh-expand-icon {
  transform: rotate(90deg);
}

.vh-detail {
  display: none;
  padding: 0 18px 14px;
}

.vh-item.open .vh-detail {
  display: block;
}

.vh-bullets {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vh-bullets li {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.vh-show-more {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background 0.15s, color 0.15s;
  margin-top: 4px;
}

.vh-show-more:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

@media (max-width: 640px) {
  .vh-hero {
    grid-template-columns: 1fr;
  }
  .vh-hero-stats {
    flex-direction: row;
    align-items: flex-start;
  }
  .vh-stat {
    text-align: left;
  }
}

/* ========================================
   Autocomplete Dropdown
   ======================================== */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(16, 19, 27, 0.98);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  z-index: 500;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.autocomplete-dropdown::-webkit-scrollbar { width: 4px; }
.autocomplete-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: rgba(255,255,255,0.06);
}

.autocomplete-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.autocomplete-info {
  flex: 1;
  min-width: 0;
}

.autocomplete-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-user {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--display);
}

.autocomplete-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 5px;
  flex-shrink: 0;
}

.autocomplete-badge.eh-yes {
  background: rgba(34,197,94,0.15);
  color: var(--eh-green);
}

.autocomplete-badge.eh-no {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}

/* ========================================
   Card Badges (Tuning / Vehicle cards)
   ======================================== */
.card-badge {
  position: absolute;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 5px;
  pointer-events: none;
}

.card-badge.gp {
  background: rgba(167,139,250,0.85);
  color: #fff;
}

.card-badge.xp {
  background: rgba(249,115,22,0.85);
  color: #fff;
}

/* ========================================
   Workshop Title & Actions
   ======================================== */
.workshop-title {
  text-align: right;
}

.workshop-title h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.workshop-title p {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

.workshop-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.slider-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  font-weight: 500;
  line-height: 1.4;
}

/* ========================================
   Feature Request Chat System
   ======================================== */

/* Footer Request Button */
.feature-request-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, var(--eh-orange) 0%, var(--eh-orange-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 14px 24px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4), 0 0 0 1px rgba(255,255,255,0.1) inset;
  z-index: 1000;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.feature-request-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(249, 115, 22, 0.5), 0 0 0 1px rgba(255,255,255,0.15) inset;
}

.feature-request-btn:active {
  transform: translateY(0);
}

.feature-request-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  background: var(--eh-red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

/* Chat Container */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 70vh;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-welcome {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0.05) 100%);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 8px;
}

.chat-welcome h4 {
  color: var(--eh-orange);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-welcome p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* Chat Bubbles */
.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  animation: bubbleIn 0.3s ease;
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--eh-orange) 0%, var(--eh-orange-dark) 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
  font-weight: 600;
}

.chat-bubble.owner {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-left-radius: 4px;
}

.chat-bubble .timestamp {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
  display: block;
  font-weight: 500;
}

.chat-bubble.owner .sender {
  font-size: 11px;
  color: var(--eh-orange);
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Chat Input */
.chat-input-wrapper {
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 12px 18px;
  color: var(--text-main);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  outline: none;
  transition: all 0.2s;
}

.chat-input:focus {
  border-color: var(--eh-orange);
  background: rgba(255, 255, 255, 0.08);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  background: var(--eh-orange);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  background: var(--eh-orange-dark);
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

/* New Message Notification Banner */
.chat-new-banner {
  background: linear-gradient(90deg, var(--eh-orange) 0%, var(--eh-orange-dark) 100%);
  color: #fff;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: bannerPulse 2s ease infinite;
}

@keyframes bannerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* Owner Chat List (for admin card) */
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.chat-list-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-list-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.chat-list-item.unread {
  border-left: 3px solid var(--eh-orange);
  background: rgba(249, 115, 22, 0.08);
}

.chat-list-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.chat-list-info {
  flex: 1;
  min-width: 0;
}

.chat-list-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-list-preview {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.chat-list-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.chat-list-time {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-list-badge {
  min-width: 20px;
  height: 20px;
  background: var(--eh-red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* Admin Chat Thread View */
.admin-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-chat-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-chat-actions {
  display: flex;
  gap: 8px;
}

.admin-chat-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--text-main);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-chat-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.admin-chat-btn.danger {
  color: var(--eh-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.admin-chat-btn.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Empty State */
.chat-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}

.chat-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.chat-empty h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.chat-empty p {
  font-size: 13px;
  line-height: 1.5;
}
