/* ============================================
   assets/css/style.css - 完整样式文件
   ============================================ */

/* ============================================
   1. 全局重置
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f5f6f9;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    padding-top: 96px;
}

a {
    text-decoration: none;
    color: #333;
}
a:hover {
    color: #4a6df0;
}

/* ============================================
   2. 布局
   ============================================ */
.app-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    padding-left: 0;
}

.w1200 {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 30px 0 0;
}

/* ============================================
   3. 主内容
   ============================================ */
.main-content {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    padding-top: 0;
    margin-left: 200px;
    padding: 0 30px 20px 0;
}

/* ============================================
   4. 快捷导航 (quick_nav.php)
   ============================================ */
.quick-nav {
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
    padding: 2px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 151;
    height: 30px;
}

.quick-nav-ul {
    display: flex;
    gap: 2px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0 20px;
    max-width: 1400px;
    width: 100%;
}

.quick-nav-ul li a {
    padding: 2px 8px;
    font-size: 10px;
    color: #666;
    border-radius: 3px;
    white-space: nowrap;
    display: block;
    transition: all 0.2s;
    text-decoration: none;
}
.quick-nav-ul li a:hover {
    background: #e8ecf1;
    color: #4a6df0;
}

/* ============================================
   5. 顶部固定导航 (top_header.php)
   ============================================ */
.top-header-fixed {
    position: fixed;
    top: 30px;
    left: 0;
    right: 0;
    z-index: 150;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e8e8e8;
    height: 66px;
    display: flex;
    align-items: center;
}

.top-header-fixed .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px 0 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 左侧：Logo */
.top-header-fixed .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 10px;
}
.top-header-fixed .header-left .logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.top-header-fixed .header-left .logo-mark {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}
.top-header-fixed .header-left .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}
.top-header-fixed .header-left .logo-text:hover {
    color: #667eea;
}

/* 中间：搜索框 */
.top-header-fixed .header-search {
    flex: 1;
    max-width: 520px;
    margin: 0 20px;
}
.top-header-fixed .header-search .engines {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.top-header-fixed .header-search .engines .eng {
    padding: 2px 14px;
    font-size: 12px;
    color: #666;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
}
.top-header-fixed .header-search .engines .eng:hover {
    border-color: #667eea;
    color: #667eea;
}
.top-header-fixed .header-search .engines .eng.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}
.top-header-fixed .header-search .search-box {
    display: flex;
    border: 2px solid #e8ecf1;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #f8f9fa;
}
.top-header-fixed .header-search .search-box:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: #fff;
}
.top-header-fixed .header-search .search-box input {
    flex: 1;
    padding: 8px 16px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    min-width: 0;
}
.top-header-fixed .header-search .search-box button {
    padding: 8px 24px;
    background: #667eea;
    color: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
    flex-shrink: 0;
}
.top-header-fixed .header-search .search-box button:hover {
    background: #5a67d8;
}

/* 右侧：用户操作 */
.top-header-fixed .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.top-header-fixed .header-right .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.top-header-fixed .header-right .user-info .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}
.top-header-fixed .header-right .user-info .uname {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}
.top-header-fixed .header-right a {
    color: #666;
    font-size: 13px;
    transition: color 0.3s;
    text-decoration: none;
    cursor: pointer;
}
.top-header-fixed .header-right a:hover {
    color: #667eea;
}
.top-header-fixed .header-right .btn {
    padding: 5px 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}
.top-header-fixed .header-right .btn-primary {
    background: #667eea;
    color: #fff;
}
.top-header-fixed .header-right .btn-primary:hover {
    background: #5a67d8;
}
.top-header-fixed .header-right .btn-danger {
    background: #e74c3c;
    color: #fff;
}
.top-header-fixed .header-right .btn-danger:hover {
    background: #c0392b;
}

