/* ==========================================================================
   CLEAN & MINIMAL DUAL-THEME STYLES (Light & Dark)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ================= DARK MODE ================= */
html.dark {
  --bg-page: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #1f2937;
  --bg-input: #0f172a;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --border: #374151;
  --border-focus: #10b981;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-text: #ffffff;
  --pill-active-bg: #064e3b;
  --pill-active-text: #34d399;
  --pill-active-border: #059669;
  --modal-bg: rgba(0, 0, 0, 0.75);
}

/* ================= LIGHT MODE ================= */
html:not(.dark) {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #10b981;
  --accent: #059669;
  --accent-hover: #047857;
  --accent-text: #ffffff;
  --pill-active-bg: #ecfdf5;
  --pill-active-text: #059669;
  --pill-active-border: #10b981;
  --modal-bg: rgba(15, 23, 42, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Containers & Cards */
.clean-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.clean-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.clean-card:hover {
  border-color: var(--accent);
}

/* Inputs */
.clean-input {
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease;
}

.clean-input:focus {
  border-color: var(--border-focus);
}

/* Buttons */
.btn-primary {
  background-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Proxy Switcher Pills */
.proxy-pill {
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.proxy-pill:hover {
  border-color: var(--accent);
  color: var(--text-main);
}

.proxy-pill.active {
  background-color: var(--pill-active-bg);
  border-color: var(--pill-active-border);
  color: var(--pill-active-text);
  font-weight: 600;
}

/* Modal */
.modal-overlay {
  background-color: var(--modal-bg);
  backdrop-filter: blur(8px);
}

/* Touch & Mobile Optimizations */
@media (max-width: 640px) {
  .clean-panel {
    border-radius: 12px;
  }
  .clean-input {
    font-size: 13px;
    padding: 8px 12px;
  }
  .btn-primary, .btn-secondary {
    touch-action: manipulation;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg-page);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ==========================================================================
   Icon & SVG High-Contrast Visibility (Light & Dark Theme Aware)
   ========================================================================== */
svg.lucide, i[data-lucide] {
  stroke-width: 2.2px;
  stroke: currentColor;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Light Mode Enhanced Icon & Element Colors (Deep, crisp colors) */
html:not(.dark) svg.lucide,
html:not(.dark) [data-lucide] {
  color: inherit;
}

html:not(.dark) .text-emerald-400,
html:not(.dark) .text-emerald-500 {
  color: #059669 !important;
}

html:not(.dark) .text-amber-400,
html:not(.dark) .text-amber-500 {
  color: #d97706 !important;
}

html:not(.dark) .text-rose-400,
html:not(.dark) .text-rose-500 {
  color: #e11d48 !important;
}

html:not(.dark) .text-purple-400,
html:not(.dark) .text-purple-500 {
  color: #7c3aed !important;
}

html:not(.dark) .text-sky-400,
html:not(.dark) .text-sky-500 {
  color: #0284c7 !important;
}

/* Dark Mode Icon Colors (Bright, luminous colors) */
html.dark .text-emerald-400,
html.dark .text-emerald-500 {
  color: #34d399 !important;
}

html.dark .text-amber-400,
html.dark .text-amber-500 {
  color: #fbbf24 !important;
}

html.dark .text-rose-400,
html.dark .text-rose-500 {
  color: #fb7185 !important;
}

html.dark .text-purple-400,
html.dark .text-purple-500 {
  color: #c084fc !important;
}

html.dark .text-sky-400,
html.dark .text-sky-500 {
  color: #38bdf8 !important;
}

