/* ============================================
   CSS变量定义 - 暗色模式科技风
   ============================================ */
:root {
    --primary: #39ff14;
    --primary-hover: #32d912;
    --primary-light: rgba(57, 255, 20, 0.15);
    --danger: #ff3366;
    --danger-hover: #ff1a53;
    --danger-light: rgba(255, 51, 102, 0.15);
    --warning: #ffaa00;
    --text-main: #e0e0e0;
    --text-sub: #a0a0a0;
    --bg-main: #0a0a0f;
    --bg-secondary: #0f0f18;
    --border-color: #1a1a2e;
    --border-light: #2a2a3e;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --topbar-height: 56px;
    --glow-primary: 0 0 20px rgba(57, 255, 20, 0.3);

    /* 情报等级颜色 */
    --level-free: #00bfff;
    --level-normal: #ff9800;
    --level-advanced: #9c27b0;
    --level-top: #e91e63;
}

/* ============================================
   全局基础样式
   ============================================ */
.intel-view-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.intel-view-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.intel-view-container a {
    color: var(--primary);
    text-decoration: none;
}

/* ============================================
   整体布局
   ============================================ */
.intel-view-container .app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ============================================
   主内容区 - 页面两侧留白
   ============================================ */
.intel-view-wrapper {
    flex: 1;
    padding: 16px 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.intel-view-main {
    display: flex;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    gap: 20px;
    min-height: 0;  /* 允许flex子元素收缩到小于内容尺寸 */
}

/* ============================================
   左侧老师列表
   ============================================ */
.teacher-sidebar {
    width: 420px;
    background: #0f0f18;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    min-height: 0;  /* 允许收缩 */
}

.sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-search {
    position: relative;
}

.sidebar-search input {
    width: 100%;
    height: 32px;
    padding: 0 32px 0 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: #ffffff !important;
    font-size: 12px;
}

.sidebar-search input::placeholder {
    color: #ffffff !important;
}

.sidebar-search input:focus {
    outline: none;
    border-color: #2a2a3e;
    box-shadow: 0 0 0 1px #2a2a3e;
}

.sidebar-search-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-sub);
    font-size: 12px;
}

/* 老师标签筛选 */
.teacher-filter {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.filter-tag {
    padding: 3px 10px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-light);
    background: #1a1a2e;
    color: var(--text-sub);
}

.filter-tag:hover {
    background: rgba(57, 255, 20, 0.1);
    color: var(--text-main);
}

.filter-tag.active {
    background: rgba(57, 255, 20, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

/* 老师列表 */
.teacher-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;  /* 允许收缩到小于内容尺寸 */
}

.teacher-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    padding-right: 36px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    position: relative;
}

.teacher-item:hover {
    background: rgba(57, 255, 20, 0.05);
}

.teacher-item.active {
    background: rgba(57, 255, 20, 0.1);
}

.teacher-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    background-color: var(--primary);
    border-radius: 0 4px 4px 0;
}

.teacher-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--level-normal), var(--level-top));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    position: relative;
}

.teacher-avatar.top {
    background: linear-gradient(135deg, #9c27b0, var(--level-top));
}

.teacher-avatar .top-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    background: var(--danger);
    border-radius: 50%;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 未读数量红点（老师头像右上角） */
.unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--danger);
    border-radius: 9px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.teacher-info {
    flex: 1;
    min-width: 0;
}

.teacher-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.teacher-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.teacher-tag {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    flex-shrink: 0;
}

.teacher-tag.top {
    background: rgba(233, 30, 99, 0.15);
    color: var(--level-top);
}

.teacher-tag.normal {
    background: rgba(255, 152, 0, 0.15);
    color: var(--level-normal);
}

.teacher-preview {
    font-size: 11px;
    color: var(--text-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.teacher-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 4px;
}

.teacher-time {
    font-size: 10px;
    color: var(--text-sub);
}

.teacher-unread {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--danger);
    border-radius: var(--radius-full);
    font-size: 9px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.teacher-unread.hidden {
    display: none;
}

/* 关注按钮 */
.follow-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    margin-top: -12px;
    width: 24px;
    height: 24px;
    background: transparent;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1;
}

.follow-btn:hover {
    color: #ffc107;
    transform: translateY(-2px);
}

.follow-btn.followed {
    color: #ffc107;
}

