:root {
  /* Dark Mode (Default) */
  --bg: #02040a;
  --surface: #0a0f1a;
  --surface2: #111827;
  --surface3: #1e293b;
  --border: #1e293b;
  --border2: #334155;
  --accent: #38bdf8;
  --accent2: #818cf8;
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #f43f5e;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted2: #cbd5e1;
  --header-bg: rgba(2, 4, 10, 0.45);
  --code-text: #bae6fd;
  --hero-chip-bg: rgba(255, 255, 255, 0.05);
  --hero-chip-bg-hover: rgba(255, 255, 255, 0.1);
  --hero-chip-border: rgba(255, 255, 255, 0.1);
  --hero-chip-border-hover: rgba(255, 255, 255, 0.2);
  --hero-logo-shadow: rgba(255, 255, 255, 0.3);
  --hero-logo-glow: rgba(255, 255, 255, 0.5);
  --hero-cta-bg: linear-gradient(
    90deg,
    rgba(10, 15, 26, 0.8) 0%,
    rgba(99, 102, 241, 0.3) 100%
  );
  --hero-cta-text: #ffffff;
  --hero-cta-border: rgba(255, 255, 255, 0.1);
  --spinner-track: rgba(255, 255, 255, 0.3);
  --spinner-head: #ffffff;
  --gh-preview-bg: #0b1220;
  --gh-preview-text: #e5edf6;
  --gh-preview-border: #263245;
  --gh-preview-soft-bg: #111b2e;
  --gh-preview-inline-code: #fbbf24;
  --gh-preview-link: #7dd3fc;
  --gh-preview-quote: #9fb0c8;
  --gh-preview-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);

  /* Hero Variables */
  --hero-bg: #02040a;
  --hero-text: #ffffff;
  --grad-cyan: #22d3ee;
  --grad-blue: #6366f1;
  --grad-purple: #c084fc;
}

/* Light Mode */
body.light-mode {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface2: #f3f4f6;
  --surface3: #e5e7eb;
  --border: #e5e7eb;
  --border2: #d1d5db;
  --accent: #0284c7;
  --accent2: #6366f1;
  --green: #059669;
  --yellow: #d97706;
  --red: #dc2626;
  --text: #000000;
  --muted: #4b5563;
  --muted2: #1f2937;
  --header-bg: rgba(248, 249, 250, 0.45);
  --code-text: #0f172a;
  --hero-chip-bg: rgba(15, 23, 42, 0.06);
  --hero-chip-bg-hover: rgba(15, 23, 42, 0.1);
  --hero-chip-border: rgba(15, 23, 42, 0.14);
  --hero-chip-border-hover: rgba(2, 132, 199, 0.35);
  --hero-logo-shadow: rgba(15, 23, 42, 0.18);
  --hero-logo-glow: rgba(2, 132, 199, 0.25);
  --hero-cta-bg: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(219, 234, 254, 0.92) 100%
  );
  --hero-cta-text: #0f172a;
  --hero-cta-border: rgba(2, 132, 199, 0.28);
  --spinner-track: rgba(15, 23, 42, 0.25);
  --spinner-head: #0284c7;
  --gh-preview-bg: #ffffff;
  --gh-preview-text: #24292f;
  --gh-preview-border: #d0d7de;
  --gh-preview-soft-bg: #f6f8fa;
  --gh-preview-inline-code: #e36209;
  --gh-preview-link: #0969da;
  --gh-preview-quote: #57606a;
  --gh-preview-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);

  /* Hero Variables for Light Mode */
  --hero-bg: #ffffff;
  --hero-text: #111827;
  --grad-cyan: #0891b2;
  --grad-blue: #3b82f6;
  --grad-purple: #7c3aed;
}

body.light-mode::before {
  background-image:
    radial-gradient(
      circle at 20% 20%,
      rgba(2, 132, 199, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(99, 102, 241, 0.08) 0%,
      transparent 50%
    );
}

body.light-mode::after {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Cambria Math", serif !important;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  /* Smooth scroll to app section */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Cambria Math", serif;
  overflow-x: hidden;
}

/* ── APP GRID BACKGROUND ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 20% 20%,
      rgba(56, 189, 248, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(129, 140, 248, 0.05) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: -2;
  /* Kept deeply in background */
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -2;
}

/* ── ICON VISIBILITY FIX ── */
i[data-lucide] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

i[data-lucide] svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2px;
}

/* =======================================================
   FUTURISTIC HERO SECTION
======================================================= */

.hero-wrapper {
  background-color: var(--hero-bg);
  color: var(--hero-text);
  font-family: "Cambria Math", serif !important;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 10;
}

.hero-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(99, 102, 241, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
}

.top-nav {
  position: absolute;
  top: 40px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  z-index: 50;
}

.hero-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--hero-text);
  text-shadow: 0 0 20px var(--hero-logo-shadow);
}

