/* Import Lexend font from Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;700&display=swap");

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Lexend", sans-serif;
}

/* Force Lexend font on all menu elements */
.menu,
.menu *,
.nexusmodal,
.nexusmodal *,
.nexustoast,
.nexustoast * {
  font-family: "Lexend", sans-serif !important;
}

/* Restore FontAwesome font for icons */
.menu .fa,
.menu .fas,
.menu .far,
.menu .fab,
.menu .fal,
.menu .fad,
.menu [class*="fa-"],
.nexusmodal .fa,
.nexusmodal .fas,
.nexusmodal .far,
.nexusmodal .fab,
.nexusmodal .fal,
.nexusmodal .fad,
.nexusmodal [class*="fa-"],
.nexustoast .fa,
.nexustoast .fas,
.nexustoast .far,
.nexustoast .fab,
.nexustoast .fal,
.nexustoast .fad,
.nexustoast [class*="fa-"] {
  font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
}

:root {
  --transition-speed: 500ms;
  --easing: cubic-bezier(0.22, 1, 0.36, 1);
  --ring-color: rgba(59, 130, 246, 0.45);

  --primary-color: #0d6efd;
  --secondary-color: #f0f0f0;
  --background-color: #f5f7fa;
  --header-bg: #4a90e2;
  --header-color: #f0f0f0;
  --button-bg: #e0e0e0;
  --button-color: #333;
  --button-hover-bg: #9cf;
  --button-active-bg: #4a90e2;
  --button-active-color: #fff;
  --settings-color: #4a90e2;
  --settings-hover-color: #003e7d;
  --feature-options-bg: #fff;
  --feature-options-active-bg: #2f5c91;
  --border-color: #ddd;
  --shadow: rgba(0, 0, 0, 0.2);
  --feature-bg: #f0f0f0;
  --input-bg: #fff;
  --nexus-text-color: #333;
  --feature-options-text: #f9fafb;
  --scrollbar-track: #f1f1f1;
  --scrollbar-thumb: #66b3ff;
  --footer-bg: #f0f0f0;
  --glow-shadow: 0 0 30px rgba(29, 78, 216, 0.6);
}

/* Theme Variants */
body.red-theme {
  --primary-color: #e74c3c;
  --header-bg: #e74c3c;
  --button-hover-bg: #e7b9b9;
  --button-active-bg: #c0392b;
  --settings-color: #c0392b;
  --feature-options-active-bg: #9b2f1f;
  --footer-bg: #fdf5f5;
  --scrollbar-thumb: #e0b4b4;
  --glow-shadow: 0 0 30px rgba(231, 76, 60, 0.6);
}

body.green-theme {
  --primary-color: #28a745;
  --header-bg: #218838;
  --button-hover-bg: #a3d59a;
  --button-active-bg: #28a745;
  --settings-color: #1e7e34;
  --settings-hover-color: #155d27;
  --feature-options-active-bg: #1e7e34;
  --footer-bg: #f3fdf7;
  --scrollbar-thumb: #28a745;
  --glow-shadow: 0 0 30px rgba(40, 167, 69, 0.6);
}

body.purple-theme {
  --primary-color: #9b59b6;
  --header-bg: #8e44ad;
  --button-hover-bg: #ba7db2;
  --button-active-bg: #9b59b6;
  --settings-color: #7d3c8f;
  --settings-hover-color: #5a2b6c;
  --feature-options-active-bg: #7d3c8f;
  --footer-bg: #f9f1fd;
  --scrollbar-thumb: #9b59b6;
  --glow-shadow: 0 0 30px rgba(155, 89, 182, 0.6);
}

body.orange-theme {
  --primary-color: #f60;
  --header-bg: #e65c00;
  --button-hover-bg: #ff7f3a;
  --button-active-bg: #f60;
  --settings-color: #cc5200;
  --settings-hover-color: #994100;
  --feature-options-active-bg: #cc5200;
  --footer-bg: #ffecdf;
  --scrollbar-thumb: #f60;
  --glow-shadow: 0 0 30px rgba(255, 102, 0, 0.6);
}

body.teal-theme {
  --primary-color: #1abc9c;
  --header-bg: #16a085;
  --button-hover-bg: #6ac1a0;
  --button-active-bg: #1abc9c;
  --settings-color: #148f72;
  --settings-hover-color: #0c6b4f;
  --feature-options-active-bg: #148f72;
  --footer-bg: #d5f6f1;
  --scrollbar-thumb: #1abc9c;
  --glow-shadow: 0 0 30px rgba(26, 188, 156, 0.6);
}

body.yellow-theme {
  --primary-color: #f39c12;
  --header-bg: #e67e22;
  --button-hover-bg: #f7d358;
  --button-active-bg: #f39c12;
  --settings-color: #d35400;
  --settings-hover-color: #c0392b;
  --feature-options-active-bg: #e67e22;
  --footer-bg: #fef9e5;
  --scrollbar-thumb: #f39c12;
  --glow-shadow: 0 0 30px rgba(243, 156, 18, 0.6);
}

body.pink-theme {
  --primary-color: #e91e63;
  --header-bg: #d81b60;
  --button-hover-bg: #f9c9d5;
  --button-active-bg: #e91e63;
  --settings-color: #c2185b;
  --settings-hover-color: #880e4f;
  --feature-options-active-bg: #c2185b;
  --footer-bg: #fce4ec;
  --scrollbar-thumb: #e91e63;
  --glow-shadow: 0 0 30px rgba(233, 30, 99, 0.6);
}

body.indigo-theme {
  --primary-color: #6366f1;
  --header-bg: #4f46e5;
  --button-hover-bg: #818cf8;
  --button-active-bg: #4338ca;
  --settings-color: #4338ca;
  --settings-hover-color: #3730a3;
  --feature-options-active-bg: #4f46e5;
  --footer-bg: #fce4ec;
  --scrollbar-thumb: #6366f1;
  --glow-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

body.rose-theme {
  --primary-color: #f43f5e;
  --header-bg: #e11d48;
  --button-hover-bg: #fb7185;
  --button-active-bg: #be123c;
  --settings-color: #be123c;
  --settings-hover-color: #9f1239;
  --feature-options-active-bg: #e11d48;
  --footer-bg: #fce4ec;
  --scrollbar-thumb: #f43f5e;
  --glow-shadow: 0 0 30px rgba(244, 63, 94, 0.6);
}

body.emerald-theme {
  --primary-color: #10b981;
  --header-bg: #059669;
  --button-hover-bg: #34d399;
  --button-active-bg: #047857;
  --settings-color: #047857;
  --settings-hover-color: #065f46;
  --feature-options-active-bg: #059669;
  --footer-bg: #fce4ec;
  --scrollbar-thumb: #10b981;
  --glow-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
}

body.amber-theme {
  --primary-color: #f59e0b;
  --header-bg: #d97706;
  --button-hover-bg: #fbbf24;
  --button-active-bg: #b45309;
  --settings-color: #b45309;
  --settings-hover-color: #92400e;
  --feature-options-active-bg: #d97706;
  --footer-bg: #fffbeb;
  --scrollbar-thumb: #f59e0b;
  --glow-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
}

body.slate-theme {
  --primary-color: #64748b;
  --header-bg: #475569;
  --button-hover-bg: #94a3b8;
  --button-active-bg: #334155;
  --settings-color: #334155;
  --settings-hover-color: #1f2937;
  --feature-options-active-bg: #475569;
  --footer-bg: #f8fafc;
  --scrollbar-thumb: #64748b;
  --glow-shadow: 0 0 30px rgba(100, 116, 139, 0.6);
}

body.nord-theme {
  --primary-color: #88c0d0;
  --header-bg: #5e81ac;
  --button-hover-bg: #8fbcbb;
  --button-active-bg: #4c566a;
  --settings-color: #5e81ac;
  --settings-hover-color: #3b4252;
  --feature-options-active-bg: #5e81ac;
  --footer-bg: #eceff4;
  --scrollbar-thumb: #88c0d0;
  --glow-shadow: 0 0 30px rgba(136, 192, 208, 0.6);
}

body.cyber-theme {
  --primary-color: #00ffd1;
  --header-bg: #00c2a8;
  --button-hover-bg: #7bfff0;
  --button-active-bg: #00a38c;
  --settings-color: #00a38c;
  --settings-hover-color: #008f7b;
  --feature-options-active-bg: #00c2a8;
  --footer-bg: #e6fffb;
  --scrollbar-thumb: #00ffd1;
  --glow-shadow: 0 0 30px rgba(0, 255, 209, 0.6);
}

body.dark-mode {
  --background-color: #1c1c2e;
  --secondary-color: #111827;
  --header-bg: #111827;
  --header-color: #f0f0f0;
  --button-bg: #3a3a4f;
  --button-color: #f0f0f0;
  --button-hover-bg: #5a5a75;
  --button-active-color: #f0f0f0;
  --feature-options-bg: #4e4e60;
  --footer-bg: #111726;
  --input-bg: #31313c;
  --feature-bg: #1e1e2c;
  --border-color: #444;
  --nexus-text-color: #f0f0f0;
  --scrollbar-track: #2a2a3a;
}

/* Modern Modal Styles */
.nexusmodal {
  position: relative;
  max-width: 440px;
  width: 90%;
  margin: auto;
  border: none;
  border-radius: 20px;
  padding: 0;
  background:
    radial-gradient(130% 100% at 50% 0%, rgba(99, 102, 241, 0.16), transparent 58%),
    linear-gradient(165deg, #0c1120, #070a12);
  font-family: "Lexend", sans-serif;
  color: #e5e7eb;
  /* Pin the modal's own font-size so descendant `em` units compute
     against a known base. Host sites sometimes set
     `html { font-size: 62.5% }` (= 10px), which would otherwise
     shrink any descendant using `rem` to ~62% of intended. With this
     pin in place plus `em` (not `rem`) on descendants, the modal
     renders at its design size regardless of the host page. */
  font-size: 16px !important;
  box-shadow:
    0 30px 60px -15px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    var(--glow-shadow);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.94) translateY(16px);
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2147483647;
}

/* Gradient accent bar across the very top of the modal */
.nexusmodal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--header-bg), #6366f1 55%, #22d3ee);
  opacity: 0.9;
  pointer-events: none;
}