/* 链接直达开关 */
.direct-link-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    user-select: none;
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.3s;
    background: #f5f5f5;
}
.direct-link-toggle:hover {
    background: #e8e8e8;
}
.direct-link-toggle .toggle-label {
    font-size: 12px;
    font-weight: 500;
}
.direct-link-toggle .toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 11px;
    transition: all 0.3s;
    flex-shrink: 0;
}
.direct-link-toggle .toggle-switch.active {
    background: #667eea;
}
.direct-link-toggle .toggle-switch .toggle-dot {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.direct-link-toggle .toggle-switch.active .toggle-dot {
    left: 20px;
}
.direct-link-toggle .toggle-status {
    font-size: 12px;
    color: #999;
    min-width: 28px;
}
.direct-link-toggle .toggle-status.on {
    color: #667eea;
    font-weight: 600;
}
.direct-link-toggle .toggle-status.off {
    color: #999;
}

/* 移动端菜单按钮 */
.top-header-fixed .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 4px 8px;
}

/* ============================================
   6. 左侧固定导航 (left_sidebar.php)
   ============================================ */
.sidebar {
    width: 200px;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
    padding: 4px 4px 8px 4px;
    position: fixed;
    top: 96px;
    left: 0;
    height: calc(100vh - 96px);
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 3px;
}
.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

/* 导航菜单 -【已修改】整体向右偏移20px */
.side-nav {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 2px;
    padding-left: 20px;
}

.side-nav a,
.side-cat-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 3px;
    color: #444;
    font-size: 12px;
    transition: all 0.1s ease;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
    text-align: left;
}

.side-nav a:hover,
.side-cat-toggle:hover {
    background: #f0f4ff;
    color: #4a6df0;
}

.side-nav a .side-ico,
.side-cat-toggle .side-ico {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.side-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s ease;
    color: #bbb;
    flex-shrink: 0;
}

.side-cat-toggle.open .side-arrow {
    transform: rotate(180deg);
}

/* 子菜单 */
.side-sub-menu {
    margin-left: 4px;
    padding-left: 8px;
    border-left: 2px solid #f0f0f0;
    display: none;
}

.side-sub-menu a {
    font-size: 11px;
    padding: 3px 8px 3px 24px;
    color: #666;
    justify-content: flex-start;
    text-align: left;
}

.side-sub-menu a:hover {
    color: #4a6df0;
}

/* 回到首页置顶 */
.side-nav .home-link-top {
    font-weight: 600;
    color: #4a6df0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
    padding-bottom: 4px;
    justify-content: flex-start;
    text-align: left;
}

.side-nav .home-link-top:hover {
    background: transparent;
    color: #333;
}

/* 底部通知框 */
.side-foot {
    flex-shrink: 0;
    padding-top: 4px;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
}

.side-foot .notice-box {
    background: #f0f7ff;
    border: 1px solid #d0e4ff;
    border-radius: 3px;
    padding: 4px 8px;
    color: #4a6df0;
    font-size: 10px;
    line-height: 1.3;
    text-align: center;
}

