/* ═══════════════════════════════════════════════
   NexSearch v3.0 — style.css
   Theme: Dark / Void — Özgün Tasarım
   ═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0a0a0f;
  --bg-2:       #0f0f1a;
  --bg-3:       #141420;
  --surface:    #1a1a28;
  --surface-2:  #202033;
  --surface-3:  #282840;

  --border:     rgba(255,255,255,0.07);
  --border-2:   rgba(255,255,255,0.12);

  --text:       #e8e8f0;
  --text-2:     #9090b0;
  --text-3:     #50507a;
  --text-dim:   #30304a;

  --accent:     #7c6aff;
  --accent-2:   #9b8aff;
  --accent-glow: rgba(124,106,255,0.25);
  --accent-glow-sm: rgba(124,106,255,0.15);

  --green:      #3be8a0;
  --green-dim:  rgba(59,232,160,0.15);
  --orange:     #ff9f43;
  --orange-dim: rgba(255,159,67,0.15);
  --red:        #ff6b6b;
  --red-dim:    rgba(255,107,107,0.12);

  --r:     16px;
  --r-sm:  10px;
  --r-xs:  7px;
  --ease:  cubic-bezier(0.16, 1, 0.3, 1);

  --sidebar-w: 220px;
}

/* ── LIGHT THEME ── */
body.theme-light {
  --bg:         #f0f0f7;
  --bg-2:       #e8e8f2;
  --bg-3:       #e0e0ec;
  --surface:    #ffffff;
  --surface-2:  #f5f5fc;
  --surface-3:  #ebebf5;

  --border:     rgba(0,0,0,0.08);
  --border-2:   rgba(0,0,0,0.13);

  --text:       #1a1a2e;
  --text-2:     #4a4a6a;
  --text-3:     #8888aa;
  --text-dim:   #bbbbcc;

  --accent:     #6c5aee;
  --accent-2:   #8a7aff;
  --accent-glow: rgba(108,90,238,0.2);
  --accent-glow-sm: rgba(108,90,238,0.12);

  --green:      #1fba7a;
  --green-dim:  rgba(31,186,122,0.12);
  --orange:     #e8882a;
  --orange-dim: rgba(232,136,42,0.12);
  --red:        #e85555;
  --red-dim:    rgba(232,85,85,0.1);
}

body.theme-light .bg-grid {
  background-image:
    linear-gradient(rgba(108,90,238,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,90,238,0.05) 1px, transparent 1px);
}

body.theme-light .bg-glow {
  background: radial-gradient(ellipse, rgba(108,90,238,0.07) 0%, transparent 70%);
}

body.theme-light .modal-card {
  box-shadow: 0 24px 80px rgba(0,0,0,.15);
}

body.theme-light .sidebar-overlay {
  background: rgba(0,0,0,0.3);
}

body.theme-light .toast {
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}

/* ── HTML ── */
html { height: 100%; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
  min-height: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ════════════════════════════
   BACKGROUND EFFECTS
   ════════════════════════════ */

.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(124,106,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,106,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(124,106,255,0.08) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ════════════════════════════
   SIDEBAR
   ════════════════════════════ */

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex; flex-direction: column;
  padding: 28px 16px 24px;
  gap: 0;
  transition: transform .35s var(--ease);
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px; margin-bottom: 36px;
}

.sl-mark {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 18px; font-weight: 800;
  color: white;
  box-shadow: 0 0 20px var(--accent-glow);
}

.sl-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 17px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.sidebar-nav {
  display: flex; flex-direction: column; gap: 4px;
  flex: 1;
}

.snav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: background .2s, color .2s;
  cursor: pointer;
  border: 1px solid transparent;
}
.snav-item:hover {
  background: var(--surface);
  color: var(--text);
}
.snav-item.active {
  background: rgba(124,106,255,0.12);
  color: var(--accent-2);
  border-color: rgba(124,106,255,0.2);
}
.snav-item.active svg { stroke: var(--accent-2); }

.sidebar-status {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--green-dim);
  border-radius: var(--r-sm);
  border: 1px solid rgba(59,232,160,0.15);
  font-size: 12px; font-weight: 500;
  color: var(--green);
}

.ss-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2.5s ease infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(59,232,160,.4); }
  50%      { opacity:.7; box-shadow: 0 0 0 4px rgba(59,232,160,0); }
}

/* ════════════════════════════
   HAMBURGER
   ════════════════════════════ */

.hamburger {
  display: none;
  position: fixed; top: 16px; right: 16px; z-index: 200;
  width: 40px; height: 40px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; cursor: pointer; padding: 0;
}
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--text-2); border-radius: 2px;
  transition: all .3s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.sidebar-overlay.active { display: block; }

/* ════════════════════════════
   MAIN CONTENT
   ════════════════════════════ */

