/* ============================================================
   🌌 CYBERARENA: NEON COMMAND CENTER (MAX UI OVERHAUL)
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=JetBrains+Mono:wght@300;500&display=swap');

:root {
  --neon-cyan: #00f3ff;
  --neon-magenta: #ff00ff;
  --neon-green: #39ff14;
  --dark-bg: #050a10;
  --terminal-bg: rgba(10, 20, 28, 0.95);
  --border-glow: 0 0 10px rgba(0, 243, 255, 0.5);
  --font-main: 'JetBrains Mono', monospace;
  --font-cyber: 'Orbitron', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--dark-bg);
  background-image: 
    linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  color: #e0e6ed;
  font-family: var(--font-main);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 📡 ACTIVITY TICKER */
.activity-ticker {
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid var(--neon-cyan);
  padding: 10px 0;
  position: fixed;
  top: 0;
  z-index: 1000;
  overflow: hidden;
}

.ticker-content {
  white-space: nowrap;
  display: inline-block;
  font-family: var(--font-main);
  font-size: 12px;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* 💠 CYBER CONTAINER */
.container {
  position: relative;
  background: var(--terminal-bg);
  width: 95%;
  max-width: 900px;
  padding: 40px;
  padding-bottom: 80px;
  border: 2px solid var(--neon-cyan);
  border-radius: 5px;
  box-shadow: 
    0 0 20px rgba(0, 243, 255, 0.2),
    inset 0 0 15px rgba(0, 243, 255, 0.1);
  backdrop-filter: blur(15px);
  clip-path: polygon(0 0, 95% 0, 100% 5%, 100% 100%, 5% 100%, 0 95%);
  margin-top: 60px; /* Space for ticker */
}

.container::before {
  content: "SYSTEM ONLINE // ENCRYPTED";
  position: absolute;
  top: -12px;
  left: 30px;
  background: var(--dark-bg);
  padding: 0 10px;
  color: var(--neon-cyan);
  font-size: 10px;
  letter-spacing: 2px;
}

/* ⚡ NEON BUTTONS */
button {
  font-family: var(--font-cyber);
  text-transform: uppercase;
  font-weight: bold;
  padding: 15px 30px;
  border: 1px solid var(--neon-cyan);
  background: transparent;
  color: var(--neon-cyan);
  cursor: pointer;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
  clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
}

button:hover {
  background: rgba(0, 243, 255, 0.1);
  box-shadow: 0 0 15px var(--neon-cyan);
  transform: translateY(-2px);
}

.primary-btn {
  background: var(--neon-cyan);
  color: var(--dark-bg);
  border: none;
}

.primary-btn:hover {
  background: #fff;
  box-shadow: 0 0 30px var(--neon-cyan);
  color: #000;
}

.secondary-btn {
  border-color: var(--neon-magenta);
  color: var(--neon-magenta);
}

.secondary-btn:hover {
  box-shadow: 0 0 15px var(--neon-magenta);
  background: rgba(255, 0, 255, 0.1);
}

/* 🗂️ MISSION CARDS */
.mission-section {
  margin-bottom: 40px;
  text-align: left;
}

.section-title {
  font-family: var(--font-cyber);
  color: var(--neon-magenta);
  font-size: 18px;
  border-bottom: 1px solid rgba(255, 0, 255, 0.3);
  padding-bottom: 10px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.missions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.missions button {
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}

/* 📊 PROGRESS BARS */
.xp-container {
  flex-grow: 1;
  text-align: left;
}

.rank-label {
  font-family: var(--font-cyber);
  color: var(--neon-cyan);
  font-size: 14px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.progress-bar, .strength-meter {
  background: #111;
  height: 12px;
  border: 1px solid #333;
  margin: 10px 0;
  overflow: hidden;
  position: relative;
}

.progress-bar div, .strength-meter div {
  height: 100%;
  transition: width 0.3s ease-in-out;
}

#progressFill, #userXPFill { background: var(--neon-cyan); box-shadow: 0 0 10px var(--neon-cyan); }
#healthBar { background: #ff003c; box-shadow: 0 0 10px #ff003c; }
#trustBar { background: var(--neon-green); box-shadow: 0 0 10px var(--neon-green); }
#strengthFill { background: #ff003c; transition: all 0.5s; }

/* 🛡️ PROFILE SECTION */
.profile-layout {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.achievement-gallery {
  min-width: 200px;
  text-align: left;
}

.achievement-gallery h3 {
  font-family: var(--font-cyber);
  color: var(--neon-green);
  font-size: 14px;
  text-transform: uppercase;
  margin-top: 0;
}

.badge-list {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.badge {
  font-size: 24px;
  background: rgba(255, 255, 255, 0.05);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--neon-green);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
  cursor: help;
}

/* 🛡️ SAFETY PROTOCOL CARD */
.protocol-card {
  background: rgba(0, 243, 255, 0.05);
  border-left: 4px solid var(--neon-green);
  padding: 20px;
  margin: 20px 0;
  text-align: left;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* 📜 LOG BOX (TERMINAL LOOK) */
.log-box {
  background: #000;
  border: 1px solid #1a1a1a;
  padding: 15px;
  color: var(--neon-green);
  font-family: 'JetBrains Mono';
  font-size: 12px;
  height: 200px;
  overflow-y: auto;
}

/* 🧛 CRT & SCANLINES */
.crt::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
              linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  z-index: 9999;
  background-size: 100% 3px, 3px 100%;
  pointer-events: none;
}

/* 🌀 GLITCH EFFECTS */
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

.glitch-active {
  animation: glitch 0.2s linear infinite;
  filter: hue-rotate(90deg) saturate(2);
}

@keyframes flash-red {
  0% { background-color: rgba(255, 0, 0, 0); }
  50% { background-color: rgba(255, 0, 0, 0.2); }
  100% { background-color: rgba(255, 0, 0, 0); }
}

@keyframes phishFlash {
  0% { opacity: 0; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.critical-flash {
  animation: flash-red 0.5s ease-in-out;
}

/* 📱 AUTH BOX OVERHAUL */
.auth-box {
  background: var(--terminal-bg);
  border: 2px solid var(--neon-magenta);
  padding: 50px;
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.2);
  clip-path: polygon(0 0, 90% 0, 100% 10%, 100% 100%, 10% 100%, 0 90%);
}

input {
  background: #000;
  border: 1px solid #333;
  color: var(--neon-cyan);
  padding: 15px;
  margin: 10px 0;
  font-family: var(--font-main);
}

input:focus {
  border-color: var(--neon-cyan);
  outline: none;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

/* 💬 CHAT INTERFACE */
.chat-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
  border-radius: 10px;
  height: 400px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-cyan) #111;
}

.chat-box::-webkit-scrollbar {
  width: 6px;
}

.chat-box::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: 10px;
}

.message {
  max-width: 80%;
  padding: 12px 18px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  animation: messageSlide 0.3s ease-out;
}

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

.message.bot {
  align-self: flex-start;
  background: #1f2937;
  color: #e0e6ed;
  border-bottom-left-radius: 2px;
  border: 1px solid #374151;
}

.message.user {
  align-self: flex-end;
  background: var(--neon-cyan);
  color: #000;
  border-bottom-right-radius: 2px;
  font-weight: 500;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.typing {
  font-style: italic;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.typing::after {
  content: "...";
  animation: ellipsis 1.5s infinite;
  width: 20px;
}

@keyframes ellipsis {
  0% { content: "."; }
  33% { content: ".."; }
  66% { content: "..."; }
}

#options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* 🛠️ INPUT GROUPS */
.input-group {
  display: flex;
  width: 100%;
  margin: 20px 0;
}

.input-group input {
  flex-grow: 1;
  margin: 0;
  border-right: none;
  border-radius: 5px 0 0 5px;
}

/* ♿ ACCESSIBILITY & USABILITY */
.high-contrast {
  --neon-cyan: #000;
  --neon-magenta: #000;
  --neon-green: #000;
  --dark-bg: #fff;
  --terminal-bg: #fff;
  --border-glow: none;
  color: #000 !important;
}

.high-contrast body {
  background-image: none !important;
  background-color: #fff !important;
  color: #000 !important;
}

.high-contrast .container {
  background: #fff !important;
  border: 2px solid #000 !important;
  box-shadow: none !important;
  color: #000 !important;
}

.high-contrast button {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid #000 !important;
  box-shadow: none !important;
  clip-path: none !important;
}

.high-contrast .section-title {
  color: #000 !important;
  border-bottom: 2px solid #000 !important;
}

.high-contrast .activity-ticker {
  background: #fff !important;
  border-bottom: 2px solid #000 !important;
  z-index: 1001 !important;
}

.high-contrast .crt::after {
  display: none !important;
}

.high-contrast * {
  color: #000 !important;
  background-color: transparent !important;
  border-color: #000 !important;
}

.high-contrast .container,
.high-contrast .modal-content,
.high-contrast .auth-box {
  background: #fff !important;
}

.high-contrast button,
.high-contrast input {
  background: #000 !important;
  color: #fff !important;
}

.high-contrast .progress-bar,
.high-contrast .strength-meter,
.high-contrast .log-box,
.high-contrast .chat-box {
  background: #f0f0f0 !important;
  border: 2px solid #000 !important;
}

.high-contrast #progressFill,
.high-contrast #userXPFill,
.high-contrast #healthBar,
.high-contrast #trustBar,
.high-contrast #strengthFill {
  background: #000 !important;
  box-shadow: none !important;
}

.high-contrast .modal {
  background: rgba(255, 255, 255, 0.95) !important;
}

.high-contrast code {
  background: #f0f0f0 !important;
  border: 1px solid #000 !important;
  padding: 2px 4px;
}

/* ============================================================
   ♿ ACCESSIBILITY — FOCUS STYLES & ARIA
============================================================ */
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
}

[role="alert"] {
  font-weight: bold;
}

/* ============================================================
   🔤 FONT SIZE CONTROLS (toggled via JS / localStorage)
============================================================ */
html.font-sm { font-size: 13px; }
html.font-md { font-size: 16px; }
html.font-lg { font-size: 20px; }

/* ============================================================
   🎞️ REDUCED MOTION — respect prefers-reduced-motion
============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .crt::after {
    display: none !important;
  }

  .ticker-content {
    animation: none !important;
    white-space: normal;
  }

  .glitch-active {
    animation: none !important;
    filter: none !important;
  }
}

/* ============================================================
   📱 MOBILE RESPONSIVE — screens < 600px
============================================================ */
@media (max-width: 600px) {
  .container {
    padding: 20px 15px;
    width: 100%;
    margin-top: 50px;
    clip-path: none;
    border-radius: 0;
  }

  .container::before {
    display: none;
  }

  .missions {
    grid-template-columns: 1fr;
  }

  .missions button {
    height: auto;
    padding: 15px;
  }

  .profile-layout {
    flex-direction: column;
    gap: 20px;
  }

  /* Smishing phone frame — responsive */
  .phone-frame {
    width: 90vw !important;
    max-width: 320px !important;
    height: auto !important;
    min-height: 400px;
  }

  /* Mission Creator two-column layout — stack on mobile */
  div[style*="display: flex"][style*="gap: 20px"] {
    flex-direction: column !important;
  }

  button {
    padding: 12px 16px;
    font-size: 12px;
  }

  .auth-box {
    padding: 30px 20px;
    clip-path: none;
  }

  #options {
    flex-direction: column;
    align-items: stretch;
  }

  #options button {
    width: 100%;
  }

  .drop-bins {
    flex-direction: column;
    align-items: center;
  }

  .drop-bin {
    width: 80%;
    max-width: 100%;
  }

  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  h3 { font-size: 15px; }
}

/* ============================================================
   📱 MOBILE RESPONSIVE — screens 601px–900px
============================================================ */
@media (min-width: 601px) and (max-width: 900px) {
  .container {
    padding: 25px 20px;
  }

  .missions {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* ============================================================
   🧭 ONBOARDING TOUR
============================================================ */
#tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  pointer-events: all;
}

#tour-spotlight {
  position: absolute;
  z-index: 10001;
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
  border: 2px solid var(--neon-cyan);
  box-shadow:
    0 0 0 4px rgba(0, 243, 255, 0.3),
    0 0 0 9999px rgba(0, 0, 0, 0.75);
  pointer-events: none;
  transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
}

#tour-card {
  position: absolute;
  z-index: 10002;
  width: 320px;
  background: var(--terminal-bg);
  border: 1px solid var(--neon-cyan);
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.25);
  font-family: var(--font-main);
  transition: top 0.3s ease, left 0.3s ease;
}

