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

:root {
  --bg:        #06040E;
  --purple1:   #9A28E8;
  --purple2:   #6014AA;
  --pink1:     #E82888;
  --pink2:     #A81660;
  --magenta:   #CC2288;
  --indigo:    #2238C8;
  --orb:       #CCAAFF;
  --accent:    #BB88DD;
  --accent2:   #8A6098;
  --text:      #EEF0FF;
  --text-dim:  #BBAACC;
  --text-mute: #6B5A7A;
  --glass-bg:  rgba(18, 10, 36, 0.55);
  --glass-border: rgba(187, 136, 221, 0.18);
  --glass-hover:  rgba(187, 136, 221, 0.28);
  --panel-bg:  rgba(12, 8, 28, 0.80);
  --panel-border: rgba(154, 40, 232, 0.25);
  --slider-track: rgba(40, 20, 70, 0.8);
  --slider-fill:  linear-gradient(90deg, #9A28E8, #E82888);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Background canvas ─────────────────────────────────── */
#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── Layout util ───────────────────────────────────────── */
section, nav, footer { position: relative; z-index: 1; }

/* ─── Navbar ────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 64px;
  background: rgba(6, 4, 14, 0.65);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  filter: drop-shadow(0 0 8px rgba(187, 136, 221, 0.7));
}

.nav-logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #BB88DD, #E82888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--text); }

.nav-cta {
  text-decoration: none;
  background: linear-gradient(135deg, #9A28E8, #E82888);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 40px;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 18px rgba(232, 40, 136, 0.35);
}
.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(232, 40, 136, 0.55);
}

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
}

.hero-content {
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  background: rgba(154, 40, 232, 0.15);
  border: 1px solid rgba(154, 40, 232, 0.4);
  color: #BB88DD;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 40px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.title-line1 {
  display: block;
  background: linear-gradient(135deg, #CCAAFF 0%, #BB88DD 40%, #9A28E8 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(154, 40, 232, 0.5));
}

.title-line2 {
  display: block;
  background: linear-gradient(135deg, #E82888 0%, #CC2288 50%, #8A6098 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(232, 40, 136, 0.5));
}

.hero-sub {
  color: var(--text-dim);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(135deg, #9A28E8, #E82888);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 30px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 30px rgba(232, 40, 136, 0.4), 0 4px 15px rgba(154, 40, 232, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 45px rgba(232, 40, 136, 0.6), 0 8px 25px rgba(154, 40, 232, 0.4);
}
.btn-primary.btn-large {
  padding: 16px 40px;
  font-size: 1.05rem;
}

.btn-ghost {
  display: inline-block;
  text-decoration: none;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 30px;
  border-radius: 40px;
  border: 1px solid rgba(187, 136, 221, 0.35);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(187, 136, 221, 0.1);
  border-color: rgba(187, 136, 221, 0.6);
  transform: translateY(-2px);
}

/* ─── Section shared ────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #CCAAFF, #E82888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--text-dim);
  font-size: 1rem;
}

/* ─── GUI Section ───────────────────────────────────────── */
.gui-section {
  padding: 6rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gui-wrapper {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: center;
}

/* ─── Jasper GUI Panel ──────────────────────────────────── */
.jasper-gui {
  width: 820px;
  height: 520px;
  background: rgba(10, 6, 22, 0.82);
  border: 1px solid rgba(154, 40, 232, 0.30);
  border-radius: 14px;
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  box-shadow:
    0 0 0 1px rgba(204, 170, 255, 0.06),
    0 8px 64px rgba(154, 40, 232, 0.22),
    0 32px 80px rgba(6, 4, 14, 0.7),
    inset 0 1px 0 rgba(204, 170, 255, 0.08);
  display: flex;
  flex-direction: column;
  user-select: none;
  cursor: default;
  position: relative;
  overflow: hidden;
}

/* Subtle inner glow */
.jasper-gui::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(ellipse 60% 30% at 50% 0%, rgba(154, 40, 232, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* Top bar */
.gui-topbar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(154, 40, 232, 0.18);
  background: rgba(8, 5, 18, 0.6);
  cursor: grab;
  border-radius: 14px 14px 0 0;
  flex-shrink: 0;
}
.gui-topbar:active { cursor: grabbing; }

.gui-logo-area {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 4px;
}

.gui-logo-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(187, 136, 221, 0.8));
}

.gui-title-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, #CCAAFF, #E82888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gui-nav-arrows {
  display: flex;
  gap: 2px;
}

.gui-nav-btn {
  background: rgba(154, 40, 232, 0.12);
  border: 1px solid rgba(154, 40, 232, 0.22);
  color: var(--text-dim);
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.gui-nav-btn:hover {
  background: rgba(154, 40, 232, 0.28);
  color: var(--text);
}

.gui-search-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.gui-search-icon {
  position: absolute;
  left: 9px;
  font-size: 0.72rem;
  color: var(--text-mute);
  pointer-events: none;
}

.gui-search {
  width: 100%;
  background: rgba(20, 10, 40, 0.6);
  border: 1px solid rgba(154, 40, 232, 0.22);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  padding: 5px 9px 5px 26px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.gui-search::placeholder { color: var(--text-mute); }
.gui-search:focus {
  border-color: rgba(154, 40, 232, 0.55);
  background: rgba(30, 14, 60, 0.65);
}

.gui-close-btn {
  background: rgba(232, 40, 136, 0.12);
  border: 1px solid rgba(232, 40, 136, 0.22);
  color: var(--text-dim);
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  line-height: 1;
}
.gui-close-btn:hover {
  background: rgba(232, 40, 136, 0.35);
  color: #fff;
}

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

/* Left panel */
.gui-left-panel {
  width: 160px;
  flex-shrink: 0;
  background: rgba(8, 5, 18, 0.55);
  border-right: 1px solid rgba(154, 40, 232, 0.15);
  overflow-y: auto;
  padding: 10px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 40, 232, 0.3) transparent;
}

.gui-left-panel::-webkit-scrollbar { width: 3px; }
.gui-left-panel::-webkit-scrollbar-track { background: transparent; }
.gui-left-panel::-webkit-scrollbar-thumb { background: rgba(154, 40, 232, 0.3); border-radius: 4px; }

.gui-cat-item {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.gui-cat-item:hover {
  background: rgba(154, 40, 232, 0.12);
  color: var(--text-dim);
}
.gui-cat-item.active {
  background: linear-gradient(90deg, rgba(154, 40, 232, 0.25), rgba(232, 40, 136, 0.12));
  color: var(--accent);
  border-left: 2px solid var(--purple1);
  padding-left: 8px;
}

/* Right panel */
.gui-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gui-modules-header {
  padding: 10px 16px 6px;
  border-bottom: 1px solid rgba(154, 40, 232, 0.12);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  flex-shrink: 0;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.gui-modules-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 40, 232, 0.3) transparent;
}
.gui-modules-list::-webkit-scrollbar { width: 3px; }
.gui-modules-list::-webkit-scrollbar-track { background: transparent; }
.gui-modules-list::-webkit-scrollbar-thumb { background: rgba(154, 40, 232, 0.3); border-radius: 4px; }

/* Module rows */
.module-row {
  background: rgba(18, 10, 36, 0.5);
  border: 1px solid rgba(154, 40, 232, 0.12);
  border-radius: 7px;
  margin-bottom: 5px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.module-row:hover { border-color: rgba(154, 40, 232, 0.28); }

.module-header {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  cursor: pointer;
  gap: 8px;
}

.module-name {
  flex: 1;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-dim);
}

.module-expand-icon {
  font-size: 0.6rem;
  color: var(--text-mute);
  transition: transform 0.2s;
}
.module-row.expanded .module-expand-icon { transform: rotate(180deg); }

.module-body {
  display: none;
  padding: 4px 12px 10px;
  border-top: 1px solid rgba(154, 40, 232, 0.1);
}
.module-row.expanded .module-body { display: block; }

/* Toggle switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-switch {
  position: relative;
  width: 32px;
  height: 17px;
  cursor: pointer;
}

.toggle-switch input { display: none; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(40, 20, 70, 0.8);
  border: 1px solid rgba(154, 40, 232, 0.25);
  border-radius: 17px;
  transition: background 0.2s, border-color 0.2s;
}

.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 11px; height: 11px;
  background: var(--text-mute);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-track {
  background: linear-gradient(90deg, rgba(154, 40, 232, 0.5), rgba(232, 40, 136, 0.4));
  border-color: rgba(154, 40, 232, 0.5);
}
.toggle-switch input:checked + .toggle-track > .toggle-thumb {
  transform: translateX(15px);
  background: linear-gradient(135deg, #CCAAFF, #E82888);
  box-shadow: 0 0 8px rgba(232, 40, 136, 0.7);
}

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

/* Slider */
.slider-row {
  margin-top: 8px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.slider-name {
  font-size: 0.66rem;
  color: var(--text-mute);
  font-weight: 500;
}

.slider-val {
  font-size: 0.66rem;
  color: var(--accent);
  font-weight: 600;
  min-width: 32px;
  text-align: right;
}

.slider-track {
  width: 100%;
  height: 4px;
  background: rgba(40, 20, 70, 0.8);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
}

.slider-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #9A28E8, #E82888);
  border-radius: 4px;
  transition: width 0.05s;
}

.slider-thumb {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  background: #fff;
  border: 2px solid #BB88DD;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(187, 136, 221, 0.6);
  cursor: grab;
  transition: transform 0.1s, box-shadow 0.15s;
  margin-left: -6px;
}
.slider-thumb:hover, .slider-thumb.dragging {
  transform: translateY(-50%) scale(1.3);
  box-shadow: 0 0 16px rgba(232, 40, 136, 0.8);
  cursor: grabbing;
}

/* Search result highlight */
.module-row.search-hidden { display: none; }

/* ─── Features Section ──────────────────────────────────── */
.features-section {
  padding: 7rem 2rem;
}

.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(154, 40, 232, 0.08) 0%, transparent 70%);
  border-radius: 16px;
  pointer-events: none;
}