.nexusmodal.modal--show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.nexusmodal::backdrop {
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  transition: opacity 0.35s ease;
  opacity: 0;
}

.nexusmodal.modal--show::backdrop {
  opacity: 1;
}

.nexusmodal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  background: transparent;
  color: #f8fafc;
  padding: 20px 22px 14px 22px;
  font-family: "Lexend", sans-serif;
}

.nexusmodal-header h2 {
  margin: 0;
  font-size: 1.2em;
  text-align: left;
  flex-grow: 1;
  font-family: "Lexend", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Glowing accent dot before every title */
.nexusmodal-header h2::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  background: linear-gradient(135deg, var(--header-bg), #6366f1);
  box-shadow: 0 0 12px 1px var(--ring-color);
}

.nexusmodal-close-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 1.15em;
  line-height: 1;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.nexusmodal-close-button:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  transform: rotate(90deg);
}

.nexusmodal-content {
  padding: 4px 22px 22px 22px;
  color: #aeb7c6;
  font-size: 0.95em;
  line-height: 1.65;
}

.nexusmodal-content p {
  margin: 0 0 1em 0;
}

.nexusmodal-content p:last-child {
  margin-bottom: 0;
}

.nexusmodal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 24px 24px;
}

.nexusmodal-button {
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
  font-family: "Lexend", sans-serif;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.nexusmodal-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nexusmodal-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.nexusmodal-button:hover::before {
  opacity: 1;
}

.nexusmodal-button:active {
  transform: translateY(0);
}

.nexusmodal-button--success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: transparent;
  color: #fff;
}

.nexusmodal-button--success:hover {
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.45);
}

.nexusmodal-button--danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: transparent;
  color: #fff;
}

.nexusmodal-button--danger:hover {
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45);
}

.nexusmodal-button--info {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-color: transparent;
  color: #fff;
}

.nexusmodal-button--info:hover {
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
}

.nexusmodal-button--neutral {
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
}

.nexusmodal-button--neutral:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}
.nexus-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  opacity: 0;
  /* Never intercept clicks — this overlay is purely a visual blackout
     for the first-run welcome fade. The welcome modal traps focus on
     its own; without this rule the overlay (which can be stuck at
     display:block if the hide setTimeout was cleared by navigation)
     silently blocks every click on the underlying page. */
  pointer-events: none;
  transition: opacity 1.2s ease;
  z-index: 2147483644;
}
.menu {
  min-height: 10px;
  font-family: "Lexend", sans-serif;
  max-width: 340px;
  max-height: 60vh;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #0b0f1a, #111827);
  box-shadow: var(--glow-shadow);
  position: fixed;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    background-color var(--transition-speed),
    color var(--transition-speed),
    max-width var(--transition-speed) var(--easing),
    padding var(--transition-speed),
    opacity 1s ease,
    transform var(--transition-speed),
    max-height var(--transition-speed) ease;
  z-index: 2147483645; /* Ensure the menu is on top */
}
@media (max-width: 768px) {
  .menu {
    max-height: 100vh;
  }
}
.menu-header {
  background: var(--header-bg);
  color: var(--header-color);
  padding: 10px 15px;
  cursor: move;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  box-shadow: 0 4px 6px var(--shadow);
  text-shadow: 0 0 6px rgba(96, 165, 250, 0.8);
  border-bottom: 1px solid var(--border-color);
  transition:
    background-color var(--transition-speed),
    color var(--transition-speed);
}
.menu-header .logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
}
.header-info {
  display: flex;
  flex-direction: column;
}
.header-text {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  text-align: left;
}
.expiration-text {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  text-align: left;
}
.menu.collapsed {
  max-width: 250px;
  max-height: 60px;
}
.menu.collapsed .menu-content,
.menu.collapsed .menu-footer,
.menu.collapsed .tabs {
  max-height: 0;
  padding: 0 10px;
  opacity: 0;
  transition:
    max-height var(--transition-speed) var(--easing),
    max-width var(--transition-speed) var(--easing),
    opacity var(--transition-speed) ease,
    padding var(--transition-speed) ease;
  overflow: hidden;
}
.menu.collapsed .menu-header {
  justify-content: space-between;
}
.menu.collapsed .menu-header p {
  display: none;
}
.menu.label {
  opacity: 1;
  transition: opacity 0.3s ease;
}
.tabs {
  background: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  transition: all 0.3s ease;
}
.tab-button {
  flex: 1;
  padding: 12px;
  border: none;
  cursor: pointer;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--button-color);
  font-family: "Lexend", sans-serif;
  transition: all 0.3s ease;
}
.tab-button.active {
  color: #fff;
  background: linear-gradient(
    145deg,
    var(--primary-color),
    var(--button-active-bg)
  );
  box-shadow: var(--glow-shadow);
  border-radius: 8px 8px 0 0;
}
.tab-button:hover {
  background-color: var(--button-hover-bg);
  color: #fff;
  border-radius: 8px 8px 0 0;
}
.menu .menu-content,
.menu .menu-footer,
.menu .tabs .menu-header p {
  max-height: 1200px;
  overflow-y: auto;
  transition:
    max-height var(--transition-speed) var(--easing),
    padding var(--transition-speed) var(--easing),
    opacity var(--transition-speed) ease;
}
.menu.collapsed {
  max-width: 250px; /* you already had this */
  max-height: 60px; /* outer shell height */
}
.menu.collapsed .menu-content,
.menu.collapsed .menu-footer,
.menu.collapsed .tabs {
  max-height: 0;
  padding: 0 10px; /* keep horizontal padding so the box doesn’t jump */
  opacity: 0;
  overflow: hidden; /* ensures no content leak during the squeeze */
}
.menu.collapsed .menu-header p {
  opacity: 0;
  width: 0;
  margin: 0;
  transition: opacity var(--transition-speed) var(--easing);
}
.menu .menu-header p {
  opacity: 1;
  transition: opacity var(--transition-speed) var(--easing);
}
.menu-content {
  color: var(--nexus-text-color);
  padding: 10px 15px;
  overflow-y: auto;
  flex: 1;
  background-color: var(--feature-bg);
  box-shadow: inset 0 2px 4px var(--shadow);
  transition:
    background-color var(--transition-speed),
    color var(--transition-speed);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scroll-behavior: smooth;
}
.menu-content::-webkit-scrollbar {
  width: 8px;
}
.menu-content::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 4px;
}
.menu-content::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 4px;
  border: 2px solid var(--scrollbar-track);
}
.menu-content::-webkit-scrollbar {
  display: block;
}
body.dark-mode .menu-content {
  background-color: var(--feature-bg);
}
.menu-footer {
  flex-shrink: 0;
  background-color: var(--footer-bg);
  padding: 10px 15px;
  text-align: center;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 -2px 4px var(--shadow);
  transition:
    background-color var(--transition-speed),
    color var(--transition-speed);
}
body.dark-mode .menu-footer {
  background-color: var(--footer-bg);
  color: #f0f0f0;
}
.feature {
  cursor: pointer;
  background: var(--button-bg);
  color: var(--button-color);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 5px;
  display: flex;
  flex-direction: column;
}

/* Disabled feature state */
.feature.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--button-bg);
  position: relative;
}

.feature.disabled::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(0, 0, 0, 0.05) 10px,
    rgba(0, 0, 0, 0.05) 20px
  );
  border-radius: 8px;
  pointer-events: none;
  z-index: 1;
}

