/* 霓虹科技主题设计系统 — 终末地·图寻 */
@import url('https://resource-static.bj.bcebos.com/fonts-skill/AlibabaPuHuiTi_SemiBold.ttf');
@import url('https://resource-static.bj.bcebos.com/fonts-skill/AlibabaPuHuiTi_Regular.ttf');

@font-face {
  font-family: 'AlibabaPuHuiTi';
  src: url('https://resource-static.bj.bcebos.com/fonts-skill/AlibabaPuHuiTi_SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'AlibabaPuHuiTi';
  src: url('https://resource-static.bj.bcebos.com/fonts-skill/AlibabaPuHuiTi_Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

/* ─── CSS Variables (same as :root in the original Tailwind config) ─── */
:root {
  --radius: 1rem;
  --background: 245 40% 8%;
  --foreground: 220 20% 92%;
  --card: 245 35% 12%;
  --card-foreground: 220 20% 92%;
  --popover: 245 38% 10%;
  --popover-foreground: 220 20% 92%;
  --primary: 265 80% 65%;
  --primary-foreground: 0 0% 100%;
  --accent: 185 85% 55%;
  --accent-foreground: 245 40% 8%;
  --secondary: 245 30% 18%;
  --secondary-foreground: 220 20% 80%;
  --muted: 245 30% 16%;
  --muted-foreground: 220 15% 55%;
  --destructive: 0 70% 55%;
  --destructive-foreground: 0 0% 100%;
  --border: 265 40% 25%;
  --input: 245 35% 15%;
  --ring: 265 80% 65%;
  --sidebar-background: 245 38% 10%;
  --sidebar-foreground: 220 20% 85%;
  --sidebar-primary: 265 80% 65%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 245 30% 18%;
  --sidebar-accent-foreground: 220 20% 85%;
  --sidebar-border: 265 40% 20%;
  --sidebar-ring: 265 80% 65%;
  --gradient-primary: linear-gradient(135deg, hsl(265 80% 65%), hsl(185 85% 55%));
  --gradient-card: linear-gradient(135deg, hsl(245 35% 14%), hsl(265 30% 16%));
  --gradient-background: radial-gradient(ellipse at top, hsl(265 40% 12%) 0%, hsl(245 40% 8%) 60%);
  --shadow-card: 0 4px 24px hsl(265 80% 65% / 0.15);
  --shadow-hover: 0 8px 32px hsl(265 80% 65% / 0.35);
  --neon-glow: 0 0 20px hsl(265 80% 65% / 0.5), 0 0 40px hsl(265 80% 65% / 0.25);
  --cyan-glow: 0 0 20px hsl(185 85% 55% / 0.5), 0 0 40px hsl(185 85% 55% / 0.25);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--border)) transparent;
}
body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'AlibabaPuHuiTi', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'AlibabaPuHuiTi', 'PingFang SC', sans-serif;
  font-weight: 600;
}

