/* 
  Zig-Zag — Main Stylesheet
  Architecture: Variables -> Reset -> Global -> Components -> Media Queries
*/

:root {
  --bg: #09090b;
  --bg-deep: #020202;
  --bg2: #18181b;
  --bg3: #27272a;
  --surface: rgba(24, 24, 27, 0.6);
  --surface2: rgba(39, 39, 42, 0.8);
  --border: rgba(255, 255, 255, 0.1);
  --border2: rgba(255, 255, 255, 0.15);
  --text: #ffffff;
  --muted: #a1a1aa;
  --faint: #3f3f46;
  --accent: #ffffff;
  --accent-text: #09090b;
  --accent2: #e4e4e7;
  --secondary: #3b82f6;
  --secondary-rgb: 59, 130, 246;
  --rose: #ef4444;
  --green: #10b981;
  --yellow: #eab308;
  --purple: #a855f7;
  --font: 'Inter', sans-serif;
  --heading: 'Sora', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --r: 8px;
  --glass: blur(16px) saturate(180%);
  --shine: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-deep: #fafafa;
  --bg2: #f4f4f5;
  --bg3: #e4e4e7;
  --surface: rgba(255, 255, 255, 0.7);
  --surface2: rgba(255, 255, 255, 0.9);
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(0, 0, 0, 0.15);
  --text: #111827;
  --muted: #4B5563;
  --faint: #9CA3AF;
  --accent: #000000;
  --accent-text: #ffffff;
  --accent2: #483AC4;
  --secondary: #2563eb;
  --secondary-rgb: 37, 99, 235;
  --rose: #dc2626;
  --green: #16a34a;
  --glass: blur(24px) saturate(200%);
  --shine: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 24px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .glass-nav {
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nav-a:hover {
  background: var(--bg2);
}

[data-theme="light"] .nav-a.active {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .btn-glass,
[data-theme="light"] .badge-glass,
[data-theme="light"] .glass,
[data-theme="light"] .d-card {
  background: var(--surface);
  border-color: var(--border2);
}

[data-theme="light"] .btn-glass:hover {
  border-color: var(--accent);
  background: var(--surface2);
}



[data-theme="light"] .lchip {
  background: var(--surface);
  border: 1px solid var(--border);
}

[data-theme="light"] .lchip:hover {
  background: var(--surface2);
  border-color: var(--border2);
}

[data-theme="light"] .ide-toolbar,
[data-theme="light"] .ide-sidebar {
  background: #FFFFFF !important;
  border-color: #E5E7EB !important;
}

[data-theme="light"] .ide-status-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

[data-theme="light"] .file-item:hover {
  background: #F3F4F6;
}

[data-theme="light"] .file-item.active {
  background: var(--bg3);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--accent);
}

.file-item.drag-over {
  background: rgba(var(--secondary-rgb), 0.2) !important;
  box-shadow: inset 0 0 0 2px var(--secondary) !important;
}

[data-theme="light"] .terminal-dock {
  background: #FFFFFF;
  border-top: 1px solid #E5E7EB;
}

[data-theme="light"] .terminal-head {
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
}

[data-theme="light"] .term-tab {
  color: #6B7280;
}

[data-theme="light"] .term-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

[data-theme="light"] .ol-log {
  color: #111827;
}

[data-theme="light"] .ol-err {
  color: #DC2626;
}

[data-theme="light"] .ol-warn {
  color: #D97706;
}

[data-theme="light"] .modal-box {
  background: #FFFFFF;
  color: #111827;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] #modal-input {
  background: #F9FAFB;
  border-color: #D1D5DB;
  color: #111827;
}

[data-theme="light"] .m-cancel {
  color: #4B5563;
}

[data-theme="light"] .main-footer {
  background: #F9FAFB;
  border-top: 1px solid #E5E7EB;
  color: #6B7280;
}

[data-theme="light"] .logo span {
  color: #111827;
}

[data-theme="light"] .editor-container {
  background: #FFFFFF;
}

[data-theme="light"] .grad-text {
  background: linear-gradient(135deg, #000000 0%, #71717a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .snip-card {
  background: #FFFFFF;
  border-color: #E5E7EB;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .snip-card:hover {
  border-color: #5B4DE6;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .s-title {
  color: #111827;
}

[data-theme="light"] .s-desc {
  color: #4B5563;
}

[data-theme="light"] .s-cat {
  color: #6B7280;
}

[data-theme="light"] .docs-nav {
  background: #FFFFFF;
  border-color: #E5E7EB;
}

[data-theme="light"] .dlink {
  color: #4B5563;
}

[data-theme="light"] .dlink:hover {
  background: #F3F4F6;
  color: #111827;
}

[data-theme="light"] .dlink.on {
  background: #EFF6FF;
  color: #2563EB;
}

[data-theme="light"] .d-sub {
  color: #111827;
}

[data-theme="light"] .kcap {
  background: #F3F4F6;
  border-color: #D1D5DB;
  color: #374151;
}

[data-theme="light"] .orb {
  opacity: 0.1;
}

/* Background Orbs */
.orb-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  filter: blur(120px);
  opacity: 0.15;
  border-radius: 50%;
}

.orb-v {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  left: -200px;
  opacity: 0.15;
}

.orb-t {
  width: 500px;
  height: 500px;
  background: var(--secondary);
  bottom: -150px;
  right: -150px;
  opacity: 0.12;
}

.orb-r {
  width: 400px;
  height: 400px;
  background: var(--rose);
  top: 40%;
  right: -100px;
  opacity: 0.08;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  z-index: -1;
  pointer-events: none;
}

[data-theme="light"] body::before {
  background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1.5px, transparent 1.5px);
}

/* Nav Redesign */
.glass-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(5, 5, 15, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
  font-family: var(--heading);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font);
}

