/* ===== GalTrans 样式表 ===== */

:root {
  --bg: #141417;
  --bg-card: #1c1c20;
  --bg-card-alt: #222228;
  --border: #2a2a32;
  --border-light: #383842;
  --text: #e4e4ec;
  --text-secondary: #9c9ca8;
  --text-muted: #6c6c7a;
  --accent: #6898bb;
  --accent-text: #84b0d0;
  --green: #5fad6b;
  --orange: #e0934a;
  --blue: #5f99c9;
  --red: #d9655b;
  --pink: #d47a95;
  --radius: 6px;
  --radius-sm: 3px;
  --font: system-ui, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* subtle grain overlay to break the flat AI look */
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--accent-text);
  text-decoration: none;
}
a:hover { color: var(--accent); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(22,22,19,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--bg-card); text-decoration: none; }
.nav-links a.active {
  color: var(--accent);
  background: rgba(224,119,72,0.08);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 12px;
}

/* ===== Hero ===== */
.hero {
  padding: 72px 20px 56px;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 3px 12px;
  border: 1px solid var(--border-light);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 750;
  line-height: 1.35;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
.hero h1 .hl {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.hero > p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.65;
}

.hero-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #5588a8;
  color: #fff;
}

.btn-hero {
  background: var(--accent);
  color: #fff;
  padding: 14px 36px;
  font-size: 1.08rem;
  border-radius: var(--radius);
  border: none;
  box-shadow: 0 0 0 4px rgba(104,152,187,0.18);
}
.btn-hero:hover {
  background: #5588a8;
  color: #fff;
  box-shadow: 0 0 0 6px rgba(104,152,187,0.25);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
  color: var(--text);
}

/* ===== Container ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Section ===== */
.section {
  padding: 56px 0;
}

.section-header {
  margin-bottom: 42px;
}
.section-header h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 0.93rem;
}

/* ===== Cards Grid ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card:hover { border-color: var(--border-light); }

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 14px;
  font-weight: 700;
  color: var(--text);
}
.card-icon.accent  { background: rgba(104,152,187,0.12);  color: var(--accent); }
.card-icon.green   { background: rgba(95,173,107,0.1);   color: var(--green); }
.card-icon.blue    { background: rgba(95,153,201,0.1);   color: var(--blue); }
.card-icon.orange  { background: rgba(224,147,74,0.1);   color: var(--orange); }
.card-icon.pink    { background: rgba(212,122,149,0.1);  color: var(--pink); }

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  font-weight: 650;
}
.card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ===== Navigation Grid (homepage quick links) ===== */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.nav-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.nav-group-title {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.nav-group-list {
  list-style: none;
  padding: 0;
}
.nav-group-list li {
  margin-bottom: 6px;
}
.nav-group-list li:last-child {
  margin-bottom: 0;
}
.nav-group-list a {
  display: block;
  padding: 6px 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-group-list a span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
}
.nav-group-list a:hover {
  color: var(--accent);
  text-decoration: none;
}
.nav-group-list a:hover span {
  color: var(--text-secondary);
}

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

/* ===== Content Cards ===== */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.content-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== Prompt Cards ===== */
.prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.prompt-card:hover { border-color: var(--border-light); }

.prompt-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prompt-tag {
  font-size: 0.73rem;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.prompt-tag.pure-love { background: rgba(212,122,149,0.12); color: var(--pink); }
.prompt-tag.plot     { background: rgba(95,153,201,0.12);  color: var(--blue); }
.prompt-tag.nukige   { background: rgba(224,147,74,0.12);  color: var(--orange); }
.prompt-tag.mystery  { background: rgba(104,152,187,0.12);  color: var(--accent); }
.prompt-tag.comedy   { background: rgba(95,173,107,0.12);  color: var(--green); }

.prompt-body {
  padding: 20px;
}

.prompt-body pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  margin-top: 12px;
}
.copy-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.copy-btn.copied {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* ===== Tables ===== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead th {
  background: var(--bg-card);
  padding: 12px 14px;
  text-align: left;
  font-weight: 650;
  border-bottom: 2px solid var(--border-light);
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:hover { background: var(--bg-card-alt); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 600;
}
.badge.good { background: rgba(95,173,107,0.15);  color: var(--green); }
.badge.mid  { background: rgba(224,147,74,0.15);  color: var(--orange); }
.badge.bad  { background: rgba(217,101,91,0.15);  color: var(--red); }

/* ===== FAQ ===== */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-q {
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.93rem;
  user-select: none;
}
.faq-q:hover { background: var(--bg-card-alt); }

.faq-q::after {
  content: '+';
  font-size: 1.1rem;
  color: var(--text-muted);
}
.faq-item.open .faq-q::after { content: '\2212'; }

.faq-a {
  padding: 0 20px 14px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  display: none;
}
.faq-item.open .faq-a { display: block; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 20px;
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.83rem;
}
.footer a { color: var(--text-secondary); }

/* ===== Search ===== */
.search-box {
  position: relative;
  max-width: 480px;
  margin: 0 auto 28px;
}

.search-box input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.93rem;
  font-family: var(--font);
  outline: none;
}
.search-box input:focus { border-color: var(--accent); }

.search-box .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

/* ===== Filter tags ===== */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}

.filter-tag {
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
}
.filter-tag:hover { border-color: var(--text-muted); color: var(--text); }
.filter-tag.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 18px 0 0;
  color: var(--text-muted);
  font-size: 0.83rem;
}
.breadcrumb a { color: var(--text-secondary); }

/* ===== Alert ===== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.88rem;
  border-left: 3px solid;
}
.alert.info    { background: var(--bg-card); border-left-color: var(--blue);   color: var(--text-secondary); }
.alert.warn    { background: var(--bg-card); border-left-color: var(--orange); color: var(--text-secondary); }
.alert.success { background: var(--bg-card); border-left-color: var(--green);  color: var(--text-secondary); }

/* ===== TOC ===== */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 28px;
}
.toc h4 {
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.toc ol {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  columns: 2;
  column-gap: 24px;
}
.toc ol li { margin-bottom: 3px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 10px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero { padding: 42px 20px 36px; }
  .hero h1 { font-size: 1.55rem; }

  .cards { grid-template-columns: 1fr; }
  .content-card { padding: 16px; }
  .toc ol { columns: 1; }
  table { font-size: 0.8rem; }
  thead th, tbody td { padding: 8px 10px; }
}

/* ===== Page Header ===== */
.page-header {
  padding: 42px 20px 28px;
}
.page-header h1 {
  font-size: 1.8rem;
  font-weight: 750;
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}
.page-header p {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* ===== Article Content ===== */
.article {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px 56px;
}

.article h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 38px 0 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}

.article h3 {
  font-size: 1.1rem;
  font-weight: 650;
  margin: 26px 0 10px;
}

.article p {
  margin-bottom: 14px;
  color: var(--text-secondary);
}

.article ul, .article ol {
  margin-bottom: 14px;
  padding-left: 22px;
  color: var(--text-secondary);
}

.article li { margin-bottom: 5px; }

.article code {
  background: var(--bg-card);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.84em;
  border: 1px solid var(--border);
}

.article pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  overflow-x: auto;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.article blockquote {
  border-left: 3px solid var(--accent);
  padding: 10px 18px;
  margin-bottom: 14px;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.article img {
  border-radius: var(--radius);
  margin: 14px 0;
}

.highlight-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0;
}

.highlight-box h4 { margin-bottom: 6px; color: var(--accent-text); }

/* extra utility: horizontal rule / spacer */
hr.plain {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}
