/* ==========================================================================
   EduSuite - Pierre Pérez Labs
   Paleta Oficial: Blanco Puro, Azul Corporativo & Amarillo Dorado
   Tema Claro (Light Mode)
   ========================================================================== */

:root {
  --bg-deep: #f0f6ff;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  
  --border-subtle: #e2e8f0;
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  /* Colores Corporativos: Azul, Blanco & Amarillo */
  --corporate-navy: #1e3a8a;
  --corporate-blue: #1d4ed8;
  --corporate-blue-light: #0284c7;
  --corporate-yellow: #eab308;
  --corporate-yellow-gold: #ca8a04;
  --corporate-yellow-light: #fef08a;

  --accent-purple: #8b5cf6;
  --accent-cyan: #0284c7;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Ambient Background Lights */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}

.glow-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16), transparent 70%);
  top: -120px;
  left: 6%;
}

.glow-2 {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.16), transparent 70%);
  bottom: -100px;
  right: 5%;
}

.bg-grid-pattern {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(29, 78, 216, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(29, 78, 216, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 0;
}

/* App Container Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar Navigation */
.sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 1px solid var(--border-subtle);
  box-shadow: 2px 0 20px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: var(--transition);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0 8px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  flex-shrink: 0;
}

.brand-logo:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: #3b82f6;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}

.brand-svg-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.brand-logo:hover .brand-svg-icon {
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.35));
}

.brand-title {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1e3a8a;
  display: block;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: #ca8a04;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.06em;
  display: block;
}

.nav-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #1e40af;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0 12px;
  margin-bottom: 10px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: #334155;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  width: 100%;
}

.nav-btn:hover {
  background: #f0f7ff;
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.2);
}

.nav-btn.active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08), inset 4px 0 0 #facc15;
}

.nav-btn-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--btn-color, #1d4ed8);
  border: 1px solid #e2e8f0;
  transition: var(--transition);
}

.nav-btn.active .nav-btn-icon-wrapper {
  background: var(--btn-color, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
  border-color: transparent;
}

.nav-btn-text {
  display: flex;
  flex-direction: column;
}

.nav-btn-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.nav-btn-desc {
  font-size: 0.74rem;
  color: #64748b;
}

.nav-btn.active .nav-btn-desc {
  color: #2563eb;
}

.nav-btn-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-purple);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  display: inline-block;
  width: fit-content;
  margin-top: 2px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.author-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.author-badge:hover {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Top Header Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 32px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.platform-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ca8a04;
  text-transform: uppercase;
}

.platform-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.top-bar-right {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.classroom-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef9c3;
  border: 1px solid #fde047;
  color: #854d0e;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(234, 179, 8, 0.12);
  height: 24px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ca8a04;
  box-shadow: 0 0 8px #eab308;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Tab Panes */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-pane.active {
  display: block;
}

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

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 30%, #facc15 70%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   VIEW 1: HUB / DASHBOARD STYLES
   ========================================================================== */

.hub-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px auto;
}

.hub-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(29, 78, 216, 0.2);
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: var(--radius-full);
  color: #fef08a;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(29, 78, 216, 0.25);
}

.hub-hero h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.15;
}

.hub-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.hub-filter-tabs {
  display: inline-flex;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: var(--radius-full);
  gap: 4px;
}

.hub-filter-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.hub-filter-btn:hover {
  color: var(--text-main);
}

.hub-filter-btn.active {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #fef08a;
  border: 1px solid rgba(250, 204, 21, 0.45);
  box-shadow: 0 2px 10px rgba(29, 78, 216, 0.4);
}

/* Grid of Cards */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.hub-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--card-accent, var(--accent-purple));
  opacity: 0.7;
}

.hub-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.hub-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hub-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-accent, var(--accent-purple));
  border: 1px solid #e2e8f0;
}

.hub-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.hub-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.hub-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex: 1;
  margin-bottom: 20px;
}

.hub-card-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.hub-card-features span {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hub-card-features i {
  width: 14px;
  height: 14px;
  color: var(--card-accent, var(--accent-purple));
}

.btn-card-launch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(29, 78, 216, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-card-launch:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: #facc15;
  color: #fef08a;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.35);
}

/* ==========================================================================
   COMMON MODULE STYLES & CONTROLS BAR
   ========================================================================== */

.module-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.module-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-right: 4px;
}

.control-btn, .tool-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.control-btn:hover, .tool-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.control-btn.active, .tool-btn.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.btn-action-primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border: 1px solid #1e40af;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-action-primary:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.btn-action-secondary {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-action-secondary:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #1d4ed8;
}

.pedagogical-hint {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.85rem;
  color: #1e3a8a;
  line-height: 1.5;
}

.pedagogical-hint i {
  color: #2563eb;
  flex-shrink: 0;
  margin-top: 2px;
}

.pedagogical-hint strong {
  color: #1d4ed8;
}

/* ==========================================================================
   MODULE 1: PIXELFORGE STYLES
   ========================================================================== */

.pixelforge-workspace {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

.palette-panel {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.palette-panel h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.color-picker-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-picker-box input[type="color"] {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
}

.preset-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.swatch:hover, .swatch.active {
  transform: scale(1.15);
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.preview-box {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sprite-preview-container {
  width: 96px;
  height: 96px;
  border: 1px dashed var(--border-subtle);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

#pf-preview-canvas {
  image-rendering: pixelated;
  width: 64px;
  height: 64px;
}

.preview-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
}

.grid-canvas-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  min-height: 420px;
}

.pixel-grid {
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  overflow: hidden;
  user-select: none;
}

.pixel-cell {
  width: 24px;
  height: 24px;
  background: #111827;
  cursor: crosshair;
  transition: background-color 0.05s;
}

.code-export-box {
  background: #090d16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.code-export-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.code-export-box pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #38bdf8;
  max-height: 180px;
  overflow-y: auto;
}

/* ==========================================================================
   MODULE 2: BEATCODER STYLES
   ========================================================================== */

/* ==========================================================================
   MODULE 2: BEATCODER PRO STYLES
   ========================================================================== */

.preset-dropdown {
  background: #ffffff;
  color: #fff;
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.preset-dropdown:hover, .preset-dropdown:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}

/* Visualizer & Ruler Header */
.bc-visualizer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  gap: 16px;
}

.bc-vis-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 200px;
}

.bc-vu-meters {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}

.vu-bar {
  width: 4px;
  height: 4px;
  background: var(--accent-cyan);
  border-radius: 2px;
  transition: height 0.08s ease, background-color 0.1s ease;
}