.nav-a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .nav-a.active {
  background: rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Page Management */
.page {
  display: none;
  height: calc(100vh - 64px);
  margin-top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  animation: fadeUp .28s ease;
}

.page.active {
  display: block;
}

#p-home.active,
#p-snippets.active,
#p-docs.active {
  display: flex !important;
  flex-direction: column;
  padding-top: 4rem;
  /* Restore spacing above */
}

#p-home.active .pw,
#p-snippets.active .pw {
  flex: 1 0 auto;
  width: 100%;
}

#p-docs.active,
#p-snippets.active {
  font-family: 'Outfit', sans-serif;
}

#p-docs.active .ph h1,
#p-snippets.active .ph h1 {
  font-family: 'Outfit', sans-serif;
}

#p-docs.active .pw {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1200px;
  /* Expand for whole page look */
}

#p-editor.page {
  overflow: hidden;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glass Wrapper */
.glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-radius: var(--r);
  box-shadow: var(--shine);
}

/* HOME PAGE HERO */
.hero {
  height: calc(100vh - 64px - 4rem - 100px);
  /* Leave room for marquee */
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
  margin-bottom: 0;
}

.badge-glass {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--glass);
  padding: 6px 16px;
  border-radius: 9999px;
  margin-bottom: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
}

.p-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.4);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.hero h1 {
  font-family: var(--heading);
  font-size: 72px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.grad-text {
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-btns {
  display: flex;
  gap: 12px;
  margin-bottom: 4rem;
}

/* CTA Buttons */
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  padding: 14px 32px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: scale(1.03);
  background: var(--accent2);
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass);
  color: var(--text);
  padding: 14px 32px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border2);
}

/* Marquee */
.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  -webkit-mask: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-content {
  display: flex;
  gap: 12px;
  padding: 1rem 0;
  width: max-content;
  animation: marquee 40s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.lpill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.ldot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Stagger Animation */
.stagger {
  opacity: 0;
  animation: staggerUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes staggerUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-p {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: #05050F;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.05);
}

.btn-p:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15);
}

.btn-o {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: var(--glass);
}

.btn-o:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.langs-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin: 0 auto 4rem;
  padding: 0;
  min-height: 50px;
  mask-image: linear-gradient(to right, transparent, white 15%, white 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, white 15%, white 85%, transparent);
}

.marquee-content {
  display: flex;
  gap: 12px;
  padding: 1rem 0;
  width: max-content;
  animation: marquee 60s linear infinite;
  will-change: transform;
}

.marquee-content:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.lchip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: var(--glass);
}

