/* ============================================
   Community Styles - 初心传承地（全新设计）
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --c-bg: #f8f5f2;
  --c-surface: #ffffff;
  --c-surface-alt: #faf8f6;
  --c-text: #1a1a1a;
  --c-text-dim: #4a4a4a;
  --c-text-muted: #8a8a8a;
  --c-accent: #c41e3a;
  --c-accent-hover: #a01830;
  --c-accent-soft: #f5e6e9;
  --c-accent-light: #fef2f2;
  --c-link: #2563eb;
  --c-border: #e8e2dc;
  --c-border-light: #f0ebe5;
  --c-shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --c-shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --c-shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
  --c-shadow-red: 0 8px 24px rgba(196,30,58,0.15);
  --c-radius: 12px;
  --c-radius-lg: 18px;
  --c-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --c-page-width: 1280px;
}

/* ---------- Body & Background ---------- */
body {
  font-family: var(--c-font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(50,160,180,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(50,160,180,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(250,240,230,0.5) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Hero Header (No-Image Pure Design) ---------- */
.comm-hero {
  position: relative;
  width: 100%;
  height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, #fff8f5 0%, #faf5f2 60%, #f5eeea 100%);
}

/* Pure CSS Gradient Background Layer */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 40%, rgba(196,30,58,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(245,158,11,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 80%, rgba(220,38,38,0.07) 0%, transparent 50%);
}

/* Animated Mesh Gradient Orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(196,30,58,0.18) 0%, transparent 70%);
  top: -10%;
  left: -5%;
  animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 70%);
  bottom: 10%;
  right: -5%;
  animation: orbFloat2 25s ease-in-out infinite reverse;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(220,38,38,0.14) 0%, transparent 70%);
  top: 40%;
  right: 20%;
  animation: orbFloat3 18s ease-in-out infinite 3s;
}

.orb-4 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(251,191,36,0.1) 0%, transparent 70%);
  bottom: 30%;
  left: 15%;
  animation: orbFloat4 22s ease-in-out infinite 5s;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, 30px) scale(1.1); }
  66% { transform: translate(-20px, 50px) scale(0.95); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, -40px) scale(1.15); }
  66% { transform: translate(20px, -20px) scale(0.9); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 30px) scale(1.08); }
}

@keyframes orbFloat4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.12); }
}

/* Canvas Layer */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* Geometric Decorations */
.geo-deco {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.geo-shape {
  position: absolute;
  opacity: 0.08;
}

/* Triangles */
.geo-triangle {
  width: 0;
  height: 0;
  border-style: solid;
}

.t1 {
  border-width: 0 40px 70px 40px;
  border-color: transparent transparent rgba(196,30,58,0.25) transparent;
  top: 15%;
  right: 12%;
  animation: geoRotate 30s linear infinite;
}

.t2 {
  border-width: 0 25px 45px 25px;
  border-color: transparent transparent rgba(245,158,11,0.2) transparent;
  bottom: 25%;
  left: 8%;
  animation: geoRotate 25s linear infinite reverse;
}

/* Diamonds */
.geo-diamond {
  width: 50px;
  height: 50px;
  background: rgba(196,30,58,0.15);
  transform: rotate(45deg);
}

.d1 {
  top: 25%;
  left: 18%;
  animation: geoPulse 8s ease-in-out infinite;
}

.d2 {
  width: 30px;
  height: 30px;
  bottom: 35%;
  right: 22%;
  background: rgba(245,158,11,0.12);
  animation: geoPulse 10s ease-in-out infinite 2s;
}

/* Hexagons via clip-path */
.geo-hex {
  width: 60px;
  height: 52px;
  background: rgba(185,28,28,0.12);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.h1 {
  top: 60%;
  right: 10%;
  animation: geoFloat 12s ease-in-out infinite;
}

/* Lines */
.geo-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,30,58,0.18), transparent);
}

.l1 {
  width: 200px;
  top: 30%;
  left: 5%;
  transform: rotate(-15deg);
  animation: geoFade 6s ease-in-out infinite;
}

.l2 {
  width: 150px;
  top: 50%;
  right: 8%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(245,158,11,0.14), transparent);
  animation: geoFade 8s ease-in-out infinite 2s;
}

.l3 {
  width: 120px;
  bottom: 40%;
  left: 25%;
  transform: rotate(-8deg);
  animation: geoFade 7s ease-in-out infinite 1s;
}

/* Dot Grid Pattern */
.geo-dot-grid {
  width: 120px;
  height: 120px;
  top: 10%;
  left: 30%;
  background-image: radial-gradient(circle, rgba(196,30,58,0.12) 1px, transparent 1px);
  background-size: 15px 15px;
  animation: geoFade 10s ease-in-out infinite;
}

@keyframes geoRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes geoPulse {
  0%, 100% { transform: rotate(45deg) scale(1); opacity: 0.08; }
  50% { transform: rotate(45deg) scale(1.2); opacity: 0.15; }
}

@keyframes geoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes geoFade {
  0%, 100% { opacity: 0.04; }
  50% { opacity: 0.12; }
}

/* Main Content */
.comm-hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: #1a1a1a;
  padding: 0 24px;
  max-width: 800px;
  opacity: 0;
  animation: heroFadeIn 1.2s ease-out 0.3s forwards;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
  opacity: 0;
  animation: heroFadeIn 1s ease-out 0.1s forwards;
}

.eyebrow-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,30,58,0.4));
}