.bc-vu-meters.active .vu-bar:nth-child(1) { height: 16px; background: #38bdf8; }
.bc-vu-meters.active .vu-bar:nth-child(2) { height: 22px; background: #06b6d4; }
.bc-vu-meters.active .vu-bar:nth-child(3) { height: 12px; background: #a855f7; }
.bc-vu-meters.active .vu-bar:nth-child(4) { height: 18px; background: #ec4899; }
.bc-vu-meters.active .vu-bar:nth-child(5) { height: 8px; background: #10b981; }

#bc-playback-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.seq-ruler {
  display: grid;
  grid-template-columns: 200px repeat(16, 1fr);
  gap: 6px;
  flex: 1;
  align-items: center;
}

.ruler-steps {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 6px;
  text-align: center;
}

.ruler-steps span {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.ruler-steps span:nth-child(4n + 1) {
  color: var(--accent-cyan);
  font-weight: 700;
}

.beatcoder-workspace {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
}

.sequencer-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 780px;
}

.seq-track {
  display: grid;
  grid-template-columns: 200px repeat(16, 1fr);
  gap: 6px;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition);
}

.seq-track.muted {
  opacity: 0.45;
  filter: grayscale(0.6);
}

.seq-track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-right: 8px;
}

.seq-track-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-track-control {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-track-control:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.btn-track-control.mute-active {
  background: #ef4444;
  color: #fff;
  border-color: #f87171;
}

.btn-track-control.solo-active {
  background: #f59e0b;
  color: #000;
  border-color: #fbbf24;
}

.track-vol-slider {
  width: 44px;
  height: 4px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* Steps */
.seq-step {
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: transform 0.05s ease, background-color 0.15s ease;
  min-width: 24px;
  min-height: 24px;
}

.seq-step:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

/* Quarter-measure separation line */
.seq-step:nth-child(4n + 2) {
  border-left: 2px solid rgba(255, 255, 255, 0.35);
}

.seq-step.playing-head {
  outline: 2px solid #fff;
  box-shadow: 0 0 10px #fff;
  transform: scale(1.15);
}

/* Distinct Instrument Colors */
.track-kick .seq-step.active { background: #ef4444; box-shadow: 0 0 10px #ef4444; border-color: #fca5a5; }
.track-snare .seq-step.active { background: #f43f5e; box-shadow: 0 0 10px #f43f5e; border-color: #fda4af; }
.track-clap .seq-step.active { background: #f97316; box-shadow: 0 0 10px #f97316; border-color: #fdba74; }
.track-hihat .seq-step.active { background: #06b6d4; box-shadow: 0 0 10px #06b6d4; border-color: #a5f3fc; }
.track-openhat .seq-step.active { background: #38bdf8; box-shadow: 0 0 10px #38bdf8; border-color: #bae6fd; }
.track-tom .seq-step.active { background: #10b981; box-shadow: 0 0 10px #10b981; border-color: #a7f3d0; }
.track-subbass .seq-step.active { background: #eab308; box-shadow: 0 0 10px #eab308; border-color: #fef08a; }
.track-lead .seq-step.active { background: #8b5cf6; box-shadow: 0 0 10px #8b5cf6; border-color: #ddd6fe; }
.track-chiptune .seq-step.active { background: #ec4899; box-shadow: 0 0 10px #ec4899; border-color: #fbcfe8; }
.track-piano .seq-step.active { background: #6366f1; box-shadow: 0 0 10px #6366f1; border-color: #c7d2fe; }

/* DJ FX & Chants Colors */
.track-airhorn .seq-step.active { background: #f59e0b; box-shadow: 0 0 12px #f59e0b; border-color: #fde68a; }
.track-scratch .seq-step.active { background: #06b6d4; box-shadow: 0 0 12px #06b6d4; border-color: #a5f3fc; }
.track-cowbell .seq-step.active { background: #10b981; box-shadow: 0 0 12px #10b981; border-color: #a7f3d0; }
.track-subdrop .seq-step.active { background: #a855f7; box-shadow: 0 0 12px #a855f7; border-color: #e9d5ff; }
.track-siren .seq-step.active { background: #ef4444; box-shadow: 0 0 12px #ef4444; border-color: #fecaca; }
.track-laser .seq-step.active { background: #ec4899; box-shadow: 0 0 12px #ec4899; border-color: #fbcfe8; }
.track-shaker .seq-step.active { background: #14b8a6; box-shadow: 0 0 12px #14b8a6; border-color: #99f6e4; }
.track-crash .seq-step.active { background: #facc15; box-shadow: 0 0 12px #facc15; border-color: #fef08a; }
.track-vocal .seq-step.active { background: #f43f5e; box-shadow: 0 0 14px #f43f5e; border-color: #ffe4e6; }
.track-mic .seq-step.active { background: #d946ef; box-shadow: 0 0 14px #d946ef; border-color: #f5d0fe; }

.btn-track-delete {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-track-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.bc-track-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

/* Modals Overlay & Content */
.bc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.bc-modal-content {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.bc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-cyan);
}

.modal-title-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.modal-title-box p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-close-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
  border-color: #94a3b8;
}

.catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.catalog-tab-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.catalog-tab-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #94a3b8;
}

.catalog-tab-btn.active {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  padding: 20px 24px;
  overflow-y: auto;
}

.catalog-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.catalog-card:hover {
  background: #ffffff;
  border-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.12);
}

.catalog-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-card-icon {
  font-size: 1.3rem;
}

.catalog-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.catalog-card-desc {
  font-size: 0.75rem;
  color: #64748b;
  flex: 1;
}

.catalog-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-audition {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition);
}

.btn-audition:hover {
  color: #0f172a;
  background: #e2e8f0;
  border-color: #94a3b8;
}

.btn-add-track {
  flex: 1;
  background: var(--accent-cyan);
  border: none;
  color: #000;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition);
}

.btn-add-track:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* Mic Recorder Modal */
.mic-modal-box {
  max-width: 480px;
}

.mic-recorder-body {
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.mic-visualizer {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.12);
  border: 2px solid #ec4899;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mic-center-icon {
  width: 36px;
  height: 36px;
  color: #ec4899;
}

.mic-visualizer.recording .mic-pulse-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid #ec4899;
  animation: mic-pulse 1.2s infinite;
}

@keyframes mic-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.mic-status-text {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.mic-actions {
  display: flex;
  gap: 12px;
}

.mic-name-input-group {
  display: flex;
  gap: 8px;
  width: 100%;
}

.mic-name-input-group input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  outline: none;
}

/* ==========================================================================
   BEATCODER: MODE NAVIGATION & CHALLENGE / RHYTHM HERO GAME
   ========================================================================== */

.bc-mode-nav {
  display: flex;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  width: fit-content;
  align-self: center;
  margin-bottom: 8px;
}

.bc-mode-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.bc-mode-tab:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.bc-mode-tab.active {
  background: #1d4ed8;
  border: 1px solid #1e40af;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.bc-badge-highlight {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: pulse-badge 1.8s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Challenge Mode Controls Bar */
.bc-challenge-bar {
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.rhythm-keys-badge-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.key-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.key-badge.badge-c0 { border-color: #06b6d4; color: #38bdf8; }
.key-badge.badge-c1 { border-color: #ec4899; color: #f472b6; }
.key-badge.badge-c2 { border-color: #f59e0b; color: #fbbf24; }
.key-badge.badge-c3 { border-color: #10b981; color: #34d399; }

/* Challenge HUD Scoreboard */
.bc-challenge-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.5fr;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  align-items: center;
}

@media (max-width: 800px) {
  .bc-challenge-hud {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hud-stat-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.hud-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.hud-value {
  font-size: 1.25rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
}

.hud-value.combo-val {
  color: #f59e0b;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.hud-value.mult-val {
  color: #06b6d4;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.hud-value.speed-val {
  color: #ec4899;
}

.hud-feedback-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #94a3b8;
  transition: all 0.15s ease;
}

.hud-feedback-box.feedback-perfect {
  color: #38bdf8;
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.18);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
  transform: scale(1.05);
}

.hud-feedback-box.feedback-good {
  color: #34d399;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
  transform: scale(1.03);
}

.hud-feedback-box.feedback-miss {
  color: #f87171;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.18);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
  transform: scale(0.96);
}

/* Song Progress Bar */
.bc-song-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bc-song-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bc-song-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #06b6d4, #a855f7, #ec4899);
  transition: width 0.1s linear;
}

.bc-song-progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

#bc-rhythm-song-title-live {
  font-weight: 600;
  color: var(--text-muted);
}

/* Playfield & Stage */
.bc-rhythm-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: radial-gradient(circle at 50% 30%, rgba(30, 41, 59, 0.4), rgba(10, 15, 26, 0.8));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.rhythm-canvas-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(6, 182, 212, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  background: #080c14;
}

#bc-rhythm-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 4 Interactive Hit Pads */
.rhythm-hit-pads {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 600px;
}

.rhythm-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: all 0.08s ease;
}

.pad-key-capsule {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: all 0.08s ease;
}

.pad-sub-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.pad-note-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.pad-lane-hint {
  font-size: 0.65rem;
  color: var(--text-dim);
}

/* Individual pad colors */
.rhythm-pad.pad-0 { border-color: rgba(6, 182, 212, 0.3); }
.rhythm-pad.pad-0 .pad-key-capsule { background: rgba(6, 182, 212, 0.15); border-color: #06b6d4; color: #38bdf8; }
.rhythm-pad.pad-0.active, .rhythm-pad.pad-0:active {
  background: rgba(6, 182, 212, 0.28);
  border-color: #06b6d4;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.6);
  transform: translateY(2px) scale(0.97);
}

.rhythm-pad.pad-1 { border-color: rgba(236, 72, 153, 0.3); }
.rhythm-pad.pad-1 .pad-key-capsule { background: rgba(236, 72, 153, 0.15); border-color: #ec4899; color: #f472b6; }
.rhythm-pad.pad-1.active, .rhythm-pad.pad-1:active {
  background: rgba(236, 72, 153, 0.28);
  border-color: #ec4899;
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.6);
  transform: translateY(2px) scale(0.97);
}

.rhythm-pad.pad-2 { border-color: rgba(245, 158, 11, 0.3); }
.rhythm-pad.pad-2 .pad-key-capsule { background: rgba(245, 158, 11, 0.15); border-color: #f59e0b; color: #fbbf24; }
.rhythm-pad.pad-2.active, .rhythm-pad.pad-2:active {
  background: rgba(245, 158, 11, 0.28);
  border-color: #f59e0b;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
  transform: translateY(2px) scale(0.97);
}

.rhythm-pad.pad-3 { border-color: rgba(16, 185, 129, 0.3); }
.rhythm-pad.pad-3 .pad-key-capsule { background: rgba(16, 185, 129, 0.15); border-color: #10b981; color: #34d399; }
.rhythm-pad.pad-3.active, .rhythm-pad.pad-3:active {
  background: rgba(16, 185, 129, 0.28);
  border-color: #10b981;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
  transform: translateY(2px) scale(0.97);
}

/* Result Modal Styling */
.rhythm-result-modal {
  max-width: 520px;
}

.rhythm-result-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.rhythm-grade-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.rhythm-grade-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 900;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.6);
  border: 3px solid rgba(255, 255, 255, 0.4);
}

.rhythm-grade-desc {
  font-weight: 700;
  color: #f59e0b;
  font-size: 1.05rem;
}

.rhythm-stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

.rhythm-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.stat-card-val {
  font-size: 1.4rem;
  color: #fff;
  font-family: var(--font-mono);
}

.rhythm-result-breakdown {
  display: flex;
  gap: 16px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.badge-perfect { color: #38bdf8; font-weight: 700; }
.badge-good { color: #34d399; font-weight: 700; }
.badge-miss { color: #f87171; font-weight: 700; }

.rhythm-result-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   MODULE 3: GRAVITYLAB PRO STYLES (TALLER DE FÍSICA & GRAVITÓFONO)
   ========================================================================== */

/* Workshop Toolbar */
.gl-tools-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.gl-tools-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.gl-tools-label i {
  color: var(--accent-purple);
  width: 18px;
  height: 18px;
}

.gl-tool-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gl-tool-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.gl-tool-btn i {
  width: 15px;
  height: 15px;
}

.gl-tool-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #94a3b8;
}

.gl-tool-btn.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

/* Gravitófono Button */
.btn-gravitophone {
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #a7f3d0 !important;
}

.btn-gravitophone.active {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: var(--accent-emerald) !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4) !important;
}

/* Canvas Area & Floating Hint Pill */
.gravitylab-canvas-area {
  position: relative;
  background: radial-gradient(circle at 50% 50%, #070e1b 0%, #02050c 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 480px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5);
}

#gravity-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.gl-toolbar-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: #38bdf8;
  margin-left: auto;
}

.gl-toolbar-hint i {
  width: 14px;
  height: 14px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.gravity-bottom-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
  background: #ffffff;
  backdrop-filter: blur(10px);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.gravity-bottom-stats strong {
  font-family: var(--font-mono);
}

/* ==========================================================================
   MODULE 4: GEOPIXEL PRO STYLES (GEOGRAFÍA INTERACTIVA & RADAR)
   ========================================================================== */

.geo-controls-bar {
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-md);
  padding: 12px 18px;
}

.geo-mode-pills {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
}

.geo-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #334155;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.geo-mode-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.geo-mode-btn.active {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.geo-continent-buttons {
  display: flex;
  gap: 4px;
}

.geo-view-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.geo-view-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #94a3b8;
}

.geo-view-btn.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

/* GeoPixel Top HUD */
.geopixel-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.6fr;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  align-items: center;
}

@media (max-width: 900px) {
  .geopixel-hud {
    grid-template-columns: repeat(2, 1fr);
  }
}

.geo-stat-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.geo-stat-label {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.geo-stat-value {
  font-size: 1.25rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
}

.geo-stat-value.streak-glow {
  color: #f59e0b;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.geo-stat-value.timer-val {
  color: #06b6d4;
}

.geo-stat-value.rank-val {
  color: #10b981;
}

.geo-coords-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #38bdf8;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
}

.geo-coords-box i {
  color: var(--accent-cyan);
  width: 16px;
  height: 16px;
}

/* Mission Question Hero Card */
.geo-mission-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.mission-header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mission-flag-capsule {
  font-size: 3rem;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mission-text-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mission-badge {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  letter-spacing: 0.06em;
}

.mission-text-group h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.mission-text-group p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Clues Bar */
.mission-clues-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.clue-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
}

.clue-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.clue-badge i {
  width: 14px;
  height: 14px;
  color: var(--accent-amber);
}

.clue-text {
  font-weight: 600;
  color: #fff;
}

.btn-reveal-clue {
  margin-left: auto;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-reveal-clue:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #f59e0b;
}

/* Multiple Choice Trivia Buttons */
.mission-choices-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 800px) {
  .mission-choices-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.geo-choice-btn {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.geo-choice-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.geo-choice-btn.correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: var(--accent-emerald) !important;
  color: #a7f3d0 !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.geo-choice-btn.wrong {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

/* Realistic World Map Presentation */
.geopixel-map-wrapper {
  background: #040a14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8), 0 10px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.map-floating-toolbar {
  position: absolute;
  top: 32px;
  right: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  z-index: 10;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.map-tool-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.map-tool-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.map-tool-btn.active {
  color: #1d4ed8;
  background: #eff6ff;
}

.map-tool-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 2px;
}

.interactive-map-container {
  width: 100%;
  max-width: 960px;
  position: relative;
  cursor: crosshair;
}

.world-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.8);
  transition: viewBox 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Continent and Country Shapes */
.geo-continent-path {
  fill: #14243b;
  stroke: #1e3a5f;
  stroke-width: 1.5;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.theme-satellite .geo-continent-path {
  fill: #0d1b2a;
  stroke: #1b263b;
}

.theme-physical .geo-continent-path {
  fill: #16362d;
  stroke: #1e5243;
}

.geo-country-path {
  fill: #1e3a5f;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.geo-country-path:hover {
  fill: #0ea5e9 !important;
  stroke: #fff !important;
  stroke-width: 2 !important;
  filter: drop-shadow(0 0 8px #0ea5e9);
}

.geo-country-path.country-correct {
  fill: #10b981 !important;
  stroke: #a7f3d0 !important;
  stroke-width: 2.5 !important;
  filter: drop-shadow(0 0 15px #10b981);
}

.geo-country-path.country-target-hint {
  fill: rgba(245, 158, 11, 0.45) !important;
  stroke: #f59e0b !important;
  animation: pulse-target 1s infinite alternate;
}

@keyframes pulse-target {
  0% { stroke-width: 1.5; filter: drop-shadow(0 0 5px #f59e0b); }
  100% { stroke-width: 3; filter: drop-shadow(0 0 15px #f59e0b); }
}

/* Radar Rings and Target Markers */
.radar-pulse-ring {
  fill: none;
  stroke: #06b6d4;
  stroke-width: 2;
  animation: radar-pulse 1.2s infinite;
}

.radar-point-center {
  fill: #06b6d4;
}

@keyframes radar-pulse {
  0% { r: 6; opacity: 1; stroke-width: 3; }
  100% { r: 35; opacity: 0; stroke-width: 1; }
}

.target-beacon {
  animation: beacon-pulse 1s infinite alternate;
}

@keyframes beacon-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 0.3; }
}

/* Proximity Feedback Toast */
.geo-proximity-toast {
  position: absolute;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 10px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 10;
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.geo-proximity-toast.toast-exact {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.geo-proximity-toast.toast-hot {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.18);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
}

.geo-proximity-toast.toast-cold {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.18);
}

.proximity-icon {
  font-size: 1.6rem;
}

.proximity-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.proximity-info strong {
  font-size: 0.95rem;
  color: #fff;
}

.proximity-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Factsheet Learning Popup */
.geo-factsheet-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

.factsheet-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.factsheet-flag {
  font-size: 2.8rem;
}

.factsheet-header h4 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.fact-continent {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.btn-next-target {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-emerald);
  border: none;
  color: #000;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-next-target:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.factsheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 800px) {
  .factsheet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.fact-item {
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fact-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.fact-item strong {
  font-size: 0.88rem;
  color: #fff;
}

/* ==========================================================================
   MODULE 5: ESCAPEROOM MAKER STYLES
   ========================================================================== */

.escape-briefing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  gap: 20px;
}

.escape-timer-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-amber);
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.escape-header-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.escape-header-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.escape-locks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.lock-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: var(--transition);
}

.lock-card.unlocked {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.lock-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lock-icon {
  color: var(--accent-amber);
}

.lock-card.unlocked .lock-icon {
  color: #10b981;
}

.lock-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

.lock-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lock-desc code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: #fde047;
}

.lock-input-group {
  display: flex;
  gap: 8px;
}

.lock-input-group input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  outline: none;
}

.lock-input-group input:focus {
  border-color: var(--accent-amber);
}

.btn-unlock {
  background: var(--accent-amber);
  color: #000;
  border: none;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-unlock:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.lock-status {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dim);
}

.lock-card.unlocked .lock-status {
  color: #34d399;
}

.switches-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.bin-switch {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.bin-switch.active {
  background: var(--accent-amber);
  color: #000;
  box-shadow: 0 0 12px var(--accent-amber);
}

.escape-victory-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  border: 2px solid #10b981;
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
}

.victory-icon {
  width: 56px;
  height: 56px;
  color: #facc15;
  margin-bottom: 12px;
}

.victory-content h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.victory-content p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ==========================================================================
   PASSWORD QUEST: CYBERSECURITY HACKER TERMINAL & THE PASSWORD GAME
   ========================================================================== */

.pq-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pq-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.pq-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pq-shield-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-amber);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

.pq-shield-icon i {
  width: 24px;
  height: 24px;
}

.pq-title-area h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.pq-title-area p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pq-header-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pq-stat-pill {
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
}

.pq-stat-lbl {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
}

.pq-stat-num {
  font-size: 1.05rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #1d4ed8;
}

/* Terminal Card & Input */
.pq-terminal-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pq-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
}

.pq-terminal-dots {
  display: flex;
  gap: 6px;
}

.pq-terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.pq-terminal-title {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-amber);
  letter-spacing: 0.08em;
  font-weight: 600;
}

.pq-copy-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pq-copy-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #94a3b8;
}

.pq-fire-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.25), rgba(249, 115, 22, 0.25));
  border: 1.5px solid #ef4444;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fecaca;
  font-size: 0.85rem;
  animation: pqPulseFire 1.2s infinite alternate;
}

@keyframes pqPulseFire {
  0% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.3); }
  100% { box-shadow: 0 0 25px rgba(249, 115, 22, 0.6); }
}

.fire-anim {
  font-size: 1.3rem;
  animation: pqShake 0.4s infinite;
}

.pq-input-wrapper {
  position: relative;
}

.pq-password-field {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  color: #0f172a;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  line-height: 1.6;
  padding: 16px;
  resize: vertical;
  min-height: 90px;
  outline: none;
  transition: var(--transition);
  word-break: break-all;
}

.pq-password-field:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.pq-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pq-strength-text {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.pq-strength-bar {
  flex: 1;
  max-width: 250px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.pq-strength-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
  transition: width 0.3s ease;
}

/* Rules Stream */
.pq-rules-stream {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pq-rule-card {
  border-radius: var(--radius-md);
  padding: 16px 20px;
  border: 1.5px solid transparent;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.pq-rule-card.invalid {
  background: #fef2f2;
  border-color: #fca5a5;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.08);
}

.pq-rule-card.invalid.shake {
  animation: pqShake 0.4s ease;
}

@keyframes pqShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.pq-rule-card.valid {
  background: #f0fdf4;
  border-color: #86efac;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.08);
}

.pq-rule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pq-rule-num-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pq-rule-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.pq-rule-card.invalid .pq-rule-badge {
  background: #fee2e2;
  color: #dc2626;
}

.pq-rule-card.valid .pq-rule-badge {
  background: #dcfce7;
  color: #16a34a;
}

.pq-rule-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.pq-rule-status-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pq-rule-card.invalid .pq-rule-status-tag {
  color: #dc2626;
}

.pq-rule-card.valid .pq-rule-status-tag {
  color: #16a34a;
}

.pq-rule-desc {
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.5;
}

.pq-rule-widget {
  margin-top: 6px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.pq-captcha-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

#pq-captcha-canvas {
  background: #0f172a;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pq-reload-captcha-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.pq-reload-captcha-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #94a3b8;
}

.pq-chess-board-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pq-chess-svg {
  width: 130px;
  height: 130px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.pq-moon-chips, .pq-elem-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pq-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: #334155;
  cursor: pointer;
}

.pq-chip:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* Victory Modal */
.pq-victory-card {
  max-width: 540px;
  text-align: center;
  border-color: var(--accent-amber);
}

.victory-icon-box {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
}

.victory-icon-box i {
  width: 36px;
  height: 36px;
}

.pq-victory-sub {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pq-cert-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.pq-cert-header {
  background: rgba(245, 158, 11, 0.15);
  padding: 8px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-amber);
  letter-spacing: 0.1em;
}

.pq-cert-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pq-final-pw-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px;
  font-family: var(--font-mono);
  color: #38bdf8;
  word-break: break-all;
  max-height: 100px;
  overflow-y: auto;
  font-size: 0.95rem;
}

.pq-cert-stats {
  display: flex;
  justify-content: space-around;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.pq-victory-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ==========================================================================
   DIBUJA EL CÍRCULO PERFECTO (Inspirado en Neal.fun Perfect Circle)
   ========================================================================== */

.circle-game-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
}

.circle-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
}

.circle-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.circle-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.circle-title-area h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.circle-title-area p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}

.circle-mode-selector {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
}

.circle-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.circle-mode-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.circle-mode-btn.active {
  background: #1d4ed8;
  color: #ffffff;
  border: 1px solid #1d4ed8;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.circle-header-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.circle-stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: #334155;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.circle-stat-pill .stat-col {
  display: flex;
  flex-direction: column;
}

.circle-stat-pill .stat-lbl {
  font-size: 0.65rem;
  color: #64748b;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.circle-stat-pill .stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--font-mono);
}

.circle-stat-pill.highlight-gold {
  border-color: #fde047;
  background: #fefce8;
}

.circle-stat-pill.highlight-gold i,
.circle-stat-pill.highlight-gold .stat-val {
  color: #ca8a04;
}

/* Secondary Toolbar */
.circle-toolbar-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.circle-toggle-group {
  display: flex;
  gap: 8px;
}

.circle-action-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.circle-action-chip:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.circle-action-chip.active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.circle-streak-badge-container {
  display: flex;
  align-items: center;
}

.streak-indicator-tag {
  font-size: 0.8rem;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  animation: pulseGold 2s infinite ease-in-out;
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.45); }
}

/* Drawing Arena Card */
.circle-arena-card {
  position: relative;
  width: 100%;
  height: 520px;
  min-height: 480px;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 20px;
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
  touch-action: none;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

#circle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#circle-confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.circle-floating-hint {
  position: relative;
  margin: 0 auto 14px auto;
  width: fit-content;
  max-width: 90%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 8px 22px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e40af;
  pointer-events: none;
  transition: opacity 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.hint-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 8px #2563eb;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* Result Overlay */
.circle-result-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  padding: 24px;
  animation: fadeInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid #cbd5e1;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.result-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.result-score-badge {
  font-size: 4.8rem;
  font-weight: 900;
  font-family: var(--font-mono);
  line-height: 1;
  color: #16a34a;
  text-shadow: 0 0 25px rgba(22, 163, 74, 0.25);
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.result-score-badge.score-gold {
  color: #d97706;
  text-shadow: 0 0 30px rgba(217, 119, 6, 0.3);
}

.result-score-badge.score-blue {
  color: #1d4ed8;
  text-shadow: 0 0 25px rgba(29, 78, 216, 0.25);
}

.result-score-badge.score-orange {
  color: #ea580c;
  text-shadow: 0 0 25px rgba(234, 88, 12, 0.25);
}

.result-score-badge.score-red {
  color: #dc2626;
  text-shadow: 0 0 25px rgba(220, 38, 38, 0.25);
}

.result-pct {
  font-size: 2.4rem;
  opacity: 0.85;
  margin-left: 4px;
}

.result-verdict-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 6px;
}

.result-verdict-sub {
  font-size: 0.92rem;
  color: #475569;
  margin-top: 4px;
  max-width: 480px;
}

.result-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 620px;
  width: 100%;
}

.metric-chip {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.metric-chip-lbl {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.metric-chip-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--font-mono);
}

.result-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

/* ==========================================================================
   ZEN ROCKS (Inspirado en Neal.fun Rocks)
   ========================================================================== */

.rocks-game-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
}

.rocks-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
}

.rocks-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rocks-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eab308, #ca8a04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
}

.rocks-title-area h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.rocks-title-area p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}

.rocks-theme-selector {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.rocks-theme-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.rocks-theme-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.rocks-theme-btn.active {
  background: #1d4ed8;
  color: #ffffff;
  border: 1px solid #1e40af;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.rocks-header-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rocks-stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}

.rocks-stat-pill .stat-col {
  display: flex;
  flex-direction: column;
}

.rocks-stat-pill .stat-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.rocks-stat-pill .stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.rocks-stat-pill.highlight-gold {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
}

.rocks-stat-pill.highlight-gold i,
.rocks-stat-pill.highlight-gold .stat-val {
  color: #f59e0b;
}

.stability-tag {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.stability-tag.balanced {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.stability-tag.wobble {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  animation: wobblePulse 1s infinite alternate;
}

.stability-tag.fallen {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

@keyframes wobblePulse {
  from { opacity: 0.7; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.04); }
}

/* Toolbar */
.rocks-toolbar-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.rocks-action-group {
  display: flex;
  gap: 8px;
}

.rocks-action-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.rocks-action-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.rocks-action-chip.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.rocks-controls-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.rocks-controls-hint code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
  color: #fff;
  font-family: var(--font-mono);
}

/* Stage Card (Realistic Landscape Environments) */
.rocks-stage-card {
  position: relative;
  width: 100%;
  height: 520px;
  min-height: 480px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4), 0 15px 35px rgba(0, 0, 0, 0.25);
  touch-action: none;
  user-select: none;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  transition: background 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.rocks-stage-card.theme-river {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.45) 80%, rgba(15, 23, 42, 0.75) 100%),
              url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1400&q=80') center center / cover no-repeat;
}

.rocks-stage-card.theme-mountains {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.45) 80%, rgba(15, 23, 42, 0.75) 100%),
              url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=1400&q=80') center center / cover no-repeat;
}

.rocks-stage-card.theme-waterfall {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.45) 80%, rgba(15, 23, 42, 0.75) 100%),
              url('https://images.unsplash.com/photo-1433086966358-54859d0ed716?auto=format&fit=crop&w=1400&q=80') center center / cover no-repeat;
}

.rocks-stage-card.theme-sunset {
  background: linear-gradient(180deg, rgba(27, 15, 36, 0.2) 0%, rgba(45, 20, 40, 0.45) 80%, rgba(20, 10, 25, 0.75) 100%),
              url('https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?auto=format&fit=crop&w=1400&q=80') center center / cover no-repeat;
}

.rocks-stage-card.theme-zen {
  background: linear-gradient(180deg, rgba(10, 25, 20, 0.2) 0%, rgba(15, 35, 28, 0.45) 80%, rgba(8, 20, 15, 0.75) 100%),
              url('https://images.unsplash.com/photo-1426604966848-d7adac402bff?auto=format&fit=crop&w=1400&q=80') center center / cover no-repeat;
}

#rocks-physics-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: grab;
}

#rocks-physics-canvas:active {
  cursor: grabbing;
}

/* Altitude Ruler */
.rocks-altitude-ruler {
  position: absolute;
  left: 20px;
  top: 40px;
  bottom: 80px;
  width: 48px;
  border-right: 1px dashed rgba(255, 255, 255, 0.18);
  z-index: 3;
  pointer-events: none;
}

.ruler-mark {
  position: absolute;
  right: 8px;
  transform: translateY(50%);
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.4);
}

.ruler-live-tracker {
  position: absolute;
  left: 0;
  width: 160px;
  border-top: 2px solid #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
  transition: bottom 0.15s ease-out;
  display: flex;
  align-items: center;
}

.tracker-val {
  background: #38bdf8;
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 10px;
}

/* Zen Toast */
.rocks-zen-toast {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid rgba(234, 179, 8, 0.5);
  padding: 8px 18px;
  border-radius: 30px;
  color: #fbbf24;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 0 25px rgba(234, 179, 8, 0.3);
  backdrop-filter: blur(8px);
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Rotation HUD */
.rock-rotation-hud {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.hud-rotate-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.hud-rotate-btn:hover {
  background: #e2e8f0;
  color: #1d4ed8;
  border-color: #94a3b8;
}

.hud-angle-text {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: #38bdf8;
  font-weight: 600;
}

/* Spawner Tray */
.rocks-spawner-tray {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tray-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tray-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-dim);
}

.tray-random-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #fef3c7;
  border: 1px solid #fde047;
  border-radius: 16px;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tray-random-btn:hover {
  background: #fde68a;
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.rocks-palette-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.rock-spawn-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.rock-spawn-card:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.rock-card-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f172a;
}

.rock-card-desc {
  font-size: 0.65rem;
  color: #64748b;
}

/* Rock Preview Icons (Organic Shapes) */
.rock-preview-icon {
  width: 44px;
  height: 32px;
  background: linear-gradient(135deg, #71717a, #3f3f46);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.25), 0 3px 6px rgba(0, 0, 0, 0.4);
}

.rock-icon-river {
  border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  background: linear-gradient(135deg, #a1a1aa, #52525b);
}

.rock-icon-slate {
  width: 50px;
  height: 20px;
  border-radius: 8px 12px 6px 10px;
  background: linear-gradient(135deg, #64748b, #334155);
}

.rock-icon-granite {
  width: 38px;
  height: 36px;
  clip-path: polygon(20% 0%, 85% 10%, 100% 70%, 75% 100%, 15% 90%, 0% 40%);
  background: linear-gradient(135deg, #78716c, #44403c);
}

.rock-icon-angular {
  width: 40px;
  height: 34px;
  clip-path: polygon(50% 0%, 95% 85%, 5% 100%);
  background: linear-gradient(135deg, #a8a29e, #57534e);
}

.rock-icon-monolith {
  width: 24px;
  height: 44px;
  border-radius: 6px 8px 5px 7px;
  background: linear-gradient(135deg, #525252, #262626);
}

.rock-icon-pebble {
  width: 24px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #b45309);
}

.rock-icon-pebble {
  width: 24px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #b45309);
}

/* ==========================================================================
   GASTA LA FORTUNA (Inspirado en Spend Bill Gates' Money de Neal.fun)
   ========================================================================== */

.spend-game-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1060px;
  margin: 0 auto;
}

.spend-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
}

.spend-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spend-avatar-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #22c55e, #15803d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.spend-title-area h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.spend-title-area p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}

.spend-profile-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
}

.spend-profile-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.spend-profile-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.spend-profile-btn.active {
  background: #1d4ed8;
  color: #ffffff;
  border: 1px solid #1d4ed8;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

/* Sticky Money Counter */
.spend-sticky-counter-card {
  position: sticky;
  top: 10px;
  z-index: 25;
  background: #ffffff;
  border: 2px solid #86efac;
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.12);
  text-align: center;
}

.spend-counter-lbl {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #64748b;
  font-weight: 700;
  letter-spacing: 1px;
}

.spend-money-glow {
  font-size: 3.2rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #15803d;
  line-height: 1.1;
  margin: 4px 0;
  transition: all 0.15s ease-out;
}

.spend-money-glow.pulse-green {
  transform: scale(1.02);
}

.spend-progress-bar-bg {
  height: 8px;
  border-radius: 10px;
  background: #e2e8f0;
  overflow: hidden;
  max-width: 640px;
  margin: 10px auto;
}

.spend-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #22c55e);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
  transition: width 0.2s ease-out;
}

.spend-counter-stats-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #475569;
  margin-top: 6px;
}

.spend-substat strong {
  color: #0f172a;
  margin-left: 4px;
}

/* Category Filter Bar */
.spend-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.spend-filter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.spend-filter-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.spend-filter-pill.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

/* Items Grid */
.spend-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.spend-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.05);
}

.spend-card:hover {
  background: #ffffff;
  border-color: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.spend-card-emoji {
  font-size: 2.8rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spend-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  min-height: 2.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spend-card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #15803d;
  font-family: var(--font-mono);
}

.spend-card-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.btn-spend-sell {
  flex: 1;
  min-width: 0;
  padding: 8px 6px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}

.btn-spend-sell:hover:not(:disabled) {
  background: #ef4444;
  color: #fff;
}

.btn-spend-sell:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.spend-input-qty {
  width: 56px;
  min-width: 48px;
  max-width: 64px;
  text-align: center;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 6px 2px;
  box-sizing: border-box;
}

.btn-spend-buy {
  flex: 1;
  min-width: 0;
  padding: 8px 6px;
  background: #10b981;
  border: 1px solid #059669;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}

.btn-spend-buy:hover:not(:disabled) {
  background: #059669;
  color: #fff;
}

.btn-spend-buy:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.spend-card-quick-btns {
  display: flex;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}

.spend-quick-btn {
  flex: 1;
  min-width: 0;
  padding: 4px 2px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #334155;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
  text-align: center;
}

.spend-quick-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Thermal Paper Receipt */
.spend-receipt-wrapper {
  margin: 30px auto 10px;
  width: 100%;
  max-width: 520px;
  animation: fadeInDown 0.3s ease;
}

.thermal-receipt-paper {
  background: #fdfdfd;
  color: #111;
  font-family: 'Courier New', Courier, monospace;
  padding: 30px 24px;
  border-radius: 4px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  border-top: 6px dashed #cbd5e1;
  border-bottom: 6px dashed #cbd5e1;
  text-align: center;
}

.receipt-barcode {
  font-size: 1.2rem;
  letter-spacing: 2px;
  color: #475569;
  margin-bottom: 6px;
}

.receipt-header h3 {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin: 0;
  color: #0f172a;
}

.receipt-header p {
  font-size: 0.75rem;
  color: #64748b;
  margin: 2px 0 8px;
}

.receipt-divider {
  color: #94a3b8;
  font-size: 0.75rem;
  overflow: hidden;
  white-space: nowrap;
}

.receipt-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #475569;
  padding: 4px 0;
}

.receipt-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  text-align: left;
  max-height: 280px;
  overflow-y: auto;
}

.receipt-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  line-height: 1.3;
}

.receipt-item-name {
  font-weight: 700;
  color: #1e293b;
}

.receipt-item-sub {
  color: #64748b;
  font-size: 0.75rem;
}

.receipt-item-total {
  font-weight: 800;
  color: #0f172a;
}

.receipt-totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
}