.lchip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

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

.feat {
  padding: 2rem;
  transition: all 0.3s ease;
}

.feat:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.05);
}

.feat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  font-weight: 800;
  color: var(--accent-text);
  background: var(--accent);
}

.feat h3 {
  font-family: var(--heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feat p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

/* IDE Layout (3-Pane) */
.ide-layout {
  display: flex;
  height: calc(100% - 24px);
  /* Subtract status bar */
  overflow: hidden;
  background: var(--bg);
}

.ide-sidebar {
  width: 260px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width .25s ease, opacity .2s ease;
  overflow: hidden;
}

.ide-sidebar.collapsed {
  width: 0 !important;
  opacity: 0;
  border-right: none !important;
  pointer-events: none;
}

.sidebar-head {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  font-size: .65rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
}

.sidebar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-mobile-close {
  display: none;
}


.file-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: .83rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: .1s;
  user-select: none;
}

.file-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--faint);
  transition: color .2s;
}

.file-item:hover .file-chevron {
  color: var(--muted);
}

.file-item:hover {
  background: var(--surface);
  color: var(--text);
}

.file-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  border-left: 2px solid var(--accent);
}

.file-item svg {
  flex-shrink: 0;
  opacity: .7;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  opacity: 0;
  transition: opacity .15s;
}

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

.file-del,
.file-edit,
.file-add,
.folder-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  /* Clear padding for strict icon centering */
  color: var(--muted);
  border-radius: 4px;
  transition: .15s;
}

.file-add:hover,
.folder-add:hover {
  background: rgba(56, 239, 200, 0.12);
  color: var(--secondary);
}

.file-actions>div:hover {
  color: var(--text);
}

.file-del:hover {
  background: rgba(247, 107, 138, 0.15);
  color: var(--rose) !important;
}

.file-edit:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
}

.file-del:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.ide-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.ide-toolbar {
  background: var(--bg2) !important;
  border-bottom: 1px solid var(--border);
  padding: 0 16px !important;
  height: 48px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.tb-delete {
  margin-left: 4px;
  color: var(--faint);
  opacity: 0.6;
}

.tb-delete:hover {
  color: var(--rose) !important;
  background: rgba(247, 107, 138, 0.12) !important;
  opacity: 1;
}

.active-file-title {
  font-size: .75rem;
  font-weight: 500;
  font-family: var(--mono);
  color: var(--muted);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="light"] .active-file-title {
  color: #6B7280;
}

.lang-sel-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-dropdown {
  appearance: none;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--muted);
  padding: 5px 30px 5px 12px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: .15s;
}

.lang-dropdown:hover {
  border-color: var(--accent);
  color: var(--text);
}

.lang-sel-wrap::after {
  content: '▾';
  position: absolute;
  right: 10px;
  font-size: 10px;
  color: var(--muted);
  pointer-events: none;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tbtn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text);
  border-radius: 6px;
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.tbtn:hover {
  background: var(--surface2);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.tbtn svg {
  opacity: 0.8;
}

.run-btn {
  background: var(--green) !important;
  border: none !important;
  color: #052e16 !important;
  font-weight: 800 !important;
  padding: 6px 20px !important;
  box-shadow: 0 4px 12px rgba(16, 217, 126, 0.2);
}

.run-btn:hover {
  background: #F59E0B !important;
  /* Turmeric Color */
  color: #000 !important;
  box-shadow: none !important;
  transform: none !important;
}

.run-btn.busy {
  background: var(--rose) !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(247, 107, 138, 0.4) !important;
  animation: pulse .8s infinite alternate;
}

@keyframes pulse {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.7;
  }
}

.api-health {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0 4px;
}

.adot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.adot.ok {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.adot.err {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
}

.adot.chk {
  background: var(--yellow);
  animation: pulse .6s infinite alternate;
}

.tsep {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
  opacity: 0.5;
}

.editor-container {
  flex: 1;
  background: var(--bg-deep);
  position: relative;
  min-height: 0;
}

/* Terminal Dock */
.terminal-dock {
  height: 350px;
  max-height: 65vh;
  position: relative;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: .25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  flex-shrink: 0;
}

.terminal-dock.collapsed {
  height: 36px !important;
}

.terminal-dock.collapsed .toggle-icon {
  transform: rotate(180deg);
}

.toggle-icon {
  transition: transform .25s ease;
}

.term-resizer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  cursor: ns-resize;
  z-index: 10;
  transition: background 0.2s;
}

