/* ========================================
   LightCafe 放映厅 — 全局样式
   配色：奶油色背景 + 咖啡色调 + 暖白卡片
   ======================================== */

/* ----- 基础重置 ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
}
body {
    font-family: "Nunito", "Noto Sans SC", sans-serif;
    color: #3e2c1f;
    margin: 0;
    padding: 0;
    background: #f5e6ca;
}

/* ----- 滚动条 ----- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f5e6ca;
}
::-webkit-scrollbar-thumb {
    background: #8b5e3c;
    border-radius: 3px;
}

/* ----- 动画 ----- */
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- 页面容器 ----- */
.page {
    width: 1280px;
    margin: 0 auto;
    min-height: 100vh;
    background: #f5e6ca;
}

/* ----- 导航栏 (lightcafe 风格) ----- */
header {
    background-color: #ffffff;
    border-bottom: 2px solid #ffffff;
    box-shadow: -27px -1px 20px -5px rgb(252 168 80);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo img {
    max-width: 200px;
    width: 100%;
    height: auto;
}
header nav {
    display: flex;
    height: 100%;
}
header nav a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 24px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}
header nav a:hover {
    background-color: #f0f5fb;
}
header nav a.active {
    background-color: #e3edf8;
    color: #225ea8;
}
header nav a small {
    font-size: 12px;
    opacity: 0.7;
    font-weight: 400;
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 用户区域 */
.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.navbar-user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #3e2c1f;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
}
.navbar-user-link:hover {
    opacity: 0.7;
}
.navbar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(139, 94, 60, 0.2);
}
.navbar-user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a67b5b, #8b5e3c);
    color: #fff9f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}
.navbar-user-name {
    color: #6b4f3a;
}

/* ----- 按钮 ----- */
.btn {
    font-weight: 600;
    border-radius: 12px;
    padding: 10px 24px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary {
    background: #8b5e3c;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover {
    background: #5c3d2e;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.btn-primary:active {
    transform: scale(0.95);
}
.btn-outline {
    background: transparent;
    color: #8b5e3c;
    border: 2px solid #8b5e3c;
}
.btn-outline:hover {
    background: #8b5e3c;
    color: white;
}
.btn-outline:active {
    transform: scale(0.95);
}
.btn-sm {
    padding: 6px 16px;
    font-size: 14px;
}
.btn-lg {
    padding: 14px 32px;
    font-size: 18px;
}

/* ----- 卡片 ----- */
.card {
    background: #fff9f0;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* ----- 欢迎卡片 ----- */
.welcome-card {
    margin: 32px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(
        135deg,
        #fff9f0 0%,
        #fff9f0 60%,
        rgba(139, 94, 60, 0.04) 100%
    );
}

/* ----- 搜索框 ----- */
.search-box {
    width: 100%;
    background: #fff9f0;
    border: 2px solid rgba(139, 94, 60, 0.1);
    border-radius: 16px;
    padding: 14px 20px 14px 52px;
    font-size: 16px;
    color: #3e2c1f;
    outline: none;
    transition: border 0.2s;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}
.search-box:focus {
    border-color: rgba(139, 94, 60, 0.4);
}
.search-box::placeholder {
    color: rgba(107, 79, 58, 0.4);
}

/* ----- 功能栏 ----- */
.toolbar {
    margin: 32px 32px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}
.search-wrapper {
    flex: 1;
    position: relative;
}
.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(107, 79, 58, 0.6);
    font-size: 18px;
}

/* ----- 房间网格 ----- */
.room-section {
    margin: 32px;
}
.room-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.room-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.room-card {
    overflow: hidden;
    transition: all 0.3s;
}
.room-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* 视频封面 */
.room-cover {
    position: relative;
    aspect-ratio: 16/9;
    background: #1f2937;
    overflow: hidden;
    cursor: pointer;
}
.room-cover-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}
.room-cover-play {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.room-card:hover .room-cover-play {
    opacity: 1;
}
.room-cover-play-btn {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}
.room-card:hover .room-cover-play-btn {
    transform: scale(1.1);
}

/* 封面角标 */
.badge-live {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.badge-live-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}
.badge-viewers {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 房间卡片内容 */
.room-body {
    padding: 16px;
}
.room-title {
    font-size: 18px;
    font-weight: 700;
    color: #3e2c1f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 0 12px;
}
.room-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.room-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(139, 94, 60, 0.1);
    color: #8b5e3c;
}
.room-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.room-host {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b4f3a;
    font-weight: 500;
}
.room-host-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #a67b5b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
}

/* ----- 房间页顶部栏 ----- */
.room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #fff9f0;
    border-bottom: 1px solid rgba(139, 94, 60, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}