/* ─── Utility classes (replacing Tailwind) ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-1 { padding-left: 4px; padding-right: 4px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-12 { padding-top: 48px; padding-bottom: 48px; }
.py-20 { padding-top: 80px; padding-bottom: 80px; }
.pt-2 { padding-top: 8px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }
.ml-2 { margin-left: 8px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.w-1\.5 { width: 6px; }
.h-full { height: 100%; }
.h-1\.5 { height: 6px; }
.mb-0\.5 { margin-bottom: 2px; }
.mb-1\.5 { margin-bottom: 6px; }
.py-0\.5 { padding-top: 2px; padding-bottom: 2px; }
.min-h-screen { min-height: 100vh; }
.min-w-0 { min-width: 0; }
.shrink-0 { flex-shrink: 0; }
.rounded { border-radius: 6px; }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.whitespace-nowrap { white-space: nowrap; }
.hidden { display: none; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: 1fr 1fr; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }
.select-none { user-select: none; }
.transition-colors { transition: color 0.15s, background-color 0.15s; }
.transition-all { transition: all 0.3s ease; }
.cursor-pointer { cursor: pointer; }
.cursor-crosshair { cursor: crosshair; }
.cursor-grab { cursor: grab; }
.opacity-40 { opacity: 0.4; }
.top-2 { top: 8px; }
.right-2 { right: 8px; }
.left-2 { left: 8px; }
.bottom-2 { bottom: 8px; }

/* ─── Color utilities ─── */
.text-foreground { color: hsl(var(--foreground)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-destructive { color: hsl(var(--destructive)); }
.text-white { color: #fff; }
.text-green-400 { color: #4ade80; }
.text-cyan-400 { color: hsl(185 85% 55%); }
.text-yellow-400 { color: hsl(45 90% 60%); }
.text-yellow-300 { color: #fde047; }
.text-red-500 { color: #ef4444; }
.bg-background { background: hsl(var(--background)); }
.bg-card { background: hsl(var(--card)); }
.bg-secondary { background: hsl(var(--secondary)); }
.bg-input { background: hsl(var(--input)); }
.bg-primary { background: hsl(var(--primary)); }
.border { border: 1px solid hsl(var(--border)); }
.border-border { border-color: hsl(var(--border)); }
.border-destructive\/30 { border-color: hsl(var(--destructive) / 0.3); }
.border-b { border-bottom: 1px solid hsl(var(--border) / 0.5); }

/* ─── Neon Theme Classes ─── */
.gradient-text {
  background-image: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.neon-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  backdrop-filter: blur(16px);
  transition: all 0.3s ease;
}
.neon-card:hover {
  border-color: hsl(var(--primary) / 0.6);
  box-shadow: var(--shadow-hover);
}
.neon-btn {
  background: var(--gradient-primary);
  box-shadow: var(--neon-glow);
  transition: all 0.3s ease;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.neon-btn:hover {
  box-shadow: 0 0 30px hsl(265 80% 65% / 0.7), 0 0 60px hsl(265 80% 65% / 0.4);
  transform: translateY(-1px);
}
.neon-btn:active {
  transform: scale(0.97);
}
.neon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.cyan-glow {
  box-shadow: var(--cyan-glow);
}
.glass-panel {
  background: hsl(var(--card) / 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid hsl(var(--border));
}

/* ─── Light Theme ─── */
[data-theme="light"] {
  --background: 240 10% 95%;
  --foreground: 240 10% 10%;
  --card: 240 10% 100%;
  --card-foreground: 240 10% 10%;
  --popover: 240 10% 98%;
  --popover-foreground: 240 10% 10%;
  --primary: 265 80% 55%;
  --primary-foreground: 0 0% 100%;
  --accent: 185 85% 40%;
  --accent-foreground: 0 0% 100%;
  --secondary: 240 10% 90%;
  --secondary-foreground: 240 10% 25%;
  --muted: 240 10% 90%;
  --muted-foreground: 240 10% 40%;
  --destructive: 0 70% 50%;
  --destructive-foreground: 0 0% 100%;
  --border: 265 40% 70%;
  --input: 240 10% 92%;
  --ring: 265 80% 55%;
  --sidebar-background: 240 10% 97%;
  --sidebar-foreground: 240 10% 15%;
  --sidebar-primary: 265 80% 55%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 240 10% 90%;
  --sidebar-accent-foreground: 240 10% 15%;
  --sidebar-border: 265 40% 68%;
  --sidebar-ring: 265 80% 55%;
  --gradient-primary: linear-gradient(135deg, hsl(265 80% 55%), hsl(185 85% 40%));
  --gradient-card: linear-gradient(135deg, hsl(240 10% 97%), hsl(260 20% 92%));
  --gradient-background: radial-gradient(ellipse at top, hsl(260 30% 88%) 0%, hsl(240 10% 95%) 60%);
  --shadow-card: 0 4px 24px hsl(265 30% 40% / 0.1);
  --shadow-hover: 0 8px 32px hsl(265 30% 40% / 0.2);
  --neon-glow: 0 0 20px hsl(265 80% 55% / 0.25), 0 0 40px hsl(265 80% 55% / 0.1);
  --cyan-glow: 0 0 20px hsl(185 85% 40% / 0.25), 0 0 40px hsl(185 85% 40% / 0.1);
}

/* ─── Page Background ─── */
.page-bg {
  background: var(--gradient-background);
  position: relative;
  overflow: hidden;
}
.page-bg::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(ellipse, hsl(265 80% 65% / 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.page-bg::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(ellipse, hsl(185 85% 55% / 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .page-bg::before {
  background: radial-gradient(ellipse, hsl(265 80% 65% / 0.05) 0%, transparent 70%);
}
[data-theme="light"] .page-bg::after {
  background: radial-gradient(ellipse, hsl(185 85% 55% / 0.04) 0%, transparent 70%);
}

/* ─── Z ordering ─── */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  background: transparent;
  color: hsl(var(--foreground));
  font-family: inherit;
}
.btn:hover { background: hsl(var(--secondary)); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: transparent; }
.btn-icon { padding: 8px; border-radius: 50%; }
.btn-sm { font-size: 0.75rem; padding: 4px 12px; }
.btn-lg { font-size: 1rem; padding: 12px 24px; }

/* ─── Inputs ─── */
.form-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--input));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: hsl(var(--primary)); }
.form-input:disabled { opacity: 0.5; }
.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-bottom: 4px;
  display: block;
}
.form-textarea {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--input));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
}
.form-textarea:focus { border-color: hsl(var(--primary)); }

/* ─── Select ─── */
.form-select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--input));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-select:focus { border-color: hsl(var(--primary)); }

/* ─── Checkbox ─── */
.form-checkbox {
  accent-color: hsl(var(--primary));
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

/* ─── Tabs ─── */
.tabs-list {
  display: flex;
  background: hsl(var(--secondary));
  border-radius: 8px;
  padding: 4px;
}
.tab-trigger {
  flex: 1;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: none;
  color: hsl(var(--muted-foreground));
  transition: all 0.15s;
  font-family: inherit;
}
.tab-trigger.active {
  background: hsl(var(--primary));
  color: #fff;
}
.tab-content { padding-top: 16px; }

/* ─── Modal / Dialog ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-content {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 24px;
  max-width: 42rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* ─── Difficulty Badges ─── */
.difficulty-easy   { color: hsl(150 70% 55%); border-color: hsl(150 70% 55% / 0.4); background: hsl(150 70% 55% / 0.1); }
.difficulty-medium { color: hsl(45 90% 60%);  border-color: hsl(45 90% 60% / 0.4);  background: hsl(45 90% 60% / 0.1); }
.difficulty-hard   { color: hsl(25 90% 60%);  border-color: hsl(25 90% 60% / 0.4);  background: hsl(25 90% 60% / 0.1); }
.difficulty-hell   { color: hsl(330 75% 60%); border-color: hsl(330 75% 60% / 0.4); background: hsl(330 75% 60% / 0.1); }
.diff-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}

/* ─── Map Picker ─── */
.map-outer {
  position: relative;
  user-select: none;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  touch-action: none;
}
.map-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1;
  touch-action: none;
}
.map-transform {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  width: 100%;
  height: 100%;
}
.map-image {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  object-fit: fill;
}
.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: none;
  z-index: 10;
}
.map-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.map-tool-btn {
  width: 28px;
  height: 28px;
  background: hsl(var(--card) / 0.9);
  border: 1px solid hsl(var(--border));
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  font-size: 14px;
}
.map-tool-btn:hover { color: hsl(var(--foreground)); }
.map-clear-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  background: hsl(var(--card) / 0.8);
  border: 1px solid hsl(var(--border));
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-clear-btn:hover { color: hsl(var(--foreground)); }
.map-scale-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 20;
  font-size: 10px;
  background: hsl(var(--card) / 0.8);
  border: 1px solid hsl(var(--border));
  border-radius: 4px;
  padding: 1px 6px;
  color: hsl(var(--muted-foreground));
  pointer-events: none;
}
.map-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
  z-index: 10;
  pointer-events: none;
}
.map-hint span {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--card) / 0.7);
  padding: 4px 8px;
  border-radius: 4px;
}