.term-resizer:hover {
  background: var(--secondary);
}

.terminal-dock.collapsed .term-resizer {
  display: none;
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  height: 36px;
  flex-shrink: 0;
}

.term-tabs {
  display: flex;
  height: 100%;
}

.term-tab {
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: var(--font);
}

.term-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.term-actions {
  display: flex;
  gap: 4px;
}

.icon-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  transition: .15s;
}

.icon-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: .83rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

#stats-panel {
  white-space: normal;
}

#input-panel {
  padding: 0;
  /* Remove padding so textarea fills container */
  display: flex;
  flex-direction: column;
}

#stdin-input {
  flex: 1;
  width: 100%;
  height: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: none;
  border-left: 2px solid transparent;
  /* Prepare for focus */
  color: var(--text);
  font-family: var(--mono);
  font-size: .83rem;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: .15s ease;
}

#stdin-input:focus {
  background: rgba(255, 255, 255, 0.02);
  border-left-color: var(--accent);
  /* Premium IDE indicator */
}

/* Status Bar */
.ide-status-bar {
  height: 24px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: .72rem;
  font-weight: 600;
  z-index: 100;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ANSI-like Terminal Colors */
.ol-log {
  color: var(--text);
}

.ol-err {
  color: #f87171;
}

.ol-warn {
  color: #fbbf24;
}

.ol-sys {
  color: var(--muted);
  font-style: italic;
}

.ol-ok {
  color: #4ade80;
}

.ol-bold {
  font-weight: 700;
}

.pw {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.ph {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.ph-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.ph h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.ph p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Resizing and UI Tweaks */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  color: #fff;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
  border: 1px solid var(--border2);
}

/* SNIPPETS PAGE */
.sbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 4rem;
  position: relative;
  width: 100%;
  max-width: 620px;
}

.sbar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--glass);
  color: var(--text);
  padding: 14px 28px;
  border-radius: 14px;
  font-family: var(--font);
  font-size: 1rem;
  text-align: center;
  outline: none;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.sbar input:focus {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.sbar input::placeholder {
  color: var(--faint);
}

.snip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.snip-card {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 200ms ease-out;
}

.snip-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.2), var(--shine);
}

.s-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.s-lang {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.s-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.s-title {
  font-family: var(--heading);
  font-size: 1.125rem;
  color: var(--text);
  margin: 4px 0;
}

.s-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.s-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.s-action {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  position: relative;
}

.s-action::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--secondary);
  transition: width 0.3s ease;
}

.snip-card:hover .s-action::after {
  width: 100%;
}

/* DOCS PAGE */
.docs-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.docs-nav {
  width: 260px;
  position: sticky;
  top: 96px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.docs-nav h4 {
  font-size: 10px;
  font-weight: 800;
  color: var(--faint);
  letter-spacing: 0.2rem;
  margin-bottom: 12px;
  padding-left: 12px;
  text-transform: uppercase;
}

.dlink {
  background: none;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 150ms ease;
  font-family: var(--font);
}

.dlink:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.dlink.on {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.docs-body {
  flex: 1;
  min-width: 0;
  max-width: 900px;
  padding-bottom: 4rem;
}

.dsec {
  display: none;
  animation: fadeUp .4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 3rem;
  margin-bottom: 3rem;
}

.dsec:last-child {
  border-bottom: none;
}

.dsec.on {
  display: block;
}

.dsec p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.85;
  margin: 1.25rem 0;
}

.d-sub {
  color: var(--secondary);
  font-size: 1.1rem;
  font-weight: 700;
  border-left: 3px solid var(--secondary);
  padding-left: 12px;
  margin: 2.25rem 0 1rem;
}

.dsec ul {
  list-style: none;
  padding: 0;
}

.dsec li {
  margin-bottom: 12px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  line-height: 1.6;
}

.dsec li::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
}

