/* ==========================================================================
   TECH BOOTCAMP - CORE DESIGN SYSTEM & STYLES (Cyber-Slate & Vibrant Neon)
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #070a13;
  --bg-surface: #0f172a;
  --bg-card: rgba(18, 26, 43, 0.85);
  --bg-card-hover: rgba(26, 38, 64, 0.95);
  --bg-glass: rgba(15, 23, 42, 0.75);
  --bg-input: rgba(11, 17, 32, 0.9);

  --primary: #00d2ff;
  --primary-hover: #38bdf8;
  --primary-glow: rgba(0, 210, 255, 0.35);

  --accent-green: #05ffa1;
  --accent-green-glow: rgba(5, 255, 161, 0.35);
  --accent-amber: #fbbf24;
  --accent-amber-glow: rgba(251, 191, 36, 0.35);
  --accent-rose: #ff2a6d;
  --accent-rose-glow: rgba(255, 42, 109, 0.4);
  --accent-purple: #a855f7;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-medium: rgba(255, 255, 255, 0.18);
  --border-glow: rgba(0, 210, 255, 0.4);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 20px var(--primary-glow);

  --font-th: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-th);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 210, 255, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 50% 120%, rgba(168, 85, 247, 0.12), transparent);
  background-attachment: fixed;
}

/* Employee account entry uses the same readable controls as registration. */
.employee-login-body{padding:16px}
.employee-login-panel{max-width:480px;margin:6vh auto;padding:clamp(18px,4vw,28px)}
.employee-login-panel h1{font-size:clamp(24px,5vw,30px);line-height:1.4}
.employee-login-panel p{margin:12px 0;line-height:1.7;overflow-wrap:anywhere}
#employeeLogin{display:grid;gap:10px;margin-top:20px}
#employeeLogin label{font-size:16px}
#employeeLogin input{width:100%;min-width:0;min-height:44px;padding:12px 14px;border:1px solid var(--border-medium);border-radius:var(--radius-md);background:var(--bg-input);color:var(--text-main);font:inherit;font-size:16px}
#employeeLogin button{min-height:44px;margin-top:8px}

/* Mobile Container */
.mobile-body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  background-color: #04060d;
}

.mobile-container {
  width: 100%;
  max-width: 500px;
  min-height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

/* Glass Panel Utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Header */
.mobile-header {
  padding: 16px 20px;
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  flex-direction: column;
}

.badge-tag {
  font-family: var(--font-en);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--primary);
  text-transform: uppercase;
}

.logo-title {
  font-family: var(--font-en);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.status-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: all 0.3s ease;
}

.status-indicator.online .dot {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green-glow);
}

.btn-admin-link {
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-admin-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(0, 210, 255, 0.1);
}

/* CRITICAL: VIEW SWITCHER */
.view {
  display: none !important;
  flex-direction: column;
  padding: 16px;
  flex: 1;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.view.active {
  display: flex !important;
}

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

/* Cards & Forms */
.card {
  padding: 20px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.card-header .subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group[hidden] { display: none; }

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.required {
  color: var(--accent-rose);
}

input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea,
.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-th);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(16, 24, 45, 0.98);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300d2ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

optgroup {
  background: var(--bg-surface);
  color: var(--primary);
  font-weight: 700;
}

option {
  background: var(--bg-surface);
  color: #fff;
}

/* Lifestyle Tags Selector */
.tag-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lifestyle-tag {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
  user-select: none;
}

.lifestyle-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-medium);
}

.lifestyle-tag.selected {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-th);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #00d2ff, #0077ff);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8, #0088ff);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, #05ffa1, #00b06f);
  color: #052617;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(5, 255, 161, 0.35);
}

.btn-warning {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1e1102;
  font-weight: 700;
}

.btn-danger {
  background: linear-gradient(135deg, #ff2a6d, #b91c1c);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-medium);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.pulse-btn {
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(0, 210, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 210, 255, 0); }
}