body.dark-mode .feature.disabled::before {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.03) 10px,
    rgba(255, 255, 255, 0.03) 20px
  );
}

/* Keep original content visible */
.feature.disabled .feature-content {
  position: relative;
  z-index: 2;
}

/* Hide settings icon when disabled */
.feature.disabled .settings {
  opacity: 0.3;
  pointer-events: none;
}

/* Disabled message overlay */
.feature.disabled .disabled-message {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--button-color);
  background: var(--button-bg);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
  z-index: 10;
  padding: 6px 10px;
  text-align: center;
}

body.dark-mode .feature.disabled .disabled-message {
  color: #f0f0f0;
  background: var(--feature-bg);
}

.feature.disabled .disabled-message i {
  font-size: 14px;
  flex-shrink: 0;
}

.feature.disabled .disabled-message span {
  line-height: 1.3;
  font-family: "Lexend", sans-serif;
}

/* Show message on hover - CRITICAL FIX */
.feature.disabled {
  pointer-events: auto !important;
}

.feature.disabled:hover {
  opacity: 0.7;
}

.feature.disabled:hover .disabled-message {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
}

/* Prevent expansion of options */
.feature.disabled .feature-options {
  display: none !important;
}

/* Shake animation on click attempt */
@keyframes disabled-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.feature.disabled.shake {
  animation: disabled-shake 0.4s ease;
}

.feature:hover {
  background: var(--primary-color);
  box-shadow: var(--glow-shadow);
}
.feature.on {
  background: linear-gradient(
    145deg,
    var(--primary-color),
    var(--button-active-bg)
  );
  box-shadow: var(--glow-shadow);
  color: #fff;
}
.feature:not(.on):hover {
  background-color: var(--button-hover-bg);
}
.feature-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.feature .settings {
  color: var(--settings-color);
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.feature .settings:hover {
  color: var(--settings-hover-color);
  transform: rotate(30deg);
}
.feature .settings::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--settings-hover-color);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s ease,
    height 0.3s ease,
    opacity 0.3s ease;
  z-index: -1;
}
.feature:not(.on) .settings:hover {
  color: var(--settings-hover-color);
}
.feature:not(.on) .settings:hover::before {
  width: 40px;
  height: 40px;
  opacity: 0.2;
}
.feature.on .settings {
  color: #fff;
}
.feature.on .settings:hover {
  color: var(--settings-hover-color);
}
.feature.on .settings:hover::before {
  opacity: 0;
  width: 0;
  height: 0;
}
.feature.on .feature-options {
  background-color: var(--feature-options-active-bg);
  border: 0;
  transition:
    background-color var(--transition-speed),
    color var(--transition-speed);
}
.feature-options {
  display: none;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--feature-options-bg);
  animation: fadeIn var(--transition-speed) ease;
  transition:
    max-height var(--transition-speed) ease,
    opacity var(--transition-speed) ease;
}
.feature-options.visible {
  display: block;
}
.feature-options .inner-container {
  background-color: rgba(0, 0, 0, 0.1);
  padding: 15px;
  border-radius: 10px;
}
/* Enhanced Checkbox Styling */
.feature-options input[type="checkbox"],
.settings-feature input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;

  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.2);

  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;

  margin: 0 !important;
  vertical-align: middle;
}

/* Hover state */
.feature-options input[type="checkbox"]:hover,
.settings-feature input[type="checkbox"]:hover {
  border-color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 8px rgba(var(--primary-color), 0.3);
}

/* Focus state */
.feature-options input[type="checkbox"]:focus,
.settings-feature input[type="checkbox"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.2);
}

/* Checked state */
.feature-options input[type="checkbox"]:checked,
.settings-feature input[type="checkbox"]:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 12px rgba(var(--primary-color), 0.5);
}

/* Checkmark */
.feature-options input[type="checkbox"]:checked::after,
.settings-feature input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  opacity: 1;
  animation: checkmarkSlide 0.3s ease forwards;
}

@keyframes checkmarkSlide {
  0% {
    opacity: 0;
    transform: rotate(45deg) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}

/* Disabled state */
.feature-options input[type="checkbox"]:disabled,
.settings-feature input[type="checkbox"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Better label alignment */
.feature-options > div[style*="display: flex"],
.settings-feature > div[style*="display: flex"] {
  gap: 10px;
  align-items: center;
}

.feature-options label,
.settings-feature label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

/* Optional: Add a subtle animation on check/uncheck */
.feature-options input[type="checkbox"],
.settings-feature input[type="checkbox"] {
  transform-origin: center;
}

.feature-options input[type="checkbox"]:checked,
.settings-feature input[type="checkbox"]:checked {
  animation: checkboxPop 0.3s ease;
}

@keyframes checkboxPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

/* Dark mode adjustments */
body.dark-mode .feature-options input[type="checkbox"],
body.dark-mode .settings-feature input[type="checkbox"] {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .feature-options input[type="checkbox"]:hover,
body.dark-mode .settings-feature input[type="checkbox"]:hover {
  border-color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Toggle Switch Styles */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.toggle-label {
  font-size: 13px;
  font-weight: 400;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
  flex: 1;
  margin: 0 !important;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-left: 10px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  transition: all 0.3s ease;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hover state */
.toggle-switch:hover .toggle-slider {
  border-color: var(--primary-color);
  background-color: rgba(0, 0, 0, 0.3);
}

/* Checked state */
.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 12px rgba(var(--primary-color), 0.4);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background-color: #fff;
}

/* Focus state */
.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.2);
}

/* Disabled state */
.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Dark mode adjustments */
body.dark-mode .toggle-slider {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .toggle-slider::before {
  background-color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .toggle-switch:hover .toggle-slider {
  background-color: rgba(255, 255, 255, 0.15);
}

.feature-options input[type="text"],
.feature-options select {
  color: var(--nexus-text-color);
  width: 80%;
  padding: 8px 10px;
  margin: 5px 0 12px;
  border: 1px solid rgba(var(--nexus-text-color), 0.5);
  border-radius: 3px;
  font-size: 12px;
  font-family: "Lexend", sans-serif;
  background-color: var(--input-bg);
  transition:
    border-color var(--transition-speed),
    box-shadow var(--transition-speed);
  box-shadow: none;
  -webkit-box-shadow: none;
  outline: none;
}
.feature-options input[type="text"]:focus,
.feature-options select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px var(--primary-color);
  outline: none;
}
.feature-options input[type="text"]:hover,
.feature-options select:hover {
  border-color: var(--primary-color);
}
.feature.on .feature-options label {
  color: var(--feature-options-text);
}
.feature-options label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 13px;
  cursor: pointer;
  font-weight: 400;
  font-family: "Lexend", sans-serif;
}
.feature-options label:disabled,
.feature-options select:disabled,
.feature-options input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#autoAdvanceDelays {
  background-color: var(--button-bg);
  border-radius: 10px;
  padding: 10px;
  overflow: hidden;
}
.feature.on #autoAdvanceDelays {
  background-color: var(--button-active-bg);
  border: 0;
  transition:
    background-color var(--transition-speed),
    color var(--transition-speed);
}
#autoSubmitDelays {
  background-color: var(--button-bg);
  border-radius: 10px;
  padding: 10px;
  overflow: hidden;
}
.feature.on #autoSubmitDelays {
  background-color: var(--button-active-bg);
  border: 0;
  transition:
    background-color var(--transition-speed),
    color var(--transition-speed);
}
/* ── Delay Accordion ──────────────────────────────────────────────── */
#autoAdvanceDelays,
#autoSubmitDelays {
  padding: 0;
}
.delay-accordion {
  overflow: hidden;
}
.delay-accordion + .delay-accordion > .delay-accordion-header {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.delay-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: "Lexend", sans-serif;
  color: var(--nexus-text-color);
  text-align: left;
  gap: 8px;
  transition: background-color 0.15s ease;
}
.delay-accordion:first-child > .delay-accordion-header {
  border-radius: 10px 10px 0 0;
}
.delay-accordion-header:hover {
  background-color: rgba(0, 0, 0, 0.04);
}
.delay-accordion-chevron {
  font-size: 9px;
  opacity: 0.35;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.15s ease;
  flex-shrink: 0;
}
.delay-accordion.open > .delay-accordion-header .delay-accordion-chevron {
  transform: rotate(180deg);
  opacity: 0.7;
}
/* Smooth height animation via CSS grid trick.
   IMPORTANT: the body needs overflow: hidden — otherwise the inner div's
   padded content overflows the 0-height grid track and the collapsed
   accordion still occupies real vertical space. min-height: 0 on the
   inner is the matching safety net so the grid item actually shrinks.
   max-height is a hard-stop in case a browser doesn't honour 0fr → 0px. */