.content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  position: relative; z-index: 1;
}

/* ════════════════════════════
   PAGES
   ════════════════════════════ */

.page {
  display: none;
  padding: 40px 48px 80px;
  max-width: 800px;
  animation: pageIn .35s var(--ease) both;
}
.page.active { display: block; }

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

/* ════════════════════════════
   HOME HEADER
   ════════════════════════════ */

.home-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 60px;
}

.ver-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 400;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 100px;
}

.stat-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
}

/* ════════════════════════════
   HERO
   ════════════════════════════ */

.hero {
  margin-bottom: 48px;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

.ht-nex    { color: var(--text); }
.ht-search { color: var(--accent); }

.hero-sub {
  font-size: 15px;
  color: var(--text-2);
  font-weight: 300;
}

/* ════════════════════════════
   SEARCH
   ════════════════════════════ */

.search-wrap {
  margin-bottom: 56px;
}

.search-box {
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  height: 58px;
  padding: 0 8px 0 20px;
  gap: 8px;
  transition: border-color .25s, box-shadow .25s;
  position: relative;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow-sm), 0 8px 32px rgba(0,0,0,.4);
}

.sb-left {
  display: flex; align-items: center; gap: 12px;
  flex: 1; min-width: 0;
}

.sb-icon {
  color: var(--text-3); flex-shrink: 0;
  transition: color .2s;
}
.search-box:focus-within .sb-icon { color: var(--accent); }

.sb-input {
  flex: 1; border: none; outline: none;
  background: transparent;
  font-family: 'Outfit', sans-serif;
  font-size: 16px; font-weight: 400;
  color: var(--text);
  min-width: 0;
}
.sb-input::placeholder { color: var(--text-3); }

.sb-right {
  display: flex; align-items: center; gap: 4px;
}

.sb-clear {
  background: none; border: none;
  width: 32px; height: 32px; border-radius: 50%;
  color: var(--text-3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  opacity: 0; pointer-events: none;
  transition: all .15s;
}
.sb-clear.visible { opacity:1; pointer-events:all; }
.sb-clear:hover { background: var(--surface-2); color: var(--text); }

.sb-go {
  width: 42px; height: 42px;
  background: var(--accent);
  border: none; border-radius: var(--r-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
  transition: background .15s, transform .12s, box-shadow .15s;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.sb-go:hover {
  background: var(--accent-2);
  transform: scale(1.05);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.sb-go:active { transform: scale(.97); }

/* Actions */
.search-actions {
  display: flex; gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn-proxy {
  display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 20px;
  background: rgba(124,106,255,0.12);
  border: 1px solid rgba(124,106,255,0.25);
  border-radius: var(--r-xs);
  font-family: 'Outfit', sans-serif;
  font-size: 14px; font-weight: 500;
  color: var(--accent-2); cursor: pointer;
  transition: all .2s;
}
.btn-proxy:hover {
  background: rgba(124,106,255,0.2);
  border-color: rgba(124,106,255,0.45);
  box-shadow: 0 4px 16px var(--accent-glow-sm);
}

.btn-lucky {
  display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 20px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  font-family: 'Outfit', sans-serif;
  font-size: 14px; font-weight: 400;
  color: var(--text-2); cursor: pointer;
  transition: all .2s;
}
.btn-lucky:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: rgba(255,255,255,0.18);
}

.kbd-row {
  display: flex; align-items: center; gap: 5px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
}
kbd {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 5px;
  padding: 2px 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--text-2);
}
.kbd-sep { color: var(--text-dim); }

/* ════════════════════════════
   PANEL
   ════════════════════════════ */

.panel { width: 100%; }

.panel-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.panel-tabs { display: flex; }

.ptab {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 18px 14px;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.ptab:hover:not(.active) { color: var(--text-2); }
.ptab.active {
  color: var(--accent-2);
  border-bottom-color: var(--accent);
}

.ptab-badge {
  background: var(--surface-2);
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 2px 7px; border-radius: 100px;
}
.ptab.active .ptab-badge {
  background: rgba(124,106,255,0.15);
  color: var(--accent-2);
}

.btn-clear-all {
  display: flex; align-items: center; gap: 5px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px; color: var(--text-3);
  background: none; border: none; cursor: pointer;
  padding: 5px 10px; border-radius: var(--r-xs);
  transition: all .15s;
}
.btn-clear-all:hover {
  background: var(--red-dim);
  color: var(--red);
}

/* Tab panes */
.tab-pane { display: none; }
.tab-pane.active {
  display: block;
  animation: fadeIn .2s var(--ease);
}
@keyframes fadeIn {
  from { opacity:0; transform: translateY(6px); }
  to   { opacity:1; transform: translateY(0); }
}

/* ════════════════════════════
   FAVORITES
   ════════════════════════════ */

.fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.fav-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 18px 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer; text-align: center;
  transition: all .2s var(--ease);
  position: relative; overflow: hidden;
}
.fav-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,106,255,0.06) 0%, transparent 60%);
  opacity: 0; transition: opacity .2s;
}
.fav-card:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  transform: translateY(-2px);
}
.fav-card:hover::before { opacity: 1; }
.fav-card:active { transform: translateY(0); }

