@import url("https://fonts.googleapis.com/css2?family=Anton&family=Bungee+Shade&family=Cinzel:wght@500;700&family=Fira+Mono:wght@400;500&family=Orbitron:wght@400;600&family=Playfair+Display:wght@500;700&family=Press+Start+2P&family=Rubik:wght@400;500;600&family=Space+Grotesk:wght@400;600&family=Sora:wght@400;600&family=VT323&display=swap");

:root {
  --bg: #f6efe8;
  --surface: rgba(255, 255, 255, 0.9);
  --text: #1d1d1d;
  --muted: #6e665c;
  --accent: #d45528;
  --accent-soft: rgba(212, 85, 40, 0.15);
  --shadow: 0 25px 60px rgba(30, 18, 8, 0.15);
  --radius: 26px;
  --font-display: "Bungee Shade", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --bg-image: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  /* background is now handled by ::before to allow hue-rotate without affecting content */
}

.onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(12, 16, 28, 0.58);
  display: grid;
  place-items: center;
  padding: 18px;
}

.onboarding-modal[hidden] {
  display: none !important;
}

.onboarding-modal-card {
  position: relative;
  width: min(560px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.25);
  padding: 22px 20px 20px;
  font-family: Arial, Helvetica, sans-serif;
}

.onboarding-modal-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
}

.onboarding-modal-card p {
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}

.onboarding-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.onboarding-modal-action {
  margin-top: 6px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: -1;
  filter: hue-rotate(var(--hue-rotate, 0deg)) saturate(var(--bg-saturation, 100%)) brightness(var(--bg-brightness, 100%));
}

.app {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 0;
  height: 100vh;
  overflow: hidden;
}

body[data-mode="preview"] .app {
  grid-template-columns: 1fr;
}

body[data-mode="preview"] .editor {
  display: none;
}

body[data-mode="preview"] .preview {
  padding: 60px 24px;
  align-items: center;
}

#edit-profile-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px 14px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
}

#edit-profile-btn:hover {
  transform: translateY(-2px);
  opacity: 1;
  color: var(--text);
}

.editor {
  padding: 32px 28px 40px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.8);
  color: #1d1d1d;
  --text: #1d1d1d;
  --muted: #6e665c;
  height: 100%;
  overflow-y: auto;
}

.editor-header h1 {
  font-family: var(--font-display);
  margin: 6px 0 10px;
  font-size: 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 12px;
  margin: 0 0 4px;
  color: var(--muted);
}