.delay-accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  max-height: 0;
  transition: grid-template-rows 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.delay-accordion.open > .delay-accordion-body {
  grid-template-rows: 1fr;
  max-height: 600px;
}
.delay-accordion-inner {
  overflow: hidden;
  min-height: 0;
  padding: 8px 12px 10px;
  background: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  opacity: 0;
  transition: opacity 0.05s ease;
}
/* Strip the trailing 12px bottom margin the global
   .feature-options input/select rule adds — the accordion's own padding
   already handles spacing, otherwise the last select leaves dead space. */
.delay-accordion-inner > input[type="text"]:last-child,
.delay-accordion-inner > select:last-child {
  margin-bottom: 0;
}
.delay-accordion.open > .delay-accordion-body > .delay-accordion-inner {
  opacity: 1;
  transition: opacity 0.18s ease 0.07s;
}
/* Feature-ON overrides */
.feature.on .delay-accordion + .delay-accordion > .delay-accordion-header {
  border-top-color: rgba(255, 255, 255, 0.12);
}
.feature.on .delay-accordion-header {
  color: var(--feature-options-text);
}
.feature.on .delay-accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.06);
}
.feature.on .delay-accordion-inner {
  background: rgba(0, 0, 0, 0.08);
  border-top-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .delay-accordion + .delay-accordion > .delay-accordion-header {
  border-top-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .delay-accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.04);
}
body.dark-mode .delay-accordion-inner {
  background: rgba(255, 255, 255, 0.03);
  border-top-color: rgba(255, 255, 255, 0.06);
}
.settings-feature {
  cursor: pointer;
  background-color: var(--button-bg);
  color: var(--button-color);
  font-size: 14px;
  font-weight: 500;
  transition:
    background-color var(--transition-speed),
    color var(--transition-speed);
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 5px;
  display: flex;
  flex-direction: column;
}
.settings-feature input[type="text"],
.settings-feature select {
  color: var(--nexus-text-color);
  width: 80%;
  padding: 8px 10px;
  margin: 5px 0 12px;
  border: 1px solid rgba(var(--nexus-text-color), 0.5);
  border-radius: 3px;
  font-size: 12px;
  font-family: "Lexend", sans-serif;
  background-color: var(--input-bg);
  transition:
    border-color var(--transition-speed),
    box-shadow var(--transition-speed);
  box-shadow: none;
  -webkit-box-shadow: none;
  outline: none;
}
.settings-feature input[type="text"]:focus,
.settings-feature select:focus {
  border-color: var(--header-bg);
  outline: none;
  box-shadow: 0 0 5px var(--header-bg);
}
.settings-feature button {
  color: var(--nexus-text-color);
  padding: 8px 10px;
  margin: 5px 0 12px;
  border: 1px solid rgba(var(--nexus-text-color), 0.5);
  border-radius: 3px;
  font-size: 12px;
  font-family: "Lexend", sans-serif;
  background-color: var(--input-bg);
  cursor: pointer;
  transition:
    border-color var(--transition-speed),
    box-shadow var(--transition-speed);
  box-shadow: none;
  -webkit-box-shadow: none;
  outline: none;
}
.settings-feature input[type="time"] {
  color: var(--nexus-text-color);
  padding: 8px 10px;
  margin: 5px 0 12px;
  border: 1px solid rgba(var(--nexus-text-color), 0.5);
  border-radius: 3px;
  font-size: 12px;
  font-family: "Lexend", sans-serif;
  background-color: var(--input-bg);
  cursor: pointer;
  transition:
    border-color var(--transition-speed),
    box-shadow var(--transition-speed);
  box-shadow: none;
  -webkit-box-shadow: none;
  outline: none;
}
.settings-feature button:hover {
  border-color: var(--primary-color);
  background-color: rgba(var(--primary-color), 0.1);
}

.settings-feature button:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px var(--primary-color);
  outline: none;
}

.settings-feature button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.theme-toggle,
.support {
  cursor: pointer;
  color: var(--button-active-bg);
  font-weight: 500;
  transition: color var(--transition-speed);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
  text-decoration: none;
}
.theme-toggle:hover,
.support:hover {
  color: var(--button-color);
}
.support:visited {
  color: var(--button-active-bg);
}
.collapse-button {
  background-color: var(--header-bg);
  color: var(--header-color);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px var(--shadow);
  transition:
    background-color var(--transition-speed),
    transform var(--transition-speed);
}
.collapse-button:hover {
  background-color: var(--button-active-bg);
}
.collapse-button i {
  transition: transform var(--transition-speed);
}
.menu.collapsed .collapse-button i {
  transform: rotate(90deg);
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.menu {
  transition:
    width var(--transition-speed) ease,
    height var(--transition-speed) ease;
}
/* Modern Toast Styles */
.nexustoast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483646;
  pointer-events: none;
}

.nexustoast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(11, 15, 26, 0.98));
  color: #e5e7eb;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 30px rgba(var(--primary-color-rgb, 59, 130, 246), 0.2);
  padding: 14px 18px;
  min-width: 280px;
  max-width: 400px;
  font-family: "Lexend", sans-serif;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(30px) scale(0.95);
}

.nexustoast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.nexustoast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-color), rgba(var(--primary-color-rgb, 59, 130, 246), 0.7));
  border-radius: 10px;
  font-size: 16px;
  flex-shrink: 0;
}

.nexustoast-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.nexustoast-message {
  flex: 1;
  line-height: 1.4;
}

.toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.toast-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #9ca3af;
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #e5e7eb;
  transform: scale(1.05);
}

/* Toast variants */
.nexustoast--success {
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(34, 197, 94, 0.15);
}

.nexustoast--success .nexustoast-icon {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.nexustoast--error {
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(239, 68, 68, 0.15);
}

.nexustoast--error .nexustoast-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.nexustoast--warning {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(245, 158, 11, 0.15);
}

.nexustoast--warning .nexustoast-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.tooltip-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.info-icon {
  color: var(--settings-color);
  font-size: 18px;
  transition: color var(--transition-speed);
}

.tooltip-container:hover .info-icon {
  color: var(--settings-hover-color);
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  background-color: var(--feature-options-bg);
  color: var(--nexus-text-color);
  text-align: center;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: "Lexend", sans-serif;
  position: absolute;
  z-index: 2147483647;
  bottom: 125%; /* Above the icon */
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  box-shadow: 0 4px 12px var(--shadow);
  transition:
    opacity var(--transition-speed),
    visibility var(--transition-speed);
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Mount/enter animation */
.menu {
  opacity: 0;
  transform: translateY(6px) scale(0.985);
}
.menu.nexus-enter {
  transition:
    opacity var(--transition-speed) var(--easing),
    transform var(--transition-speed) var(--easing),
    box-shadow var(--transition-speed) var(--easing),
    max-width var(--transition-speed) var(--easing),
    max-height var(--transition-speed) ease;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Buttons: modern look + ripple */
.menu button,
.menu .tab-button {
  position: relative;
  overflow: hidden;
  outline: none;
}
.menu button:focus-visible,
.menu .tab-button:focus-visible {
  box-shadow: 0 0 0 3px var(--ring-color);
}
.menu button:active,
.menu .tab-button:active {
  transform: translateY(1px) scale(0.99);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.35;
  transform: scale(0);
  background: var(--primary-color);
  animation: ripple var(--transition-speed) var(--easing) forwards;
}
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

body.reduced-motion .menu * {
  transition: none !important;
  animation: none !important;
}
.menu:not(.collapsed) {
  inline-size: 340px;
  max-inline-size: 340px;
}

.menu-header,
.menu-header > * {
  min-width: 0;
}

.header-info {
  flex: 1 1 auto;
  min-width: 0;
}
.header-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-inline-size: 100%;
}

/* ==================== */
/* Settings Tab Styles  */
/* ==================== */

.settings-section {
  background: var(--button-bg);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.settings-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--nexus-text-color);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-section-header i {
  color: var(--primary-color);
  font-size: 14px;
  width: 18px;
  text-align: center;
}

.settings-section-content {
  padding: 12px 14px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-row-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--nexus-text-color);
  margin: 0 !important;
  flex-shrink: 0;
}

.settings-select {
  flex: 1;
  max-width: 140px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background-color: var(--input-bg);
  color: var(--nexus-text-color);
  font-size: 12px;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-select:hover {
  border-color: var(--primary-color);
}

.settings-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.15);
}

/* Config Manager Styles */
.config-manager {
  margin-bottom: 16px;
}

.config-list {
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.config-list::-webkit-scrollbar {
  width: 6px;
}

.config-list::-webkit-scrollbar-track {
  background: transparent;
}

.config-list::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 3px;
}

.config-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  gap: 6px;
}

.config-empty i {
  font-size: 28px;
  margin-bottom: 4px;
  opacity: 0.5;
}

.config-empty span {
  font-size: 13px;
  font-weight: 500;
}

.config-empty small {
  font-size: 11px;
  opacity: 0.7;
}