.hero-logo svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 8px var(--hero-logo-glow));
}

.hero-source-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted2);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  background: var(--hero-chip-bg);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--hero-chip-border);
  backdrop-filter: blur(10px);
}

.hero-source-link:hover {
  color: var(--text);
  background: var(--hero-chip-bg-hover);
  border-color: var(--hero-chip-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-source-link svg {
  width: 16px;
  height: 16px;
}

.hero-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 5%;
  position: relative;
  z-index: 10;
}

.hero-title {
  font-size: clamp(60px, 11vw, 150px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-align: center;
  margin-top: 0;
  background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.hero-title span {
  -webkit-text-fill-color: var(--text);
  background: none;
  opacity: 0.85;
}

.hero-underline {
  position: relative;
  display: inline-block;
}

.hero-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 5px;
  width: 100%;
  height: 8px;
  background: var(--accent);
  opacity: 0.6;
  z-index: -1;
  border-radius: 4px;
  animation: underline-pulse 3s infinite ease-in-out;
}

@keyframes underline-pulse {
  0%,
  100% {
    transform: scaleX(0.95);
    opacity: 0.4;
  }

  50% {
    transform: scaleX(1.05);
    opacity: 0.8;
  }
}

body.light-mode .hero-title {
  background: none;
  color: #000000;
  -webkit-text-fill-color: currentColor;
}

.scroll-action {
  position: absolute;
  bottom: 36px;
  z-index: 50;
  display: flex;
  justify-content: center;
  width: 100%;
}

.scroll-btn {
  background: var(--hero-cta-bg);
  border: 1px solid var(--hero-cta-border);
  color: var(--hero-cta-text);
  padding: 16px 36px;
  border-radius: 50px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.6),
    inset 0 0 30px rgba(129, 140, 248, 0.4);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ── 3D CSS ART ASSETS ── */
@keyframes floatSlow {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(2deg);
  }
}

@keyframes floatFast {
  0%,
  100% {
    transform: translateY(0) rotate(15deg);
  }

  50% {
    transform: translateY(-20px) rotate(12deg);
  }
}

.css-asterisk {
  position: absolute;
  right: 12%;
  top: 15%;
  width: 180px;
  height: 180px;
  animation: floatFast 6s ease-in-out infinite;
  z-index: 5;
  filter: drop-shadow(0 20px 40px rgba(99, 102, 241, 0.2));
}

.ast-arm {
  position: absolute;
  width: 50px;
  height: 180px;
  border-radius: 50px;
  left: 65px;
  top: 0;
  box-shadow:
    inset 6px 6px 15px rgba(255, 255, 255, 0.9),
    inset -6px -6px 20px rgba(99, 102, 241, 0.6),
    10px 15px 30px rgba(0, 0, 0, 0.6);
}

.ast-arm:nth-child(1) {
  transform: rotate(0deg);
  background: linear-gradient(
    180deg,
    var(--grad-cyan) 0%,
    var(--grad-blue) 50%,
    var(--grad-purple) 100%
  );
}

.ast-arm:nth-child(2) {
  transform: rotate(60deg);
  background: linear-gradient(
    120deg,
    var(--grad-cyan) 0%,
    var(--grad-blue) 50%,
    var(--grad-purple) 100%
  );
}

.ast-arm:nth-child(3) {
  transform: rotate(120deg);
  background: linear-gradient(
    60deg,
    var(--grad-cyan) 0%,
    var(--grad-blue) 50%,
    var(--grad-purple) 100%
  );
}

.css-pills {
  position: absolute;
  right: 25%;
  bottom: 20%;
  width: 160px;
  height: 250px;
  animation: floatSlow 8s ease-in-out infinite;
  z-index: 4;
  filter: drop-shadow(0 20px 40px rgba(34, 211, 238, 0.15));
}

.css-pill {
  position: absolute;
  width: 130px;
  height: 90px;
  border-radius: 60px;
}

.css-pill:nth-child(1) {
  top: 0;
  left: 0;
  background: var(--grad-cyan);
  z-index: 1;
  box-shadow:
    inset 8px 8px 15px rgba(255, 255, 255, 0.9),
    inset -8px -8px 25px rgba(14, 165, 233, 0.4),
    15px 20px 30px rgba(0, 0, 0, 0.5);
}

.css-pill:nth-child(2) {
  top: 60px;
  left: 30px;
  background: var(--grad-blue);
  z-index: 2;
  box-shadow:
    inset 8px 8px 15px rgba(255, 255, 255, 0.8),
    inset -8px -8px 25px rgba(79, 70, 229, 0.5),
    15px 20px 30px rgba(0, 0, 0, 0.6);
}

.css-pill:nth-child(3) {
  top: 120px;
  left: 60px;
  background: var(--grad-purple);
  z-index: 3;
  box-shadow:
    inset 8px 8px 15px rgba(255, 255, 255, 0.7),
    inset -8px -8px 25px rgba(147, 51, 234, 0.6),
    15px 20px 30px rgba(0, 0, 0, 0.7);
}

@media (max-width: 1024px) {
  .css-asterisk {
    right: 5%;
    transform: scale(0.8);
  }

  .css-pills {
    right: 10%;
    bottom: 25%;
    transform: scale(0.8);
  }
}

@media (max-width: 768px) {
  .css-asterisk {
    opacity: 0.4;
    right: -10%;
    top: 10%;
  }

  .css-pills {
    opacity: 0.4;
    right: -10%;
    bottom: 30%;
  }

  .hero-title {
    font-size: 14vw;
  }
}

/* =======================================================
   APP WORKSPACE SECTION
======================================================= */
#app-builder {
  position: relative;
  z-index: 10;
}