.receipt-row-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 900;
  color: #15803d;
}

.receipt-row-remain {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
}

.receipt-footer p {
  font-size: 0.75rem;
  color: #64748b;
  margin: 10px 0 14px;
}

.receipt-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ==========================================================================
   DISEÑA EL PRÓXIMO iPHONE (Inspirado en Design the next iPhone de Neal.fun)
   ========================================================================== */

.iphone-game-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
}

.iphone-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
}

.iphone-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.iphone-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.iphone-title-area h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.iphone-title-area p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}

.iphone-color-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 12px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.color-dot-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s;
}

.color-dot-btn:hover {
  transform: scale(1.15);
}

.color-dot-btn.active {
  transform: scale(1.2);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.iphone-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Studio Workshop Card */
.iphone-studio-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

/* 3D Rotation Toolbar */
.iphone-3d-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  user-select: none;
}

.iphone-rot-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rot-lbl {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.rot-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.rot-pill-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.rot-pill-btn.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.iphone-rot-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.iphone-rot-slider-wrap input[type="range"] {
  width: 120px;
  accent-color: #38bdf8;
  cursor: pointer;
}

.rot-val-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: #38bdf8;
  min-width: 32px;
  text-align: right;
}

.rot-reset-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #cbd5e1;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.rot-reset-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
}