#tour-step-counter {
  font-size: 10px;
  color: #666;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

#tour-card h3 {
  color: var(--neon-cyan);
  font-family: var(--font-cyber);
  font-size: 14px;
  margin: 0 0 10px;
}

#tour-card p {
  font-size: 13px;
  color: #c0c8d0;
  line-height: 1.6;
  margin: 0 0 16px;
}

#tour-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tour-btn-primary {
  font-family: var(--font-cyber);
  font-size: 11px;
  padding: 8px 16px;
  background: var(--neon-cyan);
  color: var(--dark-bg);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  clip-path: none;
  text-transform: uppercase;
}

.tour-btn-primary:hover {
  background: #fff;
  box-shadow: 0 0 12px var(--neon-cyan);
  transform: none;
}

.tour-btn-secondary {
  font-family: var(--font-cyber);
  font-size: 11px;
  padding: 8px 14px;
  background: transparent;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  border-radius: 3px;
  cursor: pointer;
  clip-path: none;
  text-transform: uppercase;
}

.tour-btn-secondary:hover {
  background: rgba(0, 243, 255, 0.1);
  transform: none;
  box-shadow: none;
}

.tour-btn-skip {
  font-family: var(--font-main);
  font-size: 11px;
  padding: 4px 8px;
  background: transparent;
  color: #555;
  border: none;
  cursor: pointer;
  clip-path: none;
  text-decoration: underline;
  text-transform: none;
}