/* ── HEADER ── */
.header {
  position: relative;
  z-index: 200;
  background: var(--header-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.logo-name span {
  color: var(--accent);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  padding: 6px 16px;
  border-radius: 30px;
  border: 1px solid var(--border2);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-family: "Cambria Math", serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--muted2);
  letter-spacing: 0.3px;
}

.hbtn i[data-lucide="trash-2"] {
  color: var(--red);
}

.hbtn i[data-lucide="refresh-cw"] {
  color: var(--yellow);
}

.hbtn i[data-lucide="copy"] {
  color: var(--accent);
}

.hbtn i[data-lucide="github"] {
  color: #94a3b8;
}

.hbtn.primary i {
  color: #fff;
}

.hbtn:hover {
  color: var(--text);
  border-color: var(--muted);
  background: var(--surface3);
}

.hbtn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.hbtn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.5);
}

/* =======================================================
   UNIVERSAL NAVBAR
======================================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--header-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 2000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text);
}

.navbar.scrolled {
  background: var(--header-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  height: 70px;
}

/* ── THEME SWITCH ── */
.theme-toggle {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--surface3);
  transition: 0.4s;
  border-radius: 34px;
  border: 1px solid var(--border2);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(--bg);
}

#themeIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
}

#themeIcon i {
  position: absolute;
  transition: all 0.4s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ── LOADER ── */
.loader-wrapper {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

.loader-wrapper.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-icon {
  width: 120px;
  height: 120px;
  object-fit: contain;
  animation: pulse-loader 1.5s ease-in-out infinite;
}

@keyframes pulse-loader {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.loader-bar {
  width: 150px;
  height: 4px;
  background: var(--surface3);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.loader-progress {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: loader-slide 2s infinite linear;
}

@keyframes loader-slide {
  from {
    left: -100%;
  }

  to {
    left: 100%;
  }
}

/* ── FEATURE BOXES ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  width: 100%;
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: var(--surface2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent);
  font-size: 24px;
}

.feature-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  font-family: "Cambria Math", serif;
}

.feature-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* =======================================================
   UNIVERSAL FOOTER
======================================================= */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
}

.footer-nav {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}

.footer-social {
  display: flex;
  gap: 24px;
}

.footer-social a {
  color: var(--muted);
  transition: all 0.3s;
}

.footer-social a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.footer-copyright {
  font-size: 13px;
  color: var(--muted);
  opacity: 0.8;
  margin-top: 20px;
}

/* ── MOBILE RESPONSIVENESS ── */
@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
    /* Mobile menu logic can be added if needed */
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .main {
    flex-direction: column;
    height: auto;
  }

  .sidebar,
  .preview {
    width: 100%;
    height: auto;
    border: none;
  }

  .editor-inner {
    padding: 20px;
  }
}

/* ── LAYOUT FIXES ── */
#app-builder {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
  height: calc(100vh - 150px);
}

.sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.editor {
  flex: 1;
  overflow-y: auto;
  background: transparent;
  height: 100%;
}