/* 老师投票按钮 */
.teacher-vote-btn {
    margin-right: 30px;
    display: flex;
    align-items: center;
    gap: 2px;
    height: 30px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-sub);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.teacher-vote-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.teacher-vote-btn.voted {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.teacher-vote-btn .vote-count {
    font-weight: 600;
}

.teacher-vote-btn .vote-cancel {
    font-size: 11px;
    margin-left: 1px;
    opacity: 0.7;
}

.teacher-vote-btn:hover .vote-cancel {
    opacity: 1;
}

/* ============================================
   老师投票展开状态
   ============================================ */

/* 老师列表项展开状态 - 隐藏非展开内容 */
.teacher-item[data-voting-active="true"] .teacher-meta,
.teacher-item[data-voting-active="true"] .follow-btn,
.teacher-item[data-voting-active="true"] > .teacher-vote-btn {
    display: none;
}

/* 展开的投票容器 */
.teacher-vote-expanded {
    display: none;
    align-items: center;
    gap: 4px;
}

.teacher-item[data-voting-active="true"] .teacher-vote-expanded {
    display: flex;
}

/* 投票按钮 */
.vote-give-btn {
    height: 30px;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.vote-give-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* 收回按钮 */
.vote-cancel-btn {
    height: 30px;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--danger);
    background: var(--danger-light);
    color: var(--danger);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.vote-cancel-btn:hover {
    background: var(--danger);
    color: #fff;
}

/* 展开状态下的票数显示 */
.teacher-vote-expanded .vote-count-display {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    min-width: 24px;
    text-align: center;
}

/* ============================================
   右侧情报区域
   ============================================ */
.intel-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0f0f18;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 0;  /* 允许收缩 */
}

/* 主区域头部 */
.intel-header {
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.intel-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.intel-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--level-normal), var(--level-top));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.intel-header-details h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.intel-header-details p {
    font-size: 11px;
    color: var(--text-sub);
    margin-top: 2px;
}

/* 老师操作按钮组 */
.teacher-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

/* 文字按钮样式（老师主页/评论） */
.header-text-btn {
    display: inline-block;
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 28px;
}

.header-text-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.header-text-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.header-text-btn + .header-text-btn {
    margin-left: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-sub);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(57, 255, 20, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.intel-header-actions {
    display: flex;
    gap: 6px;
}

.header-action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-sub);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.header-action-btn:hover {
    background: rgba(57, 255, 20, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   情报筛选和排序
   ============================================ */
.intel-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.intel-sort-group {
    display: flex;
    gap: 4px;
}

.intel-sort-btn {
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 3px;
}

.intel-sort-btn:hover {
    background: rgba(57, 255, 20, 0.1);
    color: var(--text-main);
}

.intel-sort-btn.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.intel-sort-btn .arrow {
    font-size: 10px;
}

/* 情报筛选下拉框 */
.intel-filter-dropdown {
    position: relative;
}

.intel-filter-trigger {
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.intel-filter-trigger:hover {
    border-color: var(--primary);
}

.intel-filter-trigger.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.intel-filter-trigger .label {
    flex: 1;
}

.intel-filter-trigger .arrow {
    font-size: 8px;
    transition: transform 0.2s;
}

.intel-filter-trigger.active .arrow {
    transform: rotate(180deg);
}

.intel-filter-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 4px;
    display: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.intel-filter-menu.show {
    display: block;
}

.intel-filter-item {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.intel-filter-item:hover {
    background: rgba(57, 255, 20, 0.1);
}

.intel-filter-item.selected {
    background: var(--primary-light);
    color: var(--primary);
}

/* 情报列表区域 */
.intel-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    min-height: 0;  /* 允许收缩到小于内容尺寸 */
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-sub);
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

/* 情报卡片 */
.intel-card {
    background: #1a1a2e;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.intel-card:hover {
    border-color: var(--primary);
}

.intel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-light);
}

.intel-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.downgrade-badge {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    cursor: default;
}

.downgrade-badge.downgrade-expired {
    background: rgba(255, 153, 0, 0.2);
    border-color: #ff9900;
    color: #ff9900;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.intel-time {
    font-size: 11px;
    color: var(--text-sub);
}

.level-badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.level-badge.free {
    background: rgba(0, 191, 255, 0.15);
    color: var(--level-free);
    border: 1px solid rgba(0, 191, 255, 0.3);
}

.level-badge.normal {
    background: rgba(255, 152, 0, 0.15);
    color: var(--level-normal);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.level-badge.advanced {
    background: rgba(156, 39, 176, 0.15);
    color: var(--level-advanced);
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.level-badge.top {
    background: rgba(233, 30, 99, 0.15);
    color: var(--level-top);
    border: 1px solid rgba(233, 30, 99, 0.3);
}

.intel-card-body {
    padding: 12px 14px;
}

.intel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.4;
}

.intel-content-preview {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.intel-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    padding-right: 26px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--border-light);
    position: relative;
}

.intel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sticky-btn {
    padding: 3px 10px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-light);
    background: #1a1a2e;
    color: var(--text-sub);
    margin-left: auto;
}

.sticky-btn:hover {
    background: rgba(57, 255, 20, 0.1);
    color: var(--text-main);
}

