/* ============================================
   BBS Community Brand Styles
   Design: 金工银楼 — 对齐 index.asp 设计语言
   ============================================ */

/* ----- Google Fonts ----- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Playfair+Display:wght@400;600;700&display=swap');

/* ----- CSS 变量（与 index.asp 完全一致） ----- */
:root {
  --gold: #c8a45c;
  --gold2: #e2c87a;
  --gold3: #f5e6c8;
  --ink: #111;
  --ink2: #2a2a2a;
  --paper: #faf8f5;
  --paper2: #f0ebe3;
  --cloud: #e8e4df;
  --cream: #e8e0d5;
  --card: #fff;
  --muted: #999;
  --muted-light: #f0f0f0;
  --border: #e8e0d5;
  --danger: #E74C3C;
  --success: #27AE60;
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  max-width: 100%;
  display: block;
}

/* ----- Keyframes ----- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----- Navigation ----- */
.bbs-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(17,17,17,0.85);
  transition: background .3s ease, box-shadow .3s ease;
}

.bbs-nav .bbs-nav-logo { color: #fff; }

.bbs-nav.scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.bbs-nav.scrolled .bbs-nav-logo { color: var(--gold); }

.bbs-nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.bbs-nav-hamburger {
  width: 28px;
  height: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.bbs-nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: .25s ease;
}

.bbs-nav.scrolled .bbs-nav-hamburger span { background: var(--gold); }

/* ----- Hero ----- */
.bbs-hero {
  background: var(--ink);
  background-image: radial-gradient(ellipse at 50% 40%, rgba(200,164,92,.18) 0%, transparent 70%);
  padding: 80px 24px 48px;
  text-align: center;
  color: var(--paper);
}

.bbs-hero-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.bbs-hero-sub {
  font-size: 15px;
  color: rgba(245,241,234,.65);
  letter-spacing: 2px;
}

/* ----- Section Labels ----- */
.bbs-sec-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.bbs-sec-label::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.bbs-sec-title {
  font-size: 18px;
  font-weight: 700;
  padding: 0 16px 12px;
  color: var(--ink);
  letter-spacing: 1px;
}

/* ----- Publish Card ----- */
.bbs-publish {
  margin: 16px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  animation: fadeIn .4s ease;
}

.bbs-publish-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e8e0d5;
  flex-shrink: 0;
  overflow: hidden;
}

.bbs-publish-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bbs-publish-area {
  flex: 1;
  height: 40px;
  line-height: 40px;
  background: var(--paper);
  border-radius: 20px;
  padding: 0 16px;
  font-size: 14px;
  color: #999;
  cursor: pointer;
  transition: background .2s;
}

.bbs-publish-area:hover {
  background: #e8e0d5;
}

.bbs-publish-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}

.bbs-publish-btn:hover {
  opacity: .88;
}

/* ----- Tabs ----- */
.bbs-tabs {
  display: flex;
  gap: 0;
  padding: 16px 16px 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.bbs-tabs::-webkit-scrollbar {
  display: none;
}

.bbs-tab {
  display: inline-block;
  padding: 8px 20px;
  font-size: 14px;
  color: #666;
  border-radius: 20px;
  transition: all .25s;
  flex-shrink: 0;
}

.bbs-tab.active {
  background: var(--ink);
  color: var(--gold);
  font-weight: 600;
}

/* ----- Feed ----- */
.bbs-feed {
  padding: 12px 16px 100px;
  animation: fadeIn .5s ease;
}

/* ----- Card ----- */
.bbs-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  animation: fadeIn .4s ease;
}

.bbs-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.bbs-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e8e0d5;
  flex-shrink: 0;
  overflow: hidden;
}

.bbs-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bbs-card-info {
  flex: 1;
  min-width: 0;
}

.bbs-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.bbs-card-time {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.bbs-card-content {
  font-size: 15px;
  color: #333;
  line-height: 1.7;
  margin-bottom: 12px;
  word-break: break-word;
}

/* ----- Image Grid ----- */
.bbs-imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
}

.bbs-imgs.single {
  grid-template-columns: 1fr;
}

.bbs-imgs.two {
  grid-template-columns: repeat(2, 1fr);
}

.bbs-imgs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform .2s;
}

.bbs-imgs img:hover {
  transform: scale(1.03);
}

/* ----- Card Actions ----- */
.bbs-card-actions {
  display: flex;
  gap: 24px;
  padding-top: 8px;
  border-top: 1px solid var(--paper);
}

.bbs-action {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #999;
  cursor: pointer;
  transition: color .2s;
  background: none;
  border: none;
  padding: 4px 0;
}

.bbs-action:hover,
.bbs-action.liked {
  color: var(--gold);
}

/* ----- Bottom Navigation ----- */
.bbs-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #e8e0d5;
  padding: 6px 0;
  padding-bottom: env(safe-area-inset-bottom, 6px);
}

.bbs-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: #999;
  padding: 6px 14px;
  min-width: 48px;
  min-height: 44px;
  justify-content: center;
  transition: color .2s;
}
.bbs-nav-item:active {
  color: var(--gold);
}

.bbs-nav-item.active {
  color: var(--gold);
  font-weight: 600;
}
.bbs-nav-item.active::after {
  content: '';
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
  margin-top: 1px;
}

.bbs-nav-item .emoji {
  font-size: 22px;
  line-height: 1;
}

/* ----- Menu Overlay & Panel ----- */
.bbs-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17,17,17,.5);
  opacity: 0;
  visibility: hidden;
  transition: .3s ease;
}

.bbs-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.bbs-menu-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 280px;
  max-width: 80vw;
  z-index: 210;
  background: #fff;
  padding: 24px 20px;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}

.bbs-menu-panel.open {
  transform: translateX(0);
}

.bbs-menu-panel a,
.bbs-menu-panel .menu-item {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  color: var(--ink);
  border-bottom: 1px solid var(--paper);
  text-align: left;
  transition: color .2s;
}

.bbs-menu-panel a:hover,
.bbs-menu-panel .menu-item:hover {
  color: var(--gold);
}

/* ----- Buttons ----- */
.bbs-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}

.bbs-btn-primary:hover {
  opacity: .85;
}

.bbs-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}

.bbs-btn-outline:hover {
  background: var(--gold);
  color: #fff;
}

/* ----- Form Inputs ----- */
.bbs-input,
.bbs-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 10px;
  outline: none;
  transition: border-color .2s, background .2s;
}

.bbs-input:focus,
.bbs-textarea:focus {
  background: #fff;
  border-color: var(--gold);
}

.bbs-input::placeholder,
.bbs-textarea::placeholder {
  color: #bbb;
}

.bbs-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

/* ----- Responsive ----- */
@media (min-width: 768px) {
  .bbs-hero {
    padding: 100px 40px 60px;
  }

  .bbs-hero-title {
    font-size: 40px;
  }

  .bbs-hero-sub {
    font-size: 17px;
  }

  .bbs-feed {
    max-width: 680px;
    margin: 0 auto;
    padding: 12px 0 120px;
  }

  .bbs-publish {
    max-width: 680px;
    margin: 16px auto;
  }

  .bbs-tabs {
    max-width: 680px;
    margin: 0 auto;
  }

  .bbs-imgs {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
}

@media (min-width: 1024px) {
  .bbs-hero {
    padding: 120px 60px 72px;
  }

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

  .bbs-feed {
    max-width: 720px;
  }

  .bbs-publish {
    max-width: 720px;
  }

  .bbs-tabs {
    max-width: 720px;
  }

  .bbs-card {
    padding: 20px;
  }

  .bbs-bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
  }
}
