:root {
  --demo-bg-0: #060d1a;
  --demo-bg-1: #0c1930;
  --demo-bg-2: #132742;
  --demo-ink: #f0f4fc;
  --demo-muted: rgba(224, 234, 255, 0.72);
  --demo-line: rgba(255, 255, 255, 0.12);
  --demo-pill: rgba(255, 255, 255, 0.08);
  --demo-pill-border: rgba(255, 255, 255, 0.14);
  --demo-accent: #5eb3ff;
  --demo-accent-dim: rgba(94, 179, 255, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}

.demo-page {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--demo-ink);
  background:
    linear-gradient(180deg, rgba(5,10,18,0.05), rgba(5,10,18,0.25)),
    url("/images/hero-bg-web.jpg");
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}

.demo-nav {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.demo-nav-capsule {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--demo-pill-border);
  border-radius: 999px;
  background: var(--demo-pill);
  backdrop-filter: blur(20px);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.demo-nav-capsule--right {
  padding-right: 10px;
  gap: 6px;
}

.demo-logo,
.demo-nav-links a,
.demo-login,
.demo-start {
  color: var(--demo-ink);
  text-decoration: none;
}

.demo-logo {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 12px;
  margin: -4px 4px -4px -4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.demo-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 12px 0 4px;
}

.demo-nav-links a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--demo-muted);
}

.demo-nav-links a:hover {
  color: var(--demo-ink);
}

.demo-login,
.demo-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.demo-login {
  color: var(--demo-muted);
}

.demo-login:hover {
  color: var(--demo-ink);
}

.demo-start {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.95);
  color: #0a1628;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.demo-start:hover {
  background: #fff;
}

.demo-flash-stack {
  position: fixed;
  top: 88px;
  left: 50%;
  z-index: 20;
  transform: translateX(-50%);
}

.demo-flash {
  padding: 11px 18px;
  border: 1px solid var(--demo-pill-border);
  border-radius: 999px;
  background: rgba(12, 25, 48, 0.88);
  color: var(--demo-accent);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.demo-hero {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 20px 80px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4,6,12,0.58), rgba(4,6,12,0.88)),
    url("/images/black-gold-bg-1.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.demo-hero::before,
.demo-hero::after {
  display: none;
}

.demo-hero-glow {
  position: absolute;
  inset: 10% 15% auto;
  height: min(420px, 45vh);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--demo-accent-dim), transparent 70%);
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
}

.demo-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1040px, 100%);
  padding-top: 70px;
  text-align: center;
}