.iphone-stage-dropzone {
  position: relative;
  width: 100%;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  perspective: 1200px;
  perspective-origin: center center;
  cursor: grab;
  overflow: visible;
}

.iphone-stage-dropzone.orbiting {
  cursor: grabbing;
}

/* 3D Assembly Rig */
.iphone-3d-assembly {
  position: relative;
  width: 250px;
  height: 500px;
  transform-style: preserve-3d;
  transition: transform 0.08s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The Phone Body Chassis */
.iphone-body-frame {
  width: 250px;
  height: 500px;
  border-radius: 46px;
  position: absolute;
  inset: 0;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.75),
    0 8px 20px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 0 3px #1e293b,
    0 0 0 4.5px #334155;
  transition: box-shadow 0.2s ease;
}

/* 3D Orbiting Drag Hint Badge */
.iphone-drag-hint {
  position: absolute;
  top: 16px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  color: var(--text-dim);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 5px 12px;
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

/* Side physical buttons (Action button, Volume up/down) */
.iphone-body-frame::before {
  content: '';
  position: absolute;
  top: 85px;
  left: -6.5px;
  width: 4px;
  height: 134px;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(
    to bottom,
    #64748b 0, #64748b 22px,
    transparent 22px, transparent 32px,
    #64748b 32px, #64748b 78px,
    transparent 78px, transparent 88px,
    #64748b 88px, #64748b 134px
  );
  box-shadow: -1px 0 2px rgba(0, 0, 0, 0.4);
}

/* Side power/Siri button */
.iphone-body-frame::after {
  content: '';
  position: absolute;
  top: 125px;
  right: -6.5px;
  width: 4px;
  height: 56px;
  border-radius: 0 3px 3px 0;
  background: #64748b;
  box-shadow: 1px 0 2px rgba(0, 0, 0, 0.4);
}

.iphone-chassis-outer {
  position: absolute;
  inset: 0;
  border-radius: 46px;
  overflow: hidden;
  border: 4px solid #334155;
  background: #0f172a;
}

/* Screen Face */
.iphone-screen-surface {
  position: absolute;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 14px;
}

.iphone-default-notch {
  width: 90px;
  height: 26px;
  background: #000;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
}

.island-camera-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.island-sensor-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0f172a;
}

