:root {
  --bg: #f4f7fb;
  --bg-dark: #0f172a;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --primary: #0078d7;
  --primary-dark: #005ea6;
  --accent: #0ea5e9;
  --border: #e2e8f0;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0078d7, #38bdf8);
  box-shadow: 0 10px 24px rgba(0, 120, 215, 0.25);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}

.brand-text strong {
  display: block;
  font-size: 17px;
}

.brand-text span {
  color: var(--text-muted);
  font-size: 13px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}

.site-nav a {
  color: var(--text);
}

.site-nav a:hover {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 120, 215, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 16px 34px rgba(0, 120, 215, 0.34);
}

.btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--border);
}

.hero {
  padding: 72px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 120, 215, 0.08);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.hero-meta strong {
  color: var(--text);
}

.hero-panel {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.mock-window {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #dbeafe;
  background: #eef6ff;
}

.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #f87171; }
.dot.yellow { background: #fbbf24; }
.dot.green { background: #34d399; }

.mock-title {
  margin-left: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.mock-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 320px;
}

.mock-sidebar {
  background: #fafafa;
  border-right: 1px solid var(--border);
  padding: 16px;
}

.mock-filter,
.mock-thumb-grid {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.mock-filter {
  height: 34px;
  margin-bottom: 12px;
}

.mock-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px;
  min-height: 240px;
}

.mock-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  border: 1px solid #bfdbfe;
}

.mock-viewer {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mock-tabs {
  display: flex;
  gap: 8px;
}

.mock-tab {
  padding: 8px 14px;
  border-radius: 8px 8px 0 0;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 12px;
}

.mock-tab.active {
  background: #334155;
  color: #fff;
  border-color: #334155;
}

.mock-canvas {
  flex: 1;
  border-radius: 14px;
  background: linear-gradient(180deg, #475569, #334155);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.section {
  padding: 72px 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 42px;
}

.section-header h2 {
  margin: 0 0 12px;
  font-size: 34px;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 17px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(0, 120, 215, 0.1);
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 14px;
}

.download-section {
  background: linear-gradient(180deg, #ffffff, #eef6ff);
}

.download-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.download-info h3 {
  margin-top: 0;
  font-size: 28px;
}

.download-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.download-list li {
  margin-bottom: 8px;
}

.download-side {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.version-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.file-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin: 12px 0 20px;
}

.file-meta div {
  margin-bottom: 6px;
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
}

.faq {
  display: grid;
  gap: 14px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.faq-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.82);
  padding: 42px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.site-footer h4 {
  margin: 0 0 12px;
  color: #fff;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* ===== 内容平台 ===== */

.site-nav a.active {
  color: var(--primary);
  font-weight: 600;
}

.hero-platform {
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
}

.section-muted {
  background: #eef2f7;
}

.section-header-left {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.platform-showcase {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.showcase-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.showcase-card.large {
  min-height: 200px;
  padding: 24px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.showcase-label {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  margin-bottom: 6px;
}

.showcase-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.showcase-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.showcase-card.small {
  aspect-ratio: 4 / 3;
}

.showcase-card.small.a {
  background: linear-gradient(135deg, #fde68a, #fbbf24);
}

.showcase-card.small.b {
  background: linear-gradient(135deg, #a7f3d0, #34d399);
}

.showcase-card.small.c {
  background: linear-gradient(135deg, #fbcfe8, #f472b6);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.collection-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.collection-link {
  display: block;
  color: inherit;
}

.collection-cover-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

.collection-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.collection-card:hover .collection-cover {
  transform: scale(1.04);
}

.collection-cover.is-placeholder {
  object-fit: cover;
}

.collection-body {
  padding: 18px 20px 20px;
}

.collection-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 120, 215, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
}

.collection-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.collection-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.collection-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collection-date {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.tag-filter {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tag-filter:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tag-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.empty-tip {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.cta-section {
  padding-top: 48px;
  padding-bottom: 72px;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 36px 40px;
  background: linear-gradient(135deg, #0078d7, #0ea5e9);
  border-radius: 24px;
  color: #fff;
  box-shadow: var(--shadow);
}

.cta-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.cta-card p {
  margin: 0;
  opacity: 0.9;
  max-width: 560px;
}

.cta-card .btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: none;
  flex-shrink: 0;
}

/* ===== 软件看图功能介绍 ===== */

.software-spotlight {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
}

.software-spotlight-copy h2 {
  margin: 0 0 14px;
  font-size: 32px;
}

.software-spotlight-copy p {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
}

.software-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.software-mini-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}

.software-mini-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.software-mini-item span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.viewer-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.viewer-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.viewer-detail-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.viewer-detail-card p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.viewer-detail-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
}

.format-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.format-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 120, 215, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.workflow-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.workflow-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.workflow-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

/* ===== 专题频道 ===== */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.topic-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.topic-card-link {
  display: block;
  padding: 24px;
  color: inherit;
  text-decoration: none;
}

.topic-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.topic-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.topic-card p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.topic-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.topic-open-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 120, 215, 0.1);
  color: var(--primary);
  font-weight: 600;
}

.topic-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  font-size: 12px;
  font-weight: 600;
}

.topic-page {
  padding: 32px 0 72px;
}

.topic-header h1 {
  margin: 8px 0 14px;
  font-size: 36px;
}

.topic-lead {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 760px;
}

.topic-cta-text {
  margin-top: 12px;
  color: #475569;
  line-height: 1.65;
  max-width: 760px;
}

.topic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.topic-stats {
  display: flex;
  gap: 18px;
  margin: 28px 0 32px;
}

.topic-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 22px;
  min-width: 120px;
}

.topic-stat strong {
  display: block;
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 4px;
}

.topic-stat span {
  color: var(--text-muted);
  font-size: 13px;
}

.gallery-topic-link {
  margin: 0 0 12px;
  font-size: 14px;
}

.gallery-topic-link a {
  color: var(--primary);
  text-decoration: none;
}

.gallery-topic-link a:hover {
  text-decoration: underline;
}

/* ===== 图集详情页 ===== */

.engage-meta-inline {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.card-engage {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.engagement-section {
  margin: 24px 0 32px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.engagement-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.engage-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
}

.engage-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.engage-btn.liked {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #dc2626;
}

.engage-meta {
  color: var(--text-muted);
  font-size: 14px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.comment-item {
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13px;
}

.comment-head strong {
  color: #0f172a;
}

.comment-date {
  color: var(--text-muted);
  font-size: 12px;
}

.comment-delete {
  margin-left: auto;
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
}

.comment-delete:hover {
  color: #ef4444;
}

.comment-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  white-space: pre-wrap;
}

.comment-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.btn-sm {
  align-self: flex-start;
  padding: 6px 14px;
  font-size: 13px;
}

.img-engage-bar {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.img-comment-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.img-comment-panel[hidden] {
  display: none !important;
}

.lightbox-engage {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.lightbox-engage-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.lightbox-engage .comment-form textarea {
  background: rgba(255, 255, 255, 0.95);
}

.lightbox-engage .comment-item {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.lightbox-engage .comment-body,
.lightbox-engage .comment-head strong {
  color: #f8fafc;
}

.lightbox-engage .comment-date {
  color: rgba(255, 255, 255, 0.65);
}

.lightbox-engage .comment-empty {
  color: rgba(255, 255, 255, 0.7);
}

.gallery-page {
  padding: 36px 0 72px;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.back-link:hover {
  color: var(--primary);
}

.gallery-header h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
}

.gallery-desc {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 17px;
  max-width: 720px;
}

.gallery-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #e2e8f0;
  cursor: zoom-in;
}

.gallery-open img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.gallery-item figcaption strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 4px;
}

/* ===== 灯箱 ===== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.lightbox.open {
  display: block;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 72px;
}

.lightbox-image-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.lightbox-image-wrap img {
  max-height: calc(100vh - 160px);
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-caption-wrap {
  text-align: center;
  color: #fff;
  padding-top: 16px;
  max-width: 640px;
}

#lightbox-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

#lightbox-caption {
  font-size: 14px;
  opacity: 0.8;
}

#lightbox-counter {
  margin-top: 8px;
  font-size: 13px;
  opacity: 0.6;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-close {
  top: 20px;
  right: 20px;
  line-height: 1;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

body.lightbox-open {
  overflow: hidden;
}

.footer-bottom.only {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* ===== 上传页 ===== */

.upload-page {
  padding: 36px 0 72px;
}

.upload-header h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 38px);
}

.upload-header p {
  margin: 0 0 24px;
  color: var(--text-muted);
  max-width: 720px;
}

.server-banner {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
}

.server-banner.checking {
  background: #f1f5f9;
  color: var(--text-muted);
}

.server-banner.ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.server-banner.error {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.server-banner code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

.upload-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.upload-tab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.upload-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.upload-panel {
  display: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.upload-panel.active {
  display: block;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.field em {
  color: #dc2626;
  font-style: normal;
}

.field input[type="text"],
.field textarea,
.field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.field textarea {
  resize: vertical;
  min-height: 88px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-field input {
  width: auto;
}

.field-hint {
  margin: -8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.dropzone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  min-height: 220px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-inner {
  padding: 36px 24px;
  text-align: center;
}

.dropzone-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(0, 120, 215, 0.1);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
}

.dropzone-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.upload-preview {
  margin-top: 18px;
}

.preview-count {
  font-size: 13px;
  color: var(--text-muted);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.preview-bulk {
  display: flex;
  gap: 8px;
}

.preview-bulk-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.preview-bulk-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.preview-item.is-public {
  border-color: #a7f3d0;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.15);
}

.preview-item.is-private {
  border-color: var(--border);
}

.preview-name {
  display: block;
  padding: 4px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-public-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #f8fafc;
  border-top: 1px solid var(--border);
}

.preview-public-toggle input {
  margin: 0;
}

.field-hint-box {
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  color: #1e40af;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.preview-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 11px;
}

.preview-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #e2e8f0;
}

.preview-item span,
.preview-item em {
  display: block;
  padding: 4px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-item em {
  color: var(--text-muted);
  font-style: normal;
  padding-top: 0;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.upload-status {
  font-size: 14px;
  color: var(--text-muted);
}

.upload-status.ok {
  color: #047857;
}

.upload-status.error {
  color: #dc2626;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.15s ease;
}

.progress-text {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 36px;
}

.upload-help {
  margin-top: 36px;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.upload-help h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.upload-help ol {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--text-muted);
}

.upload-help li {
  margin-bottom: 6px;
}

.upload-help code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.upload-help-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== 登录注册 ===== */

.auth-page {
  padding: 48px 0 72px;
}

.auth-card-wrap {
  max-width: 440px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 8px;
}

.auth-sub {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.form-status {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.form-status.error {
  color: #dc2626;
}

.auth-switch {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.nav-user {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-small {
  padding: 8px 14px;
  font-size: 13px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-public {
  background: #ecfdf5;
  color: #047857;
}

.badge-private {
  background: #f1f5f9;
  color: #475569;
}

.my-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.collection-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.collection-actions button {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.collection-actions button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.collection-owner {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.img-private-tag {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  font-style: normal;
}

.gallery-owner-tip {
  margin: 16px 0 0;
  padding: 12px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  font-size: 14px;
  color: #1e40af;
}

.figcaption-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.figcaption-top strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.img-vis-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.img-vis-badge.public {
  background: #ecfdf5;
  color: #047857;
}

.img-vis-badge.private {
  background: #f1f5f9;
  color: #64748b;
}

.img-owner-controls {
  margin-top: 10px;
}

.img-visibility-toggle {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
}

.img-visibility-toggle:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.img-visibility-toggle:disabled {
  opacity: 0.6;
  cursor: wait;
}

.lightbox-caption-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.lightbox-vis-toggle {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.lightbox-vis-toggle:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

@media (max-width: 960px) {
  .hero-grid,
  .download-card,
  .feature-grid,
  .steps,
  .footer-grid,
  .collection-grid,
  .gallery-grid,
  .cta-card,
  .software-spotlight,
  .viewer-detail-grid,
  .workflow-grid,
  .software-mini-grid {
    grid-template-columns: 1fr;
  }

  .cta-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .mock-body {
    grid-template-columns: 1fr;
  }

  .mock-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .site-nav {
    display: none;
  }

  .lightbox-dialog {
    padding: 16px 56px;
  }

  .collection-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .upload-grid {
    grid-template-columns: 1fr;
  }

  .preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .collection-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .showcase-row {
    grid-template-columns: 1fr;
  }
}