.room-header-center {
    text-align: center;
}
.room-header-title {
    font-size: 18px;
    font-weight: 800;
    color: #3e2c1f;
    margin: 0;
}
.room-header-track {
    font-size: 14px;
    color: #6b4f3a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.room-header-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

/* ----- 房间主体布局 ----- */
.room-main {
    display: flex;
    flex: 1;
    min-height: 0;
}
.room-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 12px 24px 24px;
    min-width: 0;
}
.room-right {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 24px 24px 12px;
}

/* ----- 视频播放器 ----- */
.player {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(139, 94, 60, 0.1);
}
.player-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.player-play-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.player-play-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}
.player-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}
.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}
.player-controls-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.player-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.player-progress {
    width: 192px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}
.player-progress-fill {
    width: 33%;
    height: 100%;
    background: #a67b5b;
    border-radius: 2px;
}

/* ----- 聊天区 ----- */
.chat-panel {
    margin-top: 16px;
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.chat-header h3 {
    font-weight: 800;
    color: #3e2c1f;
    margin: 0;
}
.chat-count {
    font-size: 12px;
    color: #6b4f3a;
    background: rgba(139, 94, 60, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 8px;
}
.chat-msg {
    display: flex;
    gap: 10px;
}
.chat-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
}
.chat-msg-avatar.host {
    background: #8b5e3c;
    box-shadow: 0 0 0 2px rgba(139, 94, 60, 0.3);
}
.chat-msg-avatar.user {
    background: #a67b5b;
}
.chat-msg-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-msg-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-msg-name {
    font-size: 12px;
    font-weight: 700;
    color: #3e2c1f;
}
.chat-msg-badge {
    font-size: 10px;
    background: #8b5e3c;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}
.chat-msg-time {
    font-size: 10px;
    color: rgba(107, 79, 58, 0.6);
}
.chat-msg-text {
    font-size: 14px;
    color: #6b4f3a;
    margin: 0;
    line-height: 1.5;
}

/* ----- 侧边栏模块 ----- */
.side-module {
    padding: 16px;
}
.side-module h3 {
    font-weight: 800;
    color: #3e2c1f;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.side-module .count {
    font-size: 12px;
    color: #6b4f3a;
    font-weight: 400;
    margin-left: auto;
}
.side-input-row {
    display: flex;
    gap: 8px;
}
.side-input {
    flex: 1;
    background: #f5e6ca;
    border: 1px solid rgba(139, 94, 60, 0.15);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 14px;
    color: #3e2c1f;
    outline: none;
    font-family: inherit;
    transition: border 0.2s;
}
.side-input:focus {
    border-color: rgba(139, 94, 60, 0.4);
}
.side-input::placeholder {
    color: rgba(107, 79, 58, 0.4);
}

/* ----- 播放列表 ----- */
.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.playlist-item:hover {
    background: rgba(139, 94, 60, 0.05);
}
.playlist-item.active {
    background: rgba(139, 94, 60, 0.1);
    box-shadow: 0 0 0 1px rgba(139, 94, 60, 0.2);
}
.playlist-thumb {
    width: 64px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
}
.playlist-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}
.playlist-info {
    flex: 1;
    min-width: 0;
}
.playlist-info .title {
    font-size: 14px;
    font-weight: 600;
    color: #3e2c1f;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.playlist-info .duration {
    font-size: 12px;
    color: rgba(107, 79, 58, 0.7);
    margin: 0;
}
.playlist-remove {
    opacity: 0;
    color: rgba(107, 79, 58, 0.4);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.15s;
}
.playlist-item:hover .playlist-remove {
    opacity: 1;
}
.playlist-remove:hover {
    color: #ef4444;
}

/* ----- 在线用户 ----- */
.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    transition: background 0.15s;
}
.user-item:hover {
    background: rgba(139, 94, 60, 0.05);
}
.user-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
}
.user-avatar.host {
    background: #8b5e3c;
}
.user-avatar.member {
    background: #a67b5b;
}
.user-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff9f0;
    display: inline-block;
}
.user-dot.online {
    background: #22c55e;
}
.user-dot.offline {
    background: #9ca3af;
}
.user-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: #3e2c1f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}
.user-badge.host {
    background: #8b5e3c;
    color: white;
}
.user-badge.member {
    background: rgba(139, 94, 60, 0.1);
    color: #8b5e3c;
    font-weight: 600;
}

/* ----- 页脚 ----- */
.footer {
    margin: 64px 32px 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(139, 94, 60, 0.1);
    text-align: center;
    font-size: 14px;
    color: rgba(107, 79, 58, 0.6);
}

/* ----- 工具类 ----- */
.mt-nav {
    height: 73px;
} /* 导航栏占位 */
.flex-col {
    display: flex;
    flex-direction: column;
}
.flex-1 {
    flex: 1;
}
.gap-2 {
    gap: 8px;
}
.gap-3 {
    gap: 12px;
}
.gap-4 {
    gap: 16px;
}
.text-center {
    text-align: center;
}
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.scroll-y {
    overflow-y: auto;
}