.tour-btn-skip:hover {
  color: #888;
  background: transparent;
  box-shadow: none;
  transform: none;
}

#tour-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.tour-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #333;
  border: 1px solid #555;
  cursor: pointer;
  transition: background 0.2s;
}

.tour-dot.active {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
}

.tour-highlight {
  position: relative;
  z-index: 10001;
}

/* Replay tour button in top bar */
#replayTourBtn {
  font-size: 10px;
  padding: 5px 10px;
  clip-path: none;
  border-color: #444;
  color: #666;
}

#replayTourBtn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: none;
}

/* ============================================================
   🎮 HOW TO PLAY MODAL
============================================================ */
#howToPlayModal .modal-content {
  animation: slideUp 0.4s ease-out;
  max-height: 85vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-cyan) #111;
}

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

#howToPlayModal .modal-content ul {
  padding-left: 18px;
  color: #c0c8d0;
}

#howToPlayModal .modal-content li {
  margin-bottom: 6px;
}

/* ============================================================
   ✅ MISSION TRACKER
============================================================ */
#missionTracker {
  border-top: 1px solid rgba(0, 243, 255, 0.15);
  padding-top: 12px;
}

#missionCheckList div {
  padding: 2px 0;
  transition: color 0.2s;
}

/* Fixed bars — mobile stacking */
@media (max-width: 600px) {
  #fontControlBar {
    top: auto;
    bottom: 55px;
    right: 15px;
  }

  #audioControlBar {
    bottom: 15px;
    right: 15px;
  }
}