.eyebrow-line:last-child {
  background: linear-gradient(90deg, rgba(196,30,58,0.4), transparent);
}

.eyebrow-text {
  font-size: 0.82rem;
  letter-spacing: 5px;
  color: rgba(196,30,58,0.7);
  font-weight: 500;
}

.comm-hero-title {
  font-size: clamp(3.2rem, 9vw, 6rem);
  font-weight: 800;
  letter-spacing: 8px;
  margin-bottom: 24px;
  color: #1a1a1a;
  line-height: 1.05;
}

.title-line {
  display: block;
}

.title-glow {
  text-shadow:
    0 0 20px rgba(196,30,58,0.15),
    0 0 40px rgba(196,30,58,0.08);
}

.title-highlight {
  background: linear-gradient(135deg, #d97706 0%, #dc2626 50%, #991b1b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.title-highlight::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #dc2626, #d97706, transparent);
  border-radius: 2px;
}

.comm-hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(26,26,26,0.55);
  letter-spacing: 3px;
  font-weight: 300;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
}

.divider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626, #d97706);
  position: relative;
  box-shadow: 0 0 12px rgba(196,30,58,0.25);
}

.divider-dot::before,
.divider-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 80px;
  height: 1px;
}

.divider-dot::before {
  right: 14px;
  background: linear-gradient(90deg, transparent, rgba(196,30,58,0.25));
}

.divider-dot::after {
  left: 14px;
  background: linear-gradient(90deg, rgba(196,30,58,0.25), transparent);
}

/* Scroll Hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 24px;
  right: 32px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  opacity: 0;
  animation: heroFadeIn 1s ease-out 1.2s forwards;
  transition: opacity 0.4s ease;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 1.5px solid rgba(26,26,26,0.18);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}

.scroll-wheel {
  width: 3px;
  height: 7px;
  background: rgba(196,30,58,0.45);
  border-radius: 2px;
  animation: scrollWheel 2s ease-in-out infinite;
}

.scroll-text {
  font-size: 0.68rem;
  color: rgba(26,26,26,0.4);
  letter-spacing: 3px;
}

/* Bottom Wave Transition */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 5;
  pointer-events: none;
}

.hero-wave svg {
  width: 100%;
  height: 100%;
}

@keyframes scrollWheel {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.2; }
}

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

