:root {
  --brand: #ff5c5c;
  --brand-strong: #ff7474;
  --brand-weak: #ff8c8c;
  --bg: #0b0f1c;
  --bg-card: #11182b;
  --bg-card-2: #0f1322;
  --glass: rgba(255, 255, 255, 0.06);
  --text-primary: #f5f7ff;
  --text-secondary: #c7d0e9;
  --text-muted: #8ea0c7;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-lg: 24px;
  --radius-sm: 10px;
  --grid-gap: 16px;
  --content-max: 1180px;
  --transition: 160ms ease;
  --gradient: radial-gradient(circle at 20% 20%, rgba(255, 92, 92, 0.12), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(91, 200, 255, 0.12), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(255, 164, 92, 0.08), transparent 32%),
    linear-gradient(135deg, #0b0f1c 0%, #0c1121 40%, #0f162b 100%);
  --font-sans: "Inter", "SF Pro Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--gradient);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 20px 20px 64px;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(11, 15, 28, 0.7);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 20px !important; /* FIX: 覆盖 .shell 的 padding，保证垂直居中 */
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px; /* 调整圆角 */
  overflow: hidden;   /* 确保图片不溢出 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 保持比例 */
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--glass);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 12px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px; /* 增加间距 */
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--glass);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--border);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #ff5c5c, #ff8f70);
  color: #0c0f1a;
  box-shadow: 0 12px 30px rgba(255, 92, 92, 0.28);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.01);
}

.btn-disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-ghost {
  border-color: var(--border);
}

.hero {
  padding: 48px 0 32px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 36px;
  line-height: 1.12;
  letter-spacing: -0.5px;
}

.hero p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 640px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.hero-chip {
  padding: 14px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
}

/* Dashboard Styles */
.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: stretch;
}

.user-welcome {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.user-welcome h1 {
  font-size: 32px;
  margin: 0 0 24px;
  color: var(--text-primary);
}

.user-welcome h1 span {
  color: var(--brand-strong);
}

.credits-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  min-width: 240px;
}

.credits-card .label {
  color: var(--text-secondary);
  font-size: 14px;
}

.credits-card .value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.credits-actions {
  display: flex;
  gap: 8px;
}

.credits-card .value {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  font-family: monospace;
}

.user-products {
  background: rgba(17, 24, 43, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.user-products h3 {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 600;
}

.unlocked-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.unlocked-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(43, 212, 152, 0.1);
  border: 1px solid rgba(43, 212, 152, 0.2);
  border-radius: 12px;
  color: #7fe4c1;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition);
  cursor: pointer;
}

.unlocked-item:hover {
  background: rgba(43, 212, 152, 0.18);
  transform: translateY(-1px);
}

.empty-state {
  color: var(--text-muted);
  font-size: 14px;
  padding: 12px 0;
}

@media (max-width: 960px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)) border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 220px;
}

.card::after {
  content: "";
  position: absolute;
  inset: -20% -20% auto auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 92, 92, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover::after {
  opacity: 1;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.card .tagline {
  color: var(--text-secondary);
  margin: 0 0 16px;
  min-height: 44px;
}

.card .foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.card .foot .btn {
  flex: 1;
  justify-content: center;
}

.card .entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-weak);
  font-weight: 600;
  font-size: 13px;
}

.pill-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

/* 灵感值解锁按钮 - 卡片右上角 */
.credits-unlock-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 200, 92, 0.2), rgba(255, 164, 92, 0.15));
  border: 1px solid rgba(255, 200, 92, 0.4);
  color: #ffd07a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 160ms ease;
  white-space: nowrap;
}

.credits-unlock-btn:hover {
  background: linear-gradient(135deg, rgba(255, 200, 92, 0.35), rgba(255, 164, 92, 0.25));
  border-color: rgba(255, 200, 92, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 164, 92, 0.2);
}

.credits-unlock-btn:active {
  transform: translateY(0);
}

/* 移动端适配 */
@media (max-width: 600px) {
  .credits-unlock-btn {
    padding: 5px 10px;
    font-size: 11px;
  }
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
}

.badge-unlocked {
  background: rgba(43, 212, 152, 0.12);
  color: #7fe4c1;
  border-color: rgba(43, 212, 152, 0.35);
}

.badge-locked {
  background: rgba(255, 92, 92, 0.08);
  color: #ff9a9a;
  border-color: rgba(255, 92, 92, 0.35);
}

.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 14px;
  gap: 12px;
}

.products-header h2 {
  margin: 0;
  font-size: 22px;
}

.products-header .hint {
  color: var(--text-muted);
  font-size: 13px;
}