.fav-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  transition: transform .2s;
}
.fav-card:hover .fav-icon { transform: scale(1.1); }

.fav-name {
  font-size: 11px; font-weight: 500;
  color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;
}
.fav-host {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;
}

.fav-add {
  border-style: dashed;
  background: transparent;
  border-color: var(--surface-3);
}
.fav-add:hover {
  border-color: var(--accent);
  background: rgba(124,106,255,0.06);
}
.add-plus { font-size: 22px; color: var(--text-dim); transition: color .15s; }
.fav-add:hover .add-plus { color: var(--accent); }
.fav-add .fav-name { color: var(--text-dim); font-size: 11px; }
.fav-add:hover .fav-name { color: var(--accent); }

/* ════════════════════════════
   HISTORY
   ════════════════════════════ */

.hist-meta {
  font-size: 11px; color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 8px;
}

.history-list { list-style: none; }

.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px;
  border-radius: var(--r-xs);
  transition: background .15s;
  animation: slideIn .18s var(--ease) both;
  border: 1px solid transparent;
}
@keyframes slideIn {
  from { opacity:0; transform:translateX(-6px); }
  to   { opacity:1; transform:translateX(0); }
}
.history-item:hover { background: var(--surface); border-color: var(--border); }

.h-favicon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.h-favicon img { width: 16px; height: 16px; object-fit: contain; }

.h-link {
  color: var(--text-2); text-decoration: none; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 400;
  transition: color .15s;
}
.h-link:hover { color: var(--accent-2); text-decoration: underline; }

.h-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-dim); flex-shrink: 0;
}
.h-del {
  width: 26px; height: 26px;
  background: none; border: none;
  color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; flex-shrink: 0; font-size: 11px;
  transition: all .15s;
}
.h-del:hover { background: var(--red-dim); color: var(--red); }

.empty-state { text-align: center; padding: 40px 0; }
.empty-icon { font-size: 28px; opacity: .15; margin-bottom: 10px; }
.empty-text { font-size: 12px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }

/* ════════════════════════════
   STATIC PAGES (ABOUT / PRIVACY / SETTINGS)
   ════════════════════════════ */

.static-page { max-width: 600px; }

.sp-icon {
  width: 64px; height: 64px;
  background: rgba(124,106,255,0.12);
  border: 1px solid rgba(124,106,255,0.2);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  color: var(--accent);
}
.sp-icon--green {
  background: var(--green-dim);
  border-color: rgba(59,232,160,0.2);
  color: var(--green);
}
.sp-icon--orange {
  background: var(--orange-dim);
  border-color: rgba(255,159,67,0.2);
  color: var(--orange);
}

.sp-title {
  font-family: 'Syne', sans-serif;
  font-size: 2.4rem; font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.1;
}

.sp-version {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--text-3);
  margin-bottom: 40px;
}

.sp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  margin-bottom: 12px;
}
.sp-card--highlight {
  background: rgba(124,106,255,0.08);
  border-color: rgba(124,106,255,0.2);
}
.sp-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.sp-card p {
  font-size: 14px; color: var(--text-2);
  line-height: 1.7;
}
.sp-card strong { color: var(--text); font-weight: 600; }
.sp-card em { color: var(--accent-2); font-style: normal; }

.sp-grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 12px;
}
.sp-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 20px; text-align: center;
}
.sp-stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 2rem; font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.sp-stat-lbl {
  font-size: 12px; color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
}

/* ════════════════════════════
   SETTINGS PAGE
   ════════════════════════════ */

.setting-section { margin-bottom: 32px; }

.setting-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 12px;
  padding-left: 2px;
}

.setting-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px 20px;
  margin-bottom: 6px;
  transition: border-color .2s;
}
.setting-row:hover { border-color: var(--border-2); }

.sr-info { flex: 1; }
.sr-label {
  font-size: 14px; font-weight: 500;
  color: var(--text); margin-bottom: 2px;
}
.sr-desc {
  font-size: 12px; color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
}

.sr-control {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
}
.sr-control--full { width: 100%; flex: 1; }

.setting-input {
  flex: 1; height: 38px; padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--text);
  outline: none; min-width: 0;
  transition: border-color .2s, box-shadow .2s;
}
.setting-input::placeholder { color: var(--text-dim); }
.setting-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow-sm);
}

