/* ============================================
   斓·流彩 — 全局基础样式
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

:root {
  --cream: #FFF8F0;
  --cream-dark: #FFF0E0;
  --peach: #FF8C69;
  --peach-light: #FFB088;
  --coral: #FF6B6B;
  --coral-soft: #FF8E8E;
  --amber: #F5A623;
  --amber-light: #FFD080;
  --warm-brown: #5D4037;
  --warm-brown-light: #8D6E63;
  --rose: #F48FB1;
  --lavender: #CE93D8;
  --sky: #90CAF9;
  --mint: #80CBC4;
  --text-primary: #3E2723;
  --text-secondary: #6D4C41;
  --text-muted: #A1887F;
  --bg-warm: #FFF8F0;
  --bg-section: #FFF5EB;
  --bg-card: rgba(255, 255, 255, 0.85);
  --shadow-soft: 0 4px 24px rgba(93, 64, 55, 0.08);
  --shadow-hover: 0 8px 40px rgba(93, 64, 55, 0.14);
  --shadow-glow: 0 4px 30px rgba(255, 140, 105, 0.3);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-xl: 48px;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   排版系统
   ============================================ */

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

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.5em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--peach), var(--coral));
  border-radius: 2px;
}

.section-title.center::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* ============================================
   布局容器
   ============================================ */

main, .auth-page {
  margin-left: 220px;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* ============================================
   左侧垂直导航 — 书签式布局
   ============================================ */

.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: linear-gradient(180deg, #3E2723 0%, #5D4037 40%, #6D4C41 100%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 30px rgba(0,0,0,0.12);
}

.side-nav::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, var(--peach), transparent 30%, transparent 70%, var(--peach));
  opacity: 0.3;
}

.side-nav-top {
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.side-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  padding: 0 1.2rem;
  color: white;
}

.side-logo svg {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.side-logo-text {
  text-align: center;
  opacity: 1;
  white-space: nowrap;
}

.side-logo-text span {
  display: block;
  font-family: 'Noto Serif SC', serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.3;
}

.side-logo-text small {
  display: block;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.55rem;
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  letter-spacing: 1.5px;
  margin-top: 0.2rem;
}

/* 导航链接 */
.side-links {
  flex: 1;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.8rem 1.2rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
  justify-content: flex-start;
}

.side-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, var(--peach), var(--coral));
  border-radius: 0 2px 2px 0;
  transition: height 0.3s ease;
}

.side-link:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.04);
}

.side-link:hover::before {
  height: 60%;
}

.side-link.active {
  color: white;
  background: rgba(255, 140, 105, 0.1);
}

.side-link.active::before {
  height: 70%;
}

.side-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.side-icon svg {
  width: 18px;
  height: 18px;
}

.side-label {
  opacity: 1;
  white-space: nowrap;
  margin-left: 0.8rem;
}

/* 底部区域 */
.side-nav-bottom {
  padding: 0.8rem 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.8rem;
}

/* 用户区域 */
.side-user {
  position: relative;
}

.side-user-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peach), var(--coral));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
  border: 2px solid rgba(255,255,255,0.15);
}

.side-user-dropdown {
  position: absolute;
  bottom: calc(100% + 12px);
  left: calc(100% + 8px);
  min-width: 200px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  padding: 0.8rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
}

.side-user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.side-user-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  margin-bottom: 0.4rem;
}

.side-avatar-lg {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peach), var(--coral));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
  flex-shrink: 0;
}

.side-user-logout {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: none;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--coral);
  cursor: pointer;
  transition: var(--transition);
}

.side-user-logout:hover {
  background: rgba(255, 107, 107, 0.06);
}

/* 未登录 */
.side-auth {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.side-auth-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: var(--transition);
  background: rgba(255,255,255,0.04);
}

.side-auth-link:hover {
  color: white;
  background: rgba(255, 140, 105, 0.15);
}

.side-auth-join {
  background: rgba(255, 140, 105, 0.15);
  color: var(--peach-light);
}

.side-auth-join:hover {
  background: rgba(255, 140, 105, 0.25);
}

/* 文章菜单 */
.side-article-menu {
  position: relative;
}

.side-article-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.03);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.side-article-btn:hover {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
}

.side-article-dropdown {
  position: absolute;
  bottom: calc(100% + 12px);
  left: calc(100% + 8px);
  min-width: 150px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
}

.side-article-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.side-article-dropdown a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  border-radius: 8px;
  transition: var(--transition);
}

