/* ============================================================
   MENU PREVIEW — Precision Cockpit Theme
   Full interactive GUI preview modal
   ============================================================ */

/* --- Overlay --- */
.mp-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.mp-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Window --- */
.mp-window {
  width: 1200px;
  max-width: 96vw;
  height: 720px;
  max-height: 90vh;
  background: #0a0a14;
  border-radius: 12px;
  border: 1px solid rgba(124,58,237,0.18);
  box-shadow:
    0 0 60px rgba(124,58,237,0.12),
    0 25px 80px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
  position: relative;
}
.mp-overlay.active .mp-window {
  transform: scale(1) translateY(0);
}

/* --- Title Bar --- */
.mp-titlebar {
  height: 42px;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: rgba(10,10,20,0.95);
  border-bottom: 1px solid rgba(124,58,237,0.06);
  user-select: none;
  gap: 8px;
}
.mp-titlebar-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0.8;
}
.mp-titlebar-title {
  font-family: 'Segoe UI', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: #EEEEF5;
  letter-spacing: 0.5px;
  flex: 1;
}
.mp-titlebar-controls {
  display: flex;
  gap: 2px;
}
.mp-titlebar-btn {
  width: 36px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #8888A0;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
  font-family: 'Segoe UI', sans-serif;
}
.mp-titlebar-btn:hover {
  background: rgba(124,58,237,0.12);
  color: #EEEEF5;
}
.mp-titlebar-btn.close:hover {
  background: #F43F5E;
  color: #fff;
}

/* --- Body --- */
.mp-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* --- Sidebar --- */
.mp-sidebar {
  width: 200px;
  min-width: 200px;
  background: rgba(15,15,26,0.97);
  border-right: 1px solid rgba(124,58,237,0.08);
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  overflow-y: auto;
}
.mp-sidebar::-webkit-scrollbar { width: 0; }

.mp-nav-sep {
  height: 1px;
  background: rgba(124,58,237,0.08);
  margin: 6px 14px;
}
.mp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin: 1px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Segoe UI', 'Inter', sans-serif;
  font-size: 13px;
  color: #8888A0;
  transition: all 0.15s;
  user-select: none;
  border-left: 3px solid transparent;
}
.mp-nav-item:hover {
  background: rgba(124,58,237,0.08);
  color: #b0b0c8;
}
.mp-nav-item.active {
  background: rgba(124,58,237,0.12);
  border-left: 3px solid #7C3AED;
  border-radius: 0 6px 6px 0;
  color: #EEEEF5;
}
.mp-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  opacity: 0.7;
}
.mp-nav-item.active .mp-nav-icon { opacity: 1; }

.mp-nav-spacer { flex: 1; }

.mp-nav-bottom {
  border-top: 1px solid rgba(124,58,237,0.06);
  padding-top: 6px;
  margin-top: 4px;
}