.config-item {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.config-item:last-child {
  border-bottom: none;
}

.config-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.config-item.active {
  background: linear-gradient(
    135deg,
    rgba(var(--primary-color), 0.15),
    rgba(var(--primary-color), 0.05)
  );
  border-left: 3px solid var(--primary-color);
}

.config-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.config-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.config-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--nexus-text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.config-item-date {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

.config-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.config-item:hover .config-item-actions {
  opacity: 1;
}

.config-item-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--nexus-text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 11px;
}

.config-item-btn:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.05);
}

.config-item-btn-danger {
  color: var(--nexus-text-color);
}

.config-item-btn-danger:hover {
  background: #e74c3c;
  color: #fff;
}

.config-rename-input {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--nexus-text-color);
  font-size: 13px;
  font-family: "Lexend", sans-serif;
  outline: none;
}

.config-actions {
  display: flex;
  gap: 8px;
}

.config-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--nexus-text-color);
  font-size: 11px;
  font-family: "Lexend", sans-serif;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.config-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.config-btn i {
  font-size: 10px;
}

.config-btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--button-active-bg)
  );
  border-color: transparent;
  color: #fff;
}

.config-btn-primary:hover {
  background: linear-gradient(
    135deg,
    var(--button-active-bg),
    var(--primary-color)
  );
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(var(--primary-color), 0.3);
}

.config-btn-danger {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

.config-btn-danger:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}

/* Preset Buttons */
.config-presets {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.preset-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.preset-btn {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent);
  color: var(--nexus-text-color);
  font-size: 11px;
  font-family: "Lexend", sans-serif;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.preset-btn:hover {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--button-active-bg)
  );
  border-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--primary-color), 0.25);
}

.preset-btn i {
  font-size: 12px;
  opacity: 0.8;
}

.preset-btn:hover i {
  opacity: 1;
}

/* Speed preset */
.preset-btn[data-preset="speed"]:hover {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  border-color: #f39c12;
}

/* Balanced preset */
.preset-btn[data-preset="balanced"]:hover {
  background: linear-gradient(135deg, #3498db, #2980b9);
  border-color: #3498db;
}

/* Minimal preset */
.preset-btn[data-preset="minimal"]:hover {
  background: linear-gradient(135deg, #27ae60, #219a52);
  border-color: #27ae60;
}

/* Keyboard Shortcuts Styles */
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.shortcut-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.shortcut-row:first-child {
  padding-top: 0;
}

.shortcut-label {
  font-size: 12px;
  color: var(--nexus-text-color);
  font-weight: 400;
}

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.shortcut-keys kbd {
  display: inline-block;
  padding: 3px 7px;
  font-size: 10px;
  font-family: "Lexend", sans-serif;
  font-weight: 500;
  color: var(--nexus-text-color);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

/* Dark mode adjustments for settings */
body.dark-mode .settings-section {
  background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .settings-section-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent);
}

body.dark-mode .config-list {
  background: rgba(0, 0, 0, 0.2);
}

body.dark-mode .config-item.active {
  background: linear-gradient(
    135deg,
    rgba(var(--primary-color), 0.12),
    rgba(var(--primary-color), 0.04)
  );
}

/* ==================== */
/* About Tab Styles     */
/* ==================== */

.about-hero {
  text-align: center;
  padding: 20px 16px 24px;
  margin-bottom: 12px;
  background: linear-gradient(
    135deg,
    rgba(var(--primary-color), 0.1),
    rgba(var(--primary-color), 0.02)
  );
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.about-logo-container {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--button-active-bg)
  );
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(var(--primary-color), 0.3);
}

.about-logo-icon {
  font-size: 26px;
  color: #fff;
}

.about-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--nexus-text-color);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.about-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

.about-version {
  display: inline-block;
}

.version-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(var(--primary-color), 0.12);
  border: 1px solid rgba(var(--primary-color), 0.2);
  border-radius: 20px;
}

/* Quick Links */
.about-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: var(--nexus-text-color);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s ease;
}

.about-link:hover {
  background: linear-gradient(
    135deg,
    rgba(var(--primary-color), 0.12),
    rgba(var(--primary-color), 0.05)
  );
  border-color: var(--primary-color);
  transform: translateX(4px);
}

.about-link i:first-child {
  font-size: 18px;
  width: 24px;
  text-align: center;
  color: var(--primary-color);
}

.about-link span {
  flex: 1;
}

.about-link-arrow {
  font-size: 10px !important;
  color: rgba(255, 255, 255, 0.3) !important;
  transition: all 0.25s ease;
}

.about-link:hover .about-link-arrow {
  color: var(--primary-color) !important;
  transform: translateX(2px);
}

.about-link:visited {
  color: var(--nexus-text-color);
}

.about-link:visited i:first-child {
  color: var(--primary-color);
}

/* System Info */
.about-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.about-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.about-info-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about-info-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--nexus-text-color);
}

/* Footer */
.about-footer {
  text-align: center;
  padding: 16px;
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.about-heart {
  color: #e74c3c;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* Dark mode adjustments for about */
body.dark-mode .about-hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent);
}

body.dark-mode .about-link {
  background: rgba(255, 255, 255, 0.02);
}

body.dark-mode .about-info-item {
  background: rgba(255, 255, 255, 0.02);
}

/* ==================== */
/* Debug Info Styles    */
/* ==================== */

.debug-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.debug-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.debug-info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  overflow: hidden;
}