/* ─── Avatar ─── */
.avatar-container {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.avatar-img {
  border-radius: 50%;
  object-fit: cover;
  width: 100%;
  height: 100%;
  border: 2px solid hsl(var(--border));
  box-shadow: 0 0 8px hsl(265 80% 65% / 0.4);
}
.avatar-initial {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  background: var(--gradient-primary);
  box-shadow: 0 0 8px hsl(265 80% 65% / 0.4);
  border: 2px solid hsl(var(--primary) / 0.4);
}

/* ─── Toggle password button ─── */
.pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
}

/* ─── Animations ─── */
.home-card {
  flex: 1 1 260px;
  min-width: 240px;
  max-width: 360px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ─── Toast container ─── */
.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  animation: fadeInUp 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }

/* ─── Loading dots ─── */
.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* ─── Responsive grid ─── */
@media (min-width: 768px) {
  .md\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\\:flex-row { flex-direction: row; }
  .md\\:w-72 { width: 18rem; }
  .md\\:block { display: block; }
  .md\\:text-6xl { font-size: 3.75rem; }
  .md\\:text-xl { font-size: 1.25rem; }
  .md\\:p-6 { padding: 24px; }
  .md\\:p-8 { padding: 32px; }
  .md\\:px-8 { padding-left: 32px; padding-right: 32px; }
}

