/* ==============================================
   撑伞人 — 树洞论坛
   分区选择首页 + 三大分区内页 + 帖子 + 发帖弹窗
   ============================================== */

/* ===== 分区选择首页 ===== */
.th-home {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 14vh 0 60px;
  overflow: hidden;
  background: #0d1117;
}

/* 层级 1：视频（最底层） */
.th-home-video {
  position: absolute; inset: 0; z-index: 0;
}
.th-home-video video {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.55);
}

/* 层级 2：全局柔光遮罩（覆盖整页，不局限于视频区域） */
.th-home-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(253,250,245,0.14);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* 层级 3：粒子画布（穿透点击，仅氛围） */
#thParticles {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  opacity: 0.35;
}

/* ===== 介绍条：全站毛玻璃规范 ===== */
.th-intro {
  position: relative; z-index: 3;
  max-width: 680px; width: calc(100% - 48px);
  margin: 0 auto 48px;
  padding: 16px 28px;
  border-radius: 16px;
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.25);
  text-align: center;
  font-size: 15px;
  color: #2A2E35;
  line-height: 2;
  letter-spacing: 0.5px;
  transition: opacity 400ms var(--ease);
}

/* ===== 三张卡片 ===== */
.th-cards {
  position: relative; z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 960px;
  width: 100%;
  padding: 0 32px;
}
.th-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
  border-radius: 20px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 320ms var(--ease),
              box-shadow 320ms var(--ease);
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
/* hover 上浮 + 径向高光 + 分区柔光 */
.th-card:hover {
  transform: translateY(-4px);
}
.th-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.18), transparent 65%);
  opacity: 0;
  transition: opacity 320ms var(--ease);
  pointer-events: none;
}
.th-card:hover::after { opacity: 1; }

.th-card.male:hover   { box-shadow: 0 16px 48px rgba(32,51,85,0.40); }
.th-card.square:hover { box-shadow: 0 16px 48px rgba(98,151,201,0.20); }
.th-card.female:hover { box-shadow: 0 16px 48px rgba(230,147,64,0.30); }

.th-card-icon { font-size: 40px; margin-bottom: 16px; }
.th-card h2 {
  font-size: 22px; font-weight: 700;
  margin-bottom: 8px; letter-spacing: 1px;
  color: inherit;
}
.th-card .desc {
  font-size: 13px; line-height: 1.9;
  text-align: center; max-width: 220px;
}
.th-card .privacy {
  font-size: 11px;
  margin-top: 20px;
  text-align: center;
  color: #555A63;
}