.status {
  color: var(--text-secondary);
  font-size: 14px; /* 稍微调大字体 */
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap; /* 防止换行 */
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2bd498;
  box-shadow: 0 0 12px rgba(43, 212, 152, 0.6);
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 15, 0.75);
  /* NOTE: 安卓（尤其 MIUI 浏览器）在软键盘触发 viewport resize 时，fixed + backdrop-filter 可能闪烁 */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms ease, visibility 0s linear 120ms;
}

.modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 120ms ease, visibility 0s linear 0s;
}

/* 触摸设备上禁用 backdrop-filter，避免软键盘/viewport resize 导致遮罩闪烁 */
@media (hover: none) and (pointer: coarse) {
  .modal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.modal-card {
  width: min(520px, 92vw);
  background: linear-gradient(160deg, rgba(17, 24, 43, 0.98), rgba(11, 15, 28, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color: var(--text-primary);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 18px;
}

.tab {
  background: var(--glass);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.tab.active {
  background: linear-gradient(135deg, #ff5c5c, #ff8f70);
  color: #0c0f1a;
  border-color: transparent;
}

.form {
  display: none;
}

.form.active {
  display: block;
}

.form .field {
  margin-bottom: 12px;
}

.form label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
}

.form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 15px;
}

.form input::placeholder {
  color: var(--text-muted);
}

.form input:focus {
  outline: 1px solid rgba(255, 92, 92, 0.6);
  border-color: rgba(255, 92, 92, 0.5);
}

.code-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.code-row input {
  flex: 1;
}

.code-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.secondary {
  color: var(--text-muted);
  font-size: 13px;
  margin: 6px 0 0;
}

.feedback {
  min-height: 22px;
  font-size: 13px;
  margin-top: 10px;
  color: var(--text-secondary);
}

.feedback.error {
  color: #ff7676;
}

.feedback.success {
  color: #2bd498;
}

.hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(43, 212, 152, 0.15);
  color: #9de9cb;
  border-radius: 999px;
  border: 1px solid rgba(43, 212, 152, 0.3);
  font-size: 12px;
  margin-left: 8px;
}

.toast {
  position: fixed;
  top: 18px;
  right: 18px;
  background: rgba(25, 32, 52, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
  z-index: 1100;
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 120ms;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 0s;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

  header {
    position: sticky;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 16px 16px 48px;
  }

  .nav {
    height: 62px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .card {
    min-height: 0;
  }

  .code-row {
    flex-direction: column;
    align-items: stretch;
  }

  .code-row .btn {
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  /* FIX: 修复移动端灵感值卡片按钮文字换行问题，增加宽度 */
  .credits-actions .btn {
    width: auto;
    min-width: 80px;
    white-space: nowrap;
    padding: 6px 16px !important;
  }

  /* 移动端用户菜单适配 */
  .user-menu {
    gap: 8px;
  }

  .dropdown-trigger {
    padding: 6px 10px;
  }

  .tier-badge {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* ========================================
   用户菜单样式 - 匹配 OCCard UserMenu
======================================== */
.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

#navCredits {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.tier-badge {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: var(--glass);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tier-badge.pro {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(249, 115, 22, 0.2));
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

/* 下拉触发按钮（含余额显示）- 参考 OCCard UserMenu */
.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  color: #9ca3af;
  transition: all 0.2s;
  font-size: 14px;
}

.dropdown-trigger svg {
  pointer-events: none;
}

.dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dropdown-trigger .dropdown-arrow {
  transition: transform 0.2s;
}

.dropdown-trigger.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  z-index: 9999;
  animation: slideDown 0.15s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.dropdown-item:hover {
  background: var(--glass);
  color: var(--text-primary);
}

.dropdown-item.danger:hover {
  background: rgba(255, 92, 92, 0.1);
  color: var(--brand);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--glass);
}

.dropdown-header .tier-label {
  font-size: 12px;
  color: var(--text-muted);
}

.dropdown-header .tier-value {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.dropdown-header .tier-value.pro {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
}

.dropdown-header .tier-value.basic {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

/* ========================================
   OCCard Hero Section - C位旗舰样式
======================================== */
.hero-occard {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-card {
  max-width: 600px;
  width: 100%;
  text-align: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px;
  box-shadow: var(--shadow);
}

.hero-header {
  margin-bottom: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255, 92, 92, 0.15), rgba(255, 143, 112, 0.15));
  border: 1px solid rgba(255, 92, 92, 0.3);
  border-radius: 999px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-title {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.2;
  color: var(--text-primary);
}

.hero-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* Pro 津贴提示 */
.hero-allowance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(249, 115, 22, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 12px;
  margin-bottom: 24px;
  /* 宽度自适应内容并居中 */
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.allowance-icon {
  font-size: 18px;
}

.allowance-text {
  color: var(--text-secondary);
  font-size: 14px;
}

.allowance-value {
  color: #fbbf24;
  font-weight: 700;
  font-size: 18px;
}

.allowance-unit {
  color: var(--text-muted);
  font-size: 14px;
}

.allowance-hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-left: 4px;
}

/* 行动按钮 */
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 15px;
  border-radius: 12px;
}

.btn-secondary {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.slot-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  margin-left: 6px;
}

/* 游客提示 */
.hero-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.unlock-link {
  color: var(--brand-weak);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color var(--transition);
}

.unlock-link:hover {
  color: var(--brand-strong);
}

/* ============================================
   模板橱窗广告位 - 紧跟 hero-card
   ============================================ */
.template-promo-banner {
  max-width: 600px;
  width: 100%;
  margin-top: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow: hidden;
  position: relative;
}

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

.promo-title {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.promo-title .fire-icon {
  font-size: 14px;
}

.promo-title .highlight {
  color: #FFD700;
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
}

.promo-link {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition);
}

.promo-link:hover {
  color: var(--text-secondary);
}

/* --- 滚动轨道 --- */
.marquee-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.marquee-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: scrollLeft 35s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- 迷你卡片通用样式 --- */
.mini-card {
  width: 60px;
  height: 75px;
  border-radius: 8px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-2px) scale(1.03);
}

.mini-tag {
  position: absolute;
  top: 3px;
  left: 3px;
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 500;
  z-index: 2;
}

.mini-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  z-index: 1;
}

/* --- 风格化卡片 --- */

/* 水墨国潮 */
.style-ink {
  background: linear-gradient(135deg, #F5EDE0 0%, #E8DFD0 100%);
  border: 1px solid #C41E3A;
}
.style-ink .mini-tag {
  background: #2B2B2B;
  color: #fff;
  writing-mode: vertical-rl;
  right: 3px;
  left: auto;
  padding: 3px 2px;
}
.style-ink .mini-avatar {
  border: 1px solid #2B2B2B;
  color: #2B2B2B;
  font-family: serif;
  background: rgba(255,255,255,0.8);
}
.style-ink .mini-decor {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 10px;
  height: 10px;
  border: 1px solid #C41E3A;
  opacity: 0.5;
  border-radius: 2px;
}

/* 赛博酸性 */
.style-cyber {
  background: #0a0a0a;
  border: 1px solid #00FF41;
  box-shadow: 0 0 6px rgba(0, 255, 65, 0.15);
}
.style-cyber .mini-tag {
  background: #00FF41;
  color: #000;
  font-weight: 700;
  font-family: monospace;
}
.style-cyber .mini-avatar {
  border: 1px dashed #00FF41;
  color: #00FF41;
  font-family: monospace;
  font-size: 7px;
}

/* 甜美梦幻 */
.style-sweet {
  background: linear-gradient(135deg, #FFE4EC 0%, #E8F4FF 100%);
  border: 1px solid rgba(255,255,255,0.6);
}
.style-sweet .mini-tag {
  background: #fff;
  color: #FF6B8A;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(255,107,138,0.2);
}
.style-sweet .mini-avatar {
  background: #fff;
  border: 2px solid #FFB6C1;
  font-size: 12px;
}

/* 暗黑哥特 */
.style-gothic {
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 1px solid #8B0000;
}
.style-gothic .mini-tag {
  background: #8B0000;
  color: #fff;
  font-family: serif;
}
.style-gothic .mini-avatar {
  border: 1px solid #8B0000;
  color: #8B0000;
  background: rgba(0,0,0,0.5);
  font-size: 12px;
}

/* 拼贴手账 */
.style-paper {
  background: #F5F0E6;
  border: 1px solid #D4C5A9;
  overflow: hidden;
}
.style-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(#bbb 1px, transparent 1px);
  background-size: 5px 5px;
  opacity: 0.25;
}
.style-paper .mini-tag {
  background: #333;
  color: #fff;
  transform: rotate(-3deg);
}
.style-paper .mini-avatar {
  background: #fff;
  border: 1px solid #ccc;
  transform: rotate(2deg);
  box-shadow: 1px 1px 3px rgba(0,0,0,0.15);
  font-size: 12px;
}

/* 万能极简 */
.style-minimal {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
}
.style-minimal .mini-tag {
  border: 1px solid #ddd;
  color: #888;
  background: #fff;
}
.style-minimal .mini-avatar {
  background: #F8F8F8;
  border: 1px solid #eee;
}

/* 温暖治愈 */
.style-warm {
  background: linear-gradient(135deg, #FFF9F5 0%, #FEF3E8 100%);
  border: 1px solid #F5A623;
}
.style-warm .mini-tag {
  background: #F5A623;
  color: #fff;
}
.style-warm .mini-avatar {
  background: #fff;
  border: 2px solid #F5A623;
}

/* 复古学院 */
.style-vintage {
  background: linear-gradient(135deg, #F5F1E6 0%, #EAE5D9 100%);
  border: 1px solid #A0522D;
}
.style-vintage .mini-tag {
  background: #A0522D;
  color: #fff;
  font-family: Georgia, serif;
}
.style-vintage .mini-avatar {
  background: #EAE5D9;
  border: 1px double #A0522D;
}

/* 新中式国潮 */
.style-neo {
  background: linear-gradient(135deg, #F2E6D8 0%, #E8D9C5 100%);
  border: 1px solid #B22222;
}
.style-neo .mini-tag {
  background: #B22222;
  color: #fff;
}
.style-neo .mini-avatar {
  background: rgba(255,255,255,0.8);
  border: 1px solid #2B2B2B;
}

/* 复古都市 City Pop */
.style-citypop {
  background: linear-gradient(135deg, #662D8C 0%, #4A1D6B 100%);
  border: 2px solid #ED1E79;
}
.style-citypop .mini-tag {
  background: #ED1E79;
  color: #fff;
  font-weight: 700;
}
.style-citypop .mini-avatar {
  background: rgba(255,255,255,0.9);
  border: 1px solid #00FFFF;
}

/* 神圣西幻 */
.style-holy {
  background: linear-gradient(135deg, #FDFBF7 0%, #F5F0E6 100%);
  border: 1px solid #D4AF37;
}
.style-holy .mini-tag {
  background: #D4AF37;
  color: #fff;
}
.style-holy .mini-avatar {
  background: #fff;
  border: 1px solid #D4AF37;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* 机能档案 */
.style-utility {
  background: #F4F4F4;
  border: 2px solid #000;
}
.style-utility .mini-tag {
  background: #000;
  color: #fff;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 7px;
  text-transform: uppercase;
}
.style-utility .mini-avatar {
  background: #fff;
  border: 1px solid #000;
}

/* 移动端适配 */
@media (max-width: 640px) {
  .hero-occard {
    padding: 32px 16px;
  }

  .hero-card {
    padding: 28px 20px;
  }

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

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

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions .btn-lg {
    width: 100%;
  }

  .hero-allowance {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
  }

  /* 橱窗广告位移动端适配 */
  .template-promo-banner {
    margin-top: 10px;
    padding: 12px 14px;
  }

  .promo-title {
    font-size: 12px;
  }

  .promo-title .highlight {
    font-size: 14px;
  }

  .mini-card {
    width: 52px;
    height: 65px;
  }

  .mini-avatar {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }

  .mini-tag {
    font-size: 7px;
    padding: 1px 3px;
  }
}

/* ========================================
   Banner 轮播区
======================================== */
.banner-carousel {
  padding: 20px 0;
}

.banner-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
}

.banner-slides {
  display: flex;
  transition: transform 0.4s ease;
}

.banner-slide {
  min-width: 100%;
  aspect-ratio: 21/9;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}

.banner-slide.active {
  display: flex;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.banner-slide a.banner-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  cursor: pointer;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.banner-dot.active {
  background: var(--brand);
  border-color: var(--brand);
  transform: scale(1.2);
}

/* Banner 公告弹窗样式 - 正式公告风格 */
.banner-modal-card {
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  background: #1a1f2e; /* 深色不透明背景 */
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.banner-modal-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  padding: 20px 24px;
  position: relative;
}

.banner-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.banner-modal-title::before {
  content: '📢';
  font-size: 20px;
}

.banner-modal-body {
  padding: 24px;
}

.banner-modal-content {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
}

.banner-modal-content h1,
.banner-modal-content h2,
.banner-modal-content h3 {
  color: #fff;
  margin: 20px 0 10px;
  font-weight: 600;
}

.banner-modal-content h1 { font-size: 1.4em; }
.banner-modal-content h2 { font-size: 1.2em; }
.banner-modal-content h3 { font-size: 1.05em; }

.banner-modal-content p {
  margin: 12px 0;
}

.banner-modal-content a {
  color: #818cf8;
  text-decoration: none;
  border-bottom: 1px solid rgba(129, 140, 248, 0.3);
  transition: all 0.2s;
}

.banner-modal-content a:hover {
  color: #a5b4fc;
  border-bottom-color: rgba(165, 180, 252, 0.5);
}

.banner-modal-content ul,
.banner-modal-content ol {
  padding-left: 24px;
  margin: 12px 0;
}

.banner-modal-content li {
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.8);
}

.banner-modal-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 16px 0;
}

.banner-modal-content strong {
  color: #fff;
  font-weight: 600;
}

.banner-modal-content em {
  color: rgba(255, 255, 255, 0.7);
}

/* 公告弹窗关闭按钮 */
.banner-modal-card .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.banner-modal-card .modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ========================================
   Growth HUD - 签到/邀请/余额卡片
======================================== */
.growth-hud {
  padding: 16px 0;
}

.growth-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.growth-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.growth-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.growth-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.growth-content {
  flex: 1;
  min-width: 0;
}

.growth-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.growth-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.growth-hint {
  font-size: 14px;
  color: #2bd498;
  margin-left: 4px;
}

.growth-action {
  padding: 8px 16px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.growth-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.growth-action.btn-primary {
  background: linear-gradient(135deg, #ff5c5c, #ff8f70);
  color: #0c0f1a;
  border: none;
}

.growth-action.btn-primary:hover {
  transform: translateY(-1px);
}

.growth-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* 签到卡片特殊样式 */
.checkin-card.checked .growth-action {
  background: rgba(43, 212, 152, 0.15);
  color: #7fe4c1;
  border-color: rgba(43, 212, 152, 0.3);
  cursor: default;
}

/* ========================================
   主操作行 - 余额+签到+津贴 三等分布局
======================================== */
.main-actions-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 0 !important;
}

.main-actions-row.two-cols {
  grid-template-columns: repeat(2, 1fr);
}

.main-actions-row .action-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  gap: 6px;
  position: relative;
}

/* Pro 角标 */
.action-cell .pro-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  color: #0c0f1a;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-actions-row .action-cell:last-child {
  border-right: none;
}

.action-cell .cell-icon {
  font-size: 22px;
  line-height: 1;
}

.action-cell .cell-icon svg {
  width: 22px;
  height: 22px;
}

.action-cell .cell-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.action-cell .cell-label {
  font-size: 11px;
  color: var(--text-muted);
}

.action-cell .cell-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.action-cell .cell-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.action-cell .cell-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.action-cell .cell-btn.btn-primary {
  background: linear-gradient(135deg, #ff5c5c, #ff8f70);
  color: #0c0f1a;
  border: none;
}

.action-cell .cell-btn.btn-primary:hover {
  transform: translateY(-1px);
}

.action-cell .cell-btn.btn-accent {
  background: linear-gradient(135deg, #2bd498, #1fa880);
  color: #0c0f1a;
  border: none;
}

.action-cell .cell-btn.btn-accent:hover {
  transform: translateY(-1px);
}

.action-cell .cell-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.action-cell .cell-btn.claimed {
  background: rgba(43, 212, 152, 0.15);
  color: #7fe4c1;
  border: 1px solid rgba(43, 212, 152, 0.3);
}

/* 邀请卡片特殊样式 */
.invite-card .growth-action.copied {
  background: rgba(43, 212, 152, 0.15);
  color: #7fe4c1;
  border-color: rgba(43, 212, 152, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .growth-cards {
    flex-direction: column;
    gap: 12px;
  }

  .growth-card {
    width: 100%;
    padding: 14px 16px;
  }

  .growth-icon {
    font-size: 24px;
  }

  .growth-value {
    font-size: 16px;
  }

  /* 主操作行在移动端保持一行三等分/两等分，宽度与邀请卡片对齐 */
  .main-actions-row {
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .main-actions-row.two-cols {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .main-actions-row .action-cell {
    padding: 12px 6px;
  }

  .action-cell .cell-icon {
    font-size: 20px;
  }

  .action-cell .cell-icon svg {
    width: 20px;
    height: 20px;
  }

  .action-cell .cell-value {
    font-size: 14px;
  }

  .action-cell .cell-btn {
    padding: 5px 10px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .banner-carousel {
    padding: 16px 0;
  }

  .banner-slide {
    aspect-ratio: 16/9;
  }
}

/* ========================================
   Growth Bar - 底部固定邀请条
======================================== */
.growth-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(to right, rgba(88, 28, 135, 0.95), rgba(67, 56, 202, 0.95));
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.growth-bar-icon {
  font-size: 1.25rem;
}

.growth-bar-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

.growth-bar-copy {
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(234, 179, 8, 0.2);
  color: #fcd34d;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.growth-bar-copy:hover {
  background: rgba(234, 179, 8, 0.3);
}

.growth-bar-copy:active {
  transform: scale(0.98);
}

/* 移动端适配 - 保持一行 */
@media (max-width: 640px) {
  .growth-bar {
    gap: 8px;
    padding: 10px 12px;
  }

  .growth-bar-icon {
    font-size: 1rem;
  }

  .growth-bar-text {
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .growth-bar-copy {
    font-size: 0.7rem;
    padding: 5px 10px;
    white-space: nowrap;
  }

  /* 确保页面底部有足够空间 */
  .shell {
    padding-bottom: 56px;
  }
}

/* ========================================
   Growth 弹窗样式 - 灵感记录/签到日历/邀请记录
======================================== */

/* 大尺寸弹窗卡片 */
.modal-card-lg {
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text-primary);
}

.modal-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

/* 按钮小尺寸 */
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ========================================
   灵感记录弹窗
======================================== */
.credits-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(249, 115, 22, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 12px;
  margin-bottom: 20px;
}

.credits-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 28px;
  font-weight: 700;
  color: #fbbf24;
  flex-shrink: 0;
}

.credits-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.credits-summary .btn {
  flex-shrink: 0;
  flex-grow: 0;
  width: auto;
  min-width: 60px;
  max-width: 80px;
  padding: 8px 12px;
  font-size: 13px;
}

/* 赠送预览 */
.gift-preview {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.preview-row + .preview-row {
  border-top: 1px solid var(--border);
}

.preview-label {
  color: var(--text-muted);
  font-size: 14px;
}

.preview-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* 历史记录列表 */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

.history-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-title {
  font-size: 14px;
  color: var(--text-primary);
}

.history-time {
  font-size: 12px;
  color: var(--text-muted);
}

.history-amount {
  font-size: 16px;
  font-weight: 600;
}

.history-amount.positive {
  color: #22c55e;
}

.history-amount.negative {
  color: #ef4444;
}

/* ========================================
   签到日历弹窗
======================================== */
.checkin-stats {
  display: flex;
  justify-content: space-around;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
}

.checkin-stat {
  text-align: center;
}

.checkin-stat .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.checkin-stat .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.checkin-stat.highlight .stat-value {
  color: #fbbf24;
}

/* 日历容器 */
.calendar-container {
  margin-bottom: 20px;
}

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

.calendar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.calendar-nav {
  display: flex;
  gap: 8px;
}

.calendar-nav button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-nav button:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.calendar-weekday {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  position: relative;
}

.calendar-day.other-month {
  color: var(--text-muted);
  opacity: 0.3;
}

.calendar-day.today {
  border-color: var(--brand);
  color: var(--text-primary);
}

.calendar-day.checked {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.2));
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.calendar-day.checked::after {
  content: '✓';
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 10px;
  color: #22c55e;
}

.calendar-day .day-reward {
  font-size: 10px;
  color: #fbbf24;
  margin-top: 2px;
}

/* 签到规则 */
.checkin-rules {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.rules-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.rule-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.rule-item.highlight {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(249, 115, 22, 0.15));
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.rule-day {
  font-size: 10px;
  color: var(--text-muted);
}

.rule-reward {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
}

.rules-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ========================================
   邀请记录弹窗
======================================== */
.invite-summary {
  display: flex;
  justify-content: space-around;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
}

.invite-stat {
  text-align: center;
}

.invite-stat .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.invite-stat .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.invite-stat.highlight .stat-value {
  color: #fbbf24;
}

.invite-code-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 12px;
  margin-bottom: 20px;
}

.invite-code-label {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.invite-code-value {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
  color: #a78bfa;
  letter-spacing: 2px;
}

.invite-code-box .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.invite-code-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

/* 移动端邀请码区域适配 */
@media (max-width: 640px) {
  .invite-code-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }

  .invite-code-label {
    font-size: 12px;
  }

  .invite-code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }

  .invite-code-value {
    font-size: 18px;
  }

  .invite-code-box .btn {
    padding: 6px 12px;
    font-size: 13px;
    flex-shrink: 0;
    width: auto;
    flex-grow: 0;
  }
}

/* 邀请记录项 */
.invite-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.invite-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
}

.invite-info {
  flex: 1;
}

.invite-phone {
  font-size: 14px;
  color: var(--text-primary);
}

.invite-time {
  font-size: 12px;
  color: var(--text-muted);
}

.invite-reward {
  font-size: 14px;
  font-weight: 600;
  color: #22c55e;
}

.invite-reward.granted {
  color: #22c55e;
}

.invite-reward.pending {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.invite-reward.pending .pending-text {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
}

.invite-reward.pending .pending-hint {
  color: #6b7280;
  font-size: 10px;
  font-weight: 400;
}

/* 卡片可点击样式 */
.growth-card.clickable {
  cursor: pointer;
  transition: all 0.2s;
}

.growth-card.clickable:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.growth-card.clickable:active {
  transform: translateY(0);
}

/* action-cell 可点击样式 */
.action-cell.clickable {
  cursor: pointer;
  transition: background 0.2s;
}

.action-cell.clickable:hover {
  background: rgba(255, 255, 255, 0.05);
}

.action-cell.clickable:active {
  background: rgba(255, 255, 255, 0.08);
}

/* 移动端适配 */
@media (max-width: 640px) {
  .modal-card-lg {
    max-height: 85vh;
    width: 95%;
  }

  .modal-body {
    padding: 16px;
  }

  .credits-balance {
    font-size: 24px;
  }

  .rules-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }

  .rule-item {
    padding: 6px 2px;
  }

  .rule-day {
    font-size: 9px;
  }

  .rule-reward {
    font-size: 11px;
  }

  .calendar-day {
    font-size: 12px;
  }

  .calendar-day .day-reward {
    font-size: 8px;
  }
}

/* 隐私政策说明 */
.privacy-notice {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
}

.privacy-notice a {
  color: #9ca3af;
  text-decoration: underline;
  margin: 0 4px;
  transition: color var(--transition);
}

.privacy-notice a:hover {
  color: #d1d5db;
}

/* 输入提示文字 */
.input-hint {
  margin-top: -4px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* ========================================
   登录弹窗 - 带图标的输入框样式
======================================== */
.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
  z-index: 1;
}

.input-with-icon {
  padding-left: 42px !important;
}

.input-with-icon.has-btn {
  padding-right: 100px !important;
}

/* 内嵌在输入框内的按钮 */
.input-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: var(--brand);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
  white-space: nowrap;
}

.input-btn:hover {
  color: var(--brand-strong);
}

.input-btn:disabled {
  color: #6b7280;
  cursor: not-allowed;
}

/* 底部提示链接 */
.form-footer-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}

.link-highlight {
  background: none;
  border: none;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  transition: color var(--transition);
}

.link-highlight:hover {
  color: var(--brand-strong);
}

/* 新用户提示 */
.new-user-hint {
  text-align: center;
  color: var(--brand);
  font-size: 14px;
  margin: 8px 0;
}

/* ========================================
   灵感值不足弹窗 (RechargeModal)
======================================== */
#rechargeModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 15, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  padding: 16px;
}

#rechargeModal.show {
  display: flex;
}

.recharge-modal {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(160deg, rgba(17, 24, 43, 0.98), rgba(11, 15, 28, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.recharge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.recharge-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.recharge-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

.recharge-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.recharge-body {
  padding: 20px;
}

.recharge-message {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.recharge-message strong {
  color: var(--brand);
  font-weight: 600;
}

.recharge-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  text-align: center;
}

.recharge-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.recharge-icon {
  font-size: 18px;
}

.recharge-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.recharge-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.recharge-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.recharge-btn.primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
}

.recharge-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.recharge-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.recharge-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(99, 102, 241, 0.5);
}

.recharge-footer {
  padding: 0 20px 20px;
}

.recharge-btn.ghost {
  background: transparent;
  color: var(--text-secondary);
}

.recharge-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* ========================================
   ICP备案 Footer
======================================== */
.site-footer {
  text-align: center;
  padding: 20px 0 80px; /* 底部留出 growth-bar 空间 */
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

.site-footer a:hover {
  color: var(--text-secondary);
}

/* ========================================
   权益弹窗样式
======================================== */

/* 解锁快捷定位 */
.unlock-shortcut {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
}

.unlock-shortcut-header {
  font-size: 13px;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 12px;
}

.unlock-shortcut-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unlock-shortcut-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.unlock-shortcut-content {
  flex: 1;
  min-width: 0;
}

.unlock-shortcut-title {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
}

.unlock-shortcut-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

.benefits-section {
  margin-bottom: 20px;
}

.benefits-section:last-child {
  margin-bottom: 0;
}

.benefits-section h4 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

.benefit-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.benefit-item.highlight {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 146, 60, 0.1));
  border-color: rgba(251, 191, 36, 0.4);
  border-width: 2px;
  padding: 13px 15px; /* Adjust for 2px border */
}

.benefit-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.benefit-content {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.benefit-title {
  font-weight: 600;
  font-size: 15px;
  color: #f1f5f9;
  margin-bottom: 6px;
  line-height: 1.3;
}

.benefit-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #94a3b8;
}

.benefit-action {
  flex-shrink: 0;
  margin-top: 6px;
  white-space: nowrap;
}

#benefitsModal .modal-body {
  padding: 20px 24px;
}

#benefitsModal .modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 24px !important;
  text-align: center;
}

/* 移动端适配 */
@media (max-width: 640px) {
  .benefit-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .benefit-icon {
    font-size: 24px;
  }

  .benefit-content {
    padding-top: 0;
  }

  .benefit-item .benefit-action {
    margin-top: 0;
    width: 100%;
  }

  .benefit-item .benefit-action .btn {
    width: 100%;
  }

  /* 解锁快捷区按钮保持原样 */
  .unlock-shortcut-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .unlock-shortcut-content {
    width: 100%;
  }

  .unlock-shortcut-item .benefit-action {
    width: 100%;
    margin-top: 8px;
  }

  #benefitsModal .modal-body {
    padding: 16px 20px;
  }

  #benefitsModal .modal-footer {
    padding: 12px 20px !important;
  }
}

/* ============================================================
   PWA 安装引导
   ============================================================ */

/* PWA 悬浮按钮 */
.pwa-fab {
  position: fixed;
  bottom: 80px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 100;
  animation: pwa-fab-bounce 2s ease-in-out infinite;
}

.pwa-fab-icon {
  font-size: 20px;
}

.pwa-fab-text {
  font-size: 14px;
  font-weight: 500;
}

@keyframes pwa-fab-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* PWA 引导弹窗 */
.pwa-modal-card {
  max-width: 320px;
  text-align: center;
}

.pwa-modal-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.pwa-modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.pwa-guide-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
  text-align: left;
}

.pwa-guide-step {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-step-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pwa-modal-reward {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 8px;
  margin: 16px 0;
}

.pwa-modal-reward .reward-icon {
  font-size: 18px;
}

.pwa-modal-reward .reward-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.ios-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #007AFF;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  vertical-align: middle;
}

.android-menu-icon {
  display: inline-block;
  font-size: 16px;
  vertical-align: middle;
}

/* ============================================
   OC 黄历卡样式
   ============================================ */

.fortune-card-wrapper {
  padding: 0 !important;
  background: transparent !important;
  max-width: 340px;
}

.fortune-card {
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 16px;
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}

/* 赛博朋克光晕效果 */
.fortune-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* 头部 */
.fortune-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
}

.fortune-title {
  font-size: 18px;
  font-weight: bold;
  color: #a78bfa;
  letter-spacing: 2px;
}

.fortune-date {
  font-size: 13px;
  color: #9ca3af;
}

/* 宜忌区域 */
.fortune-yiji {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.fortune-yi,
.fortune-ji {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.fortune-yi {
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.fortune-ji {
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.fortune-label {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 4px;
}

.fortune-yi .fortune-label {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.fortune-ji .fortune-label {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
}

.fortune-value {
  font-size: 16px;
  font-weight: 600;
  color: #e5e7eb;
  text-align: center;
}

/* 今日脑洞 */
.fortune-prompt-section {
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
}

.fortune-prompt-label {
  font-size: 12px;
  color: #fbbf24;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.fortune-prompt-label::before {
  content: '💡';
}

.fortune-prompt {
  font-size: 14px;
  color: #d1d5db;
  line-height: 1.6;
}

/* 奖励信息 */
.fortune-reward {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid rgba(167, 139, 250, 0.2);
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
  margin-bottom: 12px;
}

.fortune-reward-value {
  font-size: 20px;
  font-weight: bold;
  color: #fbbf24;
}

.fortune-reward svg {
  color: #fbbf24;
}

.fortune-streak {
  font-size: 13px;
  color: #a78bfa;
}

/* 底部水印 */
.fortune-footer {
  text-align: center;
  font-size: 11px;
  color: #6b7280;
  letter-spacing: 1px;
}

/* 按钮区域 */
.fortune-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding: 0 4px;
}

.fortune-actions .btn {
  flex: 1;
}

/* 明日奖励提示 */
.fortune-next-reward {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 12px;
}

/* ========== 创作工坊入口 ========== */
.workshop-entry {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.workshop-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.workshop-entry-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.workshop-icon {
  font-size: 18px;
}

.new-badge {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.workshop-more {
  font-size: 13px;
  color: #a78bfa;
  transition: color var(--transition);
}

.workshop-more:hover {
  color: #c4b5fd;
}

.workshop-tools-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.workshop-tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
}

.workshop-tool-card:hover {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.3);
  transform: translateY(-2px);
}

.workshop-tool-icon {
  font-size: 28px;
  line-height: 1;
}

.workshop-tool-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.workshop-tool-promo {
  font-size: 11px;
  color: #4ade80;
  font-weight: 500;
}

.workshop-tool-hint {
  font-size: 11px;
  color: #4ade80;
  font-weight: 500;
}

.workshop-tool-price {
  font-size: 11px;
  color: var(--text-muted);
}

.workshop-tool-price.free {
  color: #34d399;
  font-weight: 500;
}

/* 移动端适配 */
@media (max-width: 480px) {
  .workshop-tools-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .workshop-tool-card {
    padding: 12px 8px;
  }

  .workshop-tool-icon {
    font-size: 24px;
  }

  .workshop-tool-name {
    font-size: 12px;
  }

  .workshop-tool-price {
    font-size: 10px;
  }

  .workshop-tool-promo {
    font-size: 10px;
  }
}

/* ========== OC资料局档案馆入口 ========== */
.wiki-entry {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.04) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.wiki-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wiki-entry-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.wiki-icon {
  font-size: 18px;
}

.wiki-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-left: 26px; /* 与标题图标对齐 */
}

.wiki-more {
  font-size: 13px;
  color: #3b82f6;
  transition: color var(--transition);
}

.wiki-more:hover {
  color: #60a5fa;
}

.wiki-tools-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.wiki-tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
}

.wiki-tool-card:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.wiki-tool-icon {
  font-size: 24px;
  line-height: 1;
}

.wiki-tool-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .wiki-tools-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .wiki-entry {
    padding: 16px;
  }

  .wiki-desc {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .wiki-tools-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .wiki-tool-card {
    padding: 10px 6px;
  }

  .wiki-tool-icon {
    font-size: 20px;
  }

  .wiki-tool-name {
    font-size: 11px;
  }
}