/* VIEW 2: RADAR WAITING */
.text-center {
  text-align: center;
  align-items: center;
}

.radar-spinner {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.2), transparent 70%);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 30px var(--primary-glow);
  margin: 12px auto;
}

.radar-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 70%, rgba(0, 210, 255, 0.4) 100%);
  animation: rotateSweep 2.5s linear infinite;
}

@keyframes rotateSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.user-avatar-initial {
  font-family: var(--font-en);
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  z-index: 2;
}

.welcome-text {
  font-size: 1.25rem;
  font-weight: 700;
}

.highlight-text {
  color: var(--primary);
}

.badge-subteam {
  font-size: 0.8rem;
  padding: 4px 12px;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-block;
}

.wait-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto;
}

.tip-box {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  font-size: 0.82rem;
  color: var(--accent-amber);
}

/* VIEW 3: GROUP REVEAL */
.group-reveal-card {
  padding: 24px 20px;
  gap: 18px;
}

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

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

.group-number {
  font-family: var(--font-en);
  font-size: 3.8rem;
  font-weight: 900;
  color: var(--primary);
  text-shadow: 0 0 30px var(--primary-glow);
  line-height: 1;
}

.group-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.circle-mission-box {
  width: 100%;
  background: rgba(255, 42, 109, 0.1);
  border: 1px dashed var(--accent-rose);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.alert-pulse-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-rose);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.7; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1.02); }
}

.countdown-badge {
  font-family: var(--font-en);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-amber);
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 16px;
  border-radius: var(--radius-full);
}

.circle-intermission-box {
  width: 100%;
  background: linear-gradient(135deg, rgba(5, 255, 161, 0.08), rgba(0, 210, 255, 0.08));
  border: 1px solid rgba(5, 255, 161, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  margin-bottom: 16px;
  box-shadow: 0 0 25px rgba(5, 255, 161, 0.15);
  animation: fadeIn 0.4s ease-out;
}

.intermission-success-glow {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px auto;
  border-radius: 50%;
  background: rgba(5, 255, 161, 0.15);
  border: 2px solid var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(5, 255, 161, 0.4);
  animation: pulse 2s infinite ease-in-out;
}

.intermission-icon {
  font-size: 2rem;
}

.intermission-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.bonus-status-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 184, 0, 0.15);
  border: 1px solid var(--accent-amber);
  color: var(--accent-amber);
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 12px;
  box-shadow: 0 0 12px rgba(255, 184, 0, 0.25);
}

.intermission-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

.radar-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--primary);
  background: rgba(0, 210, 255, 0.08);
  border: 1px dashed rgba(0, 210, 255, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-full);
}

.radar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.secret-code-card {
  width: 100%;
  background: rgba(5, 255, 161, 0.08);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: 0 0 20px rgba(5, 255, 161, 0.15);
  margin-bottom: 14px;
}

.secret-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-green);
  letter-spacing: 0.5px;
}

.secret-code-display {
  font-family: var(--font-en);
  font-size: 3.6rem;
  font-weight: 900;
  letter-spacing: 8px;
  color: var(--accent-green);
  text-shadow: 0 0 25px var(--accent-green-glow);
  margin: 6px 0;
}

