/* ============================================================
   公共样式文件 - common.css
   包含：主题变量、基础样式、导航栏、搜索框、通知栏、联系侧边栏
   ============================================================ */

/* ============== 重置样式 ============== */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ============== 主题变量（暗色主题 - 默认） ============== */
:root {
    --bg-body: #0d1117;
    --bg-sidebar: #161b22;
    --bg-card: #161b22;
    --bg-card-hover: #21262d;
    --border-color: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-blue: #58a6ff;
    --accent-cyan: #56d4dd;
    --accent-green: #3fb950;
    --accent-purple: #a371f7;
    --accent-yellow: #d29922;
    --accent-red: #f85149;
}

/* 亮色主题 */
[data-theme="light"] {
    --bg-body: #f6f8fa;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f3f4f6;
    --border-color: #d0d7de;
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --accent-blue: #0969da;
    --accent-cyan: #0891b2;
    --accent-green: #1a7f37;
    --accent-purple: #8250df;
    --accent-yellow: #9a6700;
    --accent-red: #cf222e;
}

/* ============== 基础样式 ============== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

a { text-decoration: none; color: inherit; }

/* ============== 顶部导航栏 ============== */
.navbar {
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.95);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-cyan);
}

/* ============== 搜索框 ============== */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 400px;
    margin: 0 40px;
}

.search-box input {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--accent-blue);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    padding: 10px 16px;
    background: var(--accent-blue);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: filter 0.2s;
}

.search-btn:hover {
    filter: brightness(1.1);
}

/* ============== 通知栏 ============== */
.notice-bar {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    color: white;
    padding: 8px 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 999;
}

.notice-bar i {
    animation: bell-shake 2s infinite;
}