/* ---------- Community Layout ---------- */
.community-main {
  position: relative;
  z-index: 1;
  max-width: var(--c-page-width);
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: 240px 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* ---------- Left Sidebar ---------- */
.sidebar-left {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.user-card {
  background: var(--c-surface);
  border-radius: var(--c-radius-lg);
  padding: 0 0 20px;
  text-align: center;
  box-shadow: var(--c-shadow-sm);
  border: 1px solid var(--c-border-light);
  overflow: hidden;
  position: relative;
}

.user-card-cover {
  height: 70px;
  background: linear-gradient(135deg, #c41e3a 0%, #8b0000 50%, #dc2626 100%);
  position: relative;
  overflow: hidden;
}

.user-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.user-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-top: -36px;
  margin-bottom: 12px;
}

.user-avatar-fb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  border: 4px solid var(--c-surface);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  background: linear-gradient(135deg, #c41e3a, #8b0000);
}

.user-avatar-fb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: -4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.avatar-edit-btn:hover {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}

.vip-badge {
  position: absolute;
  right: -2px;
  bottom: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #fff;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.user-nick {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--c-text);
  padding: 0 16px;
}

.user-bio {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
  padding: 0 16px;
}

.user-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--c-border-light);
  border-bottom: 1px solid var(--c-border-light);
  margin-bottom: 14px;
}

.user-stat {
  flex: 1;
  text-align: center;
  cursor: pointer;
  padding: 4px 0;
  transition: all 0.2s;
  border-radius: 8px;
  position: relative;
}

.user-stat.clickable:hover {
  background: var(--c-accent-soft);
}

.user-stat.clickable:hover .stat-num {
  color: var(--c-accent);
}

.stat-num {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
  transition: color 0.2s;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--c-text-muted);
  margin-top: 2px;
}

.user-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.user-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.86rem;
  color: var(--c-text-dim);
  transition: all 0.2s;
  cursor: pointer;
}

.user-link:hover {
  background: var(--c-accent-soft);
  color: var(--c-accent);
}

.user-link .link-icon {
  font-size: 1rem;
  width: 22px;
  text-align: center;
}

/* Calendar Widget */
.side-widget {
  background: var(--c-surface);
  border-radius: var(--c-radius-lg);
  padding: 18px;
  box-shadow: var(--c-shadow-sm);
  border: 1px solid var(--c-border-light);
}

.widget-header {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-header i {
  color: var(--c-accent);
}

.calendar-month {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
  color: var(--c-text);
}

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

.calendar-grid .weekday {
  font-size: 0.7rem;
  color: var(--c-text-muted);
  padding: 4px 0;
}

.calendar-grid .calendar-day {
  font-size: 0.75rem;
  padding: 5px 0;
  border-radius: 6px;
  color: var(--c-text-dim);
  cursor: default;
}

.calendar-grid .calendar-day.checked {
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-weight: 600;
}

.calendar-grid .calendar-day.today {
  background: var(--c-accent);
  color: #fff;
  font-weight: 600;
}

.calendar-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--c-text-muted);
}

.calendar-info .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.calendar-info .dot.checked { background: var(--c-accent-soft); border: 1px solid var(--c-accent); }
.calendar-info .dot.today { background: var(--c-accent); }

/* ---------- Main Feed ---------- */
.main-feed { min-width: 0; }

/* Composer */
.composer {
  background: var(--c-surface);
  border-radius: var(--c-radius-lg);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--c-shadow-sm);
  border: 1px solid var(--c-border-light);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.composer:focus-within {
  box-shadow: var(--c-shadow-md);
  border-color: rgba(196,30,58,0.15);
}

.composer-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.composer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  background: linear-gradient(135deg, #c41e3a, #8b0000);
}

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

.composer-input {
  flex: 1;
  min-height: 44px;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--c-font);
  font-size: 0.95rem;
  color: var(--c-text);
  line-height: 1.65;
  padding-top: 10px;
  background: transparent;
}

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

.composer-media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin: 14px 0 0 58px;
}

.cmp-media-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--c-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--c-text-muted);
}

.cmp-media-item img,
.cmp-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cmp-media-item .rm-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.cmp-media-item .rm-btn:hover { background: rgba(0,0,0,0.7); }

.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-left: 58px;
}

.composer-tools { display: flex; gap: 4px; }

.cmp-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  background: transparent;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  font-family: var(--c-font);
  transition: all 0.2s;
}

.cmp-tool:hover {
  background: var(--c-surface-alt);
  color: var(--c-text);
}

.cmp-tool i {
  font-size: 1rem;
}

.cmp-tool.photo:hover { color: #2563eb; background: #eff6ff; }
.cmp-tool.video:hover { color: #16a34a; background: #f0fdf4; }
.cmp-tool.topic:hover { color: var(--c-accent); background: var(--c-accent-soft); }
.cmp-tool.emoji:hover { color: #d97706; background: #fffbeb; }

.cmp-submit {
  padding: 9px 28px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-hover));
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--c-font);
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(196,30,58,0.2);
}

