/* ========================================
   房间列表 / 广场 — 样式
   ======================================== */

/* 主内容区 */
.main {
  min-height: calc(100vh - var(--nav-height));
}

/* 横幅 Banner */
.banner {
  text-align: center;
  padding: 5rem 2rem 3rem;
  position: relative;
}
.banner h1 {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}
.banner p {
  font-size: 1.6rem;
  color: var(--text-secondary);
  max-width: 50rem;
  margin: 0 auto;
}
.banner-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

/* 内容区域 */
.content {
  max-width: 120rem;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  gap: 3rem;
}

/* 左侧主内容 */
.content-main {
  flex: 1;
  min-width: 0;
}

/* 右侧侧边栏 */
.content-sidebar {
  flex: 0 0 30rem;
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  align-self: flex-start;
  max-height: calc(100vh - var(--nav-height) - 4rem);
  overflow-y: auto;
}

/* 区域标题 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-header .see-all {
  font-size: 1.3rem;
  color: var(--text-weak);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.section-header .see-all:hover { color: var(--primary); }

/* 房间分类标签 */
.room-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.room-tab {
  padding: 0.8rem 1.6rem;
  font-size: 1.3rem;
  color: var(--text-secondary);
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.room-tab:hover,
.room-tab.active {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-btn);
}

/* 房间卡片网格 */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* 房间卡片 */
.room-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), rgba(236, 72, 153, 0.04));
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: var(--transition-bounce);
  cursor: pointer;
}
.room-card:hover {
  transform: translateY(-0.5rem) scale(1.01);
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px -12px rgba(168, 85, 247, 0.3);
}
.room-card-cover {
  width: 100%;
  height: 14rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}
.room-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.room-card-badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  font-size: 1.1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 2rem;
  color: #fff;
}
.room-card-badge .dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #10b981;
}
.room-card-type {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  padding: 0.3rem 0.8rem;
  font-size: 1.1rem;
  border-radius: 0.4rem;
  color: #fff;
}
.room-card-type.public { background: rgba(16, 185, 129, 0.8); }
.room-card-type.private { background: rgba(239, 68, 68, 0.8); }
.room-card-type.paid { background: rgba(245, 158, 11, 0.8); }
.room-card-body {
  padding: 1.5rem;
}
.room-card-body h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-card-body .room-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.room-card-footer .room-members {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.2rem;
  color: var(--text-weak);
}
.room-card-footer .room-owner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.room-card-footer .room-owner img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}
.room-card-footer .room-owner span {
  font-size: 1.2rem;
  color: var(--text-weak);
}

/* 侧边栏组件 */
.widget {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), rgba(236, 72, 153, 0.04));
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  margin-bottom: 2rem;
}
.widget-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(90deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 在线用户列表 */
.online-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.online-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}
.online-user:hover { background: rgba(168, 85, 247, 0.1); }
.online-user .avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.online-user .avatar-wrap img {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}
.online-user .avatar-wrap .status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid #0a1128;
}
.online-user .user-info .name {
  font-size: 1.3rem;
  color: var(--text-primary);
  font-weight: 500;
}
.online-user .user-info .level {
  font-size: 1.1rem;
  color: var(--primary);
}

/* 热门房间 */
.hot-room-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.hot-room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}
.hot-room-item:hover { background: rgba(168, 85, 247, 0.1); }
.hot-room-item .hot-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.hot-room-item .hot-rank {
  width: 2rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-weak);
  text-align: center;
}
.hot-room-item .hot-rank.top1 { color: #f59e0b; }
.hot-room-item .hot-rank.top2 { color: #94a3b8; }
.hot-room-item .hot-rank.top3 { color: #b45309; }
.hot-room-item .hot-name {
  font-size: 1.3rem;
  color: var(--text-primary);
}
.hot-room-item .hot-count {
  font-size: 1.2rem;
  color: var(--text-weak);
}

/* 系统公告横幅 */
.announcement-bar {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.08));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.announcement-bar .announce-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.announcement-bar .announce-text {
  font-size: 1.3rem;
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.announcement-bar .announce-text a {
  color: var(--primary);
  font-weight: 500;
}

/* 筛选排序 */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.filter-bar .filter-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.filter-sort {
  padding: 0.6rem 1.2rem;
  font-size: 1.3rem;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: none;
}
.filter-search {
  width: 24rem;
  height: 3.6rem;
  padding: 0 1rem 0 3rem;
  font-size: 1.4rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  transition: var(--transition);
}
.filter-search:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.filter-search::placeholder { color: var(--text-weakest); }
.filter-search-wrap {
  position: relative;
}
.filter-search-wrap .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-weak);
  font-size: 1.4rem;
}

/* 创建房间按钮（浮动） */
.fab-create {
  position: fixed;
  bottom: 8rem;
  right: 2rem;
  width: 5.6rem;
  height: 5.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-btn);
  border: none;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-btn);
  font-size: 2.4rem;
  color: #fff;
  cursor: pointer;
  transition: var(--transition-bounce);
  z-index: 50;
}
.fab-create:hover {
  transform: translateY(-0.3rem) scale(1.05);
  box-shadow: var(--shadow-btn-hover);
}

/* --- 响应式 --- */
@media (max-width: 90rem) {
  .content-sidebar { flex: 0 0 28rem; }
}
@media (max-width: 768px) {
  .banner h1 { font-size: 2.8rem; }
  .content { flex-direction: column; padding: 1.5rem; }
  .content-sidebar {
    flex: none;
    width: 100%;
    position: static;
    max-height: none;
  }
  .room-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-search { width: 100%; }
  .banner-actions { flex-direction: column; gap: 1rem; }
  .banner { padding: 3rem 1.5rem 2rem; }
}