.secret-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.intermission-hype-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.hype-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.emoji-tap-grid.mini {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.emoji-tap-grid.mini .btn-emoji-react {
  font-size: 1.4rem;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.emoji-tap-grid.mini .btn-emoji-react:active {
  transform: scale(1.25);
  background: rgba(255, 255, 255, 0.2);
}

/* VIEW 4: ICEBREAKER CONSOLE */
.player-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-group {
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
  background: rgba(0, 210, 255, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary);
}

.player-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.group-score-pill {
  font-family: var(--font-en);
  font-weight: 800;
  color: var(--accent-green);
  font-size: 1.1rem;
}

.pinned-code-card {
  background: rgba(5, 255, 161, 0.06);
  border: 1px solid rgba(5, 255, 161, 0.3);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.pinned-code {
  font-family: var(--font-en);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent-green);
}

.mission-progress-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.missions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mission-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.mission-card.completed {
  border-color: var(--accent-green);
  background: rgba(5, 255, 161, 0.08);
}

.mission-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mission-badge {
  font-size: 0.72rem;
  color: var(--accent-amber);
  font-weight: 600;
}

.mission-desc {
  font-size: 0.88rem;
  color: #fff;
  font-weight: 500;
}

.mission-status-text {
  font-size: 0.78rem;
  color: var(--accent-green);
}

.btn-verify-mission {
  background: linear-gradient(135deg, #00d2ff, #0077ff);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.slogan-box {
  background: rgba(0, 210, 255, 0.08);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
}

/* MODAL BACKDROP */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex !important;
}

/* Keep every native popup centered even when its underlying page is scrolled. */
dialog[open] { position: fixed; inset: 0; margin: auto; max-height: calc(100dvh - 32px); }

.modal-content {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-md);
  animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--accent-amber);
}

.code-input {
  font-family: var(--font-en);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 12px;
  text-align: center;
  color: var(--accent-green);
}

.hint-text {
  font-size: 0.75rem;
  color: var(--accent-amber);
}

.error-banner {
  background: rgba(255, 42, 109, 0.15);
  border: 1px solid var(--accent-rose);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-align: center;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  width: max-content;
  max-width: min(92vw, 560px);
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.6;
  text-align: center;
  border-radius: 16px;
}

.registration-error {
  grid-column: 1 / -1;
  background: #411a2b;
  border: 1px solid #fb7185;
  color: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  line-height: 1.7;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.text-danger { color: var(--accent-rose) !important; }

/* ==========================================================================
   WAITING ROOM: INTERACTIVE EMOJI REACTION PAD
   ========================================================================== */
.waiting-reaction-box {
  margin-top: 16px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
}

.waiting-reaction-box h4 {
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 2px;
}

.waiting-reaction-box .small-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.emoji-tap-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.btn-emoji-react {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  padding: 8px 0;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-emoji-react:hover {
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--primary);
  transform: scale(1.15);
}

.btn-emoji-react:active {
  transform: scale(0.85);
  background: rgba(5, 255, 161, 0.3);
  border-color: var(--accent-green);
}

@keyframes popFlyUp {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -120px) scale(1.4);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -200px) scale(0.8);
    opacity: 0;
  }
}

/* STAGE ANNOUNCEMENT POPUP OVERLAY */
.stage-announcement-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.announcement-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary);
  box-shadow: 0 0 50px rgba(0, 210, 255, 0.4);
  animation: zoomIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.announcement-icon {
  font-size: 3.5rem;
  margin-bottom: 8px;
  animation: bounce 0.8s infinite alternate;
}

.announcement-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: rgba(0, 210, 255, 0.2);
  color: var(--primary);
  border: 1px solid var(--primary);
  margin-bottom: 8px;
}

.announcement-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 8px;
}

.announcement-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* MOBILE ROUND START COUNTDOWN OVERLAY */
.mobile-start-countdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

.mobile-start-card {
  max-width: 380px;
  width: 100%;
  text-align: center;
  padding: 30px 22px;
  border-radius: var(--radius-lg);
  border: 2px solid #00d2ff;
  box-shadow: 0 0 50px rgba(0, 210, 255, 0.45);
  background: radial-gradient(circle at top, rgba(0, 210, 255, 0.15) 0%, rgba(10, 15, 30, 0.95) 75%);
  animation: zoomIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-countdown-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: rgba(0, 210, 255, 0.2);
  color: #00d2ff;
  border: 1px solid #00d2ff;
  margin-bottom: 10px;
}

.mobile-countdown-round-name {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 12px 0;
  text-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
}