.sticky-btn.stickied {
    background: rgba(57, 255, 20, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(57, 255, 20, 0.1);
    color: var(--primary);
}

.action-btn.voted-up {
    background: var(--primary-light);
    color: var(--primary);
}

.action-btn.voted-down {
    background: var(--danger-light);
    color: var(--danger);
}

.action-btn.favorited {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.action-btn.stickied {
    background: rgba(57, 255, 20, 0.15);
    color: var(--primary);
}

.action-btn .count {
    font-weight: 700;
}

.intel-date {
    font-size: 10px;
    color: var(--text-sub);
}

/* 加载更多 */
.load-more-container {
    text-align: center;
    padding: 12px 0;
}

.btn-load-more {
    padding: 8px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-load-more:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* 无限滚动加载提示 */
.infinite-scroll-tip {
    text-align: center;
    padding: 12px 0;
    color: var(--text-sub);
    font-size: 12px;
}

.infinite-scroll-sentinel {
    height: 1px;
}

/* ============================================
   滚动条样式
   ============================================ */
.intel-view-container ::-webkit-scrollbar {
    width: 5px;
}

.intel-view-container ::-webkit-scrollbar-track {
    background: transparent;
}

.intel-view-container ::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.intel-view-container ::-webkit-scrollbar-thumb:hover {
    background: #3a3a4e;
}

/* ============================================
   页面标题区域
   ============================================ */
.intel-view-header {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.intel-view-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.intel-view-title h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.intel-view-actions {
    display: flex;
    gap: 8px;
}

/* ============================================
   情报来源信息
   ============================================ */
.intel-source {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.intel-source .source-label {
    color: var(--primary);
}

.intel-source .source-name {
    font-weight: 600;
}

.intel-source .source-level {
    margin-left: 8px;
    font-size: 12px;
}

/* ============================================
   评论抽屉面板
   ============================================ */
.comment-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 999;
}
.comment-overlay.show {
    opacity: 1; visibility: visible;
}

.comment-drawer {
    position: fixed;
    top: 0; right: -480px;
    width: 480px; height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    transition: right 0.3s ease;
    z-index: 1000;
}
.comment-drawer.open { right: 0; }

.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px; border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.drawer-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.drawer-title .icon { font-size: 18px; }
.drawer-count { color: var(--text-sub); font-weight: normal; font-size: 14px; }
.drawer-close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); color: var(--text-sub);
    font-size: 18px; cursor: pointer; transition: all 0.2s;
}
.drawer-close:hover { background: var(--bg-tertiary); color: var(--text-main); }

/* 评论列表 */
.comment-list { flex: 1; overflow-y: auto; padding: 8px 0; }

/* 顶级评论 */
.comment-item { padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.comment-item:last-child { border-bottom: none; }

.comment-card { display: flex; gap: 10px; }
.comment-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #00bfff);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; color: #000; flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-author { font-size: 13px; font-weight: 600; }
.comment-time { font-size: 11px; color: var(--text-sub); }
.comment-content { font-size: 14px; line-height: 1.6; word-break: break-word; }

.comment-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.comment-action {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; color: var(--text-sub); cursor: pointer;
    background: none; border: none; padding: 4px 8px; border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.comment-action:hover { color: var(--primary); background: var(--primary-light); }
.comment-action.dislike:hover { color: var(--danger); background: var(--danger-light); }
.comment-action.liked { color: var(--primary); }
.comment-action.disliked { color: var(--danger); }
.comment-action .icon { font-size: 14px; }

/* 回复指示器 */
.reply-indicator {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: var(--text-sub); margin-bottom: 4px;
}
.reply-indicator .reply-arrow { color: var(--primary); }
.reply-indicator .reply-to { color: var(--primary); }
.reply-indicator .view-thread {
    color: var(--text-sub); cursor: pointer; text-decoration: underline; margin-left: 8px;
}
.reply-indicator .view-thread:hover { color: var(--primary); }

/* 子评论（一层嵌套） */
.comment-replies {
    margin-left: 46px; margin-top: 10px;
    padding-left: 14px; border-left: 2px solid var(--border-light);
}
.reply-item { padding: 8px 0; }
.reply-item:not(:last-child) { border-bottom: 1px dashed var(--border-color); margin-bottom: 8px; }
.reply-item .comment-card { gap: 8px; }
.reply-item .comment-avatar { width: 28px; height: 28px; font-size: 12px; }
.reply-item .comment-author { font-size: 12px; }
.reply-item .comment-content { font-size: 13px; }
.reply-item .comment-time { font-size: 10px; }

/* 对话区域 */
.thread-container {
    margin-top: 8px; padding: 10px 12px;
    background: var(--bg-tertiary); border-radius: var(--radius-md);
    border: 1px solid var(--border-color); display: none;
}
.thread-container.show { display: block; }
.thread-container .thread-header {
    font-size: 11px; color: var(--text-sub);
    margin-bottom: 8px; padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}
.thread-item { display: flex; gap: 8px; padding: 6px 0; }
.thread-item:not(:last-child) { border-bottom: 1px dashed var(--border-color); margin-bottom: 6px; }
.thread-avatar {
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #00bfff);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 600; color: #000; flex-shrink: 0;
}
.thread-body { flex: 1; min-width: 0; }
.thread-author { font-size: 11px; font-weight: 600; margin-bottom: 2px; }
.thread-text { font-size: 12px; line-height: 1.5; }

/* 底部输入框 */
.comment-input-area {
    padding: 12px 16px; border-top: 1px solid var(--border-color); flex-shrink: 0;
}
.comment-input-wrapper { display: flex; gap: 8px; align-items: flex-end; }
.comment-textarea {
    flex: 1; min-height: 60px; max-height: 120px;
    padding: 10px 12px; background: var(--bg-tertiary);
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    color: var(--text-main); font-size: 14px; line-height: 1.5;
    resize: vertical;
}
.comment-textarea::placeholder { color: var(--text-sub); }
.comment-textarea:focus { outline: none; border-color: var(--primary); }
.comment-submit-btn {
    height: 38px; padding: 0 16px; background: var(--primary); color: #000;
    border: none; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.comment-submit-btn:hover { background: var(--primary-hover); }

/* 空状态 */
.comment-empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 60px 20px; color: var(--text-sub);
}
.comment-empty .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.comment-empty .text { font-size: 14px; }

/* 加载状态 */
.comment-loading {
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px; color: var(--text-sub);
}
.comment-loading .spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border-color); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.load-more { padding: 12px 16px; text-align: center; }
.load-more-btn {
    display: inline-block; padding: 8px 24px;
    background: var(--bg-tertiary); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); color: var(--text-sub);
    font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.load-more-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* ============================================
   排行榜横幅
   ============================================ */
.leaderboard-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    margin-bottom: 16px;
}

.banner-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.banner-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: bold;
    color: var(--primary);
}

.banner-hint {
    font-size: 11px;
    color: var(--text-sub);
}

.banner-refresh-btn {
    background: none;
    border: 1px solid var(--border-light);
    font-size: 10px;
    cursor: pointer;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    color: #fff;
}

.banner-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.banner-refresh-btn:hover {
    opacity: 1;
    background: rgba(57, 255, 20, 0.1);
}

.banner-teachers {
    display: flex;
    gap: 16px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE/Edge */
}

.banner-teachers::-webkit-scrollbar {
    display: none;  /* Chrome/Safari */
}

/* 排行榜老师卡片 */
.banner-teacher {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: var(--radius-md);
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.banner-teacher:hover {
    background: rgba(57, 255, 20, 0.08);
    border-color: var(--primary);
}

.banner-rank {
    font-size: 30px;
    font-weight: bold;
    width: 36px;
    text-align: center;
}

.rank-1 { color: var(--primary); }
.rank-2 { color: var(--text-sub); }
.rank-3 { color: var(--warning); }

.banner-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--level-normal), var(--level-top));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.banner-info {
    flex: 1;
    min-width: auto;
}