/* ─── SVG Icons (inline replacements for lucide) ─── */
.icon { display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
.icon-2xl { width: 40px; height: 40px; }

/* ─── Misc ─── */
.max-w-lg  { max-width: 32rem; }
.max-w-md  { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }
.max-h-\\[90vh\\] { max-height: 90vh; }
.min-h-\\[300px\\] { min-height: 300px; }
.bg-green-600\\/80 { background: rgba(22, 163, 74, 0.8); }
.bg-black { background: #000; }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.overflow-auto { overflow: auto; }
.file-hidden { position: absolute; width: 0; height: 0; opacity: 0; overflow: hidden; }

/* ─── Theme Toggle ─── */
.theme-toggle-btn {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 99;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}
.theme-toggle-btn:hover {
  color: hsl(var(--foreground));
  border-color: hsl(var(--primary) / 0.6);
  box-shadow: var(--shadow-hover);
}

/* ─── Question Image ─── */
.q-image {
  max-height: 200px;
  object-fit: contain;
  cursor: pointer;
  transition: opacity 0.2s;
  background: #000;
}
.q-image:hover { opacity: 0.85; }
.q-image-sm {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* ─── Body transition ─── */
body {
  transition: background 0.3s ease, color 0.3s ease;
}

/* ─── Floating Question Image ─── */
.floating-q-image {
  position: absolute;
  z-index: 30;
  user-select: none;
  touch-action: none;
}
.floating-q-img-wrap {
  width: 200px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  cursor: grab;
  transition: box-shadow 0.2s;
}
.floating-q-img-wrap:active { cursor: grabbing; }
.floating-q-img-wrap.dragging {
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  cursor: grabbing;
}
.floating-q-img-wrap img {
  width: 100%;
  height: 120px;
  max-width: 200px;
  object-fit: contain;
  display: block;
  background: #000;
  cursor: pointer;
}
.floating-q-img-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  font-size: 0.75rem;
  background: hsl(var(--card));
  border-top: 1px solid hsl(var(--border) / 0.3);
  color: hsl(var(--muted-foreground));
  cursor: grab;
}
.floating-q-img-bar.dragging { cursor: grabbing; }
.floating-q-close {
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}
.floating-q-close:hover { color: hsl(var(--foreground)); background: hsl(var(--secondary)); }

/* ─── Floating Controls Bar ─── */
.float-controls-bar {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.float-controls-bar .ctrl-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: hsl(var(--card) / 0.9);
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  padding: 6px 10px;
  backdrop-filter: blur(8px);
}
.float-nav-dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.float-submit-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: var(--neon-glow);
  white-space: nowrap;
}
.float-submit-btn:hover { box-shadow: 0 0 30px hsl(265 80% 65% / 0.7); }
.float-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.float-skip-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid hsl(var(--destructive) / 0.4);
  cursor: pointer;
  background: transparent;
  color: hsl(var(--destructive));
  transition: all 0.2s;
  white-space: nowrap;
}
.float-skip-btn:hover { background: hsl(var(--destructive) / 0.1); }

/* ─── Floating Player List (CompRoom) ─── */
.float-player-list {
  position: absolute;
  z-index: 25;
  background: hsl(var(--card) / 0.9);
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 10px;
  backdrop-filter: blur(8px);
  min-width: 160px;
  max-width: 220px;
  font-size: 0.75rem;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.float-player-list:active { cursor: grabbing; }

/* ─── Skip Confirm Modal ─── */
.skip-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.skip-confirm-dialog {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.skip-confirm-dialog h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.skip-confirm-dialog p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 20px;
}
.skip-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ─── Image Zoom Modal ─── */
.image-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: pointer;
}
.image-zoom-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
}
.image-zoom-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.image-zoom-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.image-zoom-close:hover {
  background: hsl(var(--secondary));
}