.mobile-countdown-giant-num {
  font-size: 5rem;
  font-weight: 900;
  font-family: var(--font-en);
  line-height: 1;
  color: #05ffa1;
  text-shadow: 0 0 40px rgba(5, 255, 161, 0.8), 0 0 80px rgba(0, 210, 255, 0.6);
  margin: 12px 0;
  animation: giantPulse 1s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-countdown-tip {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 16px 0;
}

.mobile-countdown-progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.mobile-countdown-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d2ff, #05ffa1);
  border-radius: var(--radius-full);
  transition: width 0.3s linear;
}

/* MOBILE ROUND END WARNING STICKY BANNER */
.mobile-end-warning-banner {
  position: sticky;
  top: 0;
  z-index: 990;
  margin: -12px -16px 14px -16px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(255, 42, 109, 0.95), rgba(255, 184, 0, 0.95));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 20px rgba(255, 42, 109, 0.5);
  border-bottom: 2px solid #fff;
  animation: pulseHazard 1.5s infinite alternate;
}

@keyframes pulseHazard {
  0% { box-shadow: 0 4px 15px rgba(255, 42, 109, 0.4); }
  100% { box-shadow: 0 6px 30px rgba(255, 184, 0, 0.7); }
}

.mobile-end-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-end-icon {
  font-size: 1.5rem;
  animation: bounce 0.6s infinite alternate;
}

.mobile-end-texts {
  display: flex;
  flex-direction: column;
}

.mobile-end-title {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.mobile-end-desc {
  font-size: 0.75rem;
  opacity: 0.92;
}

.mobile-end-clock {
  font-size: 1.25rem;
  font-weight: 900;
  font-family: var(--font-en);
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
}

/* ROUND INTERMISSION / ENDED BANNER */
.round-intermission-banner {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.15), rgba(255, 42, 109, 0.15));
  border: 2px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  text-align: center;
  box-shadow: 0 0 25px rgba(255, 184, 0, 0.2);
}

.round-intermission-banner h3 {
  color: var(--accent-amber);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 4px 0;
}

.round-intermission-banner p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

/* ==========================================================================
   MOBILE METEOR CRISIS ALERT & THRILL EFFECTS
   ========================================================================== */
body.meteor-hazard-alert {
  box-shadow: inset 0 0 35px rgba(255, 42, 109, 0.6);
  animation: mobileScreenCrisisPulse 1.2s infinite alternate ease-in-out;
}

@keyframes mobileScreenCrisisPulse {
  0% { box-shadow: inset 0 0 25px rgba(255, 42, 109, 0.5); }
  100% { box-shadow: inset 0 0 55px rgba(255, 184, 0, 0.85); }
}

.player-meteor-banner {
  background: radial-gradient(circle at center, rgba(255, 42, 109, 0.3) 0%, rgba(20, 6, 15, 0.95) 85%);
  border: 2px solid #ff2a6d;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 0 25px rgba(255, 42, 109, 0.5);
  animation: hazardPulseMobile 1s infinite alternate;
}

@keyframes hazardPulseMobile {
  0% { border-color: #ff2a6d; box-shadow: 0 0 15px rgba(255, 42, 109, 0.4); }
  100% { border-color: var(--accent-amber); box-shadow: 0 0 30px rgba(255, 184, 0, 0.7); }
}

.pmb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.pmb-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pmb-clock {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 900;
  color: #ff2a6d;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #ff2a6d;
  animation: clockTickPulse 0.8s infinite alternate;
}

@keyframes clockTickPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

.pmb-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.3;
}