.cmp-submit:hover {
  transform: translateY(-1px);
  box-shadow: var(--c-shadow-red);
}

.cmp-submit:active { transform: scale(0.97); }
.cmp-submit:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Feed Tabs */
.feed-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  background: var(--c-surface);
  border-radius: var(--c-radius-lg);
  padding: 5px;
  box-shadow: var(--c-shadow-sm);
  border: 1px solid var(--c-border-light);
}

.feed-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-radius: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-text-dim);
  font-family: var(--c-font);
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.feed-tab i {
  font-size: 0.85rem;
}

.feed-tab.active {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-hover));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(196,30,58,0.2);
}

.feed-tab:not(.active):hover {
  background: var(--c-surface-alt);
  color: var(--c-text);
}

/* Post Card */
.post {
  background: var(--c-surface);
  border-radius: var(--c-radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--c-shadow-sm);
  border: 1px solid var(--c-border-light);
  transition: box-shadow 0.3s, transform 0.3s;
  animation: fadeInUp 0.5s ease-out forwards;
}

.post:hover {
  box-shadow: var(--c-shadow-md);
  transform: translateY(-1px);
}

.post:nth-child(1) { animation-delay: 0s; }
.post:nth-child(2) { animation-delay: 0.08s; }
.post:nth-child(3) { animation-delay: 0.16s; }
.post:nth-child(4) { animation-delay: 0.24s; }
.post:nth-child(5) { animation-delay: 0.32s; }

.post-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--c-surface);
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.post-avatar-fb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
}

.post-avatar-fb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-head { flex: 1; min-width: 0; }

.post-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.post-author {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-text);
}

.post-verified {
  font-size: 0.65rem;
  color: #fff;
  background: var(--c-accent);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.post-meta-text {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-top: 3px;
}

.post-follow {
  flex-shrink: 0;
  padding: 5px 16px;
  border: 1px solid var(--c-accent-soft);
  border-radius: 16px;
  background: transparent;
  color: var(--c-accent);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--c-font);
  font-weight: 600;
  transition: all 0.2s;
}

.post-follow:hover {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}

.post-follow.followed {
  background: var(--c-surface-alt);
  color: var(--c-text-muted);
  border-color: var(--c-border);
}

.post-follow.followed:hover {
  background: #fee2e2;
  color: var(--c-accent);
  border-color: #fecaca;
}

.post-body {
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 14px;
  word-break: break-word;
  color: var(--c-text-dim);
}

.post-body a {
  color: var(--c-link);
  text-decoration: none;
}

.post-body .topic-tag {
  color: var(--c-accent);
  cursor: pointer;
  font-weight: 500;
}

.post-body .topic-tag:hover {
  text-decoration: underline;
}

/* Post Media Grid - Max 3 per row, small thumbnails */
.post-media-grid {
  margin-bottom: 14px;
  border-radius: var(--c-radius);
  overflow: hidden;
  display: grid;
  gap: 4px;
}

.post-media-grid.single {
  grid-template-columns: 1fr;
  max-width: 320px;
}

.post-media-grid.double {
  grid-template-columns: repeat(2, 1fr);
  max-width: 400px;
}

.post-media-grid.triple,
.post-media-grid.multiple {
  grid-template-columns: repeat(3, 1fr);
  max-width: 480px;
}

.post-media-grid .media-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--c-surface-alt);
}

.post-media-grid .media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.post-media-grid .media-item:hover img {
  transform: scale(1.05);
}

.post-media-grid .media-item .media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.03);
  transition: background 0.2s;
}

.post-media-grid .media-item:hover .media-overlay {
  background: rgba(0,0,0,0.08);
}

.post-media-grid .media-item .media-more-count {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
}

.post-media-grid .media-item .media-video-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
}

.post-media-grid .media-item .media-video-badge i {
  font-size: 2rem;
  color: #fff;
  opacity: 0.9;
}