.preview {
  width: 500px;
  flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ── SIDEBAR ── */
.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.qa-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--muted2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.qa-btn:hover {
  background: var(--surface3);
  border-color: var(--accent);
  color: var(--text);
  transform: translateX(4px);
}

.sidebar-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: rgba(56, 189, 248, 0.05);
  border-radius: 8px;
  border: 1px dashed var(--border2);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.stat-item strong {
  color: var(--accent);
}

.sidebar-section {
  margin-bottom: 24px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-label {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-label::before {
  content: "";
  width: 4px;
  height: 12px;
  background: var(--accent);
  border-radius: 4px;
  display: inline-block;
  box-shadow: 0 0 10px var(--accent);
}

/* Section toggles */
.section-toggles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sec-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.sec-toggle:hover {
  background: var(--surface2);
}

.sec-toggle.active {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
}

.sec-toggle-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.sec-toggle-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
  color: var(--accent);
  opacity: 0.8;
}

.sec-toggle:hover .sec-toggle-icon {
  opacity: 1;
  filter: brightness(1.2);
}

/* Section toggle icon colors - unique colors for each section */
.sec-toggle[data-section="title"] .sec-toggle-icon {
  color: #3b82f6;
}

.sec-toggle[data-section="description"] .sec-toggle-icon {
  color: #10b981;
}

.sec-toggle[data-section="features"] .sec-toggle-icon {
  color: #f59e0b;
}

.sec-toggle[data-section="techstack"] .sec-toggle-icon {
  color: #8b5cf6;
}

.sec-toggle[data-section="installation"] .sec-toggle-icon {
  color: #06b6d4;
}

.sec-toggle[data-section="usage"] .sec-toggle-icon {
  color: #ec4899;
}

.sec-toggle[data-section="structure"] .sec-toggle-icon {
  color: #84cc16;
}

.sec-toggle[data-section="screenshots"] .sec-toggle-icon {
  color: #f43f5e;
}

.sec-toggle[data-section="api"] .sec-toggle-icon {
  color: #f97316;
}

.sec-toggle[data-section="contributing"] .sec-toggle-icon {
  color: #22c55e;
}

.sec-toggle[data-section="author"] .sec-toggle-icon {
  color: #6366f1;
}

.toggle-switch {
  width: 36px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.tslider {
  position: absolute;
  inset: 0;
  background: var(--border2);
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tslider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  top: 3px;
  left: 3px;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:checked + .tslider {
  background: rgba(56, 189, 248, 0.3);
}

input:checked + .tslider::before {
  transform: translateX(16px);
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* Templates */
.templates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.template-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--muted2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
}

.template-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  transform: translateY(-1px);
}

.template-btn.selected {
  border-color: var(--accent);
  color: #fff !important;
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.template-btn i[data-lucide],
.template-btn svg {
  color: inherit !important;
}


/* ── EDITOR ── */
.editor-inner {
  padding: 6px;
  max-width: 1400px;
  margin: 0 auto;
}

.editor-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 4px;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.editor-section.hidden {
  display: none;
}

.es-header {
  padding: 6px 12px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.es-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

.es-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  flex: 1;
}

.es-badge {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.es-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label {
  display: block;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  padding: 12px 16px;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--muted);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

textarea {
  resize: vertical;
  line-height: 1.65;
  min-height: 80px;
}

select option {
  background: var(--surface2);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Tech stack picker */
.tech-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tech-chip {
  padding: 8px 14px;
  border-radius: 24px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--muted2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: "Cambria Math", serif;
  user-select: none;
}

.tech-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.05);
  transform: translateY(-2px);
}

.tech-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.tech-chip:active {
  transform: scale(0.95);
}

.tech-chip .emoji {
  font-size: 14px;
}

/* Badge picker */
.badge-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-content: center;
  gap: 6px;
}

.badge-chip {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--muted2);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "JetBrains Mono", monospace;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.05);
  transform: translateY(-2px);
}

.badge-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.badge-chip.selected i {
  color: #fff !important;
}

/* Structure visualizer */
.struct-preview {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--code-text);
  line-height: 1.8;
  margin-top: 8px;
  white-space: pre;
  overflow-x: auto;
  min-height: 60px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Screenshot drop zone */
.drop-zone {
  border: 2px dashed var(--border2);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface2);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
}

.drop-zone-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.drop-zone p {
  font-size: 13px;
  color: var(--muted2);
  font-weight: 500;
  margin-bottom: 4px;
}

.drop-zone small {
  font-size: 11px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

.screenshot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.screenshot-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 10px 12px;
}

.screenshot-item img {
  width: 48px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
}

.screenshot-item-name {
  flex: 1;
  font-size: 12px;
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
}

.screenshot-item-remove {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: var(--red);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.screenshot-item-remove:hover {
  background: var(--red);
  color: #fff;
}

/* ── PREVIEW PANEL ── */
.preview-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface2);
  flex-shrink: 0;
}

@media (min-width: 1200px) {
  .preview-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.preview-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  background: var(--surface);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.ptab {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: "Space Grotesk", sans-serif;
  user-select: none;
}

.ptab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

body.light-mode .ptab:hover {
  background: rgba(0, 0, 0, 0.03);
}

.ptab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.light-mode .ptab.active {
  background: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 20px;
}

.preview-actions .pbtn {
  justify-content: center;
  padding: 12px 10px;
  white-space: nowrap;
  font-size: 13px;
  width: 100%;
}

.pbtn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--muted2);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  white-space: nowrap;
  flex: 1;
  min-width: fit-content;
}

.pbtn.print {
  flex-basis: 100%;
}

.pbtn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.pbtn.green {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--green);
}