.side-foot .notice-box .notice-title {
    font-weight: 600;
    font-size: 11px;
    margin-bottom: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.side-foot .notice-box .notice-text {
    color: #555;
    font-size: 10px;
}

.sidebar .close-btn {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    z-index: 10;
}

/* 高亮当前分类 */
.side-nav a.active-cat {
    background: #f0f4ff;
    color: #4a6df0;
    font-weight: 600;
}

/* ============================================
   7. 快捷链接
   ============================================ */
.hotUrl {
    margin: 10px 0;
}
.urlLink {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    padding: 10px 0;
    background: #fff;
    border-radius: 8px;
}
.urlLink li a {
    padding: 6px 14px;
    font-size: 13px;
    background: #f8f9fc;
    border-radius: 4px;
    display: block;
}
.urlLink li a:hover {
    background: #f0f4ff;
    color: #4a6df0;
}

/* ============================================
   8. 自定义内容区 (后台HTML内容)
   ============================================ */
.site-content {
    background: #fff;
    border-radius: 12px;
    padding: 25px 20px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.site-content img {
    max-width: 100%;
    height: auto;
}

.site-content table {
    width: 100%;
    border-collapse: collapse;
}
.site-content table td,
.site-content table th {
    border: 1px solid #ddd;
    padding: 8px;
}

.site-content .content-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}
.site-content .content-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* 自定义内容 - 分类标题 */
.site-content .text-gray,
.site-content h4.text-gray {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 20px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #4a6df0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-content .text-gray:first-child,
.site-content h4.text-gray:first-child {
    margin-top: 0;
}

/* 自定义内容 - 网格布局 - 电脑每行12个，手机每行4个 */
.site-content .nav-grid,
.site-content .grid,
.site-content .link-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.site-content .nav-item,
.site-content .item,
.site-content .grid-item {
    background: #f8f9fc;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-align: center;
}

.site-content .nav-item:hover,
.site-content .item:hover,
.site-content .grid-item:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}

.site-content .nav-grid a,
.site-content .grid a,
.site-content .link-grid a {
    display: block;
    padding: 6px 4px;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.site-content .nav-item a,
.site-content .item a,
.site-content .grid-item a {
    display: block;
    padding: 4px 2px;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-content .nav-item a:hover,
.site-content .item a:hover,
.site-content .grid-item a:hover,
.site-content .nav-grid a:hover,
.site-content .grid a:hover,
.site-content .link-grid a:hover {
    color: #4a6df0;
    background: #f0f4ff;
}

/* ============================================
   9. 网址卡片
   ============================================ */
.section-wrap {
    padding: 0;
}
/*【已修改】电脑大屏每行6个网址卡片 */
.url-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    padding: 10px 0;
}
.url-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}
.url-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    border-color: #4a6df0;
}
.url-card .url-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.url-card .url-title a {
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.url-card .url-title a:hover {
    color: #4a6df0;
}
.url-card .url-title .fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.3s;
    padding: 0 3px;
    flex-shrink: 0;
}
.url-card .url-title .fav-btn:hover {
    transform: scale(1.2);
}
.url-card .url-title .fav-btn.active {
    color: #e74c3c;
}
.url-card .url-desc {
    color: #888;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 32px;
}
.url-card .url-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 11px;
    color: #bbb;
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
}
.url-card .url-meta .category-tag {
    background: #f0f2f5;
    padding: 2px 8px;
    border-radius: 12px;
    color: #666;
    font-size: 10px;
}

/* ============================================
   10. 我的收藏区域（保留折叠功能，删除重复冲突代码）
   ============================================ */
.my-favorites {
    background: #fff;
    border-radius: 12px;
    padding: 20px 25px;
    margin: 15px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.my-favorites.collapsed {
    padding: 10px 25px;
}
.my-favorites .fav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4a6df0;
    cursor: pointer;
    user-select: none;
    transition: margin-bottom .3s;
}
.my-favorites.collapsed .fav-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.my-favorites .fav-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}
.my-favorites .fav-header h3 .fav-count {
    background: #e74c3c;
    color: #fff;
    font-size: 12px;
    padding: 0 10px;
    border-radius: 12px;
    line-height: 22px;
    min-width: 22px;
    text-align: center;
}
.my-favorites .fav-header .toggle-icon {
    font-size: 18px;
    color: #999;
    transition: transform .3s;
}
.my-favorites.collapsed .fav-header .toggle-icon {
    transform: rotate(-90deg);
}
.my-favorites .fav-body {
    overflow: hidden;
    transition: all .3s;
    max-height: 2000px;
}
.my-favorites.collapsed .fav-body {
    max-height: 0;
    padding: 0;
    margin: 0;
}
.my-favorites .fav-empty {
    text-align: center;
    padding: 30px 20px;
    color: #999;
}
.my-favorites .fav-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
}
/*【已修改】电脑大屏每行8个收藏 */
.my-favorites .fav-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}
.my-favorites .fav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f9fc;
    border-radius: 8px;
    transition: all .2s;
}
.my-favorites .fav-item:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}
.my-favorites .fav-item .fav-link {
    flex: 1;
    color: #333;
    font-size: 13px;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}