.post-card-wrap {
  margin-bottom: 14px;
  background: var(--c-surface-alt);
  border-radius: var(--c-radius);
  padding: 14px 16px;
  border-left: 3px solid var(--c-accent);
  font-size: 0.86rem;
  color: var(--c-text-dim);
}

.post-card-wrap .card-title {
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tag {
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 14px;
  background: var(--c-surface-alt);
  color: var(--c-text-dim);
  font-weight: 500;
  border: 1px solid var(--c-border-light);
  transition: all 0.2s;
}

.tag:hover {
  background: var(--c-accent-soft);
  color: var(--c-accent);
  border-color: var(--c-accent-soft);
}

.post-actions-row {
  display: flex;
  gap: 0;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--c-border-light);
}

.post-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  font-family: var(--c-font);
  border-radius: 10px;
  transition: all 0.2s;
  position: relative;
}

.post-action:hover {
  background: var(--c-surface-alt);
  color: var(--c-text);
}

.post-action.liked { color: var(--c-accent); }

.post-action .action-count { font-weight: 600; }

.post-action i {
  font-size: 1rem;
}

/* Comments */
.post-comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--c-border-light);
  display: none;
}

.post-comments.open { display: block; }

.cmt-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border-light);
}

.cmt-item:last-child { border-bottom: none; }

.cmt-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.7rem;
  overflow: hidden;
}

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

.cmt-body { flex: 1; min-width: 0; }

.cmt-author {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-text);
}

.cmt-author .cmt-reply-to {
  font-weight: 400;
  color: var(--c-text-muted);
  margin-left: 4px;
}

.cmt-text {
  font-size: 0.86rem;
  color: var(--c-text-dim);
  margin-top: 3px;
  line-height: 1.5;
}

.cmt-bottom {
  font-size: 0.74rem;
  color: var(--c-text-muted);
  margin-top: 4px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.cmt-bottom .cmt-like { cursor: pointer; transition: color 0.2s; }
.cmt-bottom .cmt-like:hover { color: var(--c-accent); }

.cmt-input-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.cmt-input {
  flex: 1;
  padding: 9px 16px;
  border: 1px solid var(--c-border);
  border-radius: 20px;
  outline: none;
  font-size: 0.84rem;
  font-family: var(--c-font);
  color: var(--c-text);
  background: var(--c-surface-alt);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cmt-input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(196,30,58,0.08);
}

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

/* ---------- Right Sidebar ---------- */
.sidebar-right {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-card {
  background: var(--c-surface);
  border-radius: var(--c-radius-lg);
  padding: 18px 20px;
  box-shadow: var(--c-shadow-sm);
  border: 1px solid var(--c-border-light);
}

.side-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.side-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.side-card-more {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 10px;
  transition: all 0.2s;
}

.side-card-more:hover {
  color: var(--c-accent);
  background: var(--c-accent-soft);
}

/* Trending */
.trend-list { list-style: none; }

.trend-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.trend-item:hover {
  background: var(--c-surface-alt);
  margin: 0 -8px;
  padding: 10px 8px;
}

.trend-rank {
  font-size: 0.9rem;
  font-weight: 800;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  color: var(--c-text-muted);
  line-height: 1.4;
}

.trend-item.hot .trend-rank { color: var(--c-accent); }
.trend-item.hot:nth-child(1) .trend-rank { color: #dc2626; }
.trend-item.hot:nth-child(2) .trend-rank { color: #ea580c; }
.trend-item.hot:nth-child(3) .trend-rank { color: #d97706; }

.trend-info { min-width: 0; }

.trend-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
}

.trend-meta {
  font-size: 0.74rem;
  color: var(--c-text-muted);
  margin-top: 3px;
}

/* Recommend Users */
.rec-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s;
}

.rec-user:hover {
  background: var(--c-surface-alt);
  margin: 0 -8px;
  padding: 8px;
}

.rec-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  overflow: hidden;
  background: linear-gradient(135deg, #c41e3a, #8b0000);
}

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

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

.rec-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--c-text);
}

.rec-desc {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.rec-follow-btn {
  flex-shrink: 0;
  padding: 5px 14px;
  border: 1px solid var(--c-accent);
  border-radius: 14px;
  background: transparent;
  color: var(--c-accent);
  font-size: 0.76rem;
  cursor: pointer;
  font-family: var(--c-font);
  font-weight: 600;
  transition: all 0.2s;
}

.rec-follow-btn:hover {
  background: var(--c-accent);
  color: #fff;
}

.rec-follow-btn.followed {
  background: var(--c-surface-alt);
  color: var(--c-text-muted);
  border-color: var(--c-border);
}

.rec-follow-btn.followed:hover {
  background: #fee2e2;
  color: var(--c-accent);
  border-color: #fecaca;
}

/* Hot Content */
.hot-content-list { display: flex; flex-direction: column; gap: 12px; }

.hot-content-item {
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
  transition: background 0.2s;
}

.hot-content-item:hover {
  background: var(--c-surface-alt);
}

.hot-content-cover {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--c-surface-alt);
}

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

.hot-content-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-content-meta {
  font-size: 0.74rem;
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quick Links */
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; }

.quick-link {
  padding: 7px 14px;
  border-radius: 16px;
  background: var(--c-surface-alt);
  color: var(--c-text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--c-border-light);
}

.quick-link:hover {
  background: var(--c-accent-soft);
  color: var(--c-accent);
  border-color: var(--c-accent-soft);
  transform: translateY(-1px);
}

.quick-link i {
  font-size: 0.8rem;
}


/* ---------- Load More ---------- */
.load-more-wrap {
  text-align: center;
  padding: 20px 0;
}

.btn-load-more {
  padding: 10px 28px;
  border: 1px solid var(--c-border);
  border-radius: 20px;
  background: var(--c-surface);
  color: var(--c-text-dim);
  font-size: 0.88rem;
  font-family: var(--c-font);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.btn-load-more:hover {
  background: var(--c-accent-soft);
  border-color: var(--c-accent-soft);
  color: var(--c-accent);
  box-shadow: var(--c-shadow-red);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30,30,30,0.95);
  color: #fff;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 300;
  backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

/* ---------- Back to Top ---------- */
.btt {
  position: fixed;
  right: 28px;
  bottom: 36px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-surface);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--c-text-dim);
  font-size: 1.1rem;
  z-index: 150;
  transition: all 0.3s;
  border: 1px solid var(--c-border-light);
  cursor: pointer;
}