.screen-shake {
  animation: screenShakeAnim 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes screenShakeAnim {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* ==========================================================================
   DEFAULT SPACE CRUISE / VOYAGE IDLE MODE (Normal Flight Animation)
   ========================================================================== */
.player-cruising-card {
  position: relative;
  background: radial-gradient(circle at 50% 20%, rgba(0, 210, 255, 0.15) 0%, rgba(7, 10, 19, 0.95) 80%);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.15);
  animation: fadeIn 0.4s ease-out;
}

.cruise-stars-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(1.5px 1.5px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 40px 70px, rgba(0,210,255,0.8), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 90px 40px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 160px 120px, #ffd700, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 230px 80px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 290px 150px, rgba(5,255,161,0.8), rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 320px 200px;
  animation: starsDrift 20s linear infinite;
  opacity: 0.7;
  pointer-events: none;
}

@keyframes starsDrift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-200px); }
}

.cruise-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.cruise-status-tag {
  font-size: 0.76rem;
  color: var(--accent-green);
  font-weight: 800;
  background: rgba(5, 255, 161, 0.12);
  border: 1px solid var(--accent-green);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.cruise-title {
  position: relative;
  z-index: 2;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 4px 0 6px 0;
}

.cruise-desc {
  position: relative;
  z-index: 2;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 12px 0;
}

.cruise-specs-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  text-align: center;
}

.cruise-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cruise-spec-item .spec-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.cruise-spec-item .spec-num {
  font-family: var(--font-en);
  font-size: 0.98rem;
  font-weight: 800;
}

/* ==========================================================================
   MISSION FAILED & MOTHERSHIP DESTROYED FULLSCREEN OVERLAY
   ========================================================================== */
.mission-failed-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 0, 4, 0.96);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-shadow: inset 0 0 80px rgba(255, 0, 85, 0.8);
  animation: failedAlarmPulse 1s infinite alternate;
}

@keyframes failedAlarmPulse {
  0% { background: rgba(15, 2, 6, 0.96); }
  100% { background: rgba(35, 2, 10, 0.98); }
}

.mission-failed-card {
  max-width: 400px;
  width: 100%;
  text-align: center;
  border: 2px solid #ff0055;
  background: rgba(20, 4, 10, 0.9);
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 50px rgba(255, 0, 85, 0.6);
}

.failed-siren-box {
  font-size: 3rem;
  margin-bottom: 8px;
  animation: sirenWiggle 0.6s infinite alternate;
}

@keyframes sirenWiggle {
  0% { transform: rotate(-5deg) scale(1); }
  100% { transform: rotate(5deg) scale(1.1); }
}

.failed-badge {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 0.78rem;
  font-weight: 900;
  color: #ff2a6d;
  background: rgba(255, 42, 109, 0.15);
  border: 1px solid #ff2a6d;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.failed-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 4px 0;
}

.failed-sub {
  font-family: var(--font-en);
  font-size: 0.88rem;
  font-weight: 800;
  color: #ff0055;
  margin-bottom: 12px;
}

.failed-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.failed-lock-badge {
  background: rgba(0, 0, 0, 0.6);
  border: 1px dashed rgba(255, 42, 109, 0.5);
  color: #ff2a6d;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 10px;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   BRAINY MINI-GAME PUZZLE WIDGETS
   ========================================================================== */
.capacitor-matrix-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 10px 0;
}

.capacitor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0;
}

.capacitor-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 1rem;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.capacitor-btn span {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-th);
  font-weight: 600;
}

.capacitor-btn:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--primary);
}

.capacitor-btn.selected {
  background: rgba(0, 210, 255, 0.25);
  border-color: var(--primary);
  color: var(--accent-green);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
}

.step-launch-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.step-launch-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  transition: all 0.2s;
}

.step-launch-btn.ready {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--primary);
  color: #fff;
  cursor: pointer;
}