.pbtn.green:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.pbtn.print {
  background: rgba(129, 140, 248, 0.08);
  border-color: rgba(129, 140, 248, 0.3);
  color: var(--accent2);
}

.pbtn.print:hover {
  background: rgba(129, 140, 248, 0.18);
  color: var(--accent2);
  border-color: var(--accent2);
}

.preview-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  min-height: 0;
}

/* GitHub-style rendered preview */
.gh-preview {
  background: var(--gh-preview-bg);
  border-radius: 12px;
  padding: 32px 40px;
  color: var(--gh-preview-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  box-shadow: var(--gh-preview-shadow);
}

.gh-preview h1 {
  font-size: 28px;
  font-weight: 700;
  border-bottom: 1px solid var(--gh-preview-border);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.gh-preview h2 {
  font-size: 20px;
  font-weight: 600;
  border-bottom: 1px solid var(--gh-preview-border);
  padding-bottom: 7px;
  margin: 24px 0 12px;
}

.gh-preview h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 18px 0 8px;
}

.gh-preview p {
  margin-bottom: 12px;
}

.gh-preview code {
  background: var(--gh-preview-soft-bg);
  border: 1px solid var(--gh-preview-border);
  padding: 3px 6px;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--gh-preview-inline-code);
}

.gh-preview pre {
  background: var(--gh-preview-soft-bg);
  border: 1px solid var(--gh-preview-border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}

.gh-preview pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--gh-preview-text);
  font-size: 13px;
}

.gh-preview ul,
.gh-preview ol {
  padding-left: 28px;
  margin-bottom: 12px;
}

.gh-preview li {
  margin-bottom: 4px;
}

.gh-preview a {
  color: var(--gh-preview-link);
  text-decoration: none;
}

.gh-preview a:hover {
  text-decoration: underline;
}

.gh-preview hr {
  border: none;
  border-top: 1px solid var(--gh-preview-border);
  margin: 24px 0;
}

.gh-preview table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 14px;
}

.gh-preview th,
.gh-preview td {
  border: 1px solid var(--gh-preview-border);
  padding: 8px 14px;
  text-align: left;
}

.gh-preview th {
  background: var(--gh-preview-soft-bg);
  font-weight: 600;
}

.gh-preview img {
  max-width: 100%;
  border-radius: 8px;
}

.gh-preview blockquote {
  border-left: 4px solid var(--gh-preview-border);
  padding-left: 16px;
  color: var(--gh-preview-quote);
  margin: 16px 0;
}

/* Styled badges */
.gh-badge {
  display: inline-flex;
  align-items: stretch;
  border-radius: 6px;
  overflow: hidden;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
  margin: 2px 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.gh-badge-left {
  background: #333;
  color: #fff;
  padding: 4px 10px;
  white-space: nowrap;
}

.gh-badge-right {
  color: #fff;
  padding: 4px 10px;
  white-space: nowrap;
  font-weight: 700;
}

/* Raw markdown view */
.raw-view {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.85;
  color: var(--code-text);
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 2px 15px rgba(0, 0, 0, 0.3);
}

/* Empty state */
.empty-preview {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}

.empty-preview .icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.empty-preview h3 {
  font-size: 16px;
  color: var(--muted2);
  margin-bottom: 8px;
}

.empty-preview p {
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  opacity: 0.5;
}

/* =======================================================
   README QUALITY SCORE PANEL
======================================================= */
.quality-panel {
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}

.sidebar-quality {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  /* Keep it tight */
}

.sidebar-quality .quality-panel-header {
  padding: 16px 20px;
}

.quality-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.quality-panel-header:hover {
  background: var(--surface3);
}

.quality-panel-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quality-panel-icon {
  font-size: 15px;
}

.quality-panel-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted2);
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.2px;
}

.quality-score-badge {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid;
  transition: all 0.3s;
}

.quality-panel-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quality-label {
  font-size: 11px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.3s;
}

.quality-chevron {
  width: 14px;
  height: 14px;
  stroke: var(--muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  transform: rotate(0deg);
}

.quality-panel.collapsed .quality-chevron {
  transform: rotate(-90deg);
}

.quality-panel-body {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  max-height: 1500px;
  /* Large enough for all suggestions */
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    padding 0.3s ease,
    opacity 0.3s ease;
  opacity: 1;
}

.quality-panel.collapsed .quality-panel-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-color: transparent;
  opacity: 0;
  pointer-events: none;
}

.quality-score-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.quality-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.quality-ring {
  width: 64px;
  height: 64px;
  transform: rotate(-90deg);
}

.quality-ring-bg {
  fill: none;
  stroke: var(--surface3);
  stroke-width: 3;
}

.quality-ring-fill {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transition:
    stroke-dasharray 0.5s ease,
    stroke 0.3s;
}

.quality-ring-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  transition: color 0.3s;
  line-height: 1;
}

.quality-score-details {
  flex: 1;
  min-width: 0;
}