.iphone-screen-clock {
  font-size: 3.4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 35px;
  font-family: var(--font-outfit);
  letter-spacing: -1px;
}

.iphone-screen-wallpaper {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 80%, rgba(56, 189, 248, 0.35), transparent 70%);
  pointer-events: none;
}

/* Back Glass Face */
.iphone-back-surface {
  position: absolute;
  inset: 0;
  background: #1e293b;
  transition: background 0.3s ease;
}

.iphone-glass-reflection {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

/* Placed Parts Layer */
.iphone-parts-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-style: preserve-3d;
  z-index: 10;
}

.placed-part-wrapper {
  position: absolute;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  transition: filter 0.2s;
}

.placed-part-render {
  display: flex;
  align-items: center;
  justify-content: center;
}

.placed-part-render svg {
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  transition: filter 0.15s ease, transform 0.15s ease;
}

.placed-part-wrapper:hover .placed-part-render svg {
  filter: drop-shadow(0 8px 20px rgba(56, 189, 248, 0.45));
}

.placed-part-wrapper:active {
  cursor: grabbing;
}

.placed-part-wrapper.selected {
  outline: 2px dashed #38bdf8;
  outline-offset: 4px;
  border-radius: 8px;
}

.placed-part-handle {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  z-index: 100;
  pointer-events: auto;
  user-select: none;
  padding: 0;
  line-height: 1;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.placed-part-handle:hover {
  background: #dc2626;
  color: #ffffff;
  transform: scale(1.18);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
}

.placed-part-handle:active {
  transform: scale(0.92);
}

.placed-part-rotate {
  position: absolute;
  bottom: -14px;
  right: -14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0284c7;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  z-index: 100;
  pointer-events: auto;
  user-select: none;
  padding: 0;
  line-height: 1;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.placed-part-rotate:hover {
  background: #0369a1;
  color: #ffffff;
  transform: scale(1.18);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.6);
}

.placed-part-rotate:active {
  transform: scale(0.92);
}

/* Floating Elements in Studio */
.iphone-floating-price-pill {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 10;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  padding: 8px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  pointer-events: auto;
}

.iphone-floating-price-pill .price-lbl {
  font-size: 0.78rem;
  font-family: var(--font-sans);
  color: #1e293b !important;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.iphone-floating-price-pill .price-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1d4ed8 !important;
  font-family: var(--font-mono);
}

.iphone-trash-zone {
  position: absolute;
  bottom: 18px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px dashed rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 0.78rem;
  pointer-events: none;
}

/* Parts Tray */
.iphone-parts-tray {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.tray-cat-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.tray-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tray-tab-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.tray-tab-btn.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.tray-parts-palette {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 4px 12px;
}

.part-chip-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  min-width: 110px;
}

.part-chip-card:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  transform: translateY(-2px);
}