/* ============================================================
   🔒 UNLOCK SYSTEM
============================================================ */
.lock-overlay {
  pointer-events: none;
}

button:disabled .lock-overlay {
  display: block;
}

/* Unlocks panel in profile */
.unlocks-panel {
  margin-top: 20px;
  border-top: 1px solid rgba(0,243,255,0.15);
  padding-top: 14px;
}

.unlock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid #111;
}

.unlock-row .unlock-icon { font-size: 16px; min-width: 24px; }
.unlock-row .unlock-label { flex: 1; color: #c0c8d0; }
.unlock-row .unlock-status-done { color: var(--neon-green); font-size: 11px; }
.unlock-row .unlock-status-locked { color: #555; font-size: 11px; }
.unlock-row .unlock-bar {
  width: 80px; height: 4px;
  background: #1a1a1a;
  border-radius: 2px;
  overflow: hidden;
}
.unlock-row .unlock-bar-fill {
  height: 100%;
  background: var(--neon-cyan);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.high-contrast .unlock-row .unlock-status-done { color: #000 !important; }
.high-contrast .unlock-row .unlock-bar-fill { background: #000 !important; }

/* ============================================================
   📱 MOBILE FIXES — font & audio bars + general layout
============================================================ */
@media (max-width: 600px) {
  /* Font size control bar — full-width strip above audio bar */
  #fontControlBar {
    top: auto !important;
    bottom: 56px !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: 1px solid var(--neon-cyan) !important;
    border-bottom: none !important;
    justify-content: center !important;
    padding: 5px 12px !important;
    gap: 12px !important;
    box-sizing: border-box !important;
  }

  #fontControlBar button {
    padding: 5px 14px !important;
    font-size: 13px !important;
    min-width: 38px !important;
    min-height: 34px !important;
    clip-path: none !important;
  }

  /* Audio control bar — full-width strip at very bottom */
  #audioControlBar {
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    justify-content: center !important;
    padding: 5px 12px !important;
    gap: 10px !important;
    box-sizing: border-box !important;
  }

  #audioControlBar #volumeSlider {
    width: 110px !important;
    flex-shrink: 1 !important;
  }

  #audioControlBar button {
    padding: 5px 10px !important;
    font-size: 14px !important;
    min-height: 34px !important;
    clip-path: none !important;
  }

  /* Extra bottom padding so content isn't hidden behind the two bars */
  .container {
    padding-bottom: 130px !important;
  }

  /* Chat box — shorter on small screens */
  .chat-box {
    height: 260px;
  }

  /* Input group — stack on mobile */
  .input-group {
    flex-direction: column;
  }

  .input-group input {
    border-right: 1px solid #333;
    border-radius: 5px;
    margin-bottom: 8px;
  }

  .input-group button {
    border-radius: 5px;
    width: 100%;
  }

  /* Log box — shorter */
  .log-box {
    height: 140px;
    font-size: 11px;
  }

  /* Badge list — wrap on small screens */
  .badge-list {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Unlock row bar — wider on mobile */
  .unlock-row .unlock-bar {
    width: 60px;
  }

  /* Tour card — full width */
  #tour-card {
    width: calc(100vw - 30px) !important;
    left: 15px !important;
  }

  /* Auth box */
  .auth-box {
    width: 95%;
    padding: 25px 15px;
  }

  /* Tables — allow horizontal scroll */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================================
   ⚙️ SETTINGS PANEL — mobile
============================================================ */
@media (max-width: 600px) {
  #settingsToggleBtn {
    top: auto !important;
    bottom: 15px !important;
    right: 15px !important;
  }

  #settingsPanel {
    top: auto !important;
    bottom: 60px !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
  }
}