.kcap {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

.d-card {
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.key-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 1.5rem;
}

.key-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* FONT CONTROLS */
.font-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

#font-size-val {
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  min-width: 32px;
  text-align: center;
  font-family: var(--mono);
}


.snip-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all .3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

/* Reveal on Scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-active {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.snip-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent2);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.snip-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent2), transparent);
  opacity: 0;
  transition: opacity .3s;
}

.snip-card:hover::after {
  opacity: 1;
}

.s-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.s-lang {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 12px;
  border-radius: 100px;
}

.s-cat {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
}

.s-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.s-desc {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.s-foot {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.s-action {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent2);
  opacity: 0.8;
  transition: opacity .2s;
}

.snip-card:hover .s-action {
  opacity: 1;
}


/* DOCS PAGE */
.docs-layout {
  display: flex;
  gap: 0;
}

.docs-nav {
  width: 210px;
  flex-shrink: 0;
}

.docs-nav h4 {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: .65rem;
}

.dlink {
  display: block;
  width: 100%;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: .83rem;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  transition: .14s;
  border: none;
  background: none;
  text-align: left;
  font-family: var(--font);
  margin-bottom: 2px;
}

.dlink:hover {
  color: var(--text);
  background: var(--surface);
}

.dlink.on {
  color: var(--accent2);
  background: rgba(59, 130, 246, .12);
}

.docs-body {
  flex: 1;
  padding-left: 3rem;
}

.dsec {
  display: none;
}

.dsec.on {
  display: block;
}

.dsec h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: .9rem;
}

.dsec h3 {
  font-size: .93rem;
  font-weight: 700;
  margin: 1.4rem 0 .45rem;
  color: var(--accent2);
}

.dsec p {
  font-size: .87rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: .7rem;
}

.dsec ul {
  list-style: none;
  padding: 0;
}

.dsec ul li {
  font-size: .87rem;
  color: var(--muted);
  padding: 3px 0 3px 1.1rem;
  position: relative;
  line-height: 1.7;
}