.subhead {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

.onboarding-notice {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.onboarding-notice p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.onboarding-emphasis {
  color: #b42318;
  font-weight: 700;
}

.onboarding-dismiss {
  margin-top: 10px;
}

.panel {
  margin: 18px 0 24px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.panel-note {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.panel-note[data-tone="success"] {
  color: var(--accent);
}

.panel-note[data-tone="warn"] {
  color: #b34d32;
}

#share-status {
  margin-top: 16px;
}

.panel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: var(--text);
  outline: none;
}

.field textarea {
  resize: vertical;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.theme-picker {
  margin-bottom: 10px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  padding: 4px;
}

.theme-option {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  text-align: left;
  display: grid;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.theme-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.theme-option.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.theme-swatch {
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--swatch-a, #f7d083), var(--swatch-b, #f08961));
  position: relative;
  overflow: hidden;
}

.theme-swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0.6;
}

.theme-label {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}

button {
  border: none;
  font-family: var(--font-body);
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

button.ghost {
  background: transparent;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(0, 0, 0, 0.25);
}

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

.link-row {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  display: grid;
  gap: 8px;
}

.link-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.link-row-actions button {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

.preview {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 32px 40px;
  height: 100%;
  overflow-y: auto;
}

.preview-shell {
  width: min(520px, 100%);
  padding: 36px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar {
  display: block;
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  min-width: 92px;
  min-height: 92px;
  max-width: 92px;
  max-height: 92px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.05);
}



#preview-name {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
}

#preview-bio {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.5;
}

.socials {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  text-decoration: none;
}

.links {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.link-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card span {
  font-weight: 500;
  color: var(--text);
  opacity: 0.7;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.preview-footer {
  margin-top: 28px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.preview-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.preview-footer a:hover {
  border-bottom-color: currentColor;
}

body[data-theme="seventies"] {
  --bg: linear-gradient(120deg, #f7d083 0%, #f08961 45%, #f2b681 100%);
  --surface: rgba(255, 248, 236, 0.9);
  --text: #3b2b1e;
  --muted: #7d5c3b;
  --accent: #c4522a;
  --accent-soft: rgba(196, 82, 42, 0.18);
  --radius: 34px;
  --shadow: 0 30px 60px rgba(61, 43, 24, 0.22);
  --font-display: "Bungee Shade", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

body[data-theme="eighties"] {
  --bg: radial-gradient(circle at top, #2b004f 0%, #0b0623 45%, #05030c 100%);
  --surface: rgba(10, 8, 30, 0.85);
  --text: #f3f8ff;
  --muted: #b0b6ff;
  --accent: #ff3ea5;
  --accent-soft: rgba(255, 62, 165, 0.2);
  --radius: 12px;
  --shadow: 0 40px 80px rgba(22, 5, 44, 0.6);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

body[data-theme="eighties"] .preview-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
  pointer-events: none;
}

body[data-theme="eighties"] .link-card {
  background: rgba(12, 10, 32, 0.8);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="eighties"] .link-card:hover {
  box-shadow: 0 0 25px rgba(255, 62, 165, 0.4);
}

body[data-theme="nineties"] {
  --bg: linear-gradient(135deg, #b8f3ff 0%, #f3c7ff 50%, #fff6b0 100%);
  --surface: rgba(255, 255, 255, 0.85);
  --text: #1b2242;
  --muted: #50588a;
  --accent: #2d7dff;
  --accent-soft: rgba(45, 125, 255, 0.18);
  --radius: 8px;
  --shadow: 0 16px 0 rgba(33, 33, 33, 0.2);
  --font-display: "Press Start 2P", system-ui, sans-serif;
  --font-body: "Fira Mono", system-ui, sans-serif;
}

body[data-theme="nineties"] .preview-shell {
  border: 3px solid rgba(33, 33, 33, 0.4);
  box-shadow: 8px 8px 0 rgba(33, 33, 33, 0.4);
}

body[data-theme="nineties"] .link-card {
  border: 2px solid rgba(33, 33, 33, 0.5);
  box-shadow: 4px 4px 0 rgba(33, 33, 33, 0.4);
  border-radius: 8px;
}

body[data-theme="nineties"] .link-card:hover {
  transform: translateY(-1px);
}

body[data-theme="y2k"] {
  --bg: radial-gradient(circle at top, #f6f4ff 0%, #d9f2ff 45%, #f7e7ff 100%);
  --surface: rgba(255, 255, 255, 0.92);
  --text: #181a3a;
  --muted: #5b5f86;
  --accent: #7b4bff;
  --accent-soft: rgba(123, 75, 255, 0.2);
  --radius: 22px;
  --shadow: 0 34px 80px rgba(86, 95, 175, 0.25);
  --font-display: "VT323", system-ui, sans-serif;
  --font-body: "Sora", system-ui, sans-serif;
}

body[data-theme="y2k"] .preview-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(123, 75, 255, 0.15), rgba(0, 213, 255, 0.15));
  mix-blend-mode: screen;
  pointer-events: none;
}

body[data-theme="y2k"] .link-card {
  border: 1px solid rgba(123, 75, 255, 0.35);
  box-shadow: 0 12px 30px rgba(123, 75, 255, 0.18);
}

body[data-theme="brutalist"] {
  --bg: #f7f7f7;
  --surface: #ffffff;
  --text: #0a0a0a;
  --muted: #3a3a3a;
  --accent: #111111;
  --accent-soft: rgba(0, 0, 0, 0.12);
  --radius: 0;
  --shadow: none;
  --font-display: "Anton", system-ui, sans-serif;
  --font-body: "Anton", system-ui, sans-serif;
}

body[data-theme="brutalist"] .preview-shell {
  border: 3px solid #111;
}

body[data-theme="brutalist"] .link-card {
  border: 2px solid #111;
  border-radius: 0;
  box-shadow: 6px 6px 0 #111;
}

body[data-theme="brutalist"] .link-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 #111;
}

body[data-theme="artdeco"] {
  --bg: linear-gradient(135deg, #0a0a0a 0%, #2a1b0f 45%, #0a0a0a 100%);
  --surface: rgba(12, 12, 12, 0.9);
  --text: #f7e7c1;
  --muted: #b5a480;
  --accent: #d4a64a;
  --accent-soft: rgba(212, 166, 74, 0.2);
  --radius: 14px;
  --shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  --font-display: "Cinzel", system-ui, serif;
  --font-body: "Cinzel", system-ui, serif;
}

body[data-theme="artdeco"] .preview-shell {
  border: 2px solid rgba(212, 166, 74, 0.5);
  background-image: linear-gradient(135deg, rgba(212, 166, 74, 0.06), transparent);
}

body[data-theme="artdeco"] .link-card {
  background: rgba(12, 12, 12, 0.8);
  border: 1px solid rgba(212, 166, 74, 0.35);
}

body[data-theme="memphis"] {
  --bg: linear-gradient(140deg, #fff2c5 0%, #f1c4ff 40%, #c6f8ff 100%);
  --surface: rgba(255, 255, 255, 0.9);
  --text: #1e1b3c;
  --muted: #574b7b;
  --accent: #ff5aa5;
  --accent-soft: rgba(255, 90, 165, 0.2);
  --radius: 28px;
  --shadow: 0 28px 60px rgba(59, 32, 106, 0.2);
  --font-display: "Bungee Shade", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, sans-serif;
}

body[data-theme="memphis"] .preview-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 90, 165, 0.2) 2px, transparent 2px),
    radial-gradient(circle, rgba(68, 209, 255, 0.2) 2px, transparent 2px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  opacity: 0.35;
  pointer-events: none;
}

body[data-theme="vaporwave"] {
  --bg: linear-gradient(135deg, #ff9de2 0%, #7afcff 45%, #b5a0ff 100%);
  --surface: rgba(255, 255, 255, 0.88);
  --text: #2b125f;
  --muted: #6a4fb3;
  --accent: #ff4fd8;
  --accent-soft: rgba(255, 79, 216, 0.2);
  --radius: 22px;
  --shadow: 0 30px 70px rgba(86, 0, 120, 0.25);
  --font-display: "VT323", system-ui, sans-serif;
  --font-body: "Sora", system-ui, sans-serif;
}

body[data-theme="vaporwave"] .preview-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.08) 2px,
      transparent 2px,
      transparent 6px);
  opacity: 0.4;
  pointer-events: none;
}

body[data-theme="swiss"] {
  --bg: #f8f8f8;
  --surface: #ffffff;
  --text: #0d0d0d;
  --muted: #444444;
  --accent: #e10600;
  --accent-soft: rgba(225, 6, 0, 0.12);
  --radius: 6px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

body[data-theme="swiss"] .preview-shell {
  border-left: 8px solid var(--accent);
}

body[data-theme="bauhaus"] {
  --bg: #fef6e6;
  --surface: #ffffff;
  --text: #1d1d1d;
  --muted: #565656;
  --accent: #e63946;
  --accent-soft: rgba(230, 57, 70, 0.15);
  --radius: 30px;
  --shadow: 0 26px 60px rgba(0, 0, 0, 0.15);
  --font-display: "Anton", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

body[data-theme="bauhaus"] .preview-shell::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  background: #f4d35e;
  border-radius: 50%;
  opacity: 0.8;
  pointer-events: none;
}

body[data-theme="bauhaus"] .preview-shell::after {
  content: "";
  position: absolute;
  left: -20px;
  bottom: -20px;
  width: 90px;
  height: 90px;
  background: #457b9d;
  border-radius: 12px;
  transform: rotate(12deg);
  opacity: 0.8;
  pointer-events: none;
}

body[data-theme="grunge"] {
  --bg: #f1eee8;
  --surface: rgba(255, 255, 255, 0.86);
  --text: #2d2723;
  --muted: #6a5e58;
  --accent: #8b3b2b;
  --accent-soft: rgba(139, 59, 43, 0.18);
  --radius: 16px;
  --shadow: 0 24px 50px rgba(62, 48, 39, 0.2);
  --font-display: "Fira Mono", system-ui, sans-serif;
  --font-body: "Fira Mono", system-ui, sans-serif;
}

body[data-theme="grunge"] .preview-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg,
      rgba(0, 0, 0, 0.06),
      rgba(0, 0, 0, 0.06) 2px,
      transparent 2px,
      transparent 10px);
  opacity: 0.3;
  pointer-events: none;
}

body[data-theme="noir"] {
  --bg: radial-gradient(circle at top, #2b2b2b 0%, #0d0d0d 70%);
  --surface: rgba(10, 10, 10, 0.92);
  --text: #f5f1e6;
  --muted: #a59b8a;
  --accent: #c19a6b;
  --accent-soft: rgba(193, 154, 107, 0.2);
  --radius: 14px;
  --shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  --font-display: "Playfair Display", system-ui, serif;
  --font-body: "Rubik", system-ui, sans-serif;
}

body[data-theme="noir"] .link-card {
  background: rgba(15, 15, 15, 0.9);
  border-color: rgba(193, 154, 107, 0.25);
}

body[data-theme="ocean"] {
  --bg: linear-gradient(140deg, #b8f8ff 0%, #4dd7ff 45%, #0b6fae 100%);
  --surface: rgba(255, 255, 255, 0.9);
  --text: #0d2d3a;
  --muted: #2f5b6a;
  --accent: #00a6fb;
  --accent-soft: rgba(0, 166, 251, 0.18);
  --radius: 24px;
  --shadow: 0 26px 60px rgba(10, 90, 130, 0.25);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Sora", system-ui, sans-serif;
}

body[data-theme="ocean"] .preview-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(0, 166, 251, 0.15), transparent 45%);
  opacity: 0.6;
  pointer-events: none;
}

body[data-theme="sunset"] {
  --bg: linear-gradient(135deg, #ffb347 0%, #ff6f91 50%, #6a5bff 100%);
  --surface: rgba(255, 255, 255, 0.9);
  --text: #2d1730;
  --muted: #6b3c72;
  --accent: #ff4e50;
  --accent-soft: rgba(255, 78, 80, 0.2);
  --radius: 26px;
  --shadow: 0 30px 70px rgba(100, 30, 80, 0.3);
  --font-display: "Bungee Shade", system-ui, sans-serif;
  --font-body: "Sora", system-ui, sans-serif;
}

body[data-theme="arcade"] {
  --bg: radial-gradient(circle at top, #19002f 0%, #06000f 65%);
  --surface: rgba(8, 6, 20, 0.9);
  --text: #f7f4ff;
  --muted: #bdaef4;
  --accent: #39ff14;
  --accent-soft: rgba(57, 255, 20, 0.2);
  --radius: 10px;
  --shadow: 0 35px 70px rgba(0, 0, 0, 0.6);
  --font-display: "Press Start 2P", system-ui, sans-serif;
  --font-body: "Fira Mono", system-ui, sans-serif;
}

body[data-theme="arcade"] .link-card:hover {
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.35);
}

body[data-theme="newsprint"] {
  --bg: #f7f2e8;
  --surface: rgba(255, 255, 255, 0.92);
  --text: #1b1b1b;
  --muted: #5a5a5a;
  --accent: #2f2f2f;
  --accent-soft: rgba(47, 47, 47, 0.12);
  --radius: 6px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  --font-display: "Playfair Display", system-ui, serif;
  --font-body: "Playfair Display", system-ui, serif;
}

body[data-theme="newsprint"] .preview-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.04),
      rgba(0, 0, 0, 0.04) 1px,
      transparent 1px,
      transparent 4px);
  opacity: 0.2;
  pointer-events: none;
}

body[data-theme="prism"] {
  --bg: linear-gradient(120deg, #e4fffd 0%, #fff0f6 35%, #e6e0ff 70%, #f8ffe8 100%);
  --surface: rgba(255, 255, 255, 0.92);
  --text: #1a1a2e;
  --muted: #5a5a7a;
  --accent: #5b7cfa;
  --accent-soft: rgba(91, 124, 250, 0.18);
  --radius: 30px;
  --shadow: 0 30px 70px rgba(90, 90, 160, 0.2);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

body[data-theme="prism"] .preview-shell {
  border: 1px solid rgba(91, 124, 250, 0.35);
}

body[data-theme="vhs"] {
  --bg: linear-gradient(135deg, #0b0b1a 0%, #2b0f3f 45%, #0b0b1a 100%);
  --surface: rgba(12, 12, 26, 0.9);
  --text: #f6f3ff;
  --muted: #b8a6e0;
  --accent: #ff3864;
  --accent-soft: rgba(255, 56, 100, 0.2);
  --radius: 14px;
  --shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  --font-display: "VT323", system-ui, sans-serif;
  --font-body: "Fira Mono", system-ui, sans-serif;
}

body[data-theme="vhs"] .preview-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.08) 2px,
      transparent 2px,
      transparent 6px);
  opacity: 0.25;
  pointer-events: none;
}

body[data-theme="scifi"] {
  --bg: radial-gradient(circle at top, #0f2230 0%, #070c13 60%);
  --surface: rgba(6, 15, 22, 0.92);
  --text: #d8f7ff;
  --muted: #7cc7d8;
  --accent: #22f7b8;
  --accent-soft: rgba(34, 247, 184, 0.2);
  --radius: 10px;
  --shadow: 0 35px 70px rgba(0, 0, 0, 0.55);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

body[data-theme="scifi"] .link-card {
  border-color: rgba(34, 247, 184, 0.3);
}

body[data-theme="tropical"] {
  --bg: linear-gradient(140deg, #fff2a6 0%, #ff9fd4 45%, #7cf4ff 100%);
  --surface: rgba(255, 255, 255, 0.92);
  --text: #2a1c3a;
  --muted: #6b4a7a;
  --accent: #ff6b4a;
  --accent-soft: rgba(255, 107, 74, 0.2);
  --radius: 28px;
  --shadow: 0 28px 60px rgba(111, 50, 105, 0.22);
  --font-display: "Bungee Shade", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, sans-serif;
}

body[data-theme="midcentury"] {
  --bg: linear-gradient(120deg, #f1e7d5 0%, #e7d3b8 50%, #f7f0e4 100%);
  --surface: rgba(255, 255, 255, 0.92);
  --text: #3a2b24;
  --muted: #7a6254;
  --accent: #d36b3c;
  --accent-soft: rgba(211, 107, 60, 0.18);
  --radius: 30px;
  --shadow: 0 26px 60px rgba(88, 60, 45, 0.2);
  --font-display: "Playfair Display", system-ui, serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

body[data-theme="midcentury"] .preview-shell::before {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(211, 107, 60, 0.2);
  pointer-events: none;
}

body[data-theme="constructivist"] {
  --bg: #fff2e6;
  --surface: #ffffff;
  --text: #111111;
  --muted: #444444;
  --accent: #d62828;
  --accent-soft: rgba(214, 40, 40, 0.15);
  --radius: 6px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  --font-display: "Anton", system-ui, sans-serif;
  --font-body: "Anton", system-ui, sans-serif;
}

body[data-theme="constructivist"] .preview-shell {
  border-top: 10px solid #d62828;
}

body[data-theme="gothic"] {
  --bg: radial-gradient(circle at top, #1c1a1f 0%, #08070a 65%);
  --surface: rgba(8, 7, 10, 0.92);
  --text: #f2e9f7;
  --muted: #b6a2c2;
  --accent: #7a1fa2;
  --accent-soft: rgba(122, 31, 162, 0.2);
  --radius: 12px;
  --shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  --font-display: "Cinzel", system-ui, serif;
  --font-body: "Cinzel", system-ui, serif;
}

body[data-theme="minimal"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #111111;
  --muted: #666666;
  --accent: #111111;
  --accent-soft: rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

body[data-theme="minimal"] .link-card {
  border-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="chalk"] {
  --bg: #1e2b24;
  --surface: rgba(20, 28, 24, 0.92);
  --text: #f5f2e8;
  --muted: #c8c0ad;
  --accent: #f0c75e;
  --accent-soft: rgba(240, 199, 94, 0.2);
  --radius: 16px;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  --font-display: "Fira Mono", system-ui, sans-serif;
  --font-body: "Fira Mono", system-ui, sans-serif;
}

body[data-theme="chalk"] .preview-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.25;
  pointer-events: none;
}

body[data-theme="cosmic"] {
  --bg: radial-gradient(circle at 20% 20%, #3b2b6d 0%, #120a2a 45%, #070512 100%);
  --surface: rgba(11, 8, 22, 0.92);
  --text: #f0eaff;
  --muted: #b6a9d9;
  --accent: #8f7bff;
  --accent-soft: rgba(143, 123, 255, 0.2);
  --radius: 20px;
  --shadow: 0 40px 90px rgba(0, 0, 0, 0.65);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

body[data-theme="cosmic"] .preview-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.25;
  pointer-events: none;
}

body[data-theme="zen"] {
  --bg: linear-gradient(140deg, #e6f1e8 0%, #d5ece0 45%, #f2f7f0 100%);
  --surface: rgba(255, 255, 255, 0.92);
  --text: #1f2b25;
  --muted: #5c6b63;
  --accent: #4f9a7b;
  --accent-soft: rgba(79, 154, 123, 0.18);
  --radius: 30px;
  --shadow: 0 26px 60px rgba(40, 80, 60, 0.2);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Sora", system-ui, sans-serif;
}

body[data-theme="present"] {
  --bg: linear-gradient(120deg, #f7f5f0 0%, #e7eff4 45%, #f2ebf5 100%);
  --surface: rgba(255, 255, 255, 0.92);
  --text: #1c1c1c;
  --muted: #6c6c6c;
  --accent: #1f6feb;
  --accent-soft: rgba(31, 111, 235, 0.15);
  --radius: 26px;
  --shadow: 0 28px 60px rgba(31, 35, 40, 0.15);
  --font-display: "Playfair Display", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, sans-serif;
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .editor {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    height: auto;
    overflow-y: visible;
  }

  .preview {
    height: auto;
    overflow-y: visible;
    padding: 24px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .editor {
    padding: 24px 18px;
  }

  .preview-shell {
    padding: 24px;
  }

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

/* Neon Tokyo */
body[data-theme="neontokyo"] {
  --bg: radial-gradient(circle at top, #1a0033 0%, #000000 70%);
  --surface: rgba(20, 0, 40, 0.9);
  --text: #00f5ff;
  --muted: #ff006e;
  --accent: #ff006e;
  --accent-soft: rgba(255, 0, 110, 0.2);
  --radius: 8px;
  --shadow: 0 0 40px rgba(255, 0, 110, 0.3);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

/* Desert Sand */
body[data-theme="desertsand"] {
  --bg: linear-gradient(135deg, #d4a574 0%, #c19a6b 50%, #8b4513 100%);
  --surface: rgba(255, 250, 240, 0.92);
  --text: #3d2817;
  --muted: #8b6914;
  --accent: #d4a574;
  --accent-soft: rgba(212, 165, 116, 0.2);
  --radius: 20px;
  --shadow: 0 20px 50px rgba(61, 40, 23, 0.2);
  --font-display: "Playfair Display", system-ui, serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

/* Ice Palace */
body[data-theme="icepalace"] {
  --bg: linear-gradient(135deg, #e0f7ff 0%, #b3e5fc 50%, #4db8ff 100%);
  --surface: rgba(255, 255, 255, 0.95);
  --text: #003d5c;
  --muted: #0277bd;
  --accent: #00bcd4;
  --accent-soft: rgba(0, 188, 212, 0.15);
  --radius: 24px;
  --shadow: 0 25px 60px rgba(0, 61, 92, 0.15);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Sora", system-ui, sans-serif;
}

/* Vintage Film */
body[data-theme="vintagefilm"] {
  --bg: linear-gradient(135deg, #d4af37 0%, #8b7355 50%, #3d2817 100%);
  --surface: rgba(245, 235, 215, 0.9);
  --text: #2d1810;
  --muted: #6b4423;
  --accent: #d4af37;
  --accent-soft: rgba(212, 175, 55, 0.2);
  --radius: 16px;
  --shadow: 0 30px 70px rgba(45, 24, 16, 0.3);
  --font-display: "Playfair Display", system-ui, serif;
  --font-body: "Rubik", system-ui, sans-serif;
}

/* Candy Shop */
body[data-theme="candyshop"] {
  --bg: linear-gradient(135deg, #ffb6c1 0%, #ff69b4 50%, #ff1493 100%);
  --surface: rgba(255, 255, 255, 0.92);
  --text: #8b0045;
  --muted: #c71585;
  --accent: #ff69b4;
  --accent-soft: rgba(255, 105, 180, 0.2);
  --radius: 28px;
  --shadow: 0 20px 50px rgba(255, 20, 147, 0.2);
  --font-display: "Bungee Shade", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, sans-serif;
}

/* Forest Night */
body[data-theme="forestnight"] {
  --bg: radial-gradient(circle at top, #1a4d2e 0%, #0d2818 70%);
  --surface: rgba(15, 30, 20, 0.92);
  --text: #a8e6cf;
  --muted: #6fb98f;
  --accent: #4caf50;
  --accent-soft: rgba(76, 175, 80, 0.2);
  --radius: 18px;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

/* Retro Wave */
body[data-theme="retrowave"] {
  --bg: linear-gradient(135deg, #ff00ff 0%, #7700ff 50%, #00ffff 100%);
  --surface: rgba(10, 0, 20, 0.9);
  --text: #00ffff;
  --muted: #ff00ff;
  --accent: #ff00ff;
  --accent-soft: rgba(255, 0, 255, 0.2);
  --radius: 12px;
  --shadow: 0 0 50px rgba(255, 0, 255, 0.4);
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

/* Lavender Dream */
body[data-theme="lavender"] {
  --bg: linear-gradient(135deg, #e6e6fa 0%, #d8bfd8 50%, #b19cd9 100%);
  --surface: rgba(255, 255, 255, 0.92);
  --text: #4b0082;
  --muted: #8a2be2;
  --accent: #9370db;
  --accent-soft: rgba(147, 112, 219, 0.2);
  --radius: 26px;
  --shadow: 0 25px 60px rgba(75, 0, 130, 0.15);
  --font-display: "Playfair Display", system-ui, serif;
  --font-body: "Sora", system-ui, sans-serif;
}

/* Gold Rush */
body[data-theme="goldrush"] {
  --bg: linear-gradient(135deg, #ffd700 0%, #daa520 50%, #8b6914 100%);
  --surface: rgba(255, 250, 230, 0.92);
  --text: #3d2817;
  --muted: #8b6914;
  --accent: #daa520;
  --accent-soft: rgba(218, 165, 32, 0.2);
  --radius: 22px;
  --shadow: 0 30px 70px rgba(139, 105, 20, 0.25);
  --font-display: "Cinzel", system-ui, serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

/* Midnight Oil */
body[data-theme="midnightoil"] {
  --bg: radial-gradient(circle at top, #191970 0%, #000080 50%, #00008b 100%);
  --surface: rgba(10, 10, 40, 0.92);
  --text: #e6e6fa;
  --muted: #9370db;
  --accent: #4169e1;
  --accent-soft: rgba(65, 105, 225, 0.2);
  --radius: 16px;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

/* Sakura Bloom */
body[data-theme="sakura"] {
  --bg: linear-gradient(135deg, #ffd1dc 0%, #ffb7c5 50%, #ff9eb5 100%);
  --surface: rgba(255, 255, 255, 0.95);
  --text: #5d3a3a;
  --muted: #b87b8c;
  --accent: #ff69b4;
  --accent-soft: rgba(255, 105, 180, 0.15);
  --radius: 24px;
  --shadow: 0 20px 50px rgba(255, 105, 180, 0.2);
  --font-display: "Playfair Display", system-ui, serif;
  --font-body: "Sora", system-ui, sans-serif;
}

/* Cyber Grid */
body[data-theme="cybergrid"] {
  --bg: radial-gradient(circle at center, #0a0e27 0%, #000000 100%);
  --surface: rgba(10, 14, 39, 0.92);
  --text: #00ff41;
  --muted: #00cc33;
  --accent: #00ff41;
  --accent-soft: rgba(0, 255, 65, 0.15);
  --radius: 4px;
  --shadow: 0 0 40px rgba(0, 255, 65, 0.3);
  --font-display: "Courier New", monospace;
  --font-body: "Courier New", monospace;
}

/* Cyberpunk */
body[data-theme="cyberpunk"] {
  --bg: #fdf500;
  --surface: #000000;
  --text: #ffffff;
  --muted: #00ff00;
  --accent: #fdf500;
  --accent-soft: rgba(253, 245, 0, 0.2);
  --radius: 0;
  --shadow: 8px 8px 0 #000000;
  --font-display: "Orbitron", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
}

/* Pastel Goth */
body[data-theme="pastelgoth"] {
  --bg: #111111;
  --surface: #ffb7c5;
  --text: #111111;
  --muted: #4a4a4a;
  --accent: #b19cd9;
  --accent-soft: rgba(177, 156, 217, 0.2);
  --radius: 30px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --font-display: "Playfair Display", serif;
  --font-body: "Space Grotesk", sans-serif;
}

/* Corporate */
body[data-theme="corporate"] {
  --bg: #f4f7f9;
  --surface: #ffffff;
  --text: #2c3e50;
  --muted: #7f8c8d;
  --accent: #3498db;
  --accent-soft: rgba(52, 152, 219, 0.1);
  --radius: 4px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  --font-display: "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
}

/* Eco Forest */
body[data-theme="eco"] {
  --bg: #2d5a27;
  --surface: #fdfaf1;
  --text: #1a3c15;
  --muted: #5e8b54;
  --accent: #4caf50;
  --accent-soft: rgba(76, 175, 80, 0.15);
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  --font-display: "Sora", sans-serif;
  --font-body: "Sora", sans-serif;
}

/* Royal Blue */
body[data-theme="royal"] {
  --bg: #002366;
  --surface: #ffffff;
  --text: #002366;
  --muted: #c5a059;
  --accent: #c5a059;
  --accent-soft: rgba(197, 160, 89, 0.2);
  --radius: 8px;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  --font-display: "Cinzel", serif;
  --font-body: "Playfair Display", serif;
}

/* Terminal Green */
body[data-theme="terminal"] {
  --bg: #000000;
  --surface: #000000;
  --text: #00ff00;
  --muted: #006400;
  --accent: #00ff00;
  --accent-soft: rgba(0, 255, 0, 0.1);
  --radius: 0;
  --shadow: none;
  --font-display: "Courier New", monospace;
  --font-body: "Courier New", monospace;
}

/* Old Newspaper */
body[data-theme="newspaper"] {
  --bg: #e6e0d4;
  --surface: #e6e0d4;
  --text: #1a1a1a;
  --muted: #4a4a4a;
  --accent: #1a1a1a;
  --accent-soft: rgba(0, 0, 0, 0.1);
  --radius: 0;
  --shadow: inset 0 0 100px rgba(0, 0, 0, 0.05);
  --font-display: "Playfair Display", serif;
  --font-body: "Playfair Display", serif;
}

/* Blueprint */
body[data-theme="blueprint"] {
  --bg: #004a99;
  --surface: rgba(0, 74, 153, 0.8);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.6);
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.1);
  --radius: 4px;
  --shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
}

/* Bubblegum */
body[data-theme="bubblegum"] {
  --bg: #ff85a2;
  --surface: #f9f9f9;
  --text: #ff1c6b;
  --muted: #ffa3b1;
  --accent: #7bf2ff;
  --accent-soft: rgba(123, 242, 255, 0.2);
  --radius: 30px;
  --shadow: 0 12px 30px rgba(255, 133, 162, 0.3);
  --font-display: "Rubik", sans-serif;
  --font-body: "Rubik", sans-serif;
}

/* Velvet Lounge */
body[data-theme="velvet"] {
  --bg: #5a0000;
  --surface: #1a0000;
  --text: #d4a64a;
  --muted: #8b0000;
  --accent: #d4a64a;
  --accent-soft: rgba(212, 166, 74, 0.2);
  --radius: 12px;
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
  --font-display: "Cinzel", serif;
  --font-body: "Space Grotesk", sans-serif;
}

/* Liberty Red - Republican Inspired */
body[data-theme="liberty"] {
  --bg: linear-gradient(135deg, #002868 0%, #001a44 100%);
  --surface: #ffffff;
  --text: #002868;
  --muted: #4d4d4d;
  --accent: #bf0a30;
  --accent-soft: rgba(191, 10, 48, 0.1);
  --radius: 4px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --font-display: "Cinzel", serif;
  --font-body: "Playfair Display", serif;
}

body[data-theme="liberty"] .link-card {
  border-left: 4px solid #bf0a30;
}

/* Unity Blue - Democrat Inspired */
body[data-theme="unity"] {
  --bg: #f0f7ff;
  --surface: #ffffff;
  --text: #003366;
  --muted: #5e7ba2;
  --accent: #00aeef;
  --accent-soft: rgba(0, 174, 239, 0.15);
  --radius: 16px;
  --shadow: 0 15px 40px rgba(0, 51, 102, 0.08);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Sora", sans-serif;
}

body[data-theme="unity"] .preview-shell {
  border-top: 6px solid #005596;
}