@keyframes bell-shake {
    0%, 100% { transform: rotate(0); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
    50% { transform: rotate(0); }
}

.notice-bar .notice-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notice-bar .notice-close {
    cursor: pointer;
    padding: 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.notice-bar .notice-close:hover {
    opacity: 1;
}

/* 嵌入模式下隐藏导航栏和通知栏 */
body.embed-mode .navbar,
body.embed-mode .notice-bar {
    display: none;
}

/* ============== 联系侧边栏 ============== */
.contact-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-item {
    position: relative;
    height: 44px;
    background: linear-gradient(135deg, #12B7F5, #0099E5);
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -2px 2px 10px rgba(0,0,0,0.3);
    overflow: visible; /* 修改：允许悬停面板显示 */
    width: 44px;
    padding-right: 0;
}

.contact-item:nth-child(2) {
    background: linear-gradient(135deg, #4FACFE, #00B4DB);
}

/* 友情链接样式 */
.contact-item.contact-link {
    background: linear-gradient(135deg, #FA709A, #FEE140);
}

.contact-item.contact-link:nth-child(3n) {
    background: linear-gradient(135deg, #A8EDEA, #FED6E3);
}

.contact-item.contact-link:nth-child(4n) {
    background: linear-gradient(135deg, #FBC2EB, #A6C1EE);
}

.contact-item.contact-link:nth-child(5n) {
    background: linear-gradient(135deg, #F093FB, #F5576C);
}

.contact-item.contact-link .contact-icon i {
    font-size: 20px;
    color: white;
}

.contact-info .contact-desc {
    font-size: 10px;
    opacity: 0.85;
    overflow: visible; /* 允许悬停面板显示 */
    text-overflow: ellipsis;
    max-width: 100px;
}

/* 所有按钮都保持固定宽度,使用悬停面板展开 */
.contact-item:hover {
    width: 44px !important; /* 保持固定宽度 */
    padding-right: 0 !important;
}

.contact-item .contact-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item .contact-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.contact-item .contact-info {
    white-space: nowrap;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
    display: none; /* 隐藏旧的横向展开文字,使用悬停面板代替 */
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
    overflow: hidden; /* 防止文字溢出 */
}

/* 不再需要显示contact-info,改用悬停面板 */
/* .contact-item:hover .contact-info { opacity: 1; } */

.contact-info .contact-label {
    font-size: 11px;
    opacity: 0.9;
}

.contact-info .contact-value {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.contact-item .copy-hint {
    position: absolute;
    left: 50%;
    bottom: -30px;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    display: none; /* 隐藏旧的复制提示,使用面板内的复制按钮 */
}

.contact-item.copied .copy-hint {
    opacity: 1;
}

body.embed-mode .contact-sidebar {
    top: 45%;
}

/* ============== 友情链接悬停展开面板 ============== */
.contact-links-trigger {
    position: relative;
    background: linear-gradient(135deg, #FA709A, #FEE140) !important;
}

.contact-links-trigger:hover {
    width: 44px !important; /* 保持固定宽度,不展开 */
    padding-right: 0 !important;
}

.contact-links-trigger .contact-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-links-trigger .contact-icon i {
    font-size: 20px;
    color: white;
}

/* 展开面板 - 向左侧展开 */
.links-panel {
    position: absolute;
    right: 100%; /* 定位在侧边栏左侧 */
    top: 0;
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px); /* 初始向右偏移 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 8px; /* 与侧边栏保持间距 */
    z-index: 10000;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    pointer-events: none; /* 默认不响应鼠标事件 */
}

.contact-links-trigger:hover .links-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(0); /* 展开到正确位置 */
    pointer-events: auto; /* 悬停时响应鼠标事件 */
}

/* 保持面板打开 - 鼠标在面板上时 */
.links-panel:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto; /* 关键：保持面板可交互 */
}

/* 面板头部 */
.links-panel-header {
    padding: 15px 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #FA709A15, #FEE14015);
    border-radius: 12px 12px 0 0;
}

.links-panel-header i {
    font-size: 18px;
    color: #FA709A;
}

.links-panel-header span {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.links-panel-header .links-count {
    background: #FA709A;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
    flex: 0;
}

/* 面板主体 */
.links-panel-body {
    padding: 10px;
    overflow-y: auto;
    max-height: 400px;
    flex: 1;
}

.links-panel-body::-webkit-scrollbar {
    width: 6px;
}

.links-panel-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.links-panel-body::-webkit-scrollbar-thumb {
    background: #FA709A;
    border-radius: 3px;
}

.links-panel-body::-webkit-scrollbar-thumb:hover {
    background: #f8588d;
}

/* 链接项 */
.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    margin-bottom: 8px;
}

.link-item:hover {
    background: linear-gradient(135deg, #FA709A10, #FEE14010);
    transform: translateX(-4px);
    box-shadow: 0 2px 8px rgba(250, 112, 154, 0.2);
}

/* Logo */
.link-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #f0f0f0;
    transition: all 0.3s;
}

.link-item:hover .link-logo {
    border-color: #FA709A;
    transform: scale(1.1);
}

.link-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-logo i {
    font-size: 18px;
    color: #FA709A;
}

/* 链接信息 */
.link-info {
    flex: 1;
    min-width: 0;
}

.link-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-desc {
    font-size: 12px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.link-item:hover .link-name {
    color: #FA709A;
}

/* 暗色主题适配 */
[data-theme="dark"] .links-panel {
    background: #2d2d2d;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .links-panel-header {
    border-bottom-color: #404040;
    background: linear-gradient(135deg, #FA709A20, #FEE14020);
}

[data-theme="dark"] .links-panel-header span {
    color: #e0e0e0;
}

[data-theme="dark"] .link-item:hover {
    background: linear-gradient(135deg, #FA709A15, #FEE14015);
}

[data-theme="dark"] .link-name {
    color: #e0e0e0;
}

[data-theme="dark"] .link-desc {
    color: #a0a0a0;
}

[data-theme="dark"] .link-logo {
    background: linear-gradient(135deg, #404040, #353535);
    border-color: #505050;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .links-panel,
    .contact-panel {
        width: 240px;
        max-height: 400px;
    }
    
    .links-panel-body,
    .contact-panel-body {
        max-height: 320px;
    }
    
    .link-item {
        padding: 10px;
    }
    
    .link-logo {
        width: 36px;
        height: 36px;
    }
    
    .link-name {
        font-size: 13px;
    }
    
    .link-desc {
        font-size: 11px;
    }
}

/* ============== QQ和QQ群悬停展开面板（通用样式）============== */
.contact-qq-trigger,
.contact-group-trigger {
    position: relative;
    overflow: visible !important;
}

.contact-qq-trigger {
    background: linear-gradient(135deg, #12B7F5, #0099E5) !important;
}

.contact-group-trigger {
    background: linear-gradient(135deg, #4FACFE, #00B4DB) !important;
}

/* 通用联系面板 */
.contact-panel {
    position: absolute;
    right: 100%;
    top: 0;
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 8px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.contact-qq-trigger:hover .contact-panel,
.contact-group-trigger:hover .contact-panel,
.contact-panel:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* 面板头部 */
.contact-panel-header {
    padding: 15px 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.contact-qq-trigger .contact-panel-header {
    background: linear-gradient(135deg, #12B7F515, #0099E515);
}

.contact-group-trigger .contact-panel-header {
    background: linear-gradient(135deg, #4FACFE15, #00B4DB15);
}

.contact-panel-header img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.contact-panel-header span {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

/* 面板主体 */
.contact-panel-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 联系详情 */
.contact-detail {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    position: relative;
}

.detail-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.detail-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    letter-spacing: 1px;
    margin-bottom: 10px;
    user-select: all;
}

.copy-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #666;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
    color: #333;
}

.copy-btn i {
    font-size: 11px;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-primary {
    flex: 1;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary i {
    font-size: 14px;
}

/* QQ按钮特殊颜色 */
.contact-qq-trigger .btn-primary {
    background: linear-gradient(135deg, #12B7F5, #0099E5);
}

.contact-qq-trigger .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(18, 183, 245, 0.4);
}

/* QQ群按钮特殊颜色 */
.contact-group-trigger .btn-primary {
    background: linear-gradient(135deg, #4FACFE, #00B4DB);
}

.contact-group-trigger .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

/* 暗色主题适配 */
[data-theme="dark"] .contact-panel {
    background: #2d2d2d;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .contact-panel-header {
    border-bottom-color: #404040;
}

[data-theme="dark"] .contact-panel-header span {
    color: #e0e0e0;
}

[data-theme="dark"] .contact-detail {
    background: #3a3a3a;
}

[data-theme="dark"] .detail-label {
    color: #a0a0a0;
}

[data-theme="dark"] .detail-value {
    color: #e0e0e0;
}

[data-theme="dark"] .copy-btn {
    background: #404040;
    border-color: #505050;
    color: #a0a0a0;
}

[data-theme="dark"] .copy-btn:hover {
    background: #4a4a4a;
    border-color: #606060;
    color: #e0e0e0;
}

/* ============== 页面头部标题 ============== */
.page-header-container {
    max-width: 1400px;
    margin: 100px auto 0;
    padding: 10px 20px 0;
}

/* 嵌入模式下间距统一 */
body.embed-mode .page-header-container {
    margin-top: 10px !important;
    padding-top: 10px !important;
}

/* 有顶部导航条时 page-header-container 间距统一 */
.top-nav-bar + .page-header-container {
    margin-top: 10px !important;
    padding-top: 10px !important;
}

.page-header {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header-left {
    display: flex;
    flex-direction: column;
}

.page-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.page-header-title i {
    font-size: 22px;
}

.page-header-desc {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* 页面头部搜索框 */
.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input {
    width: 260px;
    padding: 8px 14px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.header-search input:focus {
    border-color: var(--accent-blue);
}

.header-search input::placeholder {
    color: var(--text-secondary);
}

.header-search-btn {
    padding: 8px 14px;
    background: var(--accent-blue);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: filter 0.2s;
}

.header-search-btn:hover {
    filter: brightness(1.1);
}

/* ============== 主布局 ============== */
.main-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 20px;
    gap: 20px;
    min-height: calc(100vh - 180px);
}

body.embed-mode .main-layout {
    min-height: calc(100vh - 80px);
}

/* ============== 左侧分类导航 ============== */
.category-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.category-list {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.category-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.category-item.active {
    background: var(--bg-card-hover);
    border-left-color: var(--accent-blue);
    color: var(--accent-blue);
}

.category-item i {
    width: 20px;
    text-align: center;
}

/* ============== 内容区域 ============== */
.content-area {
    flex: 1;
    min-width: 0;
}

.content-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.content-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.content-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
    transform: translateX(4px);
}

.item-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.item-icon.blue { background: rgba(88, 166, 255, 0.15); color: var(--accent-blue); }
.item-icon.green { background: rgba(63, 185, 80, 0.15); color: var(--accent-green); }
.item-icon.purple { background: rgba(163, 113, 247, 0.15); color: var(--accent-purple); }
.item-icon.yellow { background: rgba(210, 153, 34, 0.15); color: var(--accent-yellow); }
.item-icon.red { background: rgba(248, 81, 73, 0.15); color: var(--accent-red); }
.item-icon.cyan { background: rgba(86, 212, 221, 0.15); color: var(--accent-cyan); }

.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.item-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.item-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============== 空状态 ============== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

/* ============== 弹窗 ============== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

/* ============== 顶部导航条（面包屑+通知） ============== */
.top-nav-bar {
    position: sticky;
    top: 56px;
    margin-top: 56px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
}

/* 嵌入模式下，顶部导航条贴顶 */
body.embed-mode .top-nav-bar {
    top: 0;
    margin-top: 0;
}

[data-theme="light"] .top-nav-bar {
    background: rgba(255, 255, 255, 0.95);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
}

.breadcrumb .separator {
    color: var(--text-secondary);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

.top-nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-wrapper {
    position: relative;
}

.notification-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    font-size: 18px;
}

.notification-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.notification-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--accent-red);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0 4px;
}

.notification-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    padding: 8px 14px;
    background: var(--accent-red);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.notification-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 14px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--accent-red);
}

.notification-wrapper:hover .notification-tooltip {
    opacity: 1;
    visibility: visible;
}

.notification-btn.has-notification {
    animation: notificationPulse 2s infinite;
}

@keyframes notificationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============== 响应式 ============== */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    
    .category-sidebar {
        width: 100%;
    }
    
    .category-list {
        display: flex;
        overflow-x: auto;
    }
    
    .category-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .category-item.active {
        border-left: none;
        border-bottom-color: var(--accent-blue);
    }
    
    .search-box {
        display: none;
    }
    
    .header-search {
        width: 100%;
    }
    
    .header-search input {
        width: 100%;
    }
}
