:root {
  --ink: #16151a;
  --charcoal: #221f26;
  --panel: #2a2730;
  --paper: #f2ede4;
  --tungsten: #e8a545;
  --tungsten-soft: rgba(232, 165, 69, 0.16);
  --ember: #c9622f;
  --line: rgba(242, 237, 228, 0.12);
  --text-dim: rgba(242, 237, 228, 0.6);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Noto Sans SC', sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 聚光灯签名效果:模拟摄影棚顶光 */
.stagelight {
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 900px;
  background: radial-gradient(ellipse at center, var(--tungsten-soft) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

header, main { position: relative; z-index: 1; }

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

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  font-family: 'Zhi Mang Xing', cursive;
  font-size: 30px;
  color: var(--tungsten);
}
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: 0.05em; }

.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.2s, background 0.2s;
}
.ghost-btn:hover { border-color: var(--tungsten); background: var(--tungsten-soft); }

.hero {
  max-width: 720px;
  margin: 40px auto 0;
  padding: 0 40px;
  text-align: center;
}

.eyebrow {
  color: var(--tungsten);
  letter-spacing: 0.2em;
  font-size: 13px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.25;
  font-weight: 900;
  margin: 0 0 20px;
}

.hl { color: var(--tungsten); }

.lede { color: var(--text-dim); font-size: 16px; line-height: 1.7; }

.studio {
  max-width: 920px;
  margin: 56px auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}

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

.film-frame {
  background: var(--charcoal);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--line);
  position: relative;
}

/* 胶片齿孔装饰,呼应暗房主题 */
.film-frame::before, .film-frame::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 10px;
  background-image: radial-gradient(circle, var(--ink) 3px, transparent 3px);
  background-size: 20px 10px;
  background-repeat: repeat-x;
}
.film-frame::before { top: 0; }
.film-frame::after { bottom: 0; }

.upload-zone {
  aspect-ratio: 4 / 3;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
  margin: 10px 0;
}
.upload-zone:hover { border-color: var(--tungsten); }

.upload-hint { text-align: center; color: var(--text-dim); }
.upload-icon { font-size: 40px; color: var(--tungsten); margin-bottom: 10px; }
.hint-sub { font-size: 13px; margin-top: 6px; }

.preview-img { width: 100%; height: 100%; object-fit: contain; }

.controls { display: flex; flex-direction: column; gap: 18px; justify-content: center; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 13px; color: var(--text-dim); }

.field input, .field select {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--tungsten);
}

.develop-btn {
  background: var(--tungsten);
  color: var(--ink);
  border: none;
  padding: 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.develop-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--tungsten-soft); }
.develop-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.develop-btn-cost { font-size: 12px; font-weight: 400; opacity: 0.75; }

.status-line { min-height: 20px; font-size: 13px; color: var(--text-dim); }
.status-line.error { color: var(--ember); }

.result {
  max-width: 640px;
  margin: 0 auto 80px;
  padding: 0 40px;
  text-align: center;
}
.result h2 { font-size: 20px; margin-bottom: 20px; }
.result-frame {
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.result-frame img { width: 100%; border-radius: 8px; display: block; }

/* 弹层 */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
}
  .modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  width: 340px;
  position: relative;
}
.modal-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab-btn {
  flex: 1;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.tab-btn.active { border-color: var(--tungsten); color: var(--tungsten); }

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form[hidden] { display: none; }
.auth-form input {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
}
.auth-form button {
  background: var(--tungsten);
  color: var(--ink);
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.auth-error { color: var(--ember); font-size: 13px; margin-top: 12px; min-height: 16px; }

.close-modal {
  position: absolute;
  top: 12px; right: 14px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
}

.account { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-dim); }
.points-badge {
  background: var(--tungsten-soft);
  color: var(--tungsten);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

/* ---- v2 新增样式 ---- */
.topnav { display: flex; gap: 24px; }
.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.nav-link.active, .nav-link:hover { color: var(--paper); border-color: var(--tungsten); }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 10px;
}
.preview-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.checkbox-row { display: flex; gap: 16px; margin-top: 4px; }
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  flex: 1;
}
.checkbox-item em { color: var(--tungsten); font-style: normal; font-weight: 700; margin-left: 4px; }

.progress-bar-outer {
  width: 100%;
  height: 8px;
  background: var(--panel);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-bar-inner {
  height: 100%;
  background: var(--tungsten);
  width: 0%;
  transition: width 0.4s ease;
}

.result-files {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.result-file-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--charcoal);
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: 10px;
  color: var(--paper);
  text-decoration: none;
}
.result-file-link:hover { border-color: var(--tungsten); }

/* 产品库页面 */
.product-grid {
  max-width: 1100px;
  margin: 40px auto 80px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.product-card img { width: 100%; border-radius: 8px; margin-bottom: 12px; background: var(--panel); }
.product-card h3 { font-size: 16px; margin: 0 0 6px; }
.product-card p { font-size: 13px; color: var(--text-dim); margin: 0 0 10px; }
.status-select {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.product-links { display: flex; gap: 8px; flex-wrap: wrap; }
.product-links a {
  font-size: 12px;
  color: var(--tungsten);
  text-decoration: none;
  border: 1px solid var(--tungsten);
  padding: 5px 10px;
  border-radius: 999px;
}
.empty-state { text-align: center; color: var(--text-dim); padding: 80px 20px; }

/* ---- 竞品雷达页面样式 ---- */
.upload-zone.compact { aspect-ratio: auto; height: 140px; margin: 0; }
.upload-zone.compact .preview-grid { grid-template-columns: repeat(3, 1fr); }

.report {
  max-width: 920px;
  margin: 60px auto 100px;
  padding: 0 40px;
}
.report h2 { font-size: 24px; margin-bottom: 24px; }

.score-row { display: flex; gap: 16px; margin-bottom: 40px; }
.score-card {
  flex: 1;
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.score-label { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.score-value { font-size: 42px; font-weight: 900; color: var(--tungsten); }
.score-value.dim { color: var(--text-dim); }

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
@media (max-width: 700px) { .analysis-grid { grid-template-columns: 1fr; } }

.analysis-col {
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.analysis-col h3 { font-size: 16px; margin-bottom: 16px; }
.analysis-sub { font-size: 13px; color: var(--tungsten); margin: 14px 0 8px; font-weight: 700; }
.analysis-col ul { margin: 0; padding-left: 20px; }
.analysis-col li { font-size: 14px; color: var(--text-dim); margin-bottom: 6px; line-height: 1.6; }

.strategy-title { font-size: 18px; margin-bottom: 16px; }
.strategy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .strategy-grid { grid-template-columns: 1fr; } }

.strategy-card {
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.strategy-card h4 { margin: 0; font-size: 16px; color: var(--tungsten); }
.strategy-card p { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.strategy-card ul { margin: 0; padding-left: 18px; }
.strategy-card li { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }
.strategy-apply-btn {
  margin-top: auto;
  background: var(--tungsten);
  color: var(--ink);
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
}
.strategy-apply-btn:disabled { opacity: 0.5; cursor: not-allowed; }
