/**
 * 个人博客样式表 - 极简约现代化设计
 * 参考 Apple、Linear、Vercel 设计语言
 */

/* ==================== 1. 全局基础 ==================== */

:root {
  --color-bg: #ffffff;
  --color-bg-secondary: #fafafa;
  --color-bg-tertiary: #f5f5f7;
  --color-text: #1d1d1f;
  --color-text-secondary: #86868b;
  --color-text-tertiary: #aeaeb2;
  --color-accent: #6366f1;
  --color-accent-light: #818cf8;
  --color-accent-bg: rgba(99, 102, 241, 0.08);
  --color-border: rgba(0, 0, 0, 0.06);
  --color-card-bg: rgba(255, 255, 255, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-blur: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 星空模式变量 */
body.starry {
  --color-bg: #0a0a12;
  --color-bg-secondary: #111120;
  --color-bg-tertiary: #1a1a2e;
  --color-text: #f0f0f5;
  --color-text-secondary: #8888a8;
  --color-text-tertiary: #5a5a78;
  --color-accent: #818cf8;
  --color-accent-light: #a5b4fc;
  --color-accent-bg: rgba(129, 140, 248, 0.12);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-card-bg: rgba(18, 18, 32, 0.8);
  --glass-bg: rgba(16, 16, 28, 0.78);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: auto;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100vh;
  overflow-y: auto;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-text-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* 选中高亮色 */
::selection {
  background: var(--color-accent);
  color: white;
}

/* ==================== 2. 导航栏 (.navbar) ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 56px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.navbar-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.navbar-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-left,
.nav-center,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-center {
  gap: 32px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-right {
  gap: 16px;
}

/* ==================== 3. 模式切换开关 (.mode-switch) ==================== */
.mode-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.mode-switch-track {
  position: relative;
  width: 64px;
  height: 32px;
  border-radius: 16px;
  background: linear-gradient(135deg, #74b9ff, #a0d2ff);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

body.starry .mode-switch-track {
  background: linear-gradient(135deg, #0c1445, #1a237e);
}

.mode-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd93d, #ff914d);
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.4);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

body.starry .mode-switch-thumb {
  left: 35px;
  background: linear-gradient(135deg, #e8e8e8, #c8d6e5);
  box-shadow: 0 2px 8px rgba(200, 214, 229, 0.4);
}

.mode-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.sun-icon {
  color: #fff;
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

body.starry .sun-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.moon-icon {
  color: #2d3436;
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

body.starry .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* 星星动画 */
.mode-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

body.starry .star {
  opacity: 1;
  animation: twinkle 1.5s ease-in-out infinite alternate;
}

.star:nth-child(2) { animation-delay: 0.3s; width: 2px; height: 2px; }
.star:nth-child(3) { animation-delay: 0.6s; }
.star:nth-child(4) { animation-delay: 0.9s; width: 2px; height: 2px; }
.star:nth-child(5) { animation-delay: 1.2s; }

@keyframes twinkle {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

/* 云朵 */
.mode-clouds {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cloud {
  position: absolute;
  width: 12px;
  height: 6px;
  background: rgba(255,255,255,0.8);
  border-radius: 6px;
  transition: opacity 0.5s ease;
}

.cloud::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  top: -4px;
  left: 2px;
}

body.starry .cloud {
  opacity: 0;
}

.mode-label-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  min-width: 28px;
}

/* 旧版模式切换样式（保留兼容性） */
.mode-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider.round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  border-radius: 12px;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-radius: 50%;
}

input:checked + .slider.round {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

input:checked + .slider.round:before {
  transform: translateX(24px);
}

/* ==================== 4. 导航链接 ==================== */
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  position: relative;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--color-text);
}

/* ==================== 5. 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--color-accent-light);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-auth {
  background: var(--color-accent-bg);
  color: var(--color-accent);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-auth:hover {
  background: var(--color-accent);
  color: white;
}

.btn-submit {
  width: 100%;
  padding: 12px 24px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background: var(--color-accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-submit:disabled {
  background: var(--color-text-tertiary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-logout {
  font-size: 13px;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-logout:hover {
  color: var(--color-text);
  background: var(--color-bg-tertiary);
}

.btn-send,
.btn-publish {
  padding: 10px 20px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-send:hover,
.btn-publish:hover {
  background: var(--color-accent-light);
  transform: translateY(-1px);
}

.btn-like {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-bg-secondary);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: var(--transition);
}

.btn-like:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-like.liked {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.like-icon {
  font-size: 16px;
}

.btn-comment {
  padding: 8px 16px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-comment:hover {
  background: var(--color-accent-light);
}

/* ==================== 6. 卡片 (.card) ==================== */
.card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: none;
  padding: 28px 32px;
  margin-bottom: 24px;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

body.starry .card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

body.starry .card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-text);
}

.card-text {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* ==================== 7. 模态框 (.modal) ==================== */
.modal {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex !important;
}

.modal-content {
  max-width: 400px;
  width: 90%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: none;
  padding: 32px;
  position: relative;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.starry .modal-content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.close-btn {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
}

/* ==================== 8. 表单 ==================== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"],
input[type="text"],
input[type="password"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  transition: var(--transition);
}

.form-group input:focus,
input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-bg);
}

.form-group input::placeholder,
input::placeholder {
  color: var(--color-text-tertiary);
}

/* ==================== 9. Auth tabs ==================== */
.tab-container {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.tab-btn,
.auth-tab {
  flex: 1;
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  position: relative;
  transition: var(--transition);
}

.tab-btn:hover,
.auth-tab:hover {
  color: var(--color-text);
}

.tab-btn.active,
.auth-tab.active {
  color: var(--color-accent);
}

.tab-btn.active::after,
.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ==================== 10. 首页样式 (.profile-section) ==================== */
.profile-section {
  text-align: center;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 80px 20px 60px;
  animation: slideUp 0.6s ease;
}

.avatar-wrapper {
  margin: 0 auto 24px;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--color-bg);
  transition: var(--transition);
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.profile-name {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--color-text);
}

.info-card {
  margin: 32px auto;
  text-align: left;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.info-item {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.info-item:hover {
  background: var(--color-bg-tertiary);
}

.info-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.info-value {
  font-size: 15px;
  color: var(--color-text);
  font-weight: 500;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--color-accent-bg);
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.tag:hover {
  background: var(--color-accent);
  color: white;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin: 48px 0 24px;
  color: var(--color-text);
}

.qrcode-section {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.qrcode-item {
  text-align: center;
}

.qrcode-img {
  width: 350px;
  height: 350px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.qrcode-img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.qrcode-label {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 12px;
}

.sponsor-section {
  margin-top: 48px;
}

/* ==================== 11. 项目页 ==================== */
.projects-hero {
  text-align: center;
  padding: 100px 20px 60px;
}

.projects-hero h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--color-text);
}

.projects-hero p {
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.projects-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.project-card {
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  display: block;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card-icon {
  width: 56px;
  height: 56px;
  background: var(--color-accent-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}

.project-card h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.project-card .subtitle {
  font-size: 14px;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 12px;
}

.project-card .description {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.products-grid,
.product-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.product-icon {
  width: 48px;
  height: 48px;
  background: var(--color-accent-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.product-name-cn {
  font-size: 13px;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.product-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.hero-section {
  text-align: center;
  padding: 100px 20px 60px;
}

.hero-section h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: var(--color-text);
}

.hero-section .subtitle {
  font-size: 20px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.hero-section .description {
  font-size: 16px;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 12px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
}

.hero-btn.primary {
  background: var(--color-accent);
  color: white;
}

.hero-btn.primary:hover {
  background: var(--color-accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.hero-btn.secondary {
  background: var(--color-bg-secondary);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.hero-btn.secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.content-section {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.stat-change {
  font-size: 12px;
  color: #22c55e;
  font-weight: 500;
}

.back-link {
  text-align: center;
  margin-top: 32px;
}

.back-link a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.back-link a:hover {
  color: var(--color-accent);
}

.qr-codes {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.qr-item img {
  width: 350px;
  height: 350px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.declaration {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}

.declaration p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}

.declaration p:last-child {
  margin-bottom: 0;
}

/* ==================== 12. 合作页 ==================== */
.cooperation-page {
  padding: 80px 20px 60px;
}

.page-header {
  text-align: center;
  margin-bottom: 48px;
}

.page-header h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: var(--color-text);
}

.page-header .subtitle {
  font-size: 18px;
  color: var(--color-text-secondary);
}

.tier-info {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.tier-badge {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 32px;
  text-align: center;
  min-width: 160px;
  transition: var(--transition);
}

.tier-badge:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.tier-badge .tier-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tier-badge .tier-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.tier-badge .tier-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.pricing-container,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto 48px;
}

.pricing-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured,
.pricing-card.enterprise {
  border: 2px solid var(--color-accent);
  transform: scale(1.02);
}

.pricing-card.featured:hover,
.pricing-card.enterprise:hover {
  transform: scale(1.02) translateY(-4px);
}

.pricing-card.featured::before,
.pricing-card.enterprise::before {
  content: '推荐';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.card-header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 20px;
}

.card-header .tier-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.card-header .tier-tagline {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-item:last-child {
  border-bottom: none;
}

.service-name {
  font-size: 14px;
  color: var(--color-text);
}

.service-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-accent);
}

.contact-section {
  text-align: center;
  padding: 32px;
}

.contact-btn {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  padding: 14px 40px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: var(--transition);
}

.contact-btn:hover {
  background: var(--color-accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.contact-hint {
  margin-top: 16px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

/* ==================== 13. 社区页 ==================== */
.community-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 20px 60px;
}

.community-tabs {
  margin-bottom: 24px;
}

.chat-wrapper {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.chat-container {
  display: flex;
  flex-direction: column;
  min-height: 60vh;
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px;
}

/* 聊天气泡样式 */
.chat-message {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  max-width: 70%;
}

.chat-message.other {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-message.self {
  align-self: flex-end;
  align-items: flex-end;
}

.msg-username {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-bottom: 4px;
  padding-left: 12px;
}

.msg-bubble {
  padding: 10px 16px;
  border-radius: 16px;
  max-width: 100%;
  word-break: break-word;
}

.chat-message.other .msg-bubble {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}

.chat-message.self .msg-bubble {
  background: var(--color-accent);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.msg-content {
  font-size: 14px;
  line-height: 1.5;
}

.msg-time {
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.6;
}

.chat-message.self .msg-time {
  text-align: right;
  color: rgba(255,255,255,0.7);
}

.chat-message.other .msg-time {
  color: var(--color-text-tertiary);
}

/* 旧样式兼容 - 保留用于其他可能使用的地方 */
.chat-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.chat-username,
.chat-message .username {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-accent);
}

.chat-time,
.chat-message .time {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.chat-content {
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-input-area {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.chat-input-wrapper {
  display: flex;
  gap: 12px;
  width: 100%;
}

.chat-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 14px;
  background: var(--color-bg-secondary);
  color: var(--color-text);
  transition: var(--transition);
  outline: none;
}

.chat-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-bg);
}

.chat-login-prompt {
  text-align: center;
  padding: 12px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.space-wrapper {
  min-height: 500px;
}

.space-publish-area {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.post-input {
  width: 100%;
  min-height: 80px;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  resize: vertical;
  background: var(--color-bg);
  color: var(--color-text);
  margin-bottom: 12px;
  font-family: inherit;
  transition: var(--transition);
}

.post-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-bg);
}

.space-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.space-post {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}

.space-post:hover {
  box-shadow: var(--shadow-md);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.post-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-accent);
}

.post-time {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.post-content {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
  word-break: break-word;
}

.post-actions {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.like-btn,
.comment-btn {
  font-size: 14px;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: var(--transition);
}

.like-btn:hover,
.comment-btn:hover {
  color: var(--color-accent);
}

.like-btn.liked {
  color: #ef4444;
}

.post-comments {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-item {
  padding: 12px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-sm);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
}

.comment-time {
  font-size: 11px;
  color: var(--color-text-tertiary);
}

.comment-content {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.5;
}

.comment-input-area {
  display: flex;
  gap: 8px;
}

.comment-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  background: var(--color-bg);
  color: var(--color-text);
  transition: var(--transition);
}

.comment-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-bg);
}

.no-posts {
  text-align: center;
  padding: 48px;
  color: var(--color-text-secondary);
}

.empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px;
  color: var(--color-text-tertiary);
}

.login-to-comment {
  text-align: center;
  padding: 12px;
  color: var(--color-text-secondary);
  font-size: 13px;
}

/* 新版聊天样式 */
.chat-section {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 70%;
}

.chat-msg-other {
  align-self: flex-start;
}

.chat-msg-self {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.chat-avatar-self {
  background: #22c55e;
}

.chat-nickname {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-bottom: 4px;
}

.chat-bubble {
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  cursor: default;
}

.chat-msg-other .chat-bubble {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
  border-top-left-radius: 4px;
}

.chat-msg-self .chat-bubble {
  background: var(--color-accent);
  color: #fff;
  border-top-right-radius: 4px;
}

.chat-input-bar {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.chat-input-bar input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-bg-secondary);
  color: var(--color-text);
  font-size: 14px;
  outline: none;
}

.chat-input-bar input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-bg);
}

.chat-input-bar button {
  padding: 10px 24px;
  border-radius: 20px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.chat-input-bar button:hover {
  background: var(--color-accent-light);
}

.chat-login-hint {
  text-align: center;
  padding: 16px;
  color: var(--color-text-tertiary);
  border-top: 1px solid var(--color-border);
}

/* 右键时间提示 */
.chat-time-tip {
  position: fixed;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 9999;
}

.chat-time-tip.show {
  opacity: 1;
}

/* ==================== 14. 滑动验证 ==================== */
.sv-track {
  position: relative;
  width: 100%;
  height: 44px;
  background: var(--color-bg-tertiary);
  border-radius: 22px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.sv-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--color-accent-bg);
  border-radius: 22px;
  pointer-events: none;
}

.sv-success .sv-fill {
  background: rgba(34, 197, 94, 0.2);
}

.sv-thumb {
  position: absolute;
  top: 2px;
  left: 0;
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: grab;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  touch-action: none;
}

.sv-thumb:active {
  cursor: grabbing;
}

.sv-success .sv-thumb {
  background: #22c55e;
}

.sv-tip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--color-text-tertiary);
  pointer-events: none;
}

.sv-success .sv-tip {
  color: #22c55e;
}

/* ==================== 15. 黑洞canvas ==================== */
#blackhole-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none !important;
  touch-action: none;
}

#blackhole-star-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none !important;
  touch-action: none;
}

/* ==================== 16. 动画 ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease;
}

.animate-slide-up {
  animation: slideUp 0.6s ease;
}

/* ==================== 17. 响应式 ==================== */

/* ========== 响应式适配 ========== */

/* 平板 */
@media (max-width: 1024px) {
  .main-content {
    padding: 70px 30px 40px;
  }
  
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .hero-title {
    font-size: 48px;
  }
  
  .hero-cover {
    padding-left: 6%;
  }
  
  .products-grid,
  .product-matrix {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pricing-container,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .pricing-card.featured,
  .pricing-card.enterprise {
    transform: none;
    order: -1;
  }
  
  .pricing-card.featured:hover,
  .pricing-card.enterprise:hover {
    transform: translateY(-4px);
  }
}

/* 手机 */
@media (max-width: 768px) {
  .main-content {
    padding: 60px 16px 30px;
  }
  
  .hero-cover {
    padding-left: 20px;
    height: 100svh;
  }
  
  .hero-title {
    font-size: 28px;
  }
  
  /* 导航栏 - 手机端简化显示 */
  .navbar {
    padding: 0 8px;
    height: 50px;
  }
  
  .navbar-left {
    flex-shrink: 0;
  }
  
  .navbar-center {
    position: static;
    transform: none;
    flex: 1;
    justify-content: center;
    gap: 0;
    margin: 0 4px;
  }
  
  .navbar-center a {
    font-size: 13px;
    padding: 8px 6px;
    white-space: nowrap;
  }
  
  .navbar-right {
    flex-shrink: 0;
    margin-left: 0;
  }
  
  .mode-switch {
    transform: scale(0.75);
  }
  
  .mode-label-text {
    display: none;
  }
  
  .user-menu {
    gap: 8px;
  }
  
  .username {
    font-size: 13px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .role-badge {
    display: none;
  }
  
  .btn-logout {
    font-size: 12px;
    padding: 4px 8px;
  }
  
  .btn-auth {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  /* 信息卡片 - 手机端2列 */
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .card {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .info-item {
    padding: 10px;
  }
  
  .info-label {
    font-size: 11px;
  }
  
  .info-value {
    font-size: 13px;
  }
  
  /* 标签 */
  .tag {
    font-size: 12px;
    padding: 4px 10px;
  }
  
  /* 产品矩阵 - 手机端2列 */
  .products-grid, 
  .product-matrix {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .product-card {
    padding: 14px;
  }
  
  .product-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .product-name {
    font-size: 14px;
  }
  
  .product-name-cn {
    font-size: 12px;
  }
  
  .product-desc {
    font-size: 12px;
  }
  
  /* 项目网格 */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px 40px;
  }
  
  .project-card {
    padding: 16px;
  }
  
  .project-card-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
    margin-bottom: 12px;
  }
  
  .project-card h2 {
    font-size: 16px;
  }
  
  .project-card .subtitle {
    font-size: 12px;
  }
  
  .project-card .description {
    font-size: 13px;
  }
  
  /* 定价卡片 - 手机端1列，确保每个卡片有足够空间 */
  .pricing-container,
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%;
  }
  
  .pricing-card {
    padding: 16px;
  }
  
  .card-header .tier-title {
    font-size: 16px;
  }
  
  .card-header .tier-tagline {
    font-size: 12px;
  }
  
  .service-item {
    padding: 8px 0;
  }
  
  .service-name {
    font-size: 12px;
  }
  
  .service-price {
    font-size: 14px;
  }
  
  /* 社区聊天 */
  .chat-section {
    height: calc(100vh - 120px);
  }
  
  .chat-msg {
    max-width: 85%;
  }
  
  .chat-bubble {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .chat-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .chat-input-bar {
    padding: 12px;
    gap: 8px;
  }
  
  .chat-input-bar input {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .chat-input-bar button {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  /* 二维码 */
  .qrcode-img, 
  .qr-item img {
    width: 200px;
    height: 200px;
  }
  
  .qrcode-section {
    gap: 16px;
  }
  
  .qr-codes {
    gap: 16px;
  }
  
  /* 头像 */
  .avatar {
    width: 80px;
    height: 80px;
  }
  
  /* 区域标题 */
  .section-title, 
  h2 {
    font-size: 20px;
  }
  
  /* footer */
  .footer {
    padding: 20px 16px;
  }
  
  /* profile section */
  .profile-section {
    padding: 60px 16px 40px;
  }
  
  .profile-name {
    font-size: 24px;
  }
  
  /* 页面头部 */
  .projects-hero,
  .hero-section,
  .cooperation-page {
    padding: 80px 16px 40px;
  }
  
  .projects-hero h1,
  .hero-section h1,
  .page-header h1 {
    font-size: 28px;
  }
  
  .projects-hero p,
  .hero-section .subtitle,
  .page-header .subtitle {
    font-size: 15px;
  }
  
  /* 统计网格 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-value {
    font-size: 22px;
  }
  
  .stat-label {
    font-size: 12px;
  }
  
  /* tier info */
  .tier-info {
    gap: 12px;
    margin-bottom: 32px;
  }
  
  .tier-badge {
    padding: 16px 20px;
    min-width: 120px;
  }
  
  .tier-badge .tier-name {
    font-size: 14px;
  }
  
  .tier-badge .tier-desc {
    font-size: 12px;
  }
  
  /* 模态框 */
  .modal-content {
    width: 92%;
    padding: 20px;
    margin: 16px;
  }
  
  .content-section {
    padding: 20px;
    margin-bottom: 16px;
  }
  
  /* 社区容器 */
  .community-container {
    padding: 70px 12px 40px;
  }
  
  /* Tab按钮 */
  .tab-btn,
  .auth-tab {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  /* 空间发布 */
  .space-publish-area {
    padding: 16px;
  }
  
  .post-input {
    min-height: 60px;
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .space-post {
    padding: 16px;
  }
  
  .post-content {
    font-size: 14px;
  }
  
  /* 合作页 */
  .contact-section {
    padding: 24px 16px;
  }
  
  .contact-btn {
    padding: 12px 32px;
    font-size: 15px;
  }
}

/* 小屏手机 */
@media (max-width: 480px) {
  .main-content {
    padding: 56px 12px 24px;
  }
  
  .hero-title {
    font-size: 24px;
  }
  
  .navbar {
    padding: 0 6px;
  }
  
  .navbar-center a {
    font-size: 12px;
    padding: 8px 4px;
  }
  
  .mode-switch {
    transform: scale(0.65);
  }
  
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .card {
    padding: 12px;
    margin-bottom: 12px;
  }
  
  .products-grid, 
  .product-matrix,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .pricing-container,
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .pricing-card {
    padding: 20px;
  }
  
  .qrcode-img, 
  .qr-item img {
    width: 160px;
    height: 160px;
  }
  
  .avatar {
    width: 72px;
    height: 72px;
  }
  
  .profile-name {
    font-size: 22px;
  }
  
  .section-title {
    font-size: 18px;
    margin: 32px 0 20px;
  }
  
  .tag {
    font-size: 11px;
    padding: 3px 8px;
  }
  
  .project-card h2 {
    font-size: 14px;
  }
  
  .product-name {
    font-size: 13px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .modal-content {
    padding: 16px;
  }
  
  .tab-container {
    margin-bottom: 16px;
  }
  
  .chat-section {
    height: calc(100vh - 110px);
  }
  
  .chat-messages {
    padding: 12px;
    gap: 12px;
  }
  
  .chat-msg {
    max-width: 90%;
  }
  
  .chat-bubble {
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* ==================== 18. 主内容区 ==================== */
.main-content {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 80px 60px 60px;
  min-height: 100vh;
  background: var(--color-bg);
}

/* ==================== 19. 消息提示 ==================== */
.toast,
.auth-message {
  position: fixed;
  top: 72px;
  right: 20px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--color-text);
  color: white;
  z-index: 3000;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.3s ease;
}

.auth-message-success {
  background: #22c55e;
}

.auth-message-error {
  background: #ef4444;
}

/* ==================== 20. 用户菜单 ==================== */
.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.username {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.role-badge {
  background: var(--color-accent-bg);
  color: var(--color-accent);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* ==================== 21. 页脚 ==================== */
.footer {
  padding: 32px 20px;
  text-align: center;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
  background: var(--color-bg);
  position: relative;
  z-index: 1;
}

.footer-content {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.footer-content p {
  margin: 0;
}

/* 星空模式下footer样式 */
body.starry .footer {
  color: rgba(255, 255, 255, 0.5);
  border-top-color: rgba(255, 255, 255, 0.1);
  background: transparent;
}

body.starry .footer-content {
  color: rgba(255, 255, 255, 0.5);
}

/* ==================== 22. 玻璃效果 ==================== */
.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* ==================== 23. 星空模式额外效果 ==================== */
body.starry .navbar {
  background: rgba(16, 16, 28, 0.85);
}

body.starry .nav-link {
  color: var(--color-text-secondary);
}

body.starry .nav-link:hover,
body.starry .nav-link.active {
  color: var(--color-text);
}

body.starry .mode-label {
  color: var(--color-text-secondary);
}

body.starry .slider.round {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-border);
}

/* 星空模式下主内容区背景透明，让canvas可见 */
body.starry .main-content {
  background: transparent;
  position: relative;
  z-index: 1;
}

/* ==================== 24. 辅助类 ==================== */
.text-center {
  text-align: center;
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-tertiary {
  color: var(--color-text-tertiary);
}

.text-accent {
  color: var(--color-accent);
}

.bg-secondary {
  background: var(--color-bg-secondary);
}

.bg-tertiary {
  background: var(--color-bg-tertiary);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