/* --- Content Area --- */
.mp-content {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px 40px;
  scroll-behavior: smooth;
}
.mp-content::-webkit-scrollbar { width: 5px; }
.mp-content::-webkit-scrollbar-track { background: transparent; }
.mp-content::-webkit-scrollbar-thumb {
  background: #1C1C2E;
  border-radius: 3px;
}
.mp-content::-webkit-scrollbar-thumb:hover { background: #7C3AED; }

/* --- Page Container --- */
.mp-page { display: none; }
.mp-page.active { display: block; animation: mpFadeIn 0.22s ease; }

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

/* --- Card Group --- */
.mp-card-group {
  margin-bottom: 22px;
}
.mp-card-group-title {
  font-family: 'Consolas', 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #A78BFA;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(124,58,237,0.18);
}

/* --- Setting Card --- */
.mp-card {
  background: rgba(22,22,34,0.72);
  border: 1px solid rgba(124,58,237,0.07);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s, border-color 0.15s;
}
.mp-card:hover {
  background: rgba(28,28,46,0.72);
  border-color: rgba(124,58,237,0.14);
}
.mp-card-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #A78BFA;
  font-size: 15px;
  flex-shrink: 0;
}
.mp-card-info {
  flex: 1;
  min-width: 0;
}
.mp-card-title {
  font-family: 'Segoe UI', 'Inter', sans-serif;
  font-size: 13.5px;
  color: #EEEEF5;
  line-height: 1.3;
}
.mp-card-desc {
  font-size: 11.5px;
  color: #666680;
  line-height: 1.3;
  margin-top: 2px;
}
.mp-card-control {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Slider --- */
.mp-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mp-slider {
  position: relative;
  width: 180px;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.mp-slider-track {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: #1C1C2E;
  border-radius: 2px;
}
.mp-slider-fill {
  position: absolute;
  left: 0;
  height: 4px;
  background: #7C3AED;
  border-radius: 2px;
  pointer-events: none;
}
.mp-slider-thumb {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #7C3AED;
  border: 2px solid #A78BFA;
  border-radius: 50%;
  transform: translateX(-50%);
  cursor: grab;
  transition: box-shadow 0.15s, transform 0.1s;
  z-index: 2;
}
.mp-slider-thumb:hover,
.mp-slider-thumb.dragging {
  box-shadow: 0 0 10px rgba(124,58,237,0.5);
  transform: translateX(-50%) scale(1.15);
}
.mp-slider-val {
  font-family: 'Consolas', 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #A78BFA;
  min-width: 48px;
  text-align: right;
  user-select: none;
}

/* --- Switch --- */
.mp-switch {
  width: 42px;
  height: 22px;
  border-radius: 11px;
  background: #1C1C2E;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
  border: 1px solid rgba(124,58,237,0.1);
}
.mp-switch.on {
  background: #7C3AED;
  border-color: #7C3AED;
}
.mp-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #50505F;
  transition: left 0.2s, background 0.2s;
}
.mp-switch.on .mp-switch-thumb {
  left: 22px;
  background: #FFFFFF;
}

/* --- ComboBox --- */
.mp-combo {
  position: relative;
  min-width: 130px;
}
.mp-combo-trigger {
  background: rgba(22,22,34,0.9);
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: 8px;
  padding: 6px 30px 6px 12px;
  color: #EEEEF5;
  font-size: 13px;
  font-family: 'Segoe UI', 'Inter', sans-serif;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.15s;
}
.mp-combo-trigger:hover { border-color: rgba(124,58,237,0.28); }
.mp-combo-trigger::after {
  content: '▾';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #8888A0;
  pointer-events: none;
}
.mp-combo-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  background: #0F0F1A;
  border: 1px solid rgba(124,58,237,0.18);
  border-radius: 8px;
  padding: 4px;
  z-index: 100;
  display: none;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  max-height: 200px;
  overflow-y: auto;
}
.mp-combo-dropdown.open { display: block; animation: mpDropIn 0.15s ease; }
@keyframes mpDropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mp-combo-opt {
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 13px;
  color: #EEEEF5;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
}
.mp-combo-opt:hover { background: rgba(124,58,237,0.10); }
.mp-combo-opt.selected { background: rgba(124,58,237,0.15); color: #A78BFA; }

/* --- SpinBox --- */
.mp-spin {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(22,22,34,0.9);
}
.mp-spin-btn {
  width: 28px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #8888A0;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.12s;
  font-family: 'Consolas', monospace;
}
.mp-spin-btn:hover { background: rgba(124,58,237,0.12); color: #A78BFA; }
.mp-spin-val {
  min-width: 40px;
  text-align: center;
  font-family: 'Consolas', 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #A78BFA;
  padding: 0 4px;
  user-select: none;
}

/* --- Segmented Widget --- */
.mp-segment {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(124,58,237,0.1);
  margin-bottom: 10px;
}
.mp-segment-item {
  padding: 7px 18px;
  font-size: 13px;
  color: #8888A0;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Segoe UI', 'Inter', sans-serif;
  user-select: none;
  text-align: center;
  flex: 1;
  position: relative;
}
.mp-segment-item:hover { color: #b0b0c8; background: rgba(124,58,237,0.05); }
.mp-segment-item.active {
  color: #EEEEF5;
  background: rgba(124,58,237,0.12);
}
.mp-segment-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #7C3AED;
  border-radius: 2px;
}

/* --- Buttons --- */
.mp-btn-primary {
  background: #7C3AED;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-family: 'Segoe UI', 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.mp-btn-primary:hover { background: #6D28D9; }

.mp-btn {
  background: rgba(22,22,34,0.9);
  color: #EEEEF5;
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-family: 'Segoe UI', 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.mp-btn:hover { background: rgba(28,28,46,0.9); border-color: rgba(124,58,237,0.25); }

/* --- KeyBind Button --- */
.mp-keybind {
  background: rgba(22,22,34,0.9);
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: 8px;
  padding: 6px 16px;
  color: #EEEEF5;
  font-family: 'Consolas', monospace;
  font-size: 13px;
  min-width: 100px;
  text-align: center;
  cursor: default;
  user-select: none;
}

/* --- Config Page Split Layout --- */
.mp-config-layout {
  display: flex;
  gap: 16px;
  height: 100%;
}
.mp-config-left,
.mp-config-right {
  background: rgba(15,15,26,0.6);
  border: 1px solid rgba(124,58,237,0.1);
  border-radius: 12px;
  padding: 16px;
}
.mp-config-left { flex: 1.6; display: flex; flex-direction: column; }
.mp-config-right { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.mp-config-panel-title {
  font-family: 'Segoe UI', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #EEEEF5;
  margin-bottom: 12px;
}
.mp-config-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}
.mp-config-item {
  background: rgba(22,22,34,0.7);
  border: 1px solid rgba(124,58,237,0.08);
  border-radius: 8px;
  padding: 11px 16px;
  margin-bottom: 6px;
  color: #EEEEF5;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.12s;
}
.mp-config-item:hover {
  background: rgba(28,28,46,0.7);
  border-color: rgba(124,58,237,0.2);
}
.mp-config-item.selected {
  background: rgba(124,58,237,0.10);
  border-color: #7C3AED;
  border-left: 3px solid #7C3AED;
}
.mp-config-sep {
  height: 1px;
  background: rgba(124,58,237,0.08);
  margin: 6px 0;
}
.mp-config-right .mp-btn,
.mp-config-right .mp-btn-primary {
  width: 100%;
  text-align: center;
}

/* --- About Section --- */
.mp-about {
  padding: 20px;
}
.mp-about-title {
  font-family: 'Segoe UI', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #EEEEF5;
}
.mp-about-sub {
  font-size: 13px;
  color: #8888A0;
  margin-top: 4px;
}
.mp-about-ver {
  font-size: 13px;
  color: #50505F;
  margin-top: 8px;
  font-family: 'Consolas', monospace;
}

/* --- Status Label --- */
.mp-status-on {
  color: #10B981;
  font-weight: 600;
  font-family: 'Consolas', monospace;
  font-size: 13px;
}
.mp-status-off {
  color: #F43F5E;
  font-weight: 600;
  font-family: 'Consolas', monospace;
  font-size: 13px;
}

/* --- Menu Preview Trigger Button (for hero sections) --- */
.btn-menu-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.25);
  color: #A78BFA;
  padding: 12px 26px;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}
.btn-menu-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(124,58,237,0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-menu-preview:hover {
  background: rgba(124,58,237,0.15);
  border-color: #7C3AED;
  color: #EEEEF5;
  box-shadow: 0 0 25px rgba(124,58,237,0.2);
  transform: translateY(-1px);
}
.btn-menu-preview:hover::before { opacity: 1; }
.btn-menu-preview svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* --- Aim Page Two-Column Layout --- */
.mp-aim-layout {
  display: flex;
  gap: 16px;
}
.mp-aim-left { flex: 1; min-width: 0; }
.mp-aim-right {
  width: 220px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 0;
  align-self: flex-start;
}

/* --- HUD Stats Panel --- */
.mp-hud-panel {
  background: rgba(15,15,26,0.92);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: 10px;
  padding: 12px 14px;
}
.mp-hud-title {
  font-family: 'Consolas', monospace;
  font-size: 11px;
  font-weight: bold;
  color: #A78BFA;
  letter-spacing: 2px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(124,58,237,0.35);
  margin-bottom: 6px;
}
.mp-hud-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 22px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 10px;
  color: #8888A0;
}
.mp-hud-val {
  font-family: 'Consolas', monospace;
  font-size: 10px;
  font-weight: bold;
  color: #A78BFA;
}
.mp-hud-muted { color: #8888A0 !important; }

/* --- FOV Circle --- */
.mp-fov-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mp-fov-circle canvas { display: block; }
.mp-fov-label {
  font-family: 'Consolas', monospace;
  font-size: 10px;
  color: #8888A0;
  margin-top: -10px;
}

/* --- Humanization Top Section --- */
.mp-hum-top {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.mp-hum-canvas-wrap {
  flex: 3;
  background: rgba(22,22,34,0.6);
  border: 1px solid rgba(124,58,237,0.08);
  border-radius: 10px;
  overflow: hidden;
}
.mp-hum-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 200px;
}
.mp-hum-status {
  flex: 1;
  min-width: 140px;
  padding: 10px 12px;
}
.mp-hum-status-title {
  font-family: 'Consolas', monospace;
  font-size: 8px;
  font-weight: bold;
  color: #8888A0;
  letter-spacing: 2px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(124,58,237,0.2);
  margin-bottom: 6px;
}
.mp-hum-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: #A0A0B8;
  height: 20px;
}
.mp-hum-status-row span:last-child {
  margin-left: auto;
  font-family: 'Consolas', monospace;
  font-weight: bold;
  font-size: 9px;
}
.mp-hum-dot { font-size: 10px; }
.mp-hum-dot.off { color: #374151; }
.mp-hum-dot.on { color: #10B981; }
.mp-hum-status-val.off { color: #4B5563; }
.mp-hum-status-val.on { color: #10B981; }

/* --- Trigger Skeleton Layout --- */
.mp-trigger-area {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.mp-skeleton-wrap {
  width: 100px;
  min-width: 100px;
  background: rgba(15,15,26,0.7);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.mp-skeleton-wrap canvas { display: block; }
.mp-trigger-sliders { flex: 1; min-width: 0; }

/* --- Switch Label --- */
.mp-switch-label {
  font-family: 'Segoe UI', sans-serif;
  font-size: 12px;
  color: #8888A0;
  margin-right: 6px;
  user-select: none;
}

/* --- RCS Visualizer --- */
.mp-rcs-visualizer {
  margin-top: 8px;
}
.mp-rcs-visualizer canvas,
.mp-rcs-adv-card canvas {
  display: block;
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(124,58,237,0.08);
}
.mp-rcs-adv-card {
  background: rgba(22,22,34,0.5);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 8px;
}
.mp-rcs-textarea {
  background: rgba(22,22,34,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  color: #e0e0e0;
  font-family: 'Consolas', monospace;
  font-size: 13px;
  padding: 10px;
  min-height: 60px;
  white-space: pre;
}
.mp-rcs-name-input {
  background: rgba(22,22,34,0.6);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 13px;
  padding: 6px 10px;
  width: 180px;
  outline: none;
}
.mp-rcs-name-input:focus { border-color: rgba(124,58,237,0.4); }

/* --- Responsive --- */
@media (max-width: 1300px) {
  .mp-window { width: 96vw; height: 85vh; }
  .mp-sidebar { width: 180px; min-width: 180px; }
}

@media (max-width: 900px) {
  .mp-window { width: 98vw; height: 92vh; border-radius: 8px; }
  .mp-sidebar { width: 56px; min-width: 56px; }
  .mp-nav-item span { display: none; }
  .mp-nav-item { padding: 10px; justify-content: center; margin: 1px 4px; }
  .mp-nav-icon { font-size: 18px; }
  .mp-config-layout { flex-direction: column; }
  .mp-aim-layout { flex-direction: column; }
  .mp-aim-right { width: 100%; min-width: 100%; flex-direction: row; flex-wrap: wrap; position: static; }
  .mp-hum-top { flex-direction: column; }
  .mp-trigger-area { flex-direction: column; }
  .mp-skeleton-wrap { width: 80px; min-width: 80px; }

  /* Cards stack: title row + control row */
  .mp-card {
    flex-wrap: wrap;
    gap: 8px;
  }
  .mp-card-control {
    width: 100%;
    flex-shrink: 1;
    justify-content: flex-end;
  }
  .mp-slider { width: 100% !important; max-width: 100%; }
  .mp-slider-wrap { width: 100%; }
  .mp-combo { min-width: 120px; max-width: 100%; }
}

@media (max-width: 600px) {
  .mp-overlay { padding: 0; }
  .mp-window { width: 100vw; height: 100vh; border-radius: 0; max-width: 100vw; max-height: 100vh; }
  .mp-sidebar { width: 42px; min-width: 42px; }
  .mp-nav-item { padding: 8px; margin: 1px 2px; }
  .mp-nav-icon { font-size: 16px; }
  .mp-content { padding: 12px 10px 30px; }
  .mp-titlebar { padding: 0 8px; }
  .mp-titlebar-title { font-size: 12px; }

  /* Cards fully stacked vertically */
  .mp-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
  }
  .mp-card-icon {
    position: absolute;
    display: none; /* hide emoji icons on very small screens to save space */
  }
  .mp-card-info {
    width: 100%;
    min-width: 0;
  }
  .mp-card-title {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mp-card-desc {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .mp-card-control {
    width: 100%;
    flex-shrink: 1;
    min-width: 0;
  }

  /* Sliders take full width */
  .mp-slider {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
  }
  .mp-slider-wrap {
    width: 100%;
    min-width: 0;
  }
  .mp-slider-val {
    min-width: 36px;
    flex-shrink: 0;
    font-size: 12px;
  }

  /* Combo boxes */
  .mp-combo {
    min-width: 100px;
    max-width: 100%;
    flex: 1;
  }
  .mp-combo-trigger {
    font-size: 12px;
    padding: 5px 28px 5px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mp-combo-dropdown {
    max-width: 200px;
  }

  /* Switches inline with label */
  .mp-switch-label { font-size: 11px; }

  /* Buttons */
  .mp-btn-primary, .mp-btn {
    font-size: 11px;
    padding: 6px 12px;
    white-space: nowrap;
  }

  /* Segment tabs */
  .mp-segment { flex-wrap: wrap; }
  .mp-segment-item { font-size: 11px; padding: 6px 10px; }

  /* Group title */
  .mp-card-group-title { font-size: 9px; letter-spacing: 2px; }

  /* HUD panel */
  .mp-hud-panel { padding: 8px 10px; }
  .mp-hud-title { font-size: 10px; }
  .mp-hud-row { font-size: 9px; height: 20px; }
  .mp-hud-val { font-size: 9px; }

  /* FOV circle */
  .mp-fov-circle canvas { width: 120px; height: 140px; }
  .mp-fov-label { font-size: 9px; }

  /* Aim layout right panel horizontal on mobile */
  .mp-aim-right {
    flex-direction: row;
    gap: 8px;
    width: 100%;
    min-width: 100%;
    position: static;
  }
  .mp-aim-right .mp-hud-panel { flex: 1; min-width: 0; }
  .mp-aim-right .mp-fov-circle { flex-shrink: 0; }

  /* Humanization canvas */
  .mp-hum-canvas-wrap canvas { height: 140px; }
  .mp-hum-status { min-width: 100px; }
  .mp-hum-status-title { font-size: 7px; }
  .mp-hum-status-row { font-size: 8px; height: 18px; }

  /* Trigger skeleton */
  .mp-skeleton-wrap { width: 70px; min-width: 70px; padding: 6px; }

  /* RCS */
  .mp-rcs-adv-card { padding: 10px; }
  .mp-rcs-textarea { font-size: 11px; min-height: 45px; }
  .mp-rcs-name-input { width: 120px; font-size: 11px; }

  /* Keybind */
  .mp-keybind { font-size: 11px; padding: 5px 10px; }

  /* Config */
  .mp-config-layout { flex-direction: column; gap: 10px; }
  .mp-config-left { min-width: 100%; }
  .mp-config-right { min-width: 100%; }

  /* About */
  .mp-about-title { font-size: 20px; }
  .mp-about-sub { font-size: 11px; }
}

/* Extra small (< 400px) */
@media (max-width: 400px) {
  .mp-sidebar { width: 36px; min-width: 36px; }
  .mp-nav-item { padding: 7px; margin: 0 1px; }
  .mp-nav-icon { font-size: 14px; }
  .mp-content { padding: 8px 8px 24px; }
  .mp-card { padding: 8px 10px; gap: 6px; }
  .mp-card-title { font-size: 12px; }
  .mp-card-desc { font-size: 9px; }
  .mp-slider-val { font-size: 11px; min-width: 30px; }
  .mp-combo-trigger { font-size: 11px; padding: 4px 24px 4px 8px; }
  .mp-segment-item { font-size: 10px; padding: 5px 8px; }
  .mp-btn-primary, .mp-btn { font-size: 10px; padding: 5px 10px; }
  .mp-hum-top { gap: 6px; }
  .mp-hum-canvas-wrap canvas { height: 120px; }
  .mp-aim-right { flex-direction: column; }
}