.quality-score-main {
  font-size: 20px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  transition: color 0.3s;
  margin-bottom: 3px;
}

.quality-score-sub {
  font-size: 11px;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 10px;
  line-height: 1.4;
}

.quality-bar-wrap {
  width: 100%;
}

.quality-bar-track {
  width: 100%;
  height: 5px;
  background: var(--surface3);
  border-radius: 3px;
  overflow: hidden;
}

.quality-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition:
    width 0.5s ease,
    background 0.3s;
}

.quality-suggestions-heading {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.sidebar-section:nth-child(1) .sidebar-label { color: #38bdf8; } /* Quick Actions */
.sidebar-section:nth-child(3) .sidebar-label { color: #a855f7; } /* Templates */
.sidebar-section:nth-child(4) .sidebar-label { color: #10b981; } /* Sections */

.sidebar-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.quality-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quality-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(244, 63, 94, 0.06);
  border: 1px solid rgba(244, 63, 94, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
}

.quality-suggestion--good {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

.qs-icon {
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.qs-text {
  font-size: 12px;
  color: var(--muted2);
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.5;
}

/* =======================================================
   FOOTER SECTION
======================================================= */
.app-footer {
  background: transparent;
  padding: 40px 32px;
  position: relative;
  z-index: 20;
  margin-top: 20px;
}

.app-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted2);
  font-size: 13px;
  font-family: "Space Grotesk", sans-serif;
}

.footer-left strong {
  color: var(--text);
  font-weight: 600;
}

.footer-logo {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-divider {
  width: 1px;
  height: 24px;
  background: var(--border2);
}

.footer-link,
.footer-icon {
  color: var(--muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
}

.footer-link:hover,
.footer-icon:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-link svg,
.footer-icon svg {
  width: 20px;
  height: 20px;
  transition: filter 0.3s ease;
}

.footer-link:hover svg,
.footer-icon:hover svg {
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

/* =======================================================
   UTILITIES
======================================================= */
/* Toast notification */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--surface2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: "JetBrains Mono", monospace;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 40px rgba(56, 189, 248, 0.2);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Loading spinner */
.spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--spinner-track);
  border-top-color: var(--spinner-head);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* =======================================================
   RESPONSIVENESS (MOBILE & TABLET)
======================================================= */
@media (max-width: 1024px) {
  .main {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 64px);
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .editor {
    width: 100%;
  }

  .preview {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .sidebar,
  .editor,
  .preview {
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .header {
    height: auto;
    padding: 16px;
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .header-center {
    width: 100%;
    justify-content: center;
  }

  .header-right {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .hbtn,
  .hbtn.primary {
    flex: 1;
    text-align: center;
    justify-content: center;
    min-width: 100px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .editor-inner {
    padding: 16px;
  }

  .preview-body {
    padding: 16px;
  }

  .preview-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .preview-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }

  .preview-actions {
    width: 100%;
    justify-content: space-between;
  }

  .preview-actions .pbtn {
    flex: 1;
    justify-content: center;
  }
}

/* ── MODAL STYLES ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.3s ease;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface2);
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg);
}

.spinner {
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* =======================================================
   RESPONSIVENESS (MOBILE & TABLET)
@media (max-width: 1024px) {
  .main {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 64px);
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .editor {
    width: 100%;
  }

  .preview {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .sidebar,
  .editor,
  .preview {
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .header {
    height: auto;
    padding: 16px;
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .header-center {
    width: 100%;
    justify-content: center;
  }

  .header-right {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .hbtn,
  .hbtn.primary {
    flex: 1;
    text-align: center;
    justify-content: center;
    min-width: 100px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .editor-inner {
    padding: 16px;
  }

  .preview-body {
    padding: 16px;
  }

  .preview-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .preview-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }

  .preview-actions {
    width: 100%;
    justify-content: space-between;
  }

  .preview-actions .pbtn {
    flex: 1;
    justify-content: center;
  }
}

/* ── MODAL STYLES ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.3s ease;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface2);
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--surface2);
}

.hidden {
  display: none !important;
}

@media (max-width: 375px) {
  .header {
    padding: 12px;
    gap: 12px;
  }

  .header-right {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hbtn,
  .hbtn.primary {
    width: 100%;
    min-width: 0;
  }

  .sidebar-section {
    padding: 16px;
  }

  .templates-grid {
    grid-template-columns: 1fr;
  }

  .template-btn {
    padding: 10px 12px;
    font-size: 11px;
  }

  .editor-inner,
  .preview-body {
    padding: 12px;
  }

  .preview-actions {
    flex-direction: column;
    width: 100%;
  }

  .preview-actions .pbtn {
    width: 100%;
    justify-content: center;
  }

  .gh-preview {
    padding: 20px 16px;
    font-size: 14px;
  }
}

/* ── AUTO-SAVE INDICATOR ── */
.autosave-status {
  font-size: 11px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  margin-left: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.autosave-status.visible {
  opacity: 1;
}

/* ── PRINT MEDIA STYLES ── */
@media print {
  /* Hide everything except the preview panel */
  .top-nav {
    display: none !important;
  }

  .hero-content {
    display: none !important;
  }

  .header {
    display: none !important;
  }

  .sidebar {
    display: none !important;
  }

  .editor {
    display: none !important;
  }

  /* Show the preview panel full width */
  .preview {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
    border: none !important;
    background: white !important;
  }

  /* Hide the preview header (tabs + buttons) */
  .preview-header {
    display: none !important;
  }

  /* Hide the quality score panel */
  .quality-panel {
    display: none !important;
  }

  /* Make the preview body fully visible */
  .preview-body {
    overflow: visible !important;
    padding: 0 !important;
    background: white !important;
    color: black !important;
  }

  /* Clean up the rendered markdown */
  .gh-preview {
    background: white !important;
    color: black !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  pre {
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: black !important;
  }

  code {
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: black !important;
  }

  pre {
    page-break-inside: avoid;
  }

  blockquote {
    page-break-inside: avoid;
  }

  table {
    page-break-inside: avoid;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    page-break-after: avoid;
  }

  a {
    text-decoration: none !important;
    color: black !important;
  }

  /* Hide the hero/landing section */
  .hero-content {
    display: none !important;
  }

  /* Hide toast notifications */
  .toast {
    display: none !important;
  }

  /* Hide hero section and scroll button */
  .hero-wrapper {
    display: none !important;
  }

  .scroll-action {
    display: none !important;
  }
}

/* ── FLOATING SHAPES ── */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.3;
  animation: float-shapes 25s infinite alternate ease-in-out;
  pointer-events: none;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -10%;
  left: -5%;
}

.shape-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent2) 0%, transparent 70%);
  bottom: -10%;
  right: -5%;
  animation-delay: -5s;
}

.shape-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #f43f5e 0%, transparent 70%);
  top: 30%;
  right: 15%;
  animation-delay: -10s;
  opacity: 0.2;
}

.shape-4 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--green) 0%, transparent 70%);
  bottom: 20%;
  left: 10%;
  animation-delay: -15s;
  opacity: 0.15;
}

@keyframes float-shapes {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  33% {
    transform: translate(60px, -80px) rotate(10deg) scale(1.1);
  }

  66% {
    transform: translate(-40px, 40px) rotate(-10deg) scale(0.9);
  }

  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

/* ── PRELOADER ── */
.loader-wrapper {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.6s ease,
    visibility 0.6s;
}

.loader-wrapper.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.loader-icon {
  width: 80px;
  height: 80px;
  animation: loader-pulse 2s infinite ease-in-out;
  filter: drop-shadow(0 0 20px var(--accent));
}

.loader-bar {
  width: 200px;
  height: 4px;
  background: var(--surface3);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.loader-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 10px;
  animation: loader-slide 1.5s infinite ease-in-out;
}

@keyframes loader-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.15);
    opacity: 0.8;
  }
}

@keyframes loader-slide {
  0% {
    left: -40%;
  }

  100% {
    left: 100%;
  }
}

.badge-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text) !important;
  font-family: "Cambria Math", serif !important;
}