.dsec ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.dcode {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: .83rem;
  color: var(--green);
  margin: 1rem 0;
  line-height: 1.8;
  overflow-x: auto;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dsec code {
  background: var(--surface);
  color: var(--accent2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.85em;
  font-weight: 600;
}

.kg {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 1.25rem;
  margin: .7rem 0;
}

.kbd {
  font-family: var(--mono);
  font-size: .75rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
  color: var(--text);
  font-weight: 500;
}

.kdesc {
  font-size: .83rem;
  color: var(--muted);
  align-self: center;
}



/* Hide Scrollbar */
* {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

*::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Toast */
.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 11px 17px;
  border-radius: var(--r);
  font-size: .83rem;
  font-weight: 600;
  z-index: 999;
  transform: translateY(60px);
  opacity: 0;
  transition: .28s;
  max-width: 300px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive */
/* Mobile Menu Styles */
.mobile-menu-btn {
  display: none;
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  display: flex;
  opacity: 1;
}

.mobile-menu {
  position: absolute;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.5rem;
  border-left: 1px solid var(--border);
}

.mobile-nav-overlay.active .mobile-menu {
  right: 0;
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-menu-links .nav-a {
  padding: 12px 16px;
  font-size: 1rem;
  text-align: left;
  width: 100%;
}

.mobile-menu-footer {
  margin-top: auto;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 4rem;
  }
}

@media (max-width: 768px) {
  .glass-nav {
    padding: 0 1rem;
  }

  .nav-links .nav-a {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .features {
    grid-template-columns: 1fr;
    padding-bottom: 3rem;
  }

  .snip-grid {
    grid-template-columns: 1fr;
  }

  .docs-layout {
    flex-direction: column;
  }

  .docs-nav {
    width: 100%;
    position: relative;
    top: 0;
    margin-bottom: 2rem;
    overflow-x: auto;
    flex-direction: row;
    padding: 0.5rem;
  }

  .docs-nav h4 {
    display: none;
  }

  .dlink {
    white-space: nowrap;
  }

  .docs-body {
    padding-left: 0;
  }

  /* IDE Layout Mobile */
  .ide-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    z-index: 2100;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg2);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.7);
    border-right: 1px solid var(--border);
    opacity: 1 !important;
    pointer-events: all !important;
  }

  .ide-sidebar:not(.collapsed) {
    transform: translateX(0);
  }

  /* Add Sidebar Backdrop */
  .ide-layout::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 2050;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
  }

  .ide-layout:has(.ide-sidebar:not(.collapsed))::before {
    display: block;
    opacity: 1;
    pointer-events: all;
  }

  .ide-main {
    width: 100%;
    z-index: 10;
  }

  .ide-toolbar {
    padding: 0 12px !important;
    height: 56px;
    display: flex !important;
    justify-content: flex-end; /* Align to right */
    gap: 8px;
    background: var(--bg) !important;
    border-bottom: 1px solid var(--border);
  }

  /* Hide everything except Sidebar Toggle, Run, and Save */
  .toolbar-left > *:not(:first-child),
  .toolbar-right > *:not(#run-btn):not(#save-btn),
  .tsep,
  .font-controls {
    display: none !important;
  }

  .ide-toolbar {
    padding: 0 12px !important;
    height: 56px;
    display: flex !important;
    justify-content: space-between; /* Space out toggle and run/save */
    gap: 8px;
    background: var(--bg) !important;
    border-bottom: 1px solid var(--border);
  }

  .toolbar-left, .toolbar-right {
    display: flex !important;
    gap: 8px;
    align-items: center;
  }

  .toolbar-right {
    justify-content: flex-end;
  }

  .tbtn {
    padding: 8px 16px;
    border-radius: 8px;
  }

  .run-btn {
    padding: 8px 24px !important;
  }
  
  .run-btn span, .tbtn span {
    display: inline !important; /* Show text on Save/Run */
  }

  .terminal-dock {
    height: 300px;
  }

  /* Status Bar */
  .ide-status-bar {
    height: 32px;
    padding: 0 16px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .sidebar-head {
    padding-top: 24px;
    height: auto;
  }

  .sidebar-mobile-close {
    display: flex !important;
    margin-right: 4px;
  }

  /* Allow native selection in editor and terminal for mobile */
  .monaco-editor, 
  .monaco-editor .view-lines, 
  .terminal-body,
  .terminal-body * {
    user-select: text !important;
    -webkit-user-select: text !important;
    -webkit-touch-callout: default !important;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .ph h1 {
    font-size: 2.5rem;
  }

  .modal-box {
    width: 92%;
    padding: 1.5rem;
  }

  .s-title {
    font-size: 1rem;
  }
}

/* SUGGEST BOX */
.suggest-box {
  position: fixed;
  z-index: 1000;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  min-width: 220px;
  max-width: 350px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  font-family: var(--mono);
  font-size: 13px;
}

.suggest-item {
  padding: 8px 12px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.1s;
}

.suggest-item:hover,
.suggest-item.active {
  background: var(--surface);
  color: var(--text);
}

.suggest-item.active {
  border-left: 3px solid var(--accent);
}

.suggest-item .stype {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.15);
  padding: 2px 5px;
  border-radius: 4px;
}

/* CARET HIDER / MIRROR */
#mirror {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  pointer-events: none;
}

.main-footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  margin-top: auto;
  background: linear-gradient(to bottom, transparent, var(--bg2));
  width: 100%;
}

.footer-content {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.footer-content span {
  opacity: 0.8;
}

/* Custom Modal System */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-box {
  width: 440px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  transform: translateY(-20px);
  animation: modalSlideIn .3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalSlideIn {
  to {
    transform: translateY(0);
  }
}

.modal-box h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.modal-msg {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

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

#modal-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: .9rem;
  outline: none;
  transition: .2s;
}

#modal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.modal-btns {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.mbtn {
  padding: 10px 24px;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: .18s;
}

.m-cancel {
  background: transparent;
  color: var(--muted);
}

.m-cancel:hover {
  background: var(--surface);
  color: var(--text);
}

.m-confirm {
  background: var(--accent);
  color: var(--accent-text);
}

.m-confirm:hover {
  background: var(--accent2);
  color: var(--accent-text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}.theme-transition, .theme-transition *, .theme-transition *:before, .theme-transition *:after { transition: all 0.4s ease-in-out !important; transition-delay: 0 !important; }