.part-preview-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.part-preview-icon svg {
  max-width: 48px;
  max-height: 48px;
  width: auto;
  height: auto;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s ease;
}

.part-chip-card:hover .part-preview-icon svg {
  transform: scale(1.08);
}

.part-chip-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}

.part-chip-price {
  font-size: 0.72rem;
  font-weight: 700;
  color: #1d4ed8;
}

/* Keynote Modal */
.keynote-modal-card {
  max-width: 760px;
  background: radial-gradient(circle at 50% 20%, #172554 0%, #030712 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95);
}

.apple-keynote-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.keynote-hero-title h1 {
  font-size: 2.3rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 6px 0;
}

.keynote-tagline {
  font-size: 1rem;
  color: #cbd5e1;
  font-style: italic;
  max-width: 520px;
  margin: 0 auto 16px;
}

.keynote-showcase-arena {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  margin: 12px 0;
}

.keynote-phone-clone {
  transform: rotateY(-18deg) rotateX(10deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  transition: transform 0.5s ease;
}

.keynote-highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
  text-align: center;
}

.keynote-highlight-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
}

.keynote-hl-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.keynote-hl-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}

.keynote-price-banner {
  margin: 16px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.keynote-from {
  font-size: 0.8rem;
  color: #94a3b8;
}

.keynote-final-price {
  font-size: 2.6rem;
  font-weight: 900;
  color: #38bdf8;
  font-family: var(--font-mono);
}

.keynote-availability {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.keynote-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}


/* ==========================================================================
   UNUSUAL SUSPECTS: RUEDA DE RECONOCIMIENTO & DEDUCCIÓN LÓGICA
   ========================================================================== */
.suspects-game-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.suspects-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-card);
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.suspects-title-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.suspects-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(99, 102, 241, 0.25));
  border: 1px solid rgba(236, 72, 153, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ec4899;
}

.suspects-title-area h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.suspects-title-area p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

.suspects-case-selector {
  display: flex;
  gap: 8px;
  background: #f8fafc;
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.suspects-case-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.suspects-case-btn:hover {
  color: var(--text-main);
  background: #f1f5f9;
}

.suspects-case-btn.active {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.35);
}

.suspects-header-stats {
  display: flex;
  gap: 12px;
}

.suspects-stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 14px;
}

.suspects-stat-pill.highlight-gold {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
}

.suspects-stat-pill .stat-col {
  display: flex;
  flex-direction: column;
}

.suspects-stat-pill .stat-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.suspects-stat-pill .stat-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
}

/* Corkboard Case File Card */
.suspects-corkboard-card {
  background: radial-gradient(circle at top right, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9)),
              linear-gradient(180deg, rgba(20, 24, 39, 0.95) 0%, rgba(11, 15, 25, 0.98) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.suspects-corkboard-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ec4899, #38bdf8, #f59e0b);
}

.corkboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 14px;
}

.classified-tag {
  display: inline-block;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.case-file-badge h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 4px 0 6px 0;
}

.case-file-badge p {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin: 0;
  max-width: 650px;
  line-height: 1.45;
}

.case-file-actions {
  display: flex;
  gap: 10px;
}

/* Clues stream */
.clues-stream {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.clue-paper-strip {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid #e2e8f0;
  border-left: 4px solid #38bdf8;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.clue-paper-strip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.clue-paper-strip.clue-type-negative {
  border-left-color: #ec4899;
}

.clue-paper-strip.clue-type-height {
  border-left-color: #f59e0b;
}

.clue-paper-strip.clue-type-logic {
  border-left-color: #a855f7;
}

.clue-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #38bdf8;
}

.clue-content-box {
  flex: 1;
}

.clue-witness-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.clue-text-body {
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.4;
  margin: 0;
}

.clue-text-body strong {
  color: #facc15;
}

/* Police Lineup Stage */
.suspects-lineup-stage {
  position: relative;
  background: radial-gradient(ellipse at 50% 20%, rgba(30, 41, 59, 0.8), rgba(10, 15, 26, 0.98)),
              repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255, 255, 255, 0.04) 40px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px 20px 24px 20px;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.7), 0 10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  min-height: 480px;
}

.lineup-height-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.height-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  padding: 2px 14px;
}

.height-line span {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.35);
  font-weight: 600;
}

/* Suspects Lineup Grid */
.suspects-lineup-grid {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  padding-top: 30px;
}

.suspect-card {
  width: 196px;
  min-width: 0;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: var(--transition);
}

.suspect-card:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.1);
}

.suspect-card.ruled-out {
  opacity: 0.45;
  filter: grayscale(85%);
  border-color: rgba(239, 68, 68, 0.3);
  transform: scale(0.97);
}

.suspect-card.ruled-out:hover {
  opacity: 0.65;
  transform: scale(0.98);
}

.suspect-number-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.suspect-height-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

/* Suspect Avatar Container */
.suspect-avatar-container {
  width: 120px;
  height: 140px;
  margin: 22px 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.suspect-avatar-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.suspect-ruled-out-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.suspect-card.ruled-out .suspect-ruled-out-overlay {
  display: flex;
}

.ruled-out-stamp {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ef4444;
  border: 4px solid #ef4444;
  padding: 4px 12px;
  border-radius: 8px;
  transform: rotate(-18deg);
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  font-family: var(--font-mono);
}

.suspect-info-box {
  width: 100%;
  text-align: center;
  margin-bottom: 12px;
}

.suspect-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suspect-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.suspect-trait-chip {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  border: 1px solid #e2e8f0;
}

.suspect-actions-row {
  display: flex;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  margin-top: auto;
}

.btn-ruleout,
.btn-arrest {
  flex: 1;
  min-width: 0; /* Ensures buttons never overflow card bounds */
  box-sizing: border-box;
  border-radius: 8px;
  padding: 8px 6px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.btn-ruleout svg,
.btn-arrest svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.btn-ruleout span,
.btn-arrest span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-ruleout {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #cbd5e1;
  color: var(--text-dim);
  font-weight: 600;
}

.btn-ruleout:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.suspect-card.ruled-out .btn-ruleout {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.btn-arrest {
  background: linear-gradient(135deg, #ec4899, #be185d);
  border: none;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.35);
}

.btn-arrest:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.5);
}

/* Resolution Modal Styling */
.suspects-result-card {
  max-width: 480px;
  width: 90%;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 32px 28px;
}

.suspects-modal-stamp {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 1.8rem;
  font-weight: 900;
  font-family: var(--font-mono);
  padding: 6px 16px;
  border-radius: 8px;
  transform: rotate(14deg);
  letter-spacing: 0.12em;
  opacity: 0;
  animation: stampSlam 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  animation-delay: 0.15s;
}

.suspects-modal-stamp.stamp-guilty {
  color: #10b981;
  border: 4px solid #10b981;
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.3);
}

.suspects-modal-stamp.stamp-innocent {
  color: #ef4444;
  border: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
}

@keyframes stampSlam {
  0% {
    transform: scale(3) rotate(35deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(14deg);
    opacity: 0.95;
  }
}

.suspect-mugshot-circle {
  width: 100px;
  height: 100px;
  margin: 10px auto 16px auto;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.suspect-dialogue-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
  position: relative;
  font-style: italic;
  color: #cbd5e1;
}

.dialogue-quote {
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 2.2rem;
  color: #ec4899;
  line-height: 1;
}

.suspect-result-stats-row {
  display: flex;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.res-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.res-stat-item span {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.res-stat-item strong {
  font-size: 0.88rem;
}

.suspect-result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ==========================================================================
   SIZE OF LIFE: LA ESCALA DE LA VIDA (BIOLOGÍA & PROPORCIÓN)
   ========================================================================== */
.life-game-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.life-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-card);
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.life-title-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.life-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
}

.life-title-area h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.life-title-area p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

.life-modes-bar {
  display: flex;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
}

.life-mode-btn {
  background: transparent;
  border: none;
  color: #334155;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.life-mode-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.life-mode-btn.active {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(29, 78, 216, 0.25);
}

.life-unit-toggler {
  display: flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 4px;
}

.life-unit-btn {
  background: transparent;
  border: none;
  color: #334155;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.life-unit-btn.active {
  background: #1d4ed8;
  color: #ffffff;
}

/* Category Shortcuts Bar */
.life-categories-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
}

.life-category-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.life-cat-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.life-cat-chip:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
  transform: translateY(-1px);
}

/* Proportional Comparison Stage */
.life-comparison-stage {
  display: grid;
  grid-template-columns: 1fr 180px 1fr;
  gap: 20px;
  align-items: stretch;
  min-height: 520px;
}