.step-launch-btn.cleared {
  background: rgba(5, 255, 161, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
  cursor: default;
}

/* ==========================================================================
   CHROME-COMPATIBLE RED STROBE & EMERGENCY EFFECTS
   ========================================================================== */
.screen-red-strobe {
  animation: chromeRedStrobe 0.4s infinite alternate !important;
  box-shadow: inset 0 0 70px rgba(255, 42, 109, 0.9) !important;
}

@keyframes chromeRedStrobe {
  0% {
    background-color: rgba(255, 0, 60, 0.28);
    box-shadow: inset 0 0 50px rgba(255, 42, 109, 0.8), 0 0 40px rgba(255, 0, 60, 0.7);
  }
  100% {
    background-color: rgba(255, 0, 60, 0.05);
    box-shadow: inset 0 0 100px rgba(255, 0, 60, 0.95), 0 0 80px rgba(255, 42, 109, 0.9);
  }
}

/* Fullscreen Emergency Strobe Layer */
.screen-strobe-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  background: transparent;
}

.screen-strobe-overlay.active {
  display: block;
  animation: chromeStrobeFlash 0.35s infinite alternate;
}

@keyframes chromeStrobeFlash {
  0% {
    box-shadow: inset 0 0 80px rgba(255, 42, 109, 0.75);
    background: rgba(255, 42, 109, 0.12);
  }
  100% {
    box-shadow: inset 0 0 140px rgba(255, 0, 60, 0.95);
    background: rgba(255, 0, 60, 0.25);
  }
}

/* ==========================================================================
   PROMINENT MOTHERSHIP SHIELD HUD (STICKY ON MOBILE)
   ========================================================================== */
.mobile-mothership-shield-header {
  background: linear-gradient(180deg, rgba(11, 17, 32, 0.98) 0%, rgba(15, 23, 42, 0.92) 100%);
  border-bottom: 2px solid var(--border-medium);
  padding: 10px 16px;
  position: sticky;
  top: 57px;
  z-index: 90;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.msh-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.msh-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.msh-icon {
  font-size: 1.1rem;
}

.msh-val {
  font-family: var(--font-en);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--accent-green);
  text-shadow: 0 0 12px var(--accent-green-glow);
}

.msh-val.warning {
  color: var(--accent-amber);
  text-shadow: 0 0 12px var(--accent-amber-glow);
}

.msh-val.danger {
  color: var(--accent-rose);
  text-shadow: 0 0 15px var(--accent-rose-glow);
  animation: pulseGlow 1s infinite alternate;
}

.msh-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  position: relative;
}

.msh-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #05ffa1, #00d2ff);
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
}

.msh-bar-fill.warning {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

.msh-bar-fill.danger {
  background: linear-gradient(90deg, #ff2a6d, #dc2626);
  box-shadow: 0 0 16px rgba(255, 42, 109, 0.8);
}

/* ==========================================================================
   PRE-WAVE 3-SECOND WARNING COUNTDOWN OVERLAY
   ========================================================================== */
.mobile-precountdown-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 4, 18, 0.92);
  backdrop-filter: blur(12px);
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.mobile-precountdown-overlay.active {
  display: flex;
}

.precountdown-card {
  max-width: 420px;
  width: 100%;
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.18), rgba(15, 23, 42, 0.95));
  border: 2px solid var(--accent-rose);
  border-radius: var(--radius-xl);
  padding: 30px 20px;
  box-shadow: 0 0 50px rgba(255, 42, 109, 0.6);
  animation: precountdownPulse 1s infinite alternate;
}

@keyframes precountdownPulse {
  0% { transform: scale(0.98); }
  100% { transform: scale(1.02); }
}