.banner-name {
    font-weight: bold;
    color: var(--text-main);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 排行榜票数文字 */
.banner-vote-text {
    font-size: 10px;
    color: var(--text-sub);
    margin-top: 4px;
}

/* 响应式：768px以下隐藏排行榜 */
@media (max-width: 768px) {
    .leaderboard-banner {
        display: none;
    }
}

/* ============================================
   SSE实时推送 - 新情报样式
   ============================================ */

/* 新标签 */
.new-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 9px;
    font-weight: 700;
    background: var(--primary);
    color: #fff;
    text-transform: uppercase;
    margin-right: 4px;
}

/* 新卡片高亮动画 */
@keyframes intel-card-highlight-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(57, 255, 20, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(57, 255, 20, 0);
    }
}

.intel-card-highlight {
    animation: intel-card-highlight-pulse 1s ease-out;
    border-color: var(--primary) !important;
}

/* SSE Toast通知 */
.sse-toast {
    position: fixed;
    top: 70px;
    right: 20px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-main);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 360px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sse-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.sse-toast-info {
    border-left: 3px solid var(--primary);
}

.sse-toast-success {
    border-left: 3px solid var(--primary);
}

.sse-toast-error {
    border-left: 3px solid var(--danger);
}

.sse-toast-warning {
    border-left: 3px solid var(--warning);
}

/* ============================================
   老师简介悬浮提示
   ============================================ */

/* 老师简介悬浮提示 - 基础定位 */
[data-bio] {
    position: relative;
    cursor: pointer;
}