.demo-kicker {
  margin: 0 0 20px;
  color: var(--demo-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.demo-hero-title,
.demo-hero h1 {
  margin: 0;
  color: var(--demo-ink);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(42px, 4.8vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.demo-subtitle {
  white-space: nowrap;
  width: 100%;
  max-width: none;
  margin: 28px auto 0;
  color: var(--demo-muted);
  font-size: clamp(15px, 1.25vw, 20px);
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}

.demo-create-form {
  margin: 0;
  padding: 0;
  width: 100%;
}

.demo-template-picker {
  width: min(920px, 100%);
  margin: 54px auto 34px;
}

.demo-template-title {
  margin: 0 0 14px;
  color: rgba(244, 219, 151, 0.94);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
}

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

.demo-template-option {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.demo-template-card {
  display: flex;
  min-height: 126px;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(244, 219, 151, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045)),
    rgba(12, 14, 20, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 48px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.demo-template-option:hover .demo-template-card {
  transform: translateY(-2px);
  border-color: rgba(244, 219, 151, 0.5);
}

.demo-template-option.is-selected .demo-template-card {
  border-color: rgba(244, 219, 151, 0.95);
  background:
    linear-gradient(180deg, rgba(244, 219, 151, 0.18), rgba(255, 255, 255, 0.055)),
    rgba(13, 12, 16, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(244, 219, 151, 0.28),
    0 20px 54px rgba(0, 0, 0, 0.36);
}

.demo-template-name {
  color: #fff3c4;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.demo-template-desc {
  color: rgba(232, 220, 187, 0.74);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.demo-input-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 72vw;
  max-width: 980px;
  min-height: 72px;
  margin: 0 auto;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--demo-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 24px 64px rgba(0, 0, 0, 0.35);
}

.demo-input-shell input {
  flex: 1;
  min-width: 0;
  height: 56px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--demo-ink);
  font: inherit;
  font-size: 16px;
  padding: 0 16px;
}

.demo-input-shell input::placeholder {
  color: rgba(224, 234, 255, 0.45);
}

.demo-image-import {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 72vw;
  max-width: 980px;
  margin: 0 auto 18px;
  padding: 20px 22px;
  border: 1px solid rgba(244, 219, 151, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(244, 219, 151, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(12, 14, 20, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 52px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  text-align: left;
}

.demo-image-import-copy h2 {
  margin: 0 0 8px;
  color: #fff3c4;
  font-size: 18px;
  font-weight: 850;
}

.demo-image-import-copy p {
  margin: 0 0 8px;
  color: rgba(232, 220, 187, 0.78);
  font-size: 14px;
  line-height: 1.55;
}

.demo-image-import-copy span,
.demo-upload-preview span {
  color: rgba(244, 219, 151, 0.68);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-image-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(244, 219, 151, 0.38);
  border-radius: 999px;
  background: rgba(244, 219, 151, 0.12);
  color: #fff3c4;
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
}

.demo-image-upload-btn:hover {
  border-color: rgba(244, 219, 151, 0.72);
  background: rgba(244, 219, 151, 0.18);
}

.demo-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.demo-upload-preview {
  display: grid;
  gap: 12px;
  width: 72vw;
  max-width: 980px;
  margin: 0 auto 18px;
  padding: 14px;
  border: 1px solid rgba(244, 219, 151, 0.2);
  border-radius: 22px;
  background: rgba(12, 14, 20, 0.54);
  backdrop-filter: blur(18px);
  text-align: left;
}

.demo-upload-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  border-radius: 14px;
  object-fit: cover;
}

.demo-btn-generate,
.demo-input-shell button.demo-btn-generate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 148px;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #6ec1ff 0%, #3d8eef 48%, #2563c9 100%);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow:
    0 4px 20px rgba(61, 142, 239, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.demo-btn-generate:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.demo-workbench {
  margin: 56px auto 0;
  width: min(1040px, 100%);
  border-radius: 20px;
  border: 1px solid var(--demo-line);
  background: rgba(8, 16, 30, 0.62);
  backdrop-filter: blur(18px);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  text-align: left;
}

.demo-workbench-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--demo-line);
  background: rgba(255, 255, 255, 0.04);
}

.demo-workbench-dots {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-right: 26px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow:
    16px 0 0 #febc2e,
    32px 0 0 #28c840;
}

.demo-workbench-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--demo-muted);
}

.demo-workbench-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--demo-accent-dim);
  color: var(--demo-accent);
  background: rgba(94, 179, 255, 0.12);
}

.demo-workbench-body {
  padding: 24px;
}

.demo-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.demo-preview-card {
  min-height: 168px;
  padding: 22px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.demo-card-label {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(94, 179, 255, 0.15);
  color: var(--demo-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.demo-preview-card h2 {
  margin: 0 0 10px;
  color: var(--demo-ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.demo-preview-card p {
  margin: 0;
  color: var(--demo-muted);
  font-size: 14px;
  line-height: 1.65;
}

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

@media (max-width: 820px) {
  .demo-nav {
    flex-direction: column;
    align-items: stretch;
    width: min(100% - 28px, 1180px);
    padding: 20px 0 10px;
  }

  .demo-nav-capsule {
    justify-content: space-between;
  }

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

  .demo-nav-capsule--right {
    justify-content: flex-end;
  }

  .demo-login {
    display: none;
  }

  .demo-hero {
    min-height: 100vh;
    padding: 24px 14px 56px;
  }

  .demo-input-shell {
    flex-direction: column;
    align-items: stretch;
    border-radius: 20px;
    padding: 12px;
  }

  .demo-image-import,
  .demo-upload-preview {
    width: 100%;
    max-width: 100%;
  }

  .demo-image-import {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 16px;
  }

  .demo-image-upload-btn {
    width: 100%;
  }

  .demo-input-shell input {
    width: 100%;
  }

  .demo-btn-generate,
  .demo-input-shell button.demo-btn-generate {
    width: 100%;
    border-radius: 14px;
  }

  .demo-preview-grid {
    grid-template-columns: 1fr;
  }

  .demo-workbench {
    margin-top: 18px;
  }
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .demo-hero {
    min-height: auto;
    width: 100%;
    overflow-x: hidden;
    padding: 18px 16px 48px;
    background:
      linear-gradient(180deg, rgba(4,6,12,0.62), rgba(4,6,12,0.9)),
      url("/images/black-gold-bg-1.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
  }

  .demo-nav {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
  }

  .nav-left,
  .nav-right,
  .demo-nav-capsule {
    width: 100%;
    box-sizing: border-box;
    transform: none;
    max-width: 100%;
    min-height: 48px;
    padding: 6px 12px;
    border-radius: 999px;
  }

  .nav-left {
    width: auto;
    align-self: flex-start;
  }

  .nav-right {
    width: auto;
    align-self: flex-end;
  }

  .nav-left a:not(:first-child),
  .nav-right a:first-child {
    display: none;
  }

  .hero-content,
  .demo-hero-inner {
    padding-top: 8px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .hero-title,
  .demo-hero-title,
  .demo-hero h1,
  h1 {
    font-size: clamp(32px, 10vw, 44px);
    line-height: 1.08;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
  }

  .hero-subtitle,
  .demo-subtitle {
    white-space: normal;
    font-size: 15px;
    line-height: 1.6;
    max-width: 92%;
    margin-left: auto;
    margin-right: auto;
  }

  .demo-template-picker {
    width: 100%;
    max-width: 100%;
    margin-top: 24px;
  }

  .demo-template-title {
    text-align: center;
  }

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

  .demo-template-card {
    min-height: auto;
    padding: 16px;
  }

  .generate-form,
  .hero-form,
  .prompt-form,
  .demo-create-form,
  .demo-input-shell {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border-radius: 24px;
  }

  .demo-input-shell {
    margin-top: 18px;
  }

  .demo-image-import,
  .demo-upload-preview {
    width: 100%;
    max-width: 100%;
  }

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

  .generate-form input,
  .hero-form input,
  .prompt-form input,
  .demo-input-shell input {
    width: 100%;
    font-size: 15px;
  }

  .generate-form button,
  .hero-form button,
  .prompt-form button,
  .demo-input-shell button {
    width: 100%;
    height: 56px;
  }

  .workbench,
  .demo-workbench,
  .workspace-preview {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    margin-top: 36px;
    border-radius: 24px;
  }

  .preview-grid,
  .result-grid,
  .workspace-cards,
  .demo-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .preview-card,
  .result-card,
  .workspace-card,
  .demo-preview-card {
    min-height: 180px;
  }
}

@media (max-width: 768px) {
  .demo-hero,
  .demo-page,
  .hero-section,
  .hero-wrapper {
    background:
      linear-gradient(180deg, rgba(4,6,12,0.62), rgba(4,6,12,0.92)),
      url("/images/black-gold-bg-1.png") !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
  }

  .demo-hero::before,
  .demo-hero::after,
  .demo-page::before,
  .demo-page::after {
    display: none !important;
  }
}