.my-favorites .fav-item .fav-link:hover {
    color: #4a6df0;
}
.my-favorites .fav-item .fav-remove {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}
.my-favorites .fav-item .fav-remove:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, .1);
}

/* ============================================
   11. 空状态
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}
.empty-state h3 {
    font-size: 20px;
    color: #666;
    margin-bottom: 8px;
}

/* ============================================
   12. 底部
   ============================================ */
.footer {
    text-align: center;
    padding: 20px;
    color: #aaa;
    font-size: 12px;
    border-top: 1px solid #e8e8e8;
    margin-top: 20px;
}

/* ============================================
   13. 移动端遮罩
   ============================================ */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 199;
}
.overlay.show {
    display: block;
}

/* ============================================
   14. 弹窗样式
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
.modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.modal .modal-header h2 {
    font-size: 22px;
    color: #333;
}
.modal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0 8px;
}
.modal .modal-close:hover {
    color: #333;
}
.modal .form-group {
    margin-bottom: 18px;
}
.modal .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #555;
    font-size: 14px;
}
.modal .form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e8ecf1;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    outline: none;
}
.modal .form-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}
.modal .btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.modal .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}
.modal .form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #999;
}
.modal .form-footer a {
    color: #667eea;
    cursor: pointer;
}
.modal .form-footer a:hover {
    text-decoration: underline;
}
.modal .alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.modal .alert-danger {
    background: #fde8e8;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}
.modal .alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ============================================
   15. index.php 特有样式
   ============================================ */

/* 收藏按钮 */
.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 4px 8px;
    transition: all .3s;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}
.fav-btn:hover {
    transform: scale(1.2);
    background: rgba(231, 76, 60, 0.1);
}
.fav-btn.active {
    color: #e74c3c;
}
.fav-btn.pulse {
    animation: pulse .5s;
}
@keyframes pulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.4); }
    50% { transform: scale(.9); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 同步弹窗 */
.sync-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}
.sync-modal.active {
    display: flex;
}
.sync-modal .sync-box {
    background: #fff;
    border-radius: 16px;
    padding: 35px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: modalIn .3s;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.sync-modal .sync-box .sync-icon {
    font-size: 48px;
    margin-bottom: 15px;
}
.sync-modal .sync-box h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
}
.sync-modal .sync-box p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}
.sync-modal .sync-box p strong {
    color: #4a6df0;
}
.sync-modal .sync-box .sync-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.sync-modal .sync-box .sync-btns .btn {
    padding: 10px 30px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
}
.sync-modal .sync-box .sync-btns .btn-sync {
    background: #4a6df0;
    color: #fff;
}
.sync-modal .sync-box .sync-btns .btn-sync:hover {
    background: #3a5dd0;
    transform: translateY(-2px);
}
.sync-modal .sync-box .sync-btns .btn-cancel {
    background: #f0f0f0;
    color: #666;
}
.sync-modal .sync-box .sync-btns .btn-cancel:hover {
    background: #e0e0e0;
}
.sync-modal .sync-box .sync-btns .btn-sync:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ============================================
   16. 详情页样式 (detail.php) - 卡片式与背景融合
   ============================================ */

/* 详情页布局 */
.detail-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}
.detail-main {
    flex: 1;
    min-width: 0;
}
.detail-side {
    width: 320px;
    flex-shrink: 0;
}

/* 详情主体 - 卡片样式，背景透明与主背景融合 */
.detail-container {
    background: #fff;
    border-radius: 12px;
    padding: 30px 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.detail-container .detail-icon {
    font-size: 48px;
    margin-bottom: 8px;
}
.detail-container .detail-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
    word-break: break-all;
}