.btn-setting-save {
  height: 38px; padding: 0 16px;
  background: var(--accent);
  border: none; border-radius: var(--r-xs);
  color: white; font-size: 13px; font-weight: 500;
  font-family: 'Outfit', sans-serif;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 2px 10px var(--accent-glow);
}
.btn-setting-save:hover {
  background: var(--accent-2);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* Toggle */
.toggle { cursor: pointer; }
.toggle input { display: none; }
.toggle-track {
  display: block;
  width: 44px; height: 24px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  position: relative;
  transition: background .25s, border-color .25s;
}
.toggle input:checked + .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform .25s var(--ease);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
}

/* Danger buttons */
.btn-danger-sm {
  height: 34px; padding: 0 16px;
  background: var(--red-dim);
  border: 1px solid rgba(255,107,107,0.2);
  border-radius: var(--r-xs);
  color: var(--red); font-size: 13px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer; transition: all .15s;
}
.btn-danger-sm:hover {
  background: rgba(255,107,107,0.2);
  border-color: rgba(255,107,107,0.4);
}

.btn-danger {
  height: 34px; padding: 0 16px;
  background: var(--red);
  border: none; border-radius: var(--r-xs);
  color: white; font-size: 13px; font-weight: 500;
  font-family: 'Outfit', sans-serif;
  cursor: pointer; transition: all .15s;
  box-shadow: 0 2px 10px rgba(255,107,107,0.3);
}
.btn-danger:hover {
  background: #ff8080;
  box-shadow: 0 4px 16px rgba(255,107,107,0.4);
}

/* App info */
.app-info-grid {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.ai-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.ai-row:last-child { border-bottom: none; }
.ai-row span:first-child { color: var(--text-2); }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--accent-2); }

/* ════════════════════════════
   MODAL
   ════════════════════════════ */

.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-card {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  width: 100%; max-width: 440px;
  margin: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.7);
  transform: scale(.92) translateY(20px);
  transition: transform .35s var(--ease);
  overflow: hidden;
}
.modal-overlay.open .modal-card { transform: scale(1) translateY(0); }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 18px; color: var(--text);
}
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: all .15s;
}
.modal-close:hover { background: var(--red-dim); color: var(--red); border-color: transparent; }

.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }

.mfield { display: flex; flex-direction: column; gap: 7px; }
.mfield label {
  font-size: 11px; font-weight: 500; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.07em;
  font-family: 'JetBrains Mono', monospace;
}
.mfinput {
  height: 44px; padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  font-family: 'Outfit', sans-serif;
  font-size: 14px; color: var(--text);
  outline: none; transition: all .2s;
}
.mfinput::placeholder { color: var(--text-dim); }
.mfinput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow-sm);
}

.emoji-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-opt {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--surface);
  border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; cursor: pointer;
  transition: all .15s;
}
.emoji-opt:hover { background: var(--surface-2); }
.emoji-opt.selected {
  border-color: var(--accent);
  background: rgba(124,106,255,0.12);
}

.modal-foot {
  display: flex; gap: 8px;
  padding: 16px 24px 22px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}
.mf-cancel {
  height: 40px; padding: 0 18px;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs); color: var(--text-2);
  font-family: 'Outfit', sans-serif;
  font-size: 14px; cursor: pointer;
  transition: all .15s;
}
.mf-cancel:hover { background: var(--surface); color: var(--text); }

.mf-save {
  height: 40px; padding: 0 22px;
  background: var(--accent); border: none;
  border-radius: var(--r-xs); color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.mf-save:hover { background: var(--accent-2); box-shadow: 0 4px 20px var(--accent-glow); }

/* ════════════════════════════
   TOAST
   ════════════════════════════ */

.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(70px);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 20px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; z-index: 999;
  opacity: 0;
  transition: transform .35s var(--ease), opacity .25s;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast svg { color: var(--green); flex-shrink: 0; }

/* ════════════════════════════
   THEME SWITCHER
   ════════════════════════════ */

.theme-switcher {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xs);
  padding: 3px;
  gap: 2px;
}

.theme-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.theme-btn:hover { background: var(--surface-2); color: var(--text); }
.theme-btn.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.theme-btn svg { flex-shrink: 0; }

/* ════════════════════════════
   SCROLLBAR
   ════════════════════════════ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--surface-2); }

/* ════════════════════════════
   RESPONSIVE
   ════════════════════════════ */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,.6);
  }
  .hamburger { display: flex; }
  .content { margin-left: 0; }
  .page { padding: 24px 20px 60px; }
  .hero-title { font-size: 3rem; }
  .sp-title { font-size: 2rem; }
  .sp-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .setting-row { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .search-actions { flex-direction: column; }
  .btn-proxy, .btn-lucky { width: 100%; justify-content: center; }
  .sp-grid-3 { grid-template-columns: 1fr 1fr; }
}
