:root {
  --bg: #0b1118;
  --bg-soft: #121b26;
  --panel: rgba(12, 20, 30, 0.86);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --muted: #a9b5c4;
  --accent: #2dd4bf;
  --accent-strong: #fb923c;
  --shadow: 0 30px 70px rgba(3, 7, 12, 0.55);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 20%, #1b2736 0%, #0b1118 45%, #070b10 100%);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background: radial-gradient(circle at 80% 10%, rgba(45, 212, 191, 0.18), transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(251, 146, 60, 0.15), transparent 40%);
}

body::after {
  background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.05) 0%, transparent 35%),
    linear-gradient(300deg, rgba(255, 255, 255, 0.03) 0%, transparent 30%);
  mix-blend-mode: screen;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  animation: floatIn 0.9s ease both;
}

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

h1 {
  font-family: "Russo One", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 12px;
}

h2 {
  font-family: "Russo One", sans-serif;
  font-size: 1.25rem;
  margin: 0 0 16px;
}

.hero-sub {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b1118;
  box-shadow: 0 12px 30px rgba(45, 212, 191, 0.35);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn.icon {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.1fr);
  gap: 24px;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  padding: 24px;
  box-shadow: var(--shadow);
  animation: panelIn 0.8s ease both;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.seed-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

label {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

input,
textarea {
  background: #0d141d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: "Space Grotesk", sans-serif;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(45, 212, 191, 0.4);
  border-color: transparent;
}

input[type="file"] {
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}

input[type="range"] {
  accent-color: var(--accent);
}

.help {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.theme-option {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease;
}

.theme-option input {
  display: none;
}

.theme-option input:checked + .theme-swatch {
  outline: 2px solid var(--accent);
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.4);
}

.theme-option input:checked ~ .theme-name {
  color: var(--text);
}

.theme-option:hover {
  transform: translateY(-2px);
}

.theme-swatch {
  height: 48px;
  border-radius: 12px;
}

.theme-neo {
  background: linear-gradient(135deg, #0f172a, #0891b2);
}

.theme-solar {
  background: linear-gradient(135deg, #f97316, #fde68a);
}

.theme-ember {
  background: linear-gradient(135deg, #1f2937, #f87171);
}

.theme-name {
  font-size: 0.85rem;
  color: var(--muted);
}

.palette-grid,
.frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.palette-option,
.frame-option {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease;
}

.palette-option input,
.frame-option input {
  display: none;
}

.palette-option input:checked + .palette-swatch,
.frame-option input:checked + .frame-preview {
  outline: 2px solid var(--accent);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.35);
}

.palette-option:hover,
.frame-option:hover {
  transform: translateY(-2px);
}

.palette-swatch {
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.palette-name,
.frame-name {
  font-size: 0.78rem;
  color: var(--muted);
}

.frame-preview {
  height: 36px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  position: relative;
}

.frame-preview::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.frame-preview[data-style="dash"] {
  border-style: dashed;
}

.frame-preview[data-style="corner"]::after {
  border: none;
  background: linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.4) 45%) 0 0 / 18px 18px
      no-repeat,
    linear-gradient(225deg, transparent 45%, rgba(255, 255, 255, 0.4) 45%) 100% 0 / 18px 18px no-repeat,
    linear-gradient(315deg, transparent 45%, rgba(255, 255, 255, 0.4) 45%) 100% 100% / 18px 18px
      no-repeat,
    linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.4) 45%) 0 100% / 18px 18px no-repeat;
}

.frame-preview[data-style="band"]::after {
  inset: 10px 6px;
  border-left: none;
  border-right: none;
}

.frame-preview[data-style="glow"] {
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.35);
}

.frame-preview[data-style="angled"]::after {
  border-radius: 0;
  clip-path: polygon(8% 0, 92% 0, 100% 18%, 100% 82%, 92% 100%, 8% 100%, 0 82%, 0 18%);
}

.skills-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(160px, 1fr) minmax(70px, 0.5fr) auto;
  gap: 8px;
  align-items: center;
}

.skill-row > * {
  min-width: 0;
}

.skill-row input {
  width: 100%;
}

.preview {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.card-shell {
  background: #070c12;
  border-radius: 24px;
  padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#cardCanvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
}

.export-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.export-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.download-link {
  color: var(--accent);
  text-decoration: none;
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.download-link.is-ready {
  opacity: 1;
  pointer-events: auto;
}

.output-image {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
}

.output-image.is-visible {
  display: block;
}

.landing-page {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-family: "Russo One", sans-serif;
  color: #0b1118;
}

.brand-name {
  margin: 0;
  font-family: "Russo One", sans-serif;
  font-size: 1.1rem;
}

.brand-tag {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.nav-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(240px, 0.8fr);
  gap: 28px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-number {
  display: block;
  font-family: "Russo One", sans-serif;
  font-size: 1.6rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-showcase {
  display: grid;
  gap: 18px;
  justify-items: end;
}

.mock-card {
  width: 220px;
  height: 320px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.2), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 16px;
  display: grid;
  gap: 14px;
  position: relative;
  box-shadow: var(--shadow);
}

.mock-card.alt {
  transform: translateX(-24px) translateY(12px);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(15, 23, 42, 0.9));
}

.mock-card__frame {
  flex: 1;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.mock-card__image {
  height: 130px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.4));
}

.mock-card__bars {
  display: grid;
  gap: 8px;
}

.mock-card__bars span {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.mock-card__bars span::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 70%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
  padding: 20px;
  border-radius: 18px;
  background: rgba(12, 20, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.feature-card h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.palette-showcase {
  display: grid;
  gap: 20px;
  align-items: center;
  grid-template-columns: minmax(240px, 0.8fr) minmax(240px, 1fr);
}

.swatch-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(32px, 1fr));
  gap: 10px;
}

.swatch-strip span {
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(12, 20, 30, 0.85));
  box-shadow: var(--shadow);
}

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

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

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }

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

  .landing-hero {
    grid-template-columns: 1fr;
  }

  .hero-showcase {
    justify-items: start;
  }

  .palette-showcase {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 32px 16px 56px;
  }

  .skill-row {
    grid-template-columns: 1fr 1fr;
  }

  .skill-row .btn.icon {
    grid-column: span 2;
    justify-self: start;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