.badge-chip i {
  width: 14px;
  height: 14px;
  color: inherit !important;
}

.badge-chip [data-lucide] {
  color: inherit !important;
}

/* ── 3D DECORATIVE ASSETS ── */
.css-asterisk {
  position: absolute;
  top: 15%;
  right: 10%;
  width: 160px;
  height: 160px;
  z-index: 1;
  transform-style: preserve-3d;
  perspective: 1200px;
  animation: rotate-3d 40s infinite linear;
  pointer-events: none;
}

.ast-arm {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 36px;
  background: linear-gradient(90deg, #818cf8, #c084fc);
  border-radius: 40px;
  box-shadow:
    inset 0 4px 6px rgba(255, 255, 255, 0.3),
    0 10px 20px rgba(0, 0, 0, 0.3);
  transform-origin: center center;
}

.ast-arm:nth-child(1) {
  transform: translateY(-50%) rotate(0deg) translateZ(12px);
}

.ast-arm:nth-child(2) {
  transform: translateY(-50%) rotate(60deg) translateZ(0);
}

.ast-arm:nth-child(3) {
  transform: translateY(-50%) rotate(120deg) translateZ(-12px);
}

.css-pill {
  position: absolute;
  width: 100px;
  height: 45px;
  border-radius: 50px;
  z-index: 1;
  pointer-events: none;
  box-shadow:
    inset 0 8px 10px rgba(255, 255, 255, 0.2),
    0 15px 30px rgba(0, 0, 0, 0.4);
  animation: float-pill 6s infinite ease-in-out;
  transform: rotate(-20deg);
}

.css-pill:nth-child(2) {
  animation-delay: 1s;
  opacity: 0.8;
}

.css-pill:nth-child(3) {
  animation-delay: 2s;
  opacity: 0.9;
}

@keyframes rotate-3d {
  0% {
    transform: rotateX(15deg) rotateY(15deg) rotateZ(0deg);
  }

  50% {
    transform: rotateX(-15deg) rotateY(-15deg) rotateZ(180deg);
  }

  100% {
    transform: rotateX(15deg) rotateY(15deg) rotateZ(360deg);
  }
}

@keyframes float-pill {
  0%,
  100% {
    transform: translateY(0) rotate(-20deg);
  }

  50% {
    transform: translateY(-30px) rotate(-15deg);
  }
}

/* Light mode button visibility */
body.light-mode .scroll-btn {
  color: #000 !important;
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  font-weight: 700 !important;
}

/* ── MOBILE RESPONSIVENESS ── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  z-index: 2100;
  padding: 8px;
}

@media (max-width: 900px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 2050;
    display: flex !important;
    padding: 40px;
    border-left: 1px solid var(--border);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-link {
    font-size: 18px;
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  .theme-toggle {
    margin: 10px 0;
  }

  .hero-title {
    font-size: 2.5rem !important;
  }

  .navbar {
    padding: 0 20px;
  }

  .hero-content {
    padding: 0 20px;
  }

  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
}

/* ── PREVIEW ICON VISIBILITY ── */
/* Dark mode: white icons */
body:not(.light-mode) .preview-body img[src*="lucide-static"] {
  filter: invert(1) brightness(2) !important;
}

/* Light mode: black icons */
body.light-mode .preview-body img[src*="lucide-static"] {
  filter: invert(0) brightness(0) !important;
}

/* Keep only heart icon red */
.preview-body img[src*="heart.svg"] {
  filter: invert(27%) sepia(91%) saturate(2352%) hue-rotate(331deg)
    brightness(94%) contrast(94%) !important;
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem !important;
  }
}