.btt:hover {
  background: var(--c-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--c-shadow-red);
}

/* ---------- Animations ---------- */
@keyframes heartPop {
  0% { transform: scale(0.3); opacity: 1; }
  60% { transform: scale(1.4); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.heart-particle {
  position: absolute;
  pointer-events: none;
  font-size: 1.1rem;
  animation: heartPop 0.55s ease-out forwards;
  z-index: 10;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .community-main {
    grid-template-columns: 1fr 280px;
  }
  .sidebar-left { display: none; }
  .comm-hero { padding: 60px 20px 40px; }
}

@media (max-width: 760px) {
  .community-main {
    grid-template-columns: 1fr;
    padding: 0 12px 60px;
  }
  .sidebar-right { display: none; }
  .post { padding: 16px 18px; }
  .composer { padding: 16px 18px; }
  .composer-bottom {
    padding-left: 0;
    flex-wrap: wrap;
    gap: 10px;
  }
  .composer-media-preview { margin-left: 0; }
  .feed-tabs { margin-bottom: 10px; }

  /* Hero responsive */
  .comm-hero-title { font-size: 2.8rem; letter-spacing: 4px; }
  .comm-hero-sub { font-size: 0.9rem; letter-spacing: 1px; }
  .hero-eyebrow { gap: 10px; margin-bottom: 16px; }
  .eyebrow-line { width: 24px; }
  .eyebrow-text { font-size: 0.75rem; letter-spacing: 2px; }
  .orb-1 { width: 250px; height: 250px; }
  .orb-2 { width: 200px; height: 200px; }
  .orb-3, .orb-4 { display: none; }
  .geo-deco { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Emoji Picker ---------- */
.emoji-picker {
  position: absolute;
  z-index: 500;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--c-radius);
  box-shadow: var(--c-shadow-lg);
  padding: 12px;
  width: 300px;
}

.emoji-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--c-border-light);
  padding-bottom: 8px;
}

.emoji-tab {
  background: none;
  border: none;
  font-size: 0.82rem;
  color: var(--c-text-muted);
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--c-font);
}