.side-article-dropdown a:hover {
  background: rgba(255, 140, 105, 0.06);
  color: var(--peach);
}

.side-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
}

/* ============================================
   移动端底部导航
   ============================================ */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 1000;
  padding: 0 0.5rem;
  border-top: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 -2px 20px rgba(0,0,0,0.04);
}

.bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  flex: 1;
  height: 100%;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  transition: var(--transition);
}

.bottom-link svg {
  width: 20px;
  height: 20px;
}

.bottom-link.active {
  color: var(--peach);
}

.bottom-link.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--peach), var(--coral));
  border-radius: 0 0 3px 3px;
}

.bottom-more-menu {
  display: none;
  position: fixed;
  bottom: 64px;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.1);
  z-index: 1001;
  max-height: 70vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bottom-more-menu.open {
  display: block;
  transform: translateY(0);
}

.bottom-more-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-weight: 600;
  font-size: 0.95rem;
}

.bottom-more-header button {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0,0,0,0.04);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.bottom-more-links {
  padding: 0.5rem 0;
}

.bottom-more-link {
  display: block;
  padding: 0.8rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.bottom-more-link:hover {
  background: rgba(255, 140, 105, 0.04);
  color: var(--peach);
}

.bottom-more-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.bottom-more-divider {
  height: 1px;
  background: rgba(0,0,0,0.05);
  margin: 0.5rem 1.5rem;
}

/* ============================================
   Footer 页脚
   ============================================ */

.site-footer {
  background: var(--warm-brown);
  color: rgba(255, 255, 255, 0.85);
  padding: 4rem 0 0;
  margin-top: 6rem;
  margin-left: 220px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.8;
  opacity: 0.7;
  margin-top: 1rem;
}

.footer-col h4 {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.2rem;
  color: var(--amber-light);
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.3rem 0;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--peach-light);
  padding-left: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--peach-light);
}

/* ============================================
   通用组件
   ============================================ */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.8rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--peach), var(--coral));
  color: white;
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
  background: rgba(255, 140, 105, 0.1);
  color: var(--peach);
  border: 1px solid rgba(255, 140, 105, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 140, 105, 0.15);
  border-color: var(--peach);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--peach);
  color: var(--peach);
}

/* 卡片 */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(255, 140, 105, 0.06);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 140, 105, 0.15), rgba(255, 107, 107, 0.15));
  color: var(--peach);
}

.tag-amber {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.15), rgba(255, 208, 128, 0.15));
  color: var(--amber);
}

.tag-coral {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 142, 142, 0.15));
  color: var(--coral);
}

/* 返回按钮 */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.2rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 50px;
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  margin-bottom: 2rem;
}

.back-btn:hover {
  color: var(--peach);
  transform: translateX(-4px);
  box-shadow: var(--shadow-hover);
}

.back-btn svg {
  width: 18px;
  height: 18px;
}

/* 页面标题区 */
.page-header {
  padding: 140px 0 3rem;
  text-align: center;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, var(--cream-dark), var(--cream));
  z-index: -1;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.8rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* 装饰性光晕 */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* 表单 */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1.5px solid rgba(93, 64, 55, 0.12);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--text-primary);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--peach);
  box-shadow: 0 0 0 4px rgba(255, 140, 105, 0.1);
}

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

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--peach);
  cursor: pointer;
}

.checkbox-group a {
  color: var(--peach);
  text-decoration: none;
}

.checkbox-group a:hover {
  text-decoration: underline;
}

/* 文章页面 */
.article-content {
  padding: 3rem 0;
}

.article-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  padding-left: 1rem;
  border-left: 4px solid var(--peach);
}

.article-content h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.8rem;
  color: var(--text-secondary);
}

.article-content p {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

/* 模态框 */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================
   动画
   ============================================ */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.25; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse { animation: pulse 4s ease-in-out infinite; }
.animate-slide-up { animation: slideUp 0.6s ease-out forwards; }

/* 滚动入场 */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   响应式
   ============================================ */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .side-nav { display: none; }
  
  main, .auth-page {
    margin-left: 0 !important;
    padding-bottom: 80px;
  }

  .site-footer {
    margin-left: 0;
  }

  .bottom-nav {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
}

@media (max-width: 480px) {
  .logo-text { font-size: 1rem; }
  .logo-text small { display: none; }
  .logo-group svg { width: 36px; height: 36px; }
  .logo-group { gap: 8px; }
}