/* =======================================================
   VIBRANT ICON COLOR SYSTEM
======================================================= */

/* General Lucide Icon Overrides */
i[data-lucide] {
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

/* 1. Header & Actions */
[data-lucide="trash-2"] {
  color: #f43f5e;
}

[data-lucide="refresh-cw"] {
  color: #f59e0b;
}

[data-lucide="copy"] {
  color: #38bdf8;
}

[data-lucide="github"] {
  color: #94a3b8;
}

[data-lucide="file-text"] {
  color: #10b981;
}

[data-lucide="external-link"] {
  color: #818cf8;
}

[data-lucide="code"] {
  color: #06b6d4;
}

/* 2. Sidebar Sections */
[data-lucide="type"] {
  color: #38bdf8;
}

/* Title */
[data-lucide="file-text"] {
  color: #10b981;
}

/* Description */
[data-lucide="star"] {
  color: #f59e0b;
}

/* Features */
[data-lucide="layers"] {
  color: #a855f7;
}

/* Tech Stack */
[data-lucide="download"] {
  color: #06b6d4;
}

/* Installation */
[data-lucide="terminal"] {
  color: #ec4899;
}

/* Usage */
[data-lucide="folder-tree"] {
  color: #84cc16;
}

/* Structure */
[data-lucide="image"] {
  color: #f43f5e;
}

/* Screenshots */
[data-lucide="zap"] {
  color: #38bdf8;
}

/* API */
[data-lucide="users"] {
  color: #6366f1;
}

/* Contributing */
[data-lucide="shield"] {
  color: #14b8a6;
}

/* License */


/* 4. Misc UI Elements */
[data-lucide="printer"] {
  color: #38bdf8;
}

[data-lucide="info"] {
  color: #38bdf8;
}

[data-lucide="check-circle"] {
  color: #10b981;
}

[data-lucide="alert-circle"] {
  color: #f43f5e;
}

[data-lucide="bar-chart-3"] {
  color: var(--accent);
}

[data-lucide="chevron-right"],
[data-lucide="chevron-down"] {
  color: #94a3b8;
}

[data-lucide="search"] {
  color: #38bdf8;
}

[data-lucide="plus"] {
  color: #10b981;
}

[data-lucide="x"] {
  color: #f43f5e;
}

[data-lucide="party-popper"] {
  color: #f59e0b;
}

/* Ensure primary buttons keep white icons for contrast */
.primary i[data-lucide],
.hbtn.primary i[data-lucide] {
  color: #fff !important;
}

/* Hover Effects */
.hbtn:hover i[data-lucide],
.template-btn:hover i[data-lucide],
.sec-toggle:hover i[data-lucide] {
  transform: scale(1.15);
  filter: brightness(1.2);
}