.precountdown-badge {
  display: inline-block;
  background: rgba(255, 42, 109, 0.25);
  border: 1px solid var(--accent-rose);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.precountdown-title {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.precountdown-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.precountdown-giant-num {
  font-family: var(--font-en);
  font-size: 5rem;
  font-weight: 900;
  color: var(--accent-rose);
  text-shadow: 0 0 35px rgba(255, 42, 109, 0.9);
  line-height: 1;
  margin: 10px 0;
  animation: numPop 1s infinite;
}

@keyframes numPop {
  0% { transform: scale(1.3); opacity: 0.6; }
  50% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   MOTHERSHIP DESTROYED OVERLAY (HP = 0%)
   ========================================================================== */
.mobile-destroyed-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 2, 8, 0.96);
  backdrop-filter: blur(14px);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.mobile-destroyed-overlay.active {
  display: flex;
}

.destroyed-card {
  max-width: 440px;
  width: 100%;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(15, 5, 10, 0.95));
  border: 2px solid #ef4444;
  border-radius: var(--radius-xl);
  padding: 30px 22px;
  box-shadow: 0 0 60px rgba(239, 68, 68, 0.7);
}

.destroyed-icon {
  font-size: 3.5rem;
  margin-bottom: 8px;
  animation: shake 0.8s infinite;
}

.destroyed-title {
  color: #ef4444;
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.destroyed-desc {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.destroyed-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   PERSONAL NUMBER CIPHER CLUE STYLES
   ========================================================================== */
.personal-cipher-badge {
  background: rgba(251, 191, 36, 0.15);
  border: 1.5px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 10px;
  text-align: left;
}

.personal-cipher-badge .pcb-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-amber);
  text-transform: uppercase;
}

.personal-cipher-badge .pcb-value {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  margin: 4px 0;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
}

.personal-cipher-badge .pcb-clue {
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.4;
}

/* ==========================================================================
   REGISTRATION AVATAR EMOJI SELECTOR
   ========================================================================== */
.emoji-avatar-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.btn-avatar-emoji {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 1.6rem;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-avatar-emoji:hover {
  background: rgba(0, 210, 255, 0.18);
  border-color: var(--primary);
  transform: scale(1.1);
}

.btn-avatar-emoji.selected {
  background: rgba(0, 210, 255, 0.3);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.6);
  transform: scale(1.15);
}

/* ==========================================================================
   DASHBOARD: ENLARGED LIVE JOINED PARTICIPANT CHIPS
   ========================================================================== */
.user-stream-chip {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.85));
  border: 1.5px solid rgba(0, 210, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  animation: popIn 0.3s ease-out;
}

.user-stream-chip:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.4);
}

.user-stream-chip .chip-emoji {
  font-size: 1.5rem;
  display: inline-block;
  line-height: 1;
}

.user-stream-chip .chip-team {
  font-size: 0.8rem;
  color: var(--accent-amber);
  font-weight: 600;
  margin-left: 4px;
}

/* ==========================================================================
   DASHBOARD: OLYMPIC PODIUM FOR TOP 3 & REMAINING RANK LIST
   ========================================================================== */
.podium-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin: 20px 0 25px 0;
  padding: 10px 0;
}

.podium-card {
  flex: 1;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
}

.podium-card .podium-medal {
  font-size: 2.8rem;
  margin-bottom: 4px;
  line-height: 1;
}

.podium-card .podium-group-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2px;
  word-break: break-word;
}

.podium-card .podium-group-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.podium-card .podium-score-pill {
  font-family: var(--font-en);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent-green);
  text-shadow: 0 0 15px rgba(5, 255, 161, 0.5);
  margin-bottom: 10px;
}

.podium-block {
  width: 100%;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 1.8rem;
  color: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* 1st Place (Gold) */
.podium-card.rank-1 .podium-block {
  height: 140px;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.4) 0%, rgba(217, 119, 6, 0.8) 100%);
  border: 2px solid #fbbf24;
  box-shadow: 0 0 35px rgba(251, 191, 36, 0.6);
}

/* 2nd Place (Silver) */
.podium-card.rank-2 .podium-block {
  height: 105px;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.3) 0%, rgba(100, 116, 139, 0.8) 100%);
  border: 2px solid #cbd5e1;
  box-shadow: 0 0 25px rgba(203, 213, 225, 0.4);
}

/* 3rd Place (Bronze) */
.podium-card.rank-3 .podium-block {
  height: 80px;
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.35) 0%, rgba(120, 53, 15, 0.8) 100%);
  border: 2px solid #d97706;
  box-shadow: 0 0 25px rgba(217, 119, 6, 0.4);
}