/* 卡片配色定稿 */
.th-card.male {
  background: linear-gradient(160deg, #203355 0%, #1a2945 100%);
}
.th-card.male h2       { color: #fff; }
.th-card.male .desc    { color: rgba(255,255,255,0.72); }
.th-card.male .privacy { color: rgba(255,255,255,0.45); }

.th-card.square {
  background: linear-gradient(160deg, #E8F2FB 0%, #d4e4f2 100%);
}
.th-card.square h2       { color: #2A2E35; }
.th-card.square .desc    { color: #555A63; }
.th-card.square .privacy { color: #555A63; }

.th-card.female {
  background: linear-gradient(160deg, #F7B87A 0%, #eaa565 100%);
}
.th-card.female h2       { color: #2A2E35; }
.th-card.female .desc    { color: #555A63; }
.th-card.female .privacy { color: #555A63; }

/* ===== 侧边浮窗：统一毛玻璃 ===== */
.th-sidebar {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.th-sidebar a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.22);
  color: #555A63;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 320ms var(--ease),
              color 320ms var(--ease),
              border-color 320ms var(--ease),
              box-shadow 320ms var(--ease);
}
.th-sidebar a:hover {
  background: rgba(255,255,255,0.85);
  color: #2A2E35;
  border-color: rgba(230,147,64,0.30);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* ===== 专区内页 ===== */
.th-inner {
  min-height: 100vh; background: var(--bg);
}
.th-inner-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 80px 32px 24px; max-width: 1100px; margin: 0 auto;
}
.th-inner-banner h1 { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.th-inner-banner .dot { width: 8px; height: 8px; border-radius: 50%; animation: dotPulse 2s ease-in-out infinite; }
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 4px currentColor; }
  50% { box-shadow: 0 0 16px currentColor; }
}

.btn-post {
  padding: 12px 28px; border-radius: 12px; border: none;
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  letter-spacing: 1px; transition: all 320ms;
}
.btn-post:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.15); }

/* Tab 栏 */
.th-tabs {
  display: flex; gap: 4px; max-width: 1100px;
  margin: 0 auto; padding: 0 32px 16px;
}
.th-tab {
  padding: 10px 22px; border-radius: 10px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  background: rgba(255,255,255,0.45); border: 1px solid rgba(0,0,0,0.04);
  color: var(--gray); transition: all 240ms;
}
.th-tab.active { background: #fff; color: var(--charcoal); font-weight: 600; }

/* 提示条 */
.th-notice {
  max-width: 1100px; margin: 0 auto 24px; padding: 0 32px;
}
.th-notice-inner {
  display: flex; gap: 0;
  border-radius: 12px; background: rgba(255,255,255,0.45);
  backdrop-filter: blur(8px); border: 1px solid rgba(0,0,0,0.04);
  overflow: hidden;
}
.th-notice-bar {
  width: 3px; flex-shrink: 0;
}
.th-notice-text {
  padding: 16px 20px; font-size: 13px; color: var(--gray); line-height: 1.8;
}
.th-notice-text .ok { color: #10b981; }
.th-notice-text .no { color: var(--amber); }
.th-notice-text .guide { color: var(--blue); }

/* 搜索筛选 */
.th-search {
  max-width: 1100px; margin: 0 auto 20px; padding: 0 32px;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.th-search input {
  flex: 1; min-width: 200px;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid rgba(57,100,150,0.10);
  background: rgba(255,255,255,0.55); font-size: 13px; outline: none;
}
.th-search input:focus { border-color: var(--blue); }
.th-search select {
  padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(57,100,150,0.10);
  background: rgba(255,255,255,0.55); font-size: 13px; outline: none; cursor: pointer;
}

/* 帖子流 */
.th-feed {
  max-width: 1100px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.th-post-card {
  padding: 20px 22px; border-radius: 16px;
  background: rgba(255,255,255,0.52); backdrop-filter: blur(6px);
  border: 1px solid rgba(57,100,150,0.05);
  cursor: pointer; transition: all 320ms;
}
.th-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(57,100,150,0.06);
}
.th-post-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.th-post-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(57,100,150,0.12); display: flex; align-items: center;
  justify-content: center; font-size: 12px; color: var(--blue);
}
.th-post-user { font-size: 12px; color: var(--charcoal); font-weight: 500; }
.th-post-time { font-size: 11px; color: var(--gray); margin-left: auto; }
.th-post-tag {
  display: inline-block; padding: 2px 10px; border-radius: 8px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.th-post-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.th-post-preview {
  font-size: 13px; color: var(--gray); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.th-post-actions {
  display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--gray);
}
.th-post-actions span { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.th-post-actions span:hover { color: var(--blue); }

/* 侧边栏 */
.th-side-col {
  position: fixed; right: 24px; top: 120px; width: 200px;
  display: flex; flex-direction: column; gap: 16px; z-index: 10;
}
@media (max-width: 1300px) { .th-side-col { display: none; } }

/* ===== 发帖弹窗 ===== */
.post-modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(13,17,23,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 320ms;
}
.post-modal-overlay.open { opacity: 1; pointer-events: auto; }
.post-modal {
  width: 90%; max-width: 560px; max-height: 85vh; overflow-y: auto;
  padding: 28px; border-radius: 20px;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(16px);
  border: 1px solid rgba(57,100,150,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: modalIn 320ms var(--ease);
}
@keyframes modalIn { from { opacity:0; transform:translateY(16px) } to { opacity:1; transform:translateY(0) } }
.post-modal .notice { font-size: 12px; color: var(--amber); margin-bottom: 16px; padding: 10px 14px; border-radius: 8px; background: rgba(230,147,64,0.06); }
.post-modal input, .post-modal textarea {
  width: 100%; padding: 12px 16px; border-radius: 10px;
  border: 1px solid rgba(57,100,150,0.12); font-size: 14px;
  margin-bottom: 12px; outline: none; font-family: inherit;
}
.post-modal textarea { min-height: 160px; resize: vertical; }
.post-modal input:focus, .post-modal textarea:focus { border-color: var(--blue); }
.post-modal .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.post-modal .tag-option {
  padding: 6px 14px; border-radius: 16px; border: 1px solid rgba(57,100,150,0.15);
  font-size: 12px; cursor: pointer; transition: all 200ms;
}
.post-modal .tag-option:hover, .post-modal .tag-option.selected {
  background: var(--blue); color: #fff; border-color: var(--blue);
}
.post-modal .identity { display: flex; gap: 24px; margin-bottom: 12px; font-size: 13px; }
.post-modal .visibility { display: flex; gap: 16px; margin-bottom: 12px; font-size: 13px; }
.post-modal .advanced { font-size: 12px; color: var(--gray); margin-bottom: 16px; }
.post-modal .actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ===== Responsive ===== */
/* ===== Responsive ===== */
/* 平板及以下：卡片垂直堆叠，侧边栏隐藏 */
@media (max-width: 900px) {
  .th-cards {
    grid-template-columns: 1fr;
    max-width: 420px;
    gap: 20px;
    padding: 0 20px;
  }
  .th-card {
    min-height: auto;
    padding: 36px 24px;
  }
}
/* 手机：侧边栏隐藏，视频降级，粒子减半 */
@media (max-width: 680px) {
  .th-sidebar { display: none; }
  .th-home-video video { display: none; }
  .th-home {
    background: linear-gradient(170deg, #1a2945 0%, #203355 40%, #0d1117 100%);
  }
  .th-intro {
    font-size: 13px;
    padding: 14px 18px;
    line-height: 1.9;
  }
  .th-cards { padding: 0 16px; gap: 16px; }
  .th-card { padding: 28px 20px; }
}

/* 专区内页响应式 */
@media (max-width: 768px) {
  .th-feed { grid-template-columns: 1fr; padding: 0 16px; }
  .th-inner-banner { flex-direction: column; gap: 12px; padding: 70px 16px 16px; }
  .th-tabs { padding: 0 16px 12px; overflow-x: auto; }
  .th-search { padding: 0 16px; }
  .th-notice { padding: 0 16px; }
}