/* URL 显示 */
.detail-url-display {
    background: #f5f7fa;
    padding: 12px 16px;
    border-radius: 8px;
    color: #667eea;
    font-size: 14px;
    word-break: break-all;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.detail-url-display .detail-url-text {
    flex: 1;
    min-width: 0;
    word-break: break-all;
}
.detail-url-display .detail-copy-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
    flex-shrink: 0;
}
.detail-url-display .detail-copy-btn:hover {
    background: #eef3ff;
}
.detail-url-display .detail-copy-btn .copied-tip {
    display: none;
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}
.detail-url-display .detail-copy-btn .copied-tip.show {
    display: block;
}

/* 描述 */
.detail-desc {
    color: #666;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: #f8f9fc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* 关键词 */
.detail-keywords {
    margin-bottom: 16px;
}
.detail-keywords .detail-keywords-label {
    font-size: 14px;
    color: #999;
    margin-right: 8px;
    font-weight: 500;
}
.detail-keywords .detail-keyword-tag {
    display: inline-block;
    padding: 4px 14px;
    background: #f0f4ff;
    color: #4a6df0;
    border-radius: 20px;
    font-size: 13px;
    margin: 3px 4px;
    transition: all 0.2s;
    text-decoration: none;
}
.detail-keywords .detail-keyword-tag:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
}

/* 分享按钮 */
.detail-share-buttons {
    display: flex;
    gap: 10px;
    margin: 16px 0;
    flex-wrap: wrap;
}
.detail-share-buttons .detail-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: #fff;
}
.detail-share-buttons .detail-share-btn:hover {
    transform: translateY(-2px);
}
.detail-share-buttons .detail-share-btn.wechat {
    background: #07c160;
}
.detail-share-buttons .detail-share-btn.wechat:hover {
    background: #06ad56;
}
.detail-share-buttons .detail-share-btn.weibo {
    background: #ff8200;
}
.detail-share-buttons .detail-share-btn.weibo:hover {
    background: #e67500;
}
.detail-share-buttons .detail-share-btn.qq {
    background: #12b7f5;
}
.detail-share-buttons .detail-share-btn.qq:hover {
    background: #0fa5dd;
}
.detail-share-buttons .detail-share-btn.openurl {
    background: #667eea;
}
.detail-share-buttons .detail-share-btn.openurl:hover {
    background: #5a67d8;
}

/* 统计 */
.detail-stats {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 30px;
    color: #999;
    font-size: 13px;
    flex-wrap: wrap;
}
.detail-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 右侧边栏 - 卡片式，背景透明与主背景融合 */
.detail-side .detail-side-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.detail-side .detail-side-box:not(:last-child) {
    margin-bottom: 20px;
}
.detail-side .detail-side-box h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-side .detail-side-box .detail-side-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
    color: #333;
    gap: 10px;
    border-bottom: 1px solid #f5f5f5;
}
.detail-side .detail-side-box .detail-side-item:last-child {
    border-bottom: none;
}
.detail-side .detail-side-box .detail-side-item:hover {
    background: #f0f4ff;
}
.detail-side .detail-side-box .detail-rank {
    font-size: 12px;
    color: #999;
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}
.detail-side .detail-side-box .detail-rank.top {
    color: #f5a623;
}
.detail-side .detail-side-box .detail-side-info {
    flex: 1;
    min-width: 0;
}
.detail-side .detail-side-box .detail-side-title {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.detail-side .detail-side-box .detail-side-meta {
    font-size: 11px;
    color: #999;
    margin-top: 1px;
}
.detail-side .detail-side-box .detail-tag {
    font-size: 11px;
    color: #667eea;
    background: #eef3ff;
    padding: 2px 10px;
    border-radius: 12px;
    flex-shrink: 0;
}
.detail-side .detail-side-box .detail-empty {
    text-align: center;
    padding: 30px 10px;
    color: #999;
    font-size: 14px;
}
.detail-side .detail-side-box .detail-empty .detail-empty-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

/* 文章列表 */
.detail-side .detail-side-box .detail-article-item {
    display: block;
    padding: 10px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
}
.detail-side .detail-side-box .detail-article-item:last-child {
    border-bottom: none;
}
.detail-side .detail-side-box .detail-article-item:hover {
    background: #f0f4