.feature-card:hover {
  border-color: rgba(187, 136, 221, 0.38);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(154, 40, 232, 0.18);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  filter: hue-rotate(280deg) saturate(2);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ─── Download Section ──────────────────────────────────── */
.download-section {
  padding: 7rem 2rem;
  text-align: center;
}

.download-inner {
  max-width: 600px;
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 4rem 3rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.download-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(154, 40, 232, 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(232, 40, 136, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

.download-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #CCAAFF, #E82888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.download-sub {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ─── Footer ────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.8rem;
}

/* ─── Nav login button ──────────────────────────────────────── */
.nav-login-btn {
  background: transparent;
  border: 1px solid rgba(187, 136, 221, 0.40);
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 40px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.nav-login-btn:hover {
  background: rgba(187, 136, 221, 0.12);
  border-color: rgba(187, 136, 221, 0.7);
  color: var(--text);
}
.nav-login-btn.logged-in {
  background: linear-gradient(135deg, rgba(154, 40, 232, 0.25), rgba(232, 40, 136, 0.15));
  border-color: rgba(154, 40, 232, 0.5);
  color: var(--accent);
}

/* ─── Modal overlay ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 2, 10, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1rem;
}
.modal-overlay.open { display: flex; }

.modal-card {
  position: relative;
  background: rgba(10, 6, 24, 0.97);
  border: 1px solid rgba(154, 40, 232, 0.30);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 0 0 1px rgba(204, 170, 255, 0.05),
    0 24px 80px rgba(4, 2, 10, 0.8),
    0 0 60px rgba(154, 40, 232, 0.12);
  animation: modalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-card--wide { max-width: 680px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.93) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(154, 40, 232, 0.10);
  border: 1px solid rgba(154, 40, 232, 0.20);
  color: var(--text-dim);
  width: 28px; height: 28px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  z-index: 1;
}
.modal-close:hover { background: rgba(232, 40, 136, 0.28); color: #fff; }

.modal-logo {
  text-align: center;
  margin-bottom: 1.25rem;
}
.modal-logo img {
  width: 52px; height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(187, 136, 221, 0.7));
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  background: linear-gradient(135deg, #CCAAFF, #E82888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.modal-sub {
  color: var(--text-mute);
  font-size: 0.83rem;
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-input-wrap { margin-bottom: 0.75rem; }

.modal-input {
  width: 100%;
  background: rgba(18, 10, 38, 0.7);
  border: 1px solid rgba(154, 40, 232, 0.22);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 11px 14px;
  outline: none;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.modal-input::placeholder { color: var(--text-mute); letter-spacing: 0.02em; }
.modal-input:focus {
  border-color: rgba(154, 40, 232, 0.6);
  background: rgba(28, 14, 56, 0.8);
  box-shadow: 0 0 0 3px rgba(154, 40, 232, 0.12);
}

.modal-error {
  color: #f07070;
  font-size: 0.78rem;
  min-height: 1.4em;
  margin-bottom: 0.75rem;
  text-align: center;
  padding: 0 4px;
}

.modal-success {
  color: #50e898;
  font-size: 0.78rem;
  min-height: 1.4em;
  margin-bottom: 0.75rem;
  text-align: center;
}

.modal-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #9A28E8, #E82888);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 24px rgba(232, 40, 136, 0.35);
}
.modal-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 0 36px rgba(232, 40, 136, 0.5);
}
.modal-btn-primary:active { transform: translateY(0); }
.modal-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.modal-footer-note {
  text-align: center;
  color: var(--text-mute);
  font-size: 0.78rem;
  margin-top: 1.25rem;
}
.modal-footer-note a { color: var(--accent); text-decoration: none; }
.modal-footer-note a:hover { color: var(--text); }

.modal-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Dashboard ─────────────────────────────────────────────── */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(154, 40, 232, 0.15);
}

.dash-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #9A28E8, #E82888);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 20px rgba(154, 40, 232, 0.4);
  flex-shrink: 0;
}

.dash-username {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.dash-key-display {
  font-size: 0.72rem;
  font-family: 'Consolas', 'Courier New', monospace;
  color: var(--text-mute);
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.dash-status-badge {
  padding: 5px 12px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.dash-status-badge.active {
  background: rgba(80, 232, 152, 0.12);
  border: 1px solid rgba(80, 232, 152, 0.3);
  color: #50E898;
}
.dash-status-badge.unbound {
  background: rgba(88, 184, 224, 0.12);
  border: 1px solid rgba(88, 184, 224, 0.3);
  color: #58B8E0;
}
.dash-status-badge.revoked, .dash-status-badge.banned {
  background: rgba(240, 80, 80, 0.12);
  border: 1px solid rgba(240, 80, 80, 0.3);
  color: #F05050;
}

.dash-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 1.5rem;
  background: rgba(10, 6, 22, 0.6);
  border-radius: 10px;
  padding: 4px;
}

.dash-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-mute);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.dash-tab:hover { color: var(--text-dim); background: rgba(154, 40, 232, 0.08); }
.dash-tab.active {
  background: rgba(154, 40, 232, 0.22);
  color: var(--accent);
}

.dash-panel { min-height: 200px; }

.updates-loading {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-mute); font-size: 0.83rem;
  padding: 2rem 0; justify-content: center;
}
.updates-empty {
  color: var(--text-mute); font-size: 0.83rem;
  text-align: center; padding: 2rem 0;
}

.update-card {
  background: rgba(18, 10, 36, 0.6);
  border: 1px solid rgba(154, 40, 232, 0.18);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.update-card:first-child {
  border-color: rgba(154, 40, 232, 0.40);
  box-shadow: 0 0 30px rgba(154, 40, 232, 0.10);
}

.update-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.update-version-badge {
  background: linear-gradient(135deg, rgba(154,40,232,0.3), rgba(232,40,136,0.2));
  border: 1px solid rgba(154, 40, 232, 0.4);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 40px;
  white-space: nowrap;
  flex-shrink: 0;
}

.update-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.update-date { font-size: 0.7rem; color: var(--text-mute); margin-top: 2px; }

.update-notes {
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.update-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(154,40,232,0.22), rgba(232,40,136,0.15));
  border: 1px solid rgba(154, 40, 232, 0.35);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s;
}
.update-download:hover {
  background: linear-gradient(135deg, rgba(154,40,232,0.38), rgba(232,40,136,0.28));
  border-color: rgba(154, 40, 232, 0.6);
  color: var(--text);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.info-item {
  background: rgba(18, 10, 36, 0.5);
  border: 1px solid rgba(154, 40, 232, 0.12);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.info-item-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.info-item-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
  font-family: 'Consolas', 'Courier New', monospace;
}

/* ─── Admin panel ───────────────────────────────────────────── */
.admin-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.admin-input-row { margin-bottom: 0.75rem; }
.admin-form { display: flex; flex-direction: column; gap: 0.75rem; }
.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.modal-textarea {
  width: 100%;
  background: rgba(18, 10, 38, 0.7);
  border: 1px solid rgba(154, 40, 232, 0.22);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.8rem;
  padding: 11px 14px;
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-textarea::placeholder { color: var(--text-mute); font-family: 'Inter', sans-serif; }
.modal-textarea:focus {
  border-color: rgba(154, 40, 232, 0.6);
  box-shadow: 0 0 0 3px rgba(154, 40, 232, 0.10);
}

.file-upload-wrap {
  border: 1.5px dashed rgba(154, 40, 232, 0.30);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.file-upload-wrap:hover, .file-upload-wrap.drag-over {
  border-color: rgba(154, 40, 232, 0.65);
  background: rgba(154, 40, 232, 0.06);
}
.file-upload-inner { pointer-events: none; }
.file-upload-icon { display: block; font-size: 1.5rem; color: var(--text-mute); margin-bottom: 4px; }
.file-upload-text { font-size: 0.8rem; color: var(--text-mute); }
.file-upload-name { display: block; font-size: 0.78rem; color: var(--accent); margin-top: 4px; }

.admin-release-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 10, 36, 0.5);
  border: 1px solid rgba(154, 40, 232, 0.12);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  margin-bottom: 6px;
  gap: 1rem;
}
.admin-release-info { flex: 1; min-width: 0; }
.admin-release-ver { font-size: 0.75rem; font-weight: 700; color: var(--accent); }
.admin-release-title { font-size: 0.82rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-release-date { font-size: 0.68rem; color: var(--text-mute); }
.admin-delete-btn {
  background: rgba(240, 80, 80, 0.10);
  border: 1px solid rgba(240, 80, 80, 0.22);
  color: #F05050;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}
.admin-delete-btn:hover { background: rgba(240, 80, 80, 0.25); }

.admin-overview,
.admin-traffic-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.admin-stat-card {
  background: rgba(18, 10, 36, 0.55);
  border: 1px solid rgba(154, 40, 232, 0.16);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.admin-stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.3rem;
}

.admin-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.admin-selection-bar {
  margin-bottom: 1rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.admin-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-subtab,
.admin-action-btn {
  background: rgba(18, 10, 36, 0.6);
  border: 1px solid rgba(154, 40, 232, 0.18);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
  font-family: 'Inter', sans-serif;
}

.admin-subtab:hover,
.admin-subtab.active,
.admin-action-btn:hover {
  border-color: rgba(154, 40, 232, 0.45);
  background: rgba(154, 40, 232, 0.10);
  color: var(--text);
}

.admin-action-btn--good { color: #91f4bf; }
.admin-action-btn--warn { color: #ffca7a; }
.admin-action-btn--danger { color: #ff8f8f; }

.admin-view { display: none; }
.admin-view.active { display: block; }

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  align-items: center;
}

.admin-actions--tight { margin-top: 1rem; }

.admin-inline-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-search {
  min-width: 250px;
  flex: 1 1 260px;
}

.admin-small-input {
  width: 88px;
  min-width: 88px;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid rgba(154, 40, 232, 0.12);
  border-radius: 10px;
  background: rgba(18, 10, 36, 0.38);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid rgba(154, 40, 232, 0.10);
  font-size: 0.75rem;
  color: var(--text-dim);
  vertical-align: top;
}

.admin-table thead th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  background: rgba(8, 5, 20, 0.55);
  position: sticky;
  top: 0;
}

.admin-table tbody tr:hover {
  background: rgba(154, 40, 232, 0.05);
}

.admin-key-cell {
  font-family: 'Consolas', 'Courier New', monospace;
  color: var(--text);
  min-width: 220px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-badge.active {
  background: rgba(56, 214, 120, 0.14);
  color: #91f4bf;
}

.admin-badge.unbound {
  background: rgba(94, 185, 255, 0.12);
  color: #8ed4ff;
}

.admin-badge.revoked,
.admin-badge.banned {
  background: rgba(240, 80, 80, 0.14);
  color: #ff9e9e;
}

.admin-badge.admin {
  background: rgba(255, 201, 102, 0.14);
  color: #ffd17c;
}

.admin-meta {
  display: block;
  font-size: 0.68rem;
  color: var(--text-mute);
  margin-top: 0.2rem;
}

.admin-list {
  display: grid;
  gap: 0.7rem;
}

.admin-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(154, 40, 232, 0.14);
  border-radius: 10px;
  background: rgba(18, 10, 36, 0.48);
}

.admin-card.is-selected {
  border-color: rgba(154, 40, 232, 0.46);
  box-shadow: 0 0 0 2px rgba(154, 40, 232, 0.08);
}

.admin-card-main {
  min-width: 0;
  flex: 1;
}

.admin-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
}

.admin-card-subtitle,
.admin-card-meta {
  font-size: 0.72rem;
  color: var(--text-mute);
  margin-top: 0.2rem;
  line-height: 1.5;
  word-break: break-word;
}

.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.admin-choice-btn {
  background: rgba(18, 10, 36, 0.8);
  border: 1px solid rgba(154, 40, 232, 0.16);
  color: var(--text-dim);
  border-radius: 7px;
  padding: 0.45rem 0.7rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.admin-choice-btn:hover,
.admin-choice-btn.active {
  border-color: rgba(154, 40, 232, 0.48);
  color: var(--text);
}

.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.admin-empty {
  padding: 1rem;
  border: 1px dashed rgba(154, 40, 232, 0.18);
  border-radius: 10px;
  color: var(--text-mute);
  font-size: 0.78rem;
  text-align: center;
}

/* ─── Scrollbar global ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(154, 40, 232, 0.25); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(154, 40, 232, 0.45); }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 860px) {
  .jasper-gui {
    width: 96vw;
    height: 480px;
  }
  .gui-left-panel { width: 120px; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .jasper-gui { height: 400px; }
  .gui-left-panel { width: 100px; }
  .gui-search-wrap { display: none; }
  .admin-form-row,
  .admin-form-row--stack {
    grid-template-columns: 1fr;
  }
  .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-inline-group {
    width: 100%;
  }
  .admin-small-input {
    width: 100%;
  }
  .admin-search {
    min-width: 0;
  }
}
