:root {
  color-scheme: dark;
  --bg: #090b0f;
  --surface: #11151c;
  --surface-2: #171c24;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f5f7fa;
  --muted: #9aa5b5;
  --accent: #c5ff4a;
  --accent-2: #84e7ff;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 85% 5%, rgba(132, 231, 255, 0.09), transparent 26rem), radial-gradient(circle at 10% 25%, rgba(197, 255, 74, 0.06), transparent 24rem), var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.18em; }

.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 0 max(20px, calc((100vw - var(--max)) / 2)); border-bottom: 1px solid var(--line); background: rgba(9, 11, 15, 0.82); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #0b0d0f; }
nav { display: flex; gap: 26px; color: var(--muted); font-size: 14px; }
nav a:hover { color: var(--text); }

.hero { display: grid; grid-template-columns: 1.08fr 0.92fr; align-items: center; min-height: 650px; padding-block: 90px; }
.hero h1 { margin: 0; max-width: 760px; font-size: clamp(46px, 6.3vw, 82px); line-height: 0.98; letter-spacing: -0.055em; }
.hero h1 span { color: var(--accent); }
.hero-intro { max-width: 650px; margin: 28px 0 0; color: var(--muted); font-size: 18px; line-height: 1.8; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #0a0d0f; font-weight: 800; }
.button.secondary, .button.reset { background: transparent; color: var(--text); }
.stats { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 44px; }
.stat strong { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 12px; }

.hero-visual { position: relative; min-height: 430px; }
.orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.orbit-one { inset: 5% 8%; }
.orbit-two { inset: 20%; border-style: dashed; transform: rotate(20deg); }
.hero-card { position: absolute; width: 240px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: rgba(23, 28, 36, 0.88); box-shadow: 0 28px 80px rgba(0,0,0,.3); }
.hero-card span { color: var(--accent-2); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.hero-card strong, .hero-card small { display: block; }
.hero-card strong { margin-top: 26px; font-size: 20px; }
.hero-card small { margin-top: 8px; color: var(--muted); }
.hero-card-main { top: 18%; left: 4%; transform: rotate(-6deg); }
.hero-card-output { right: 0; bottom: 14%; transform: rotate(5deg); }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.principles article { padding: 32px 28px; border-right: 1px solid var(--line); }
.principles article:last-child { border-right: 0; }
.principles span { color: var(--accent); font-size: 12px; }
.principles strong { display: block; margin-top: 14px; font-size: 18px; }
.principles p { margin: 8px 0 0; color: var(--muted); line-height: 1.65; }

.section { padding-block: 96px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.section-heading h2, .cta h2, .support h2 { margin: 0; font-size: clamp(32px, 4vw, 50px); letter-spacing: -.035em; }
.section-heading > p { max-width: 470px; margin: 0; color: var(--muted); line-height: 1.7; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.case-card { position: relative; min-height: 300px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); cursor: pointer; }
.case-card:first-child { grid-column: span 2; grid-row: span 2; min-height: 616px; }
.case-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.case-card:hover img { transform: scale(1.035); }
.case-overlay { position: absolute; inset: auto 0 0; padding: 50px 18px 18px; background: linear-gradient(transparent, rgba(0,0,0,.88)); }
.case-overlay strong { display: block; font-size: 17px; }
.case-overlay span { color: #cbd3dd; font-size: 12px; }
.case-overlay .license-warning { display: block; width: fit-content; margin-top: 8px; padding: 3px 7px; border: 1px solid rgba(255, 196, 87, .55); border-radius: 999px; color: #ffd98a; background: rgba(0, 0, 0, .45); }

.library-section { border-block: 1px solid var(--line); background: rgba(17, 21, 28, 0.72); }
.filters { display: grid; grid-template-columns: minmax(280px, 1fr) 220px 180px auto; gap: 10px; margin-bottom: 28px; }
input, select { width: 100%; min-height: 48px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: #0d1117; color: var(--text); }
input:focus, select:focus { border-color: var(--accent); }
.prompt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.prompt-card { display: flex; flex-direction: column; min-height: 250px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #0d1117; transition: border-color .2s, transform .2s; }
.prompt-card:hover { transform: translateY(-2px); border-color: rgba(197,255,74,.45); }
.card-top { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.prompt-card h3 { margin: 30px 0 10px; font-size: 20px; }
.prompt-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 22px; }
.tag { padding: 5px 8px; border-radius: 999px; background: var(--surface-2); color: #c3ccd7; font-size: 11px; }
.card-action { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer; }
.empty-state { grid-column: 1 / -1; padding: 60px; text-align: center; color: var(--muted); }

.workflow-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.workflow-card { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.workflow-card span { color: var(--accent-2); font-size: 12px; font-weight: 800; }
.workflow-card h3 { margin: 22px 0 10px; }
.workflow-card p { color: var(--muted); line-height: 1.65; }
.workflow-card a { display: inline-block; margin-top: 12px; color: var(--accent); font-weight: 700; }

.cta, .support { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-block: 30px 80px; padding: 50px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(135deg, rgba(197,255,74,.08), rgba(132,231,255,.05)); }
.cta p, .support p { max-width: 680px; color: var(--muted); line-height: 1.7; }
.support img { border-radius: 18px; background: #fff; }
.site-footer { display: flex; justify-content: space-between; padding-block: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.prompt-dialog { width: min(800px, calc(100% - 30px)); max-height: 86vh; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: #10141b; color: var(--text); }
.prompt-dialog::backdrop { background: rgba(0,0,0,.76); backdrop-filter: blur(6px); }
.dialog-close { position: sticky; top: 16px; float: right; z-index: 2; width: 38px; height: 38px; margin: 16px; border: 1px solid var(--line); border-radius: 50%; background: #171c24; color: var(--text); cursor: pointer; font-size: 24px; }
.dialog-body { padding: 36px; }
.dialog-body h2 { margin: 0 55px 8px 0; font-size: 32px; }
.dialog-body > p { color: var(--muted); }
.dialog-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.prompt-code { max-height: 380px; overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #080a0e; white-space: pre-wrap; line-height: 1.65; font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; }
.dialog-actions { display: flex; gap: 10px; margin-top: 18px; }

@media (max-width: 900px) {
  nav a:not(:last-child) { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { min-height: 360px; }
  .principles, .prompt-grid { grid-template-columns: 1fr 1fr; }
  .principles article:last-child { grid-column: span 2; border-top: 1px solid var(--line); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: span 2; }
}

@media (max-width: 620px) {
  .shell { width: min(calc(100% - 24px), var(--max)); }
  .site-header { padding-inline: 14px; }
  .brand span:last-child { font-size: 13px; }
  .hero { padding-block: 64px 30px; }
  .hero h1 { font-size: 48px; }
  .hero-visual { min-height: 320px; }
  .hero-card { width: 210px; }
  .principles, .prompt-grid, .workflow-grid, .gallery-grid { grid-template-columns: 1fr; }
  .principles article, .principles article:last-child { grid-column: auto; border-right: 0; border-top: 1px solid var(--line); }
  .principles article:first-child { border-top: 0; }
  .case-card:first-child { grid-column: auto; grid-row: auto; min-height: 380px; }
  .section { padding-block: 70px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 16px; }
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .cta, .support { align-items: flex-start; flex-direction: column; padding: 28px; }
  .support img { align-self: center; }
  .site-footer { flex-direction: column; gap: 8px; }
}