/* Remaining Rank List (4th onwards) */
.rank-remaining-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}

.rank-remaining-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  transition: all 0.2s;
}

.rank-remaining-item:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: var(--primary);
}

.admin-users-table-container {
  min-height: 400px;
  max-height: 650px;
  overflow-y: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   SILO TRAP: 10-STATION CROSS-ROLE GAMEPLAY UI STYLES
   ========================================================================== */

.station-badge-box {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.station-badge-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.station-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 210, 255, 0.12);
  border: 1.5px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.station-header-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.station-dept-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.badge-nav { background: rgba(0, 210, 255, 0.2); color: #00d2ff; border: 1px solid #00d2ff; }
.badge-power { background: rgba(251, 191, 36, 0.2); color: #fbbf24; border: 1px solid #fbbf24; }
.badge-maint { background: rgba(5, 255, 161, 0.2); color: #05ffa1; border: 1px solid #05ffa1; }
.badge-comms { background: rgba(255, 42, 109, 0.2); color: #ff2a6d; border: 1px solid #ff2a6d; }

.station-main-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-sub-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

/* AREA A: PERSONAL MISSION CARD */
.silo-area-a {
  background: rgba(18, 26, 43, 0.85);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  text-align: left;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.silo-mission-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.silo-mission-badge {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-waiting { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); border: 1px solid rgba(255, 255, 255, 0.2); }
.status-inprogress { background: rgba(251, 191, 36, 0.2); color: var(--accent-amber); border: 1px solid var(--accent-amber); animation: pulseSlow 2s infinite; }
.status-blocked { background: rgba(255, 42, 109, 0.2); color: var(--accent-rose); border: 1px solid var(--accent-rose); }
.status-completed { background: rgba(5, 255, 161, 0.2); color: var(--accent-green); border: 1px solid var(--accent-green); }

.silo-prog-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.silo-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-green));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.silo-mission-objective {
  font-size: 0.88rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 4px;
}

.silo-mission-hint {
  font-size: 0.78rem;
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* AREA B: MAIN CONTROL CONSOLE */
.silo-area-b {
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.15);
}

.station-control-panel {
  display: none;
}
.station-control-panel.active {
  display: block;
}

/* Slider Controls for PWR-02 */
.slider-group-box {
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.slider-lbl-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
}

.range-slider-cyber {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #1e293b;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.range-slider-cyber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.8);
  cursor: pointer;
}

/* AREA C: CROSS-ROLE PIPELINE (DEPENDENCIES) */
.silo-area-c {
  background: rgba(18, 26, 43, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  text-align: left;
}

.pipeline-header {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-amber);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.pipeline-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pipeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-medium);
  font-size: 0.8rem;
}

.pipeline-item.incoming { border-left-color: var(--primary); }
.pipeline-item.outgoing { border-left-color: var(--accent-green); }

.pipeline-item-label {
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pipeline-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.pill-waiting { background: rgba(255, 42, 109, 0.15); color: var(--accent-rose); border: 1px solid var(--accent-rose); }
.pill-ready { background: rgba(5, 255, 161, 0.15); color: var(--accent-green); border: 1px solid var(--accent-green); }
.pill-sent { background: rgba(0, 210, 255, 0.15); color: var(--primary); border: 1px solid var(--primary); }

/* AREA D: TEAM SPACECRAFT STATUS */
.silo-area-d {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.team-progress-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #fff;
}

.team-completed-badge {
  background: rgba(5, 255, 161, 0.2);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
}

/* Reactor Stability Dashboard */
.reactor-core-gauge {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px dashed var(--accent-amber);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px auto;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.2), transparent);
  animation: rotateSlow 20s linear infinite;
}

.reactor-core-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  font-family: var(--font-en);
}

@keyframes rotateSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulseSlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}


[data-correct-employee-id][hidden] { display:none !important; }