.life-organism-panel {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.life-organism-panel.right-panel {
  border-color: #93c5fd;
  box-shadow: 0 10px 30px rgba(29, 78, 216, 0.08);
}

.org-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.org-rank-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

.org-domain-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #2563eb;
  letter-spacing: 0.06em;
}

.org-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px 0;
  letter-spacing: -0.02em;
}

.org-scientific {
  font-size: 0.84rem;
  font-style: italic;
  color: #64748b;
  margin-bottom: 14px;
  display: block;
}

.org-size-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 16px;
  align-self: flex-start;
}

.org-size-badge.highlight {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* Visual Viewport with Grid */
.org-visual-viewport {
  flex: 1;
  min-height: 250px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 16px;
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.04);
}

.org-visual-svg-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Real Scientific Specimen Photo Presentation */
.org-card-photo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 280px;
  position: relative;
}

.org-photo-frame {
  position: relative;
  width: 230px;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #cbd5e1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.org-card-photo-container:hover .org-photo-frame {
  transform: translateY(-3px) scale(1.03);
  border-color: #3b82f6;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.15);
}

/* Microscopic Confocal Lens View for viruses & cells */
.org-card-photo-container.micro-specimen .org-photo-frame {
  border-radius: 50%;
  width: 200px;
  height: 200px;
  border: 3px solid #3b82f6;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.org-real-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.org-card-photo-container:hover .org-real-photo-img {
  transform: scale(1.1);
}

.org-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, 0.75) 100%);
  pointer-events: none;
}

.org-photo-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  letter-spacing: 0.03em;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.micro-lens-grid {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(6, 182, 212, 0.35);
  pointer-events: none;
  background-image: 
    radial-gradient(circle, transparent 65%, rgba(6, 182, 212, 0.2) 100%),
    linear-gradient(to right, transparent 49.5%, rgba(6, 182, 212, 0.3) 50%, transparent 50.5%),
    linear-gradient(to bottom, transparent 49.5%, rgba(6, 182, 212, 0.3) 50%, transparent 50.5%);
}

/* Quiz Card adjustments */
.quiz-card-avatar .org-photo-frame {
  width: 110px;
  height: 110px;
  border-radius: 14px;
}

.quiz-card-avatar .org-card-photo-container.micro-specimen .org-photo-frame {
  width: 110px;
  height: 110px;
  border-radius: 50%;
}

.quiz-card-avatar .org-photo-badge {
  display: none;
}

.org-visual-svg {
  max-width: 90%;
  max-height: 90%;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.org-fact-card {
  margin-top: 16px;
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 10px;
  padding: 12px 14px;
}

.fact-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ca8a04;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.fact-title i {
  width: 14px;
  height: 14px;
}

.org-fact-card p {
  font-size: 0.84rem;
  color: #713f12;
  line-height: 1.45;
  margin: 0;
}

/* Center Multiplier Hub */
.life-multiplier-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 10px;
}

.multiplier-ring-box {
  background: #ffffff;
  border: 2px solid #93c5fd;
  border-radius: 50%;
  width: 130px;
  height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(29, 78, 216, 0.12);
  animation: pulseSubtle 3s ease-in-out infinite alternate;
}

@keyframes pulseSubtle {
  0% { transform: scale(1); box-shadow: 0 2px 12px rgba(29, 78, 216, 0.1); }
  100% { transform: scale(1.04); box-shadow: 0 6px 24px rgba(29, 78, 216, 0.2); }
}

.multiplier-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #64748b;
  text-transform: uppercase;
}

.multiplier-number {
  font-size: 1.55rem;
  font-weight: 900;
  color: #1d4ed8;
  font-family: var(--font-mono);
  line-height: 1.1;
  margin: 2px 0;
}

.multiplier-sub {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #475569;
  text-transform: uppercase;
}

.multiplier-meter-bar {
  width: 140px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.meter-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  width: 50%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.multiplier-equivalency {
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.35;
  font-weight: 600;
  max-width: 150px;
}

/* Bottom Navigation Scrubber */
.life-controls-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #ffffff;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.life-nav-arrow-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.life-nav-arrow-btn:hover {
  background: #e2e8f0;
}

.life-nav-arrow-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  transform: translateY(-1px);
}

.life-slider-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-labels-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.slider-labels-row strong {
  color: #34d399;
}

.life-scale-scrubber {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #38bdf8, #10b981, #f59e0b, #ec4899);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}

.life-scale-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  cursor: grab;
  transition: transform 0.15s;
}

.life-scale-scrubber::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-ticks-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

/* Duel Mode Styling */
.life-duel-controls-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--bg-card);
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.duel-selector-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  max-width: 320px;
}

.duel-selector-col label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.duel-vs-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}

.life-duel-stage {
  min-height: 440px;
  background: radial-gradient(ellipse at 50% 50%, rgba(30, 41, 59, 0.8), rgba(10, 15, 26, 0.98)),
              repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(255, 255, 255, 0.03) 30px),
              repeating-linear-gradient(90deg, transparent, transparent 29px, rgba(255, 255, 255, 0.03) 30px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.6);
}

.life-duel-summary-banner {
  margin-top: 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
}

/* Quiz Mode Styling */
.life-quiz-wrapper {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-hud-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.quiz-score-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.quiz-question-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
}

.quiz-question-box h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 6px 0;
}

.quiz-question-box p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

.quiz-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.quiz-choice-card {
  background: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-choice-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.quiz-card-avatar {
  width: 120px;
  height: 120px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-choice-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px 0;
}

.quiz-latin {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.quiz-feedback-box {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  animation: fadeIn 0.3s ease;
}

.quiz-feedback-box.correct {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.quiz-feedback-box.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

@media (max-width: 900px) {
  .life-comparison-stage {
    grid-template-columns: 1fr;
  }
  .life-multiplier-center {
    padding: 16px 0;
  }
  .life-duel-controls-card {
    flex-direction: column;
  }
  .quiz-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -280px;
    z-index: 100;
  }

  .sidebar.open {
    left: 0;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
  }

  .mobile-menu-toggle {
    display: block;
  }

  .main-content {
    padding: 16px;
  }

  .pixelforge-workspace {
    grid-template-columns: 1fr;
  }

  .geopixel-hud {
    grid-template-columns: 1fr 1fr;
  }

  .geo-target-challenge {
    grid-column: span 2;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border-subtle);
    padding-top: 12px;
  }
}


/* ==========================================================================
   AGARBIO: BATALLA CELULAR & MICROBIOLOGÍA (AGAR.IO REVOLUTION)
   ========================================================================== */

.agar-game-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
}

.agar-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
}

.agar-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.agar-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.agar-title-area h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.agar-title-area p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}

.agar-mode-selector {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
}

.agar-mode-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.agar-mode-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.agar-mode-btn.active {
  background: #1d4ed8;
  color: #ffffff;
  border: 1px solid #1d4ed8;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.agar-header-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.agar-stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}

.agar-stat-pill .stat-col {
  display: flex;
  flex-direction: column;
}

.agar-stat-pill .stat-lbl {
  font-size: 0.65rem;
  color: #64748b;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.agar-stat-pill .stat-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  font-family: var(--font-mono);
}

.agar-stat-pill.highlight-cyan {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.08);
}
.agar-stat-pill.highlight-cyan i,
.agar-stat-pill.highlight-cyan .stat-val {
  color: #0284c7;
}

.agar-stat-pill.highlight-gold {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}
.agar-stat-pill.highlight-gold i,
.agar-stat-pill.highlight-gold .stat-val {
  color: #d97706;
}

.agar-stat-pill.highlight-green {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}
.agar-stat-pill.highlight-green i,
.agar-stat-pill.highlight-green .stat-val {
  color: #059669;
}

/* Toolbar */
.agar-toolbar-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.agar-action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.agar-action-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.agar-action-chip:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.agar-controls-hint {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.agar-controls-hint code {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: 4px;
  color: #1e293b;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
}

/* Arena Card */
.agar-arena-card {
  position: relative;
  width: 100%;
  height: 640px;
  min-height: 520px;
  background: #060b14;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid #1e293b;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.8), 0 16px 40px rgba(15, 23, 42, 0.2);
  touch-action: none;
  user-select: none;
  cursor: crosshair;
  transition: max-height 0.2s ease;
}

/* Fullscreen Arena Mode */
.agar-arena-card:fullscreen,
.agar-arena-card:-webkit-full-screen,
.agar-arena-card.is-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 999999 !important;
}

.agar-floating-fs-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agar-floating-fs-btn:hover {
  background: rgba(37, 99, 235, 0.85);
  border-color: #60a5fa;
  transform: scale(1.05);
}

#agar-physics-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* HUD Overlay */
.agar-hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

/* Leaderboard */
.agar-leaderboard-card {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 210px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 14px;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

.agar-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.agar-hud-header h3 {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #f8fafc;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.agar-hud-header i {
  color: #facc15;
}

.agar-lb-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.agar-lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.agar-lb-row.is-player {
  background: rgba(37, 99, 235, 0.45);
  border: 1px solid rgba(59, 130, 246, 0.6);
  font-weight: 800;
  color: #93c5fd;
}

.agar-lb-rank {
  font-family: var(--font-mono);
  font-weight: 700;
  width: 20px;
  color: #94a3b8;
}

.agar-lb-row.is-player .agar-lb-rank {
  color: #facc15;
}

.agar-lb-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 6px;
  color: #e2e8f0;
}

.agar-lb-mass {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.72rem;
}

/* Minimap Radar */
.agar-minimap-card {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 140px;
  height: 140px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(56, 189, 248, 0.35);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25), 0 8px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

#agar-minimap-canvas {
  width: 130px;
  height: 130px;
  border-radius: 50%;
}

.minimap-label {
  position: absolute;
  bottom: 6px;
  font-size: 0.58rem;
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 1px;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.8);
  padding: 1px 6px;
  border-radius: 8px;
  pointer-events: none;
}

