:root {
  color-scheme: light;
  --background: 45 30% 98%;
  --foreground: 200 25% 15%;
  --primary: 174 72% 40%;
  --primary-foreground: 0 0% 100%;
  --secondary: 45 30% 94%;
  --muted: 45 20% 92%;
  --muted-foreground: 200 15% 45%;
  --accent: 174 60% 95%;
  --border: 200 20% 88%;
  --shadow-card: 0 8px 30px -16px rgba(23, 91, 92, 0.2);
  --shadow-elevated: 0 18px 50px -22px rgba(23, 91, 92, 0.35);
  --glow: 0 0 40px rgba(23, 201, 186, 0.2);
  --radius-base: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  font-family: "Outfit", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(
      circle at top,
      rgba(255, 255, 255, 0.9) 0%,
      hsl(var(--background)) 55%,
      #f6f1e6 100%
    );
  color: hsl(var(--foreground));
  min-height: 100vh;
}

body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 320px;
  background: radial-gradient(
      circle at 50% 20%,
      rgba(23, 201, 186, 0.18),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: min(1024px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 28px 0 12px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: hsl(var(--accent));
  color: hsl(var(--primary));
  font-weight: 700;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

.brand-icon-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

.brand-name {
  font-size: 1.1rem;
}

.nav-label {
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  font-size: 0.95rem;
}

.hero {
  text-align: center;
  padding-bottom: 16px;
}

h1 {
  font-size: clamp(2.1rem, 3.6vw, 3.2rem);
  margin: 0 0 10px;
  font-weight: 600;
  line-height: 1.1;
}

h1 span {
  color: hsl(var(--primary));
}

.subtitle {
  max-width: 540px;
  margin: 0 auto 18px;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
  font-size: 0.98rem;
}

.hero-highlights {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 20px -18px rgba(10, 60, 70, 0.45);
}

.pill-icon {
  font-size: 0.9rem;
}

body[data-page="instagram"] .pill {
  background: linear-gradient(135deg, rgba(255, 94, 98, 0.12), rgba(130, 89, 255, 0.16));
  border-color: rgba(200, 120, 255, 0.25);
}

body[data-page="restaurant-menu"] .pill {
  background: linear-gradient(135deg, rgba(255, 174, 91, 0.14), rgba(216, 120, 72, 0.18));
  border-color: rgba(216, 120, 72, 0.25);
}

body[data-page="png"] .pill,
body[data-page="svg"] .pill {
  background: linear-gradient(135deg, rgba(73, 148, 255, 0.12), rgba(73, 201, 204, 0.16));
  border-color: rgba(73, 148, 255, 0.25);
}

.site-main {
  padding-bottom: 36px;
}

.builder {
  display: grid;
  gap: 36px;
}

.workspace {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 30px 60px -38px rgba(20, 60, 70, 0.4);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.card {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-card);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.card-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: hsl(var(--accent));
  color: hsl(var(--primary));
  font-weight: 600;
}

.controls h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.controls {
  overflow: hidden;
}

.flow {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: hsl(var(--muted-foreground));
}

.field span {
  font-weight: 500;
  color: hsl(var(--foreground));
}

textarea,
input[type="file"],
input[type="color"],
select {
  font: inherit;
}

textarea {
  padding: 12px 14px;
  border-radius: var(--radius-base);
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #ffffff;
  resize: vertical;
  min-height: 70px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea::placeholder {
  color: rgba(85, 92, 105, 0.6);
}

textarea:focus {
  outline: none;
  border-color: rgba(23, 201, 186, 0.6);
  box-shadow: 0 0 0 3px rgba(23, 201, 186, 0.2);
}

input[type="file"] {
  padding: 6px 0;
  max-width: 100%;
}

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

input[type="color"] {
  width: 100%;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
}

select {
  padding: 12px 14px;
  border-radius: var(--radius-base);
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #ffffff;
}

.cta {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, hsl(174 72% 40%), hsl(187 80% 45%));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  padding: 14px 18px;
  border-radius: var(--radius-base);
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-elevated), var(--glow);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px -18px rgba(23, 91, 92, 0.4), var(--glow);
}

.secondary {
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: transparent;
  padding: 10px 14px;
  border-radius: var(--radius-base);
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.secondary:hover {
  border-color: rgba(23, 201, 186, 0.6);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.text-button {
  border: none;
  background: none;
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
}

.download-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed hsl(var(--border));
}

.download-section.is-hidden .download-actions,
.download-section.is-hidden .text-button,
.download-section.is-hidden .download-ready {
  display: none;
}

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

.download-muted {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
}

.download-ready {
  font-size: 0.8rem;
  color: hsl(174 60% 35%);
  background: rgba(23, 201, 186, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
  display: none;
}

body.is-generated .download-ready {
  display: inline-flex;
}

.download-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.preview {
  display: grid;
  gap: 14px;
  place-items: center;
}

.preview-card {
  width: min(320px, 90vw);
  text-align: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.4);
}

.preview-title {
  margin: 0;
  font-weight: 600;
}

.qr-output {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 16px;
  background: #fdfbf6;
  border-radius: var(--radius-lg);
  border: 1px dashed hsl(var(--border));
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qr-output.is-empty {
  background: hsl(var(--muted));
}

body.is-generated .qr-output {
  border-color: rgba(23, 201, 186, 0.6);
  box-shadow: 0 0 0 4px rgba(23, 201, 186, 0.12);
}

.qr-frame {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.qr-output.is-ready .qr-frame {
  opacity: 1;
  transform: scale(1);
}

.qr-frame canvas,
.qr-frame svg,
.qr-frame img {
  display: block;
  margin: 0 auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.qr-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
}

.qr-output.is-ready .qr-placeholder {
  opacity: 0;
  visibility: hidden;
}

.qr-placeholder-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid hsl(var(--border));
  background: #ffffff;
  display: block;
}

.ad-slot {
  width: min(320px, 90vw);
  height: 72px;
  border-radius: 12px;
  border: 1px dashed hsl(var(--border));
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
}

.ad-slot.is-hidden {
  display: none;
}

.advanced {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(23, 201, 186, 0.08);
  border: 1px solid rgba(23, 201, 186, 0.18);
  margin-bottom: 14px;
}

.advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced .chevron {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.advanced[open] .chevron {
  transform: rotate(180deg);
}

.advanced-body {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  animation: fadeUp 0.3s ease both;
  overflow: hidden;
}

.with-tooltip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tooltip {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid hsl(var(--border));
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  position: relative;
}

.tooltip::after {
  content: attr(aria-label);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  padding: 6px 8px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: var(--shadow-card);
}

.tooltip:hover::after {
  opacity: 1;
}

.intro {
  margin: 24px auto 0;
  max-width: 920px;
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq {
  margin-top: 36px;
}

.faq h2 {
  margin: 0 0 16px;
}

.faq details {
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  padding: 14px 16px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "⌄";
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

.faq details p {
  margin: 12px 0 0;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

.faq-callout {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(23, 201, 186, 0.08);
  border: 1px solid rgba(23, 201, 186, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-callout p {
  margin: 0;
  color: hsl(var(--foreground));
  font-weight: 500;
}

.faq-callout a {
  color: hsl(var(--primary));
  text-decoration: none;
  font-weight: 600;
}

.related {
  margin-top: 36px;
}

.related ul {
  padding-left: 18px;
}

.site-footer {
  padding: 18px 0 28px;
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
}

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

  .preview {
    order: 1;
  }

  .controls {
    order: 2;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cta,
  .secondary {
    width: 100%;
  }

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

.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 0 32px;
  color: hsl(var(--foreground));
  line-height: 1.7;
}

.legal h1 {
  margin-bottom: 12px;
}

.legal h2 {
  margin: 24px 0 10px;
  font-size: 1.1rem;
}

.legal ul,
.legal ol {
  padding-left: 20px;
  margin: 10px 0 16px;
}

.footer-links {
  margin-top: 8px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
}

.footer-links a {
  color: hsl(var(--primary));
  text-decoration: none;
  font-weight: 600;
}

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

/* --- Premium UI overrides --- */
body {
  background: linear-gradient(180deg, #f7f9fb 0%, #eef3f7 100%);
}

body::before {
  background: radial-gradient(
      circle at 15% 15%,
      rgba(18, 184, 200, 0.18),
      transparent 55%
    ),
    radial-gradient(
      circle at 85% 5%,
      rgba(72, 142, 255, 0.18),
      transparent 60%
    );
}

.hero {
  position: relative;
}

.hero h1 {
  display: inline-block;
  position: relative;
}

.hero h1::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(23, 201, 186, 0.15), rgba(23, 201, 186, 0.7));
  box-shadow: 0 8px 18px rgba(23, 201, 186, 0.25);
}

body[data-page="instagram"] .hero h1::after {
  background: linear-gradient(90deg, rgba(255, 102, 153, 0.2), rgba(131, 82, 255, 0.8), rgba(255, 139, 61, 0.6));
  box-shadow: 0 8px 18px rgba(155, 89, 255, 0.3);
}

body[data-page="restaurant-menu"] .hero h1::after {
  background: linear-gradient(90deg, rgba(255, 176, 92, 0.25), rgba(210, 97, 65, 0.8));
  box-shadow: 0 8px 18px rgba(210, 97, 65, 0.25);
}

body[data-page="png"] .hero h1::after,
body[data-page="svg"] .hero h1::after {
  background: linear-gradient(90deg, rgba(64, 150, 255, 0.25), rgba(64, 201, 255, 0.75));
  box-shadow: 0 8px 18px rgba(64, 150, 255, 0.25);
}

.workspace {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(207, 219, 230, 0.8);
  box-shadow: 0 35px 70px -32px rgba(20, 45, 60, 0.45);
}

.card {
  border-color: rgba(203, 215, 226, 0.9);
  box-shadow: 0 14px 40px -26px rgba(18, 38, 50, 0.4);
}

.preview-card {
  width: min(420px, 92vw);
}

.qr-output {
  background: #ffffff;
  border: 1px dashed rgba(120, 140, 160, 0.35);
}

textarea,
select {
  border-color: rgba(31, 41, 55, 0.22);
}

textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(23, 201, 186, 0.7);
  box-shadow: 0 0 0 3px rgba(23, 201, 186, 0.22);
}

.faq details {
  padding: 16px 18px;
  border-color: rgba(200, 212, 222, 0.8);
}

.faq summary {
  gap: 12px;
}

.faq details p {
  margin-top: 14px;
}