.emoji-tab.active {
  color: var(--c-accent);
  background: var(--c-accent-soft);
  font-weight: 600;
}

.emoji-list {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  max-height: 200px;
  overflow-y: auto;
}

.emoji-item {
  font-size: 1.3rem;
  padding: 5px;
  text-align: center;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.emoji-item:hover {
  background: var(--c-surface-alt);
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  background: var(--c-surface);
  border-radius: var(--c-radius-lg);
  box-shadow: var(--c-shadow-lg);
  max-width: 560px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.3s ease-out;
}

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

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

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--c-surface-alt);
  color: var(--c-text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.modal-close:hover {
  background: var(--c-border);
  color: var(--c-text);
}

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

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--c-border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  padding: 9px 22px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-family: var(--c-font);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-hover));
  color: #fff;
  box-shadow: 0 2px 8px rgba(196,30,58,0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--c-shadow-red);
}

.btn-secondary {
  background: var(--c-surface-alt);
  color: var(--c-text-dim);
  border: 1px solid var(--c-border);
}

.btn-secondary:hover {
  background: var(--c-border-light);
}

/* Image Preview Modal */
.modal-image-preview .modal-content {
  max-width: 900px;
  background: rgba(10,10,10,0.95);
  border: none;
}

.modal-image-preview img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.modal-nav:hover { background: rgba(255,255,255,0.2); }
.modal-nav.modal-prev { left: 16px; }
.modal-nav.modal-next { right: 16px; }

/* Comment Modal */
.comment-input-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c-surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.input-wrapper {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--c-surface-alt);
  border-radius: 22px;
  padding: 4px 4px 4px 16px;
  border: 1px solid var(--c-border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(196,30,58,0.08);
}

.comment-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.88rem;
  color: var(--c-text);
  font-family: var(--c-font);
}

.btn-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.btn-send:hover {
  background: var(--c-accent-hover);
  transform: scale(1.05);
}

/* Upload Modal */
.upload-area {
  border: 2px dashed var(--c-border);
  border-radius: var(--c-radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--c-surface-alt);
}

.upload-area:hover {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
}

/* User List Modal */
.modal-user-list .modal-content {
  max-width: 420px;
}

.user-list-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--c-surface-alt);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--c-border);
}

.user-list-search i {
  color: var(--c-text-muted);
  font-size: 0.9rem;
}

.user-list-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.88rem;
  color: var(--c-text);
  font-family: var(--c-font);
}

.user-list-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.user-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  transition: background 0.2s;
  cursor: pointer;
}

.user-list-item:hover {
  background: var(--c-surface-alt);
}

.user-list-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #c41e3a, #8b0000);
}

.user-list-info { flex: 1; min-width: 0; }

.user-list-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-text);
}

.user-list-meta {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-top: 2px;
}

/* Settings Modal */
.settings-section {
  margin-bottom: 24px;
}

.settings-section h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border-light);
}

.setting-item {
  margin-bottom: 14px;
}

.setting-item label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--c-text-dim);
  margin-bottom: 6px;
}

.setting-item input,
.setting-item textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font-size: 0.88rem;
  font-family: var(--c-font);
  color: var(--c-text);
  background: var(--c-surface-alt);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.setting-item input:focus,
.setting-item textarea:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(196,30,58,0.08);
}

.setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border-light);
  font-size: 0.88rem;
  color: var(--c-text-dim);
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--c-border);
  border-radius: 24px;
  transition: 0.3s;
}

.slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.switch input:checked + .slider {
  background: var(--c-accent);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

/* Collections & History */
.collections-list,
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.collection-item,
.history-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--c-surface-alt);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--c-border-light);
}

.collection-item:hover,
.history-item:hover {
  border-color: var(--c-accent-soft);
  background: var(--c-accent-light);
}

.collection-item img,
.history-item img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--c-border);
}

.collection-info,
.history-info { flex: 1; min-width: 0; }

.collection-title,
.history-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-meta,
.history-meta {
  font-size: 0.76rem;
  color: var(--c-text-muted);
}

/* ---------- Hidden file inputs ---------- */
input[type="file"][hidden] {
  display: none !important;
}