/* Touch Controls */
.agar-touch-controls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 12px;
  pointer-events: auto;
}

.agar-touch-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid #38bdf8;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
  user-select: none;
}

.agar-touch-btn span {
  font-size: 0.6rem;
  color: #94a3b8;
  margin-top: 1px;
}

.agar-touch-btn:active {
  transform: scale(0.92);
  background: #1d4ed8;
}

/* Modals (Start & Game Over) */
.agar-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.agar-modal-dialog {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  padding: 26px 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  color: #0f172a;
  animation: agarModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes agarModalPop {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.agar-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.agar-modal-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.agar-modal-header p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.agar-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.agar-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agar-form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.agar-input-text {
  padding: 10px 14px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s;
}

.agar-input-text:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.agar-skins-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.agar-skin-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: #334155;
  text-align: left;
}

.agar-skin-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.agar-skin-pill.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.pill-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.pill-perk-badge {
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
}

.badge-speed { background: #e0f2fe; color: #0284c7; }
.badge-shield { background: #fce7f3; color: #db2777; }
.badge-phage { background: #dcfce7; color: #059669; }
.badge-fusion { background: #ede9fe; color: #6366f1; }
.badge-armor { background: #fef3c7; color: #d97706; }

/* Dynamic Perk Card */
.agar-perk-card {
  margin-top: 8px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perk-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.perk-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.perk-titles {
  display: flex;
  flex-direction: column;
}

.perk-titles strong {
  font-size: 0.88rem;
  color: #0f172a;
}

.perk-subtitle {
  font-size: 0.75rem;
  color: #2563eb;
  font-weight: 700;
}

.perk-text {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.38;
  margin: 0;
}

.perk-bars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 2px;
  background: #ffffff;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.perk-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  gap: 8px;
}

.perk-bar-row span {
  min-width: 95px;
}

.perk-progress {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.perk-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.agar-modal-footer {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agar-btn-primary {
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.agar-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.agar-gameover-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #f8fafc;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.agar-go-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.agar-go-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.agar-go-val {
  font-size: 1.2rem;
  font-weight: 900;
  color: #0f172a;
  font-family: var(--font-mono);
}

/* Educational Callout */
.agar-edu-callout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 18px 22px;
}

.agar-edu-icon {
  font-size: 1.8rem;
  color: #2563eb;
  line-height: 1;
}

.agar-edu-content h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #1e3a8a;
  margin: 0 0 6px 0;
}

.agar-edu-content p {
  font-size: 0.85rem;
  color: #1e40af;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .agar-arena-card {
    height: 480px;
  }
  .agar-leaderboard-card {
    width: 170px;
    padding: 8px 10px;
  }
  .agar-minimap-card {
    width: 110px;
    height: 110px;
  }
  #agar-minimap-canvas {
    width: 100px;
    height: 100px;
  }
}


/* AgarBio Sub-elements & Responsive Support */
.agar-leaderboard-card .leaderboard-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.agar-leaderboard-card .leaderboard-header i {
  color: #facc15;
  width: 15px;
  height: 15px;
}

.agar-leaderboard-card .leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agar-leaderboard-card .leaderboard-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  padding: 3px 6px;
  border-radius: 6px;
  color: #cbd5e1;
}

.agar-leaderboard-card .leaderboard-list li.is-player {
  background: rgba(37, 99, 235, 0.5);
  border: 1px solid rgba(96, 165, 250, 0.6);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.agar-leaderboard-card .leaderboard-list li .lb-rank {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #94a3b8;
  width: 22px;
}

.agar-leaderboard-card .leaderboard-list li.is-player .lb-rank {
  color: #facc15;
}

.agar-leaderboard-card .leaderboard-list li .lb-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 6px;
}

.agar-leaderboard-card .leaderboard-list li .lb-mass {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.72rem;
}

.minimap-lbl {
  position: absolute;
  bottom: 6px;
  font-size: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 1px;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.85);
  padding: 1px 8px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  pointer-events: none;
}

.touch-action-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.88);
  border: 2px solid #38bdf8;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 14px rgba(56, 189, 248, 0.3);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  touch-action: manipulation;
}

.touch-action-btn small {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 2px;
  font-family: var(--font-mono);
}

.touch-action-btn:active {
  transform: scale(0.92);
  background: #1d4ed8;
  border-color: #93c5fd;
}

.touch-btn-eject {
  border-color: #10b981;
}
.touch-btn-eject:active {
  background: #059669;
}

.agar-dialog-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #ffffff;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.45);
}

.agar-dialog-icon.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.45);
}

.agar-btn-play {
  margin-top: 10px;
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  transition: all 0.2s;
}

.agar-btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.55);
}

.gov-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.gov-stat span {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.gov-stat strong {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  font-family: var(--font-mono);
}


/* ==========================================================================
   PANEL DE ADMINISTRADOR & CONTROL DOCENTE (BLOQUEO / ACTIVACIÓN DE AULA)
   ========================================================================== */

/* Top Bar Status Pill */
.platform-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  height: 24px;
}

.platform-status-pill:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseGreen 1.8s infinite;
}

.status-dot-pulse.locked {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulseRed 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes pulseRed {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Admin Access Button in Header - Micro size, sleek & minimal */
.btn-admin-access {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  height: 24px;
}

.btn-admin-access:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.2);
  transform: translateY(-1px);
}

.btn-admin-access:hover i {
  color: #ffffff;
}

.btn-admin-access i {
  width: 11px;
  height: 11px;
  color: #2563eb;
  transition: color 0.2s;
}

/* Sidebar Footer Admin Link */
.sidebar-admin-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
  text-align: left;
}

.sidebar-admin-link:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.sidebar-admin-link i {
  width: 15px;
  height: 15px;
  color: #2563eb;
}

/* =====================================================================
   FULLSCREEN LOCKDOWN OVERLAY FOR STUDENTS
   ===================================================================== */
.student-lockdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeInLockdown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInLockdown {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.lockdown-card {
  max-width: 580px;
  width: 100%;
  background: #ffffff;
  border-radius: 24px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(239, 68, 68, 0.2);
  border: 2px solid rgba(239, 68, 68, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lockdown-icon-box {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fee2e2;
  border: 3px solid #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
  font-size: 2.4rem;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
  animation: pulseIcon 2s infinite alternate;
}

.lockdown-icon-box i {
  width: 40px;
  height: 40px;
}

@keyframes pulseIcon {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.lockdown-card h2 {
  font-size: 1.6rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
}

.lockdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.lockdown-badge i {
  width: 14px;
  height: 14px;
}

.lockdown-msg {
  font-size: 1.05rem;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  padding: 16px 20px;
  border-radius: 14px;
  width: 100%;
  margin: 4px 0;
  line-height: 1.5;
}

.lockdown-tips {
  width: 100%;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 12px 16px;
  text-align: left;
}

.tip-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: #1e40af;
  line-height: 1.4;
}

.tip-row i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.lockdown-actions {
  margin-top: 8px;
  width: 100%;
}

.btn-lockdown-admin {
  padding: 10px 20px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-lockdown-admin:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-lockdown-admin i {
  width: 15px;
  height: 15px;
}

/* =====================================================================
   ADMIN MODALS (LOGIN & DASHBOARD)
   ===================================================================== */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-dialog {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 22px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: adminModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.admin-modal-dialog.admin-dashboard-dialog {
  max-width: 680px;
  max-height: 90vh;
}

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

.admin-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.admin-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.admin-icon-circle.active {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.admin-icon-circle i {
  width: 22px;
  height: 22px;
}

.admin-header-titles {
  flex: 1;
}

.admin-header-titles h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.admin-header-titles p {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
}

.admin-session-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  letter-spacing: 0.5px;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-btn-logout:hover {
  background: #fca5a5;
  color: #991b1b;
}

.admin-btn-logout i {
  width: 14px;
  height: 14px;
}

.admin-close-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #94a3b8;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.admin-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.admin-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.admin-input {
  width: 100%;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.admin-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.admin-credentials-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.78rem;
  color: #1e40af;
}

.admin-credentials-hint i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.admin-feedback-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
}

.admin-feedback-msg.error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.admin-feedback-msg.success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.admin-modal-footer {
  margin-top: 8px;
}

.admin-btn-primary {
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.admin-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

/* Master Switch Card in Dashboard */
.admin-card-master-switch {
  border-radius: 16px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-card-master-switch.active {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
}

.admin-card-master-switch.locked {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 2px solid #fca5a5;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15);
}

.master-switch-info {
  flex: 1;
  min-width: 240px;
}

.master-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
  display: inline-block;
  margin-bottom: 4px;
}

.admin-card-master-switch.active .master-tag {
  color: #15803d;
}

.admin-card-master-switch.locked .master-tag {
  color: #b91c1c;
}

.master-switch-info h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.master-switch-info p {
  font-size: 0.8rem;
  color: #475569;
  margin: 0;
  line-height: 1.4;
}

.btn-master-toggle {
  padding: 14px 24px;
  border-radius: 14px;
  border: none;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-master-toggle.lock {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.btn-master-toggle.lock:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5);
}

.btn-master-toggle.unlock {
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

.btn-master-toggle.unlock:hover {
  background: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(22, 163, 74, 0.5);
}

.btn-master-toggle i {
  width: 18px;
  height: 18px;
}

/* Admin Subcards */
.admin-subcard {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subcard-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.subcard-header i {
  color: #2563eb;
  width: 16px;
  height: 16px;
}

.subcard-help {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
}

.message-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-btn-secondary {
  align-self: flex-start;
  padding: 8px 14px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.admin-btn-secondary:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.admin-btn-secondary i {
  width: 14px;
  height: 14px;
}

.admin-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.admin-module-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.admin-module-pill.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.change-pass-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 600px) {
  .change-pass-grid {
    grid-template-columns: 1fr;
  }
}