.debug-info-label {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.debug-info-value {
  font-size: 11px;
  font-weight: 500;
  color: var(--nexus-text-color);
  font-family: "Consolas", "Monaco", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.debug-info-url {
  font-size: 10px;
}

/* Console Output */
.debug-console {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.debug-console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.debug-console-header i {
  margin-right: 6px;
  font-size: 10px;
}

.debug-console-count {
  background: var(--primary-color);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.debug-console-output {
  max-height: 120px;
  overflow-y: auto;
  padding: 8px;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.debug-console-output::-webkit-scrollbar {
  width: 5px;
}

.debug-console-output::-webkit-scrollbar-track {
  background: transparent;
}

.debug-console-output::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 3px;
}

.debug-console-empty {
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
  text-align: center;
  padding: 12px;
}

.debug-log-entry {
  padding: 4px 8px;
  margin-bottom: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  word-break: break-word;
}

.debug-log-entry:last-child {
  margin-bottom: 0;
}

.debug-log-entry.log-error {
  background: rgba(231, 76, 60, 0.1);
  border-left-color: #e74c3c;
  color: #e74c3c;
}

.debug-log-entry.log-warn {
  background: rgba(241, 196, 15, 0.1);
  border-left-color: #f1c40f;
  color: #f1c40f;
}

.debug-log-entry.log-info {
  border-left-color: var(--primary-color);
  color: var(--nexus-text-color);
}

.debug-log-time {
  color: rgba(255, 255, 255, 0.4);
  margin-right: 8px;
  font-size: 9px;
}

.debug-copy-btn {
  margin-top: 4px;
}

.debug-copy-btn.copied {
  background: linear-gradient(135deg, #27ae60, #219a52) !important;
}

/* Dark mode adjustments for debug */
body.dark-mode .debug-info-item {
  background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .debug-console {
  background: rgba(0, 0, 0, 0.3);
}

/* ─── Scheduler GUI modal (#nxsg-*) ─────────────────────────────────────────── */

#nxsg-modal, #nxsg-modal * { box-sizing:border-box !important; }
#nxsg-modal input:not([type="checkbox"]) {
  -webkit-appearance:none !important; appearance:none !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-top:1px solid rgba(255,255,255,.08) !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
  border-left:1px solid rgba(255,255,255,.08) !important;
  border-right:1px solid rgba(255,255,255,.08) !important;
  outline:none !important; box-shadow:none !important;
  font-family:"Lexend",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
}
#nxsg-modal input:not([type="checkbox"]):focus {
  border-color:rgba(59,130,246,.5) !important;
  box-shadow:0 0 0 3px rgba(59,130,246,.12) !important;
}
#nxsg-modal .nxsg-switch input {
  opacity:0 !important; width:0 !important; height:0 !important;
  position:absolute !important; pointer-events:none !important;
  border:none !important; box-shadow:none !important;
}
#nxsg-modal div, #nxsg-modal span, #nxsg-modal label,
#nxsg-modal p, #nxsg-modal h2, #nxsg-modal button {
  font-family:"Lexend",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
}
@keyframes nxsg-fade-in  { from { opacity:0 } to { opacity:1 } }
@keyframes nxsg-fade-out { from { opacity:1 } to { opacity:0 } }
@keyframes nxsg-slide-in { from { opacity:0; transform:translateY(12px) scale(.97) } to { opacity:1; transform:translateY(0) scale(1) } }
@keyframes nxsg-slide-out { from { opacity:1; transform:translateY(0) scale(1) } to { opacity:0; transform:translateY(12px) scale(.97) } }
#nxsg-overlay {
  position:fixed !important; inset:0 !important;
  background:rgba(0,0,0,.72) !important;
  backdrop-filter:blur(8px) !important;
  z-index:2147483647 !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  font-family:"Lexend",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  font-size:13px !important;
  color:#E5E7EB !important;
  animation:nxsg-fade-in .18s ease !important;
}
#nxsg-overlay.nxsg-closing {
  animation:nxsg-fade-out .18s ease forwards !important;
}
#nxsg-overlay.nxsg-closing #nxsg-modal {
  animation:nxsg-slide-out .18s ease forwards !important;
}
#nxsg-modal {
  background:#111827 !important;
  border:1px solid rgba(255,255,255,.06) !important;
  border-radius:12px !important;
  width:520px !important; max-width:94vw !important;
  max-height:88vh !important;
  display:flex !important; flex-direction:column !important;
  overflow:hidden !important;
  box-shadow:0 24px 64px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.04) !important;
  animation:nxsg-slide-in .18s ease !important;
}
#nxsg-header {
  display:flex !important; align-items:center !important; justify-content:space-between !important;
  padding:16px 20px !important;
  border-bottom:1px solid rgba(255,255,255,.06) !important;
  flex-shrink:0 !important;
}
#nxsg-header h2 {
  margin:0 !important; font-size:14px !important; font-weight:600 !important;
  color:#fff !important; letter-spacing:-.01em !important;
  font-family:"Lexend",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
}
#nxsg-body {
  flex:1 !important; overflow-y:auto !important; padding:16px 20px !important;
  display:flex !important; flex-direction:column !important; gap:8px !important;
}
.nxsg-section {
  background:#1F2937 !important;
  border:1px solid rgba(255,255,255,.06) !important;
  border-radius:8px !important;
  padding:14px 16px !important;
}
.nxsg-section-header {
  display:flex !important; align-items:center !important; justify-content:space-between !important;
}
.nxsg-section-title {
  font-size:11px !important; font-weight:600 !important;
  text-transform:uppercase !important; letter-spacing:.08em !important;
  color:#3B82F6 !important;
  margin-bottom:4px !important; display:block !important;
}
.nxsg-section-header .nxsg-section-title { margin-bottom:0 !important; }
.nxsg-hint {
  font-size:11px !important; line-height:1.6 !important;
  color:#6B7280 !important;
  margin:6px 0 12px !important;
  font-family:"Lexend",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
}
.nxsg-hint:last-child { margin-bottom:0 !important; }
.nxsg-two-col { display:flex !important; gap:10px !important; }
.nxsg-two-col .nxsg-field { flex:1 !important; min-width:0 !important; }
.nxsg-field { margin-bottom:0 !important; }
.nxsg-field-label {
  display:block !important; font-size:11px !important; font-weight:500 !important;
  color:#9CA3AF !important;
  margin-bottom:5px !important;
  font-family:"Lexend",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
}
.nxsg-input {
  display:block !important; width:100% !important; box-sizing:border-box !important;
  background:#0F172A !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:6px !important;
  color:#E5E7EB !important;
  font-size:13px !important;
  font-family:"Lexend",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  padding:7px 10px !important; outline:none !important;
  -webkit-appearance:none !important; appearance:none !important;
  transition:border-color .15s,box-shadow .15s !important;
}
.nxsg-input:focus {
  border-color:rgba(59,130,246,.5) !important;
  box-shadow:0 0 0 3px rgba(59,130,246,.12) !important;
}
.nxsg-time-row {
  display:flex !important; gap:10px !important; align-items:flex-end !important;
}
.nxsg-time-row .nxsg-field { flex:1 !important; }
.nxsg-time-divider {
  padding-bottom:10px !important; font-size:12px !important;
  color:#6B7280 !important; flex-shrink:0 !important;
  font-family:"Lexend",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
}
.nxsg-days-row {
  display:flex !important; gap:6px !important; flex-wrap:wrap !important;
}
.nxsg-day-btn {
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  width:52px !important; height:32px !important;
  background:#0F172A !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:6px !important;
  color:#9CA3AF !important;
  font-size:12px !important; font-weight:500 !important;
  cursor:pointer !important; transition:all 0.12s !important;
  font-family:"Lexend",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  -webkit-appearance:none !important; appearance:none !important; outline:none !important;
}
.nxsg-day-btn.active {
  background:#3B82F6 !important;
  border-color:#3B82F6 !important;
  color:#fff !important;
}
.nxsg-day-btn:hover:not(.active) {
  border-color:rgba(59,130,246,.4) !important;
  color:#E5E7EB !important;
}
.nxsg-switch {
  position:relative !important; width:32px !important; height:18px !important;
  display:inline-block !important; flex-shrink:0 !important;
}
.nxsg-switch input {
  opacity:0 !important; width:0 !important; height:0 !important;
  position:absolute !important; pointer-events:none !important;
}
.nxsg-slider {
  position:absolute !important; inset:0 !important;
  background:#374151 !important;
  border-radius:18px !important; cursor:pointer !important; transition:background .2s !important;
}
.nxsg-slider::before {
  content:"" !important; position:absolute !important;
  height:12px !important; width:12px !important; left:3px !important; bottom:3px !important;
  background:#fff !important; border-radius:50% !important; transition:transform .2s !important;
}
.nxsg-switch input:checked + .nxsg-slider { background:#3B82F6 !important; }
.nxsg-switch input:checked + .nxsg-slider::before { transform:translateX(14px) !important; }
.nxsg-btn-close {
  background:transparent !important; border:none !important;
  color:#6B7280 !important;
  font-size:16px !important; cursor:pointer !important;
  width:28px !important; height:28px !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  border-radius:6px !important; transition:background .15s,color .15s !important;
  font-family:"Lexend",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  -webkit-appearance:none !important; appearance:none !important; outline:none !important;
}
.nxsg-btn-close:hover { background:rgba(255,255,255,.08) !important; color:#fff !important; }
.nxsg-two-col--mb { margin-bottom:12px !important; }

/* EDGYX PANEL DESIGN */
/* EdgyX panel — shared by the installed script and website preview. */
.menu {
  --ex-surface: #f5f7ff; --ex-card: #ffffff; --ex-ink: #17213c; --ex-muted: #586780;
  --ex-line: #b9c9eb; --ex-gradient: linear-gradient(115deg, #245ef5, #7753e8 65%, #388db7);
  border: 1px solid var(--ex-line); border-radius: 20px;
  background: var(--ex-surface); color: var(--ex-ink);
  box-shadow: 0 18px 50px #080e3540, 0 0 24px #5375ff25;
}
body.dark-mode .menu { --ex-surface:#101626; --ex-card:#182136; --ex-ink:#edf3ff; --ex-muted:#a0b1cc; --ex-line:#303f60; }
.menu .menu-header { background:var(--ex-surface); color:var(--ex-ink); padding:17px 16px; border-bottom:1px solid var(--ex-line); }
.menu .header-text { letter-spacing:-.8px; text-shadow:none; }
.menu .header-info p { color:var(--ex-muted); font-size:11px; line-height:1.6; }
.menu .tabs { background:var(--ex-surface); padding:7px; gap:5px; border-bottom:1px solid var(--ex-line); }
.menu .tab-button { border-radius:10px; background:transparent; color:var(--ex-muted); padding:10px 5px; font-size:12px; }
.menu .tab-button.active { background:var(--ex-gradient); color:white; box-shadow:0 3px 14px #5368ff40; }
.menu .menu-content { background:var(--ex-surface); padding:12px; scrollbar-color:#637be0 transparent; }
.menu .feature { border:1px solid var(--ex-line); border-radius:11px; background:var(--ex-card); color:var(--ex-ink); margin-bottom:8px; box-shadow:none; }
.menu .feature.on { background:var(--ex-gradient); color:white; border-color:#8095ff; box-shadow:0 3px 13px #466cf02b; }
.menu .feature.disabled { opacity:.45; }
.menu .feature .settings { color:inherit; }
.menu .edgyx-intro { padding:5px 3px 17px; }
.menu .edgyx-intro > span, .menu .edgyx-eyebrow { font-size:9px; letter-spacing:2px; font-weight:700; color:var(--ex-muted); }
.menu .edgyx-intro h3 { font-size:25px; letter-spacing:-1px; color:var(--ex-ink); margin:5px 0; }
.menu .edgyx-intro p { font-size:11px; color:var(--ex-muted); }
.menu .settings-section { background:var(--ex-card); border:1px solid var(--ex-line); border-radius:13px; overflow:hidden; margin-bottom:12px; box-shadow:none; }
.menu .settings-section-header { background:transparent; color:var(--ex-ink); padding:13px; border-bottom:1px solid var(--ex-line); font-size:12px; }
.menu .settings-section-header i { color:#8a83ff; }
.menu .settings-section-content { padding:13px; }
.menu .settings-row-label, .menu .shortcut-label { color:var(--ex-muted); font-size:11px; }
.menu .settings-select { background:var(--ex-surface); color:var(--ex-ink); border:1px solid var(--ex-line); border-radius:8px; padding:8px; }
.menu .config-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.menu .config-btn, .menu .preset-btn { border:1px solid var(--ex-line); background:var(--ex-surface); color:var(--ex-ink); border-radius:9px; font-size:11px; padding:10px 7px; min-width:0; }
.menu .config-btn-primary, .menu .preset-btn.active { background:var(--ex-gradient); color:white; border-color:#7d8bff; }
.menu .preset-buttons { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.menu .preset-btn { background:linear-gradient(120deg,#435eff18,#9163ed22); text-align:left; }
.menu .config-item { background:var(--ex-surface); border-color:var(--ex-line); color:var(--ex-ink); }
.menu .shortcut-row { display:flex; flex-wrap:wrap; gap:7px; padding:8px 0; border-color:var(--ex-line); }
.menu kbd { background:var(--ex-surface); border:1px solid var(--ex-line); color:var(--ex-ink); border-radius:5px; box-shadow:0 2px 0 var(--ex-line); }
.menu .about-hero { border:1px solid var(--ex-line); border-radius:15px; padding:22px 14px; margin-bottom:12px; background:radial-gradient(ellipse at top,#6864e62e,transparent 75%),var(--ex-card); }
.menu .about-logo-container { background:transparent; box-shadow:none; margin:15px auto 9px; width:65px; height:65px; }
.menu .edgyx-about-logo { width:65px; height:65px; object-fit:contain; border-radius:14px; filter:drop-shadow(0 0 12px #6575ff45); }
.menu .about-title { color:var(--ex-ink); font-size:30px; letter-spacing:-1.3px; text-shadow:none; }
.menu .edgyx-maker { font-size:12px; color:var(--ex-ink); margin:5px 0 12px; }
.menu .about-tagline { color:var(--ex-muted); font-size:11px; line-height:1.7; }
.menu .version-badge { background:var(--ex-gradient); color:white; border:0; border-radius:20px; }
.menu .about-link { background:var(--ex-surface); color:var(--ex-ink); border:1px solid var(--ex-line); border-radius:10px; padding:12px; font-size:11px; }
.menu .debug-info-grid { grid-template-columns:1fr 1fr; gap:8px; }
.menu .debug-info-item { background:var(--ex-surface); padding:9px; border-radius:8px; min-width:0; }
.menu .debug-info-label { color:var(--ex-muted); font-size:9px; text-transform:uppercase; letter-spacing:.7px; }
.menu .debug-info-value { color:var(--ex-ink); font-size:10px; overflow-wrap:anywhere; }
.menu .debug-console { border:1px solid var(--ex-line); border-radius:9px; }
.menu .about-footer { color:var(--ex-muted); font-size:10px; border:0; }
.menu .menu-footer { display:grid; grid-template-columns:1fr 1fr; gap:9px; padding:12px; background:var(--ex-surface); border-top:1px solid var(--ex-line); }
.menu .menu-footer .theme-toggle, .menu .menu-footer .support { display:flex; justify-content:center; align-items:center; gap:7px; margin:0; padding:10px 5px; border:1px solid var(--ex-line); border-radius:10px; background:var(--ex-card); color:var(--ex-ink); font-size:11px; font-weight:500; cursor:pointer; text-decoration:none; }
.menu .menu-footer .support { background:var(--ex-gradient); border-color:#7286ee; color:white; }
.menu button:hover, .menu .about-link:hover { filter:brightness(1.12); }
.menu button:focus-visible, .menu a:focus-visible, .menu select:focus-visible { outline:2px solid #9c96ff; outline-offset:2px; }
.menu.collapsed .menu-footer { display:none; }
@media (prefers-reduced-motion:reduce) { .menu, .menu * { animation:none!important; transition:none!important; } }
/* Compact identity and feature-level controls. */
.menu:not(.collapsed) .menu-header { padding:10px 12px; min-height:0; height:auto; flex:0 0 auto; gap:8px; text-shadow:none; box-shadow:none; }
.menu .menu-header > div { flex:1; gap:10px; }
.menu .menu-header .logo { width:50px; height:50px; flex:0 0 50px; margin:0; object-fit:contain; border-radius:10px; }
.menu .header-info { gap:3px; }
.menu .menu-header .header-text { font-family:"Segoe UI",Arial,sans-serif!important; font-size:22px; font-weight:750; line-height:1.05; letter-spacing:-.7px; }
.menu .menu-header .expiration-text, .menu .menu-header .expiration-text b { font-family:"Segoe UI",Arial,sans-serif!important; font-size:10px; line-height:1.4; font-weight:400; text-shadow:none; }
.menu .menu-header .expiration-text { margin:0; padding:0; color:var(--ex-muted); }
.menu .collapse-button { flex:0 0 26px; width:26px; height:26px; margin:0; }
.menu .feature .feature-options { background:var(--ex-surface); color:var(--ex-ink); border:1px solid var(--ex-line); border-radius:10px; margin:8px 0 0; padding:9px; box-shadow:none; }
.menu .feature-options .delay-accordion { background:var(--ex-card); border:1px solid var(--ex-line); border-radius:9px; margin:0 0 7px; }
.menu .feature-options .delay-accordion-header { color:var(--ex-ink); background:linear-gradient(100deg,#6874ed18,#a371ee15); padding:10px; border:0; border-radius:8px; font-size:11px; }
.menu .feature-options .delay-accordion-inner { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:7px; padding:10px; background:var(--ex-card); border-top:1px solid var(--ex-line); }
.menu .feature-options .delay-accordion-inner > label { grid-column:1 / -1; margin:3px 0 0; font-size:10px; letter-spacing:.5px; text-transform:uppercase; color:var(--ex-muted); }
.menu .feature-options input[type="text"], .menu .feature-options input[type="number"], .menu .feature-options select, .menu .feature-options textarea { background:var(--ex-surface); color:var(--ex-ink); border:1px solid var(--ex-line); border-radius:7px; padding:9px 8px; font-size:11px; box-shadow:none; min-width:0; }
.menu .feature-options .delay-accordion-inner > input, .menu .feature-options .delay-accordion-inner > select { width:100%; max-width:100%!important; margin:0; }
.menu .feature-options label { color:var(--ex-ink); font-size:11px; }
.menu .feature-options .toggle-row { border-bottom:1px solid var(--ex-line); padding:10px 0; gap:8px; }
.menu .feature-options .toggle-row:last-child { border-bottom:0; }
.menu .feature-options .toggle-label { line-height:1.5; }
.menu .feature-options .toggle-slider { background:#586780; }
.menu .feature-options input:checked + .toggle-slider { background:var(--ex-gradient); box-shadow:0 0 9px #7378ff45; }
.menu .feature-options input:focus-visible, .menu .feature-options textarea:focus-visible { outline:2px solid #9187ff; outline-offset:1px; }
.menu .feature-options input::placeholder { color:var(--ex-muted); }
.menu .feature-options button:not(.delay-accordion-header) { background:var(--ex-gradient); color:#fff; border:1px solid #8095ff; border-radius:8px; }
.menu .feature #autoAdvanceDelays, .menu .feature #autoSubmitDelays { background:transparent; border:0; box-shadow:none; padding:0; }
.menu .feature .settings { color:inherit; }
/* License details must stay readable alongside the compact header. */
.menu .menu-header .expiration-text, .menu .menu-header .expiration-text b { font-size:11px; font-weight:650; line-height:1.45; color:var(--ex-ink); }
.menu .menu-header .expiration-text b { font-weight:750; }

/* Theme colors are shared by every panel surface and notification. */
:root { --ex-accent:#345eea; --ex-accent-end:#7753d6; }
body.blue-theme { --ex-accent:#345eea; --ex-accent-end:#7753d6; }
body.red-theme { --ex-accent:#c43045; --ex-accent-end:#aa345e; }
body.green-theme { --ex-accent:#168040; --ex-accent-end:#247368; }
body.purple-theme { --ex-accent:#8242cc; --ex-accent-end:#534ac9; }
body.orange-theme { --ex-accent:#bd4e16; --ex-accent-end:#b13555; }
body.teal-theme { --ex-accent:#087b80; --ex-accent-end:#2462ac; }
body.yellow-theme { --ex-accent:#8c6900; --ex-accent-end:#a45115; }
body.pink-theme { --ex-accent:#bb287b; --ex-accent-end:#8245c5; }
body.indigo-theme { --ex-accent:#4f46cf; --ex-accent-end:#7c3dad; }
body.rose-theme { --ex-accent:#bd345f; --ex-accent-end:#954780; }
body.emerald-theme { --ex-accent:#087d59; --ex-accent-end:#16727b; }
body.amber-theme { --ex-accent:#a46409; --ex-accent-end:#b84419; }
body.slate-theme { --ex-accent:#52647a; --ex-accent-end:#455770; }
body.nord-theme { --ex-accent:#426d88; --ex-accent-end:#536ba5; }
body.cyber-theme { --ex-accent:#057973; --ex-accent-end:#4263d7; }

.menu { --ex-gradient:linear-gradient(115deg,var(--ex-accent),var(--ex-accent-end)); --ex-surface:color-mix(in srgb,var(--ex-accent) 7%,#fff); --ex-card:color-mix(in srgb,var(--ex-accent) 3%,#fff); --ex-line:color-mix(in srgb,var(--ex-accent) 27%,#dde3ee); box-shadow:0 18px 50px #080e3540,0 0 26px color-mix(in srgb,var(--ex-accent) 22%,transparent); }
body.dark-mode .menu { --ex-surface:color-mix(in srgb,var(--ex-accent) 15%,#0b101b); --ex-card:color-mix(in srgb,var(--ex-accent) 20%,#141b29); --ex-line:color-mix(in srgb,var(--ex-accent) 43%,#293248); }
.menu .feature.on, .menu .config-btn-primary, .menu .preset-btn.active, .menu .menu-footer .support { border-color:color-mix(in srgb,var(--ex-accent) 65%,#fff); box-shadow:0 3px 14px color-mix(in srgb,var(--ex-accent) 25%,transparent); }
.menu .tab-button.active { box-shadow:0 3px 14px color-mix(in srgb,var(--ex-accent) 30%,transparent); }
.menu .menu-content { scrollbar-color:var(--ex-accent) transparent; }
.menu .settings-section-header i { color:var(--ex-accent); }
body.dark-mode .menu .settings-section-header i { color:color-mix(in srgb,var(--ex-accent) 55%,#fff); }
.menu .preset-btn, .menu .feature-options .delay-accordion-header { background:linear-gradient(110deg,color-mix(in srgb,var(--ex-accent) 12%,transparent),color-mix(in srgb,var(--ex-accent-end) 8%,transparent)); }
.menu .about-hero { background:radial-gradient(ellipse at top,color-mix(in srgb,var(--ex-accent) 20%,transparent),transparent 75%),var(--ex-card); }
.menu button:focus-visible, .menu a:focus-visible, .menu select:focus-visible, .menu .feature-options input:focus-visible { outline-color:color-mix(in srgb,var(--ex-accent) 60%,#fff); }
.menu .feature-options input:checked + .toggle-slider { box-shadow:0 0 9px color-mix(in srgb,var(--ex-accent) 35%,transparent); }
.nexustoast-container .nexustoast { position:relative; gap:11px; padding:12px 13px; min-width:260px; max-width:min(410px,calc(100vw - 30px)); border-radius:12px; border:1px solid color-mix(in srgb,var(--ex-accent) 40%,#293448); border-left:3px solid var(--ex-accent); background:linear-gradient(115deg,color-mix(in srgb,var(--ex-accent) 12%,#0e1523),#111723); box-shadow:0 12px 32px #0004; }
.nexustoast-container .nexustoast::before { display:none; }
.nexustoast-container .nexustoast-icon { background:transparent; border-radius:8px; width:38px; height:38px; }
.nexustoast-container .nexustoast-logo { width:36px; height:36px; object-fit:contain; border-radius:8px; }
.nexustoast-container .nexustoast-message { color:#f0f4ff; font-family:'Segoe UI',Arial,sans-serif!important; font-size:13px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
.nexustoast-container .nexustoast-message::before { content:'EDGYX'; display:block; font-size:9px; font-weight:700; letter-spacing:1.7px; color:color-mix(in srgb,var(--ex-accent) 45%,#fff); margin-bottom:3px; }
.nexustoast-container .toast-close { width:25px; height:25px; border-radius:50%; background:#ffffff08; color:#c5cde0; }
.nexustoast-container .toast-close:hover { background:#ffffff20; color:white; }
.nexustoast-container .toast-close:focus-visible { outline:2px solid #c0bdff; outline-offset:2px; }
.nexustoast-container .nexustoast--error { border-left-color:#f17888; }
.nexustoast-container .nexustoast--warning { border-left-color:#e9b65c; }
.nexustoast-container .nexustoast--success { border-left-color:#52cea1; }
/* Collapsed shell has its own dimensions; expanded header padding must not clip it. */
.menu.collapsed { width:250px; inline-size:250px; max-inline-size:calc(100vw - 24px); height:60px; min-height:60px; max-height:60px; padding:0; border-radius:15px; }
.menu.collapsed .menu-header { box-sizing:border-box; width:100%; height:58px; min-height:58px; padding:8px 11px; flex:0 0 58px; gap:8px; border:0; border-radius:14px; align-items:center; box-shadow:none; }
.menu.collapsed .menu-header > div { min-width:0; gap:9px; align-items:center; }
.menu.collapsed .menu-header .logo { width:40px; height:40px; flex:0 0 40px; margin:0; object-fit:contain; }
.menu.collapsed .menu-header .header-text { font-size:20px; line-height:24px; margin:0; }
.menu.collapsed .menu-header .header-info { justify-content:center; gap:0; }
.menu.collapsed .tabs, .menu.collapsed .menu-content, .menu.collapsed .menu-footer { display:none; }
.menu.collapsed .collapse-button { width:26px; height:26px; flex:0 0 26px; align-self:center; margin:0; }
/* Allow full glyph height in the title; the old 1.05 line-height clipped it. */
.menu .menu-header .header-text { line-height:1.3; padding-block:2px; overflow:visible; text-overflow:clip; flex-shrink:0; }
.menu .menu-header .header-info { overflow:visible; }
.menu.collapsed .menu-header .header-text { line-height:26px; padding-block:0; }
/* Compact notification: a single readable line with the product mark. */
.nexustoast-container .nexustoast { min-width:240px; max-width:min(420px,calc(100vw - 28px)); padding:11px 12px; gap:12px; border:1px solid #ffffff24; border-bottom:2px solid var(--ex-accent,#6475ef); border-radius:15px; background:linear-gradient(125deg,#151d2d,#101520); box-shadow:0 9px 28px #0004; }
.nexustoast-container .nexustoast-message::before { display:none; }
.nexustoast-container .nexustoast-message { font-size:13px; font-weight:600; line-height:1.5; }
.nexustoast-container .nexustoast-icon { width:32px; height:32px; }
.nexustoast-container .nexustoast-logo { width:32px; height:32px; border-radius:7px; }
.nexustoast-container .toast-close { background:transparent; width:24px; height:24px; color:#aebad2; }
.nexustoast-container .nexustoast--error { border-bottom-color:#f17888; }
.nexustoast-container .nexustoast--warning { border-bottom-color:#e9b65c; }
.nexustoast-container .nexustoast--success { border-bottom-color:#52cea1; }

/* Compact phone layout; the feature list scrolls within the panel. */
@media (max-width: 600px), (pointer: coarse) and (max-height: 500px) {
  .menu {
    width: 286px;
    max-width: calc(100vw - 20px);
    min-height: 0;
    max-height: min(480px, 68vh);
    max-height: min(480px, 68dvh);
    border-radius: 15px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  .menu:not(.collapsed) .menu-header { padding: 8px 10px; gap: 6px; }
  .menu .menu-header .logo { width: 40px; height: 40px; flex-basis: 40px; }
  .menu .menu-header .header-text { font-size: 19px; line-height: 1.25; }
  .menu .menu-header .expiration-text, .menu .menu-header .expiration-text b { font-size: 10px; line-height: 1.35; }
  .menu .tabs { padding: 5px; gap: 3px; flex-shrink: 0; }
  .menu .tab-button { padding: 8px 4px; font-size: 11px; }
  .menu .menu-content { flex: 1 1 auto; min-height: 0; padding: 8px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .menu .feature { font-size: 12px; padding: 8px; margin-bottom: 6px; border-radius: 9px; }
  .menu .feature .settings { min-width: 28px; min-height: 28px; display: inline-flex; align-items: center; justify-content: center; margin: -5px 0; }
  .menu .menu-footer { padding: 8px; gap: 6px; flex-shrink: 0; }
  .menu .menu-footer .support, .menu .menu-footer .dark-mode { padding: 9px 5px; font-size: 10px; }
  .menu.collapsed { width: 214px; inline-size: 214px; height: 54px; min-height: 54px; max-height: 54px; }
  .menu.collapsed .menu-header { height: 52px; min-height: 52px; flex-basis: 52px; padding: 6px 9px; }
  .menu.collapsed .menu-header .logo { width: 36px; height: 36px; flex-basis: 36px; }
}
