/* ========== 微光计划 v2 · 紫色微光风格 ========== */

:root {
  --bg-deep: #1E1338;
  --bg-mid: #3D1F6B;
  --bg-light: #6C3BBF;
  --accent-gold: #D4AF37;
  --accent-purple: #8B5CF6;
  --text-primary: #F2F3F5;
  --text-secondary: #A0A4B8;
  --text-faint: #5A5F7B;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(212, 175, 55, 0.2);
  --radius: 16px;
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 50%, var(--bg-deep) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
}

/* ========== 背景层 ========== */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.glow-orb {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108, 59, 191, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* ========== 顶部导航 ========== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(30, 19, 56, 0.8);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-brand {
  font-family: 'Noto Serif SC', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s var(--transition);
}

.nav-links a:hover {
  color: var(--accent-gold);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========== 通用 ========== */
main {
  position: relative;
  z-index: 1;
  padding-top: 70px;
}

section {
  padding: 80px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 36px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 16px;
}

.faint {
  color: var(--text-faint);
  font-size: 13px;
}

/* ========== 按钮 ========== */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #B8941F);
  color: var(--bg-deep);
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.1);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
}

.btn-text:hover {
  color: var(--accent-gold);
}

.btn-text-faint {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 0;
  text-decoration: underline;
}

.btn-text-faint:hover {
  color: var(--text-secondary);
}

.btn-small {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s var(--transition);
}

.btn-small:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-large {
  padding: 16px 40px;
  font-size: 17px;
}

/* ========== Hero 首屏 ========== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 40px;
}

.hero-content {
  max-width: 700px;
}

.hero-title {
  font-size: 72px;
  font-weight: 900;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #FFF 50%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.hero-tags span {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ========== 验证卡片 ========== */
.auth-section {
  margin-top: 32px;
}

.auth-card {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.input-field {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  width: 160px;
  transition: border-color 0.3s var(--transition);
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.input-field::placeholder {
  color: var(--text-faint);
}

.auth-error {
  color: #FF6B6B;
  font-size: 14px;
  margin-bottom: 12px;
}

.apply-entry {
  margin-top: 16px;
}

.apply-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 12px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.apply-panel p {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.口令-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 16px;
  border-radius: 8px;
  margin: 12px 0;
}

.口令-box code {
  color: var(--accent-gold);
  font-size: 14px;
  flex: 1;
}

.口令-box.large {
  max-width: 400px;
  margin: 16px auto;
}

/* ========== 已登录用户区 ========== */
.user-section {
  margin-top: 32px;
}

.welcome-text {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.welcome-text span {
  color: var(--accent-gold);
  font-weight: 600;
}

.user-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== 星轨进度 ========== */
.progress-section {
  text-align: center;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.progress-header h2 {
  font-size: 28px;
}

.progress-count {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: 'Noto Serif SC', serif;
}

.progress-count span {
  font-size: 48px;
}

.star-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 24px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.star {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: all 0.5s var(--transition);
  cursor: pointer;
  position: relative;
}

.star.lit {
  background: radial-gradient(circle, #FFF 0%, var(--accent-gold) 40%, #B8941F 100%);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6), 0 0 24px rgba(212, 175, 55, 0.3);
  animation: starPulse 2s ease-in-out infinite;
}
@keyframes starPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(212, 175, 55, 0.6), 0 0 24px rgba(212, 175, 55, 0.3); }
  50% { box-shadow: 0 0 16px rgba(212, 175, 55, 0.8), 0 0 32px rgba(212, 175, 55, 0.4); }
}

.star.dim {
  background: rgba(90, 95, 123, 0.3);
  border: 1px solid rgba(90, 95, 123, 0.5);
}

.star:hover {
  transform: scale(1.3);
}

.star-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-deep);
  border: 1px solid var(--card-border);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}

.star:hover .star-tooltip {
  opacity: 1;
}
.star-tooltip .tooltip-id {
  color: var(--accent-gold);
  font-weight: 600;
  font-family: monospace;
}
.star-tooltip .tooltip-title {
  color: var(--text-primary);
}
.star-tooltip .tooltip-date {
  color: var(--text-faint);
  font-size: 11px;
  margin-left: 4px;
}

.progress-hint {
  margin-top: 8px;
}

/* ========== 公示博物馆 ========== */
.museum-filter {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s var(--transition);
}

.filter-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.filter-btn.active {
  background: var(--accent-gold);
  color: var(--bg-deep);
  border-color: var(--accent-gold);
  font-weight: 600;
}

.museum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.museum-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.4s var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.museum-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple));
  opacity: 0;
  transition: opacity 0.3s;
}