/* ========================================
   弹窗 / 模态框
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal {
    background: #fff9f0;
    border-radius: 20px;
    padding: 32px;
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}
.modal h2 {
    font-size: 22px;
    font-weight: 800;
    color: #3e2c1f;
    margin: 0 0 20px;
}
.modal label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #6b4f3a;
    margin-bottom: 6px;
}
.modal input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    background: #f5e6ca;
    border: 1px solid rgba(139, 94, 60, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 15px;
    color: #3e2c1f;
    outline: none;
    font-family: inherit;
    transition: border 0.2s;
    margin-bottom: 16px;
}
.modal input[type="text"]:focus {
    border-color: #8b5e3c;
}

/* 标签选择器 */
.tag-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.tag-option {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid rgba(139, 94, 60, 0.15);
    background: #fff9f0;
    color: #6b4f3a;
    transition: all 0.2s;
    font-family: inherit;
}
.tag-option:hover {
    border-color: #8b5e3c;
}
.tag-option.selected {
    background: #8b5e3c;
    color: white;
    border-color: #8b5e3c;
}

/* 开关 / Toggle */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.toggle-row span {
    font-size: 14px;
    font-weight: 700;
    color: #6b4f3a;
}
.toggle {
    width: 48px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle.on {
    background: #8b5e3c;
}
.toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: left 0.2s;
}
.toggle.on::after {
    left: 25px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ========================================
   视频播放器（iframe 容器）
   ======================================== */
.player-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================================
   搜索栏——房间号搜索提示
   ======================================== */
.search-hint {
    font-size: 11px;
    color: rgba(107, 79, 58, 0.4);
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* ========================================
   登录按钮 / 用户菜单
   ======================================== */
.user-menu {
    position: relative;
}
.user-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    background: #fff9f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px;
    min-width: 160px;
    z-index: 60;
}
.user-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #3e2c1f;
    cursor: pointer;
    font-family: inherit;
}
.user-dropdown button:hover {
    background: rgba(139, 94, 60, 0.08);
}

/* ========================================
   在线人数实时徽标
   ======================================== */
.live-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #22c55e;
}
.live-count::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* ========================================
   响应式宽高比容器
   ======================================== */
.aspect-16-9 {
    aspect-ratio: 16/9;
}

/* ========================================
   弹幕 (Danmaku)
   ======================================== */
.danmaku-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}
.danmaku-msg {
    position: absolute;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    animation: danmaku-fly 8s linear forwards;
    user-select: none;
}
@keyframes danmaku-fly {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100vw);
    }
}

/* ========================================
   在线用户列表（紧凑版）
   ======================================== */
.presence-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 4px;
}
.presence-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(139, 94, 60, 0.08);
    color: #6b4f3a;
}
.presence-tag .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}
.presence-tag.host {
    background: rgba(139, 94, 60, 0.18);
    color: #5c3d2e;
    font-weight: 700;
}

/* ========================================
   错误 / 提示 Toast
   ======================================== */
.toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.toast.error {
    background: #fee2e2;
    color: #991b1b;
}
.toast.success {
    background: #dcfce7;
    color: #166534;
}

/* 响应式导航 */
@media (max-width: 768px) {
    header {
        padding: 0 12px;
        height: 60px;
    }
    .logo img {
        max-width: 140px;
    }
    .hamburger {
        display: flex;
    }
    header nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    header nav.open {
        display: flex;
    }
    header nav a {
        padding: 14px 20px;
        font-size: 15px;
        flex-direction: row;
        gap: 6px;
    }
    header nav a small {
        font-size: 12px;
    }
}
@media (max-width: 480px) {
    header {
        height: 55px;
        padding: 0 10px;
    }
    .logo img {
        max-width: 120px;
    }
    header nav a {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ====== 公告弹窗 ====== */
.announce-overlay {
    position: fixed; inset: 0; z-index: 300;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}
.announce-card {
    background: rgba(255,249,240,0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 20px; padding: 32px 32px 32px;
    text-align: center; max-width: 380px; width: 90%;
    position: relative;
    box-shadow: 0 16px 48px rgba(62,44,31,0.2);
    border: 1px solid rgba(139,94,60,0.15);
}
.announce-close {
    position: absolute; top: 10px; right: 14px;
    background: none; border: none;
    font-size: 24px; color: #A67B5B; cursor: pointer;
}
.announce-close:hover { color: #5C3D2E; }
.announce-icon { font-size: 40px; margin-bottom: 8px; }
.announce-title { font-size: 22px; font-weight: 800; color: #3E2C1F; margin-bottom: 12px; }
.announce-body { color: #6B4F3A; font-size: 15px; line-height: 1.6; }