.museum-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-gold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.museum-card:hover::before {
  opacity: 1;
}

.museum-card-id {
  font-size: 13px;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.museum-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  line-height: 1.4;
}

.museum-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.museum-tag {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-purple);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.museum-tag.gold {
  background: rgba(212, 175, 55, 0.2);
  color: var(--accent-gold);
}

.museum-card-review {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
  margin-top: 12px;
}

.museum-empty {
  text-align: center;
  padding: 60px 20px;
  font-size: 16px;
  grid-column: 1 / -1;
}

/* ========== 内层工作台 ========== */
.inner-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  margin-top: 40px;
}

.requests-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.request-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s var(--transition);
}

.request-card:hover {
  border-color: var(--accent-gold);
}

.request-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.request-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-pending {
  background: rgba(212, 175, 55, 0.2);
  color: var(--accent-gold);
}

.status-processing {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-purple);
}

.status-completed {
  background: rgba(76, 175, 80, 0.2);
  color: #81C784;
}

.request-summary {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.request-meta {
  font-size: 13px;
  color: var(--text-faint);
}

/* ========== 提交表单 ========== */
.submit-form {
  max-width: 700px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.category-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--transition);
  font-size: 14px;
}

.category-card:hover {
  border-color: var(--accent-gold);
}

.category-card.selected {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 600;
}

.toggle-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.toggle-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
}

.toggle-option input[type="radio"] {
  accent-color: var(--accent-gold);
}

.textarea-field {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s var(--transition);
}

.textarea-field:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.textarea-field::placeholder {
  color: var(--text-faint);
}

.checkbox-group {
  margin-bottom: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-gold);
  width: 18px;
  height: 18px;
}

.checkbox-label a {
  color: var(--accent-gold);
  text-decoration: underline;
}

.submit-result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.submit-result.success {
  background: rgba(76, 175, 80, 0.15);
  color: #81C784;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.submit-result.error {
  background: rgba(255, 107, 107, 0.15);
  color: #FF6B6B;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

/* ========== 关于/公约/申请 ========== */
.about-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.about-block {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s var(--transition);
}

.about-block:hover {
  border-color: var(--card-border);
  transform: translateY(-4px);
}

.about-block h3 {
  font-size: 20px;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.about-block p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.terms-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px;
}

.terms-list {
  list-style: none;
  counter-reset: term;
}

.terms-list li {
  counter-increment: term;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.terms-list li:last-child {
  border-bottom: none;
}

.terms-list li::before {
  content: counter(term);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  margin-right: 12px;
  flex-shrink: 0;
}

.terms-list li strong {
  color: var(--text-primary);
}

.apply-content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.apply-content p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 15px;
}

/* ========== 页脚 ========== */
.site-footer {
  text-align: center;
  padding: 40px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 60px;
  position: relative;
  z-index: 1;
}

.site-footer p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 4px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .top-nav {
    padding: 12px 16px;
  }

  .nav-links {
    display: none;
  }

  section {
    padding: 60px 16px;
  }

  .hero-title {
    font-size: 48px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .auth-card {
    flex-direction: column;
    align-items: center;
  }

  .input-field {
    width: 100%;
    max-width: 280px;
  }

  .category-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .museum-grid {
    grid-template-columns: 1fr;
  }

  .progress-header {
    flex-direction: column;
    text-align: center;
  }

  .section-header h2 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }

  .hero-tags {
    gap: 8px;
  }

  .hero-tags span {
    font-size: 12px;
    padding: 4px 12px;
  }

  .star {
    width: 18px;
    height: 18px;
  }
}
