/**
 * 临沂极优网络科技有限公司
 * 网址：www.jiyousoft.cn
 * 
 * 文件路径：/modules/dh/templates/default/style.css
 * 网址导航 - 默认模板样式
 * 创建时间：2026-04-16
 */

/* ============================================
   防止页面晃动 - 只需这一行
   ============================================ */
html {
    overflow-y: scroll;
}

/* ============================================
   基础容器
   ============================================ */
.dh-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   顶部通栏 - 高度200px
   ============================================ */
.dh-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0 32px;
    margin: 8px 0 24px 0;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
    height: 200px;
    box-sizing: border-box;
}

.dh-hero-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dh-hero-icon {
    font-size: 44px;
    line-height: 1;
}

.dh-hero-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dh-hero-search {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
}

.dh-search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    padding: 5px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s;
}

.dh-search-box:focus-within {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.dh-search-box input {
    flex: 1;
    padding: 14px 22px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 15px;
    outline: none;
}

.dh-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.dh-search-box button {
    padding: 12px 32px;
    background: #fff;
    color: #667eea;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.dh-search-box button:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dh-hero-right {
    display: flex;
    align-items: center;
}

.dh-datetime {
    text-align: right;
}

.dh-date {
    font-size: 15px;
    opacity: 0.9;
    line-height: 1.5;
}

.dh-time {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.3;
}

/* ============================================
   私有网址区域
   ============================================ */
.dh-private-section {
    background: #fff;
    border-radius: 16px;
    padding: 18px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.dh-private-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dh-private-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dh-private-manage {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.dh-private-manage:hover {
    color: #764ba2;
}

.dh-private-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.dh-tab {
    padding: 6px 16px;
    cursor: pointer;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    background: #f8f9fa;
    transition: all 0.2s;
    white-space: nowrap;
    border: 1px solid transparent;
}

.dh-tab:hover {
    background: #eef2ff;
    color: #667eea;
}

.dh-tab.active {
    background: #667eea;
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.dh-private-content {
    min-height: 80px;
}

.dh-private-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.dh-private-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    color: #1a1a2e;
    transition: all 0.2s;
    border: 1px solid #eef2f6;
}

.dh-private-item:hover {
    background: #eef2ff;
    border-color: #667eea;
    transform: translateX(3px);
}

.dh-private-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
    overflow: hidden;
}

.dh-private-icon img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.dh-private-info {
    flex: 1;
    min-width: 0;
}

.dh-private-name {
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dh-private-empty {
    padding: 30px;
    text-align: center;
    color: #999;
}

.dh-private-empty a {
    color: #667eea;
    text-decoration: none;
}

.dh-login-tip {
    padding: 20px;
    text-align: center;
    background: #f8fafc;
    border-radius: 12px;
    color: #666;
}

.dh-login-tip a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.dh-login-tip a:hover {
    text-decoration: underline;
}

/* ============================================
   布局
   ============================================ */
.dh-layout {
    display: flex;
    gap: 24px;
}

.dh-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.dh-main {
    flex: 1;
    min-width: 0;
}

/* ============================================
   侧边栏组件
   ============================================ */
.dh-section {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f0f0;
}

.dh-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dh-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dh-category-list li {
    margin-bottom: 4px;
}

.dh-category-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #555;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 14px;
}

.dh-category-list a:hover {
    background: #f5f7fa;
    color: #667eea;
}

.dh-category-list li.active a {
    background: #eef2ff;
    color: #667eea;
    font-weight: 500;
}

.dh-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dh-menu-list li {
    margin-bottom: 4px;
}

.dh-menu-list a {
    display: block;
    padding: 10px 12px;
    color: #555;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 14px;
}

.dh-menu-list a:hover {
    background: #f5f7fa;
    color: #667eea;
}

.dh-favorites {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dh-fav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    color: #1a1a2e;
    transition: all 0.2s;
    font-size: 13px;
}

.dh-fav-item:hover {
    background: #eef2ff;
}

.dh-fav-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #667eea;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

/* ============================================
   主内容区
   ============================================ */
.dh-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dh-main-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dh-main-count {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

.dh-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.dh-link-card-wrapper {
    position: relative;
}

.dh-link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    border: 1px solid #f0f0f0;
    position: relative;
    cursor: pointer;
}

.dh-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #e0e0e0;
}

.dh-link-card.private {
    border-left: 3px solid #667eea;
}

.dh-link-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.dh-link-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dh-icon-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 18px;
    text-transform: uppercase;
}

.dh-link-info {
    flex: 1;
    min-width: 0;
}

.dh-link-name {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a2e;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dh-link-desc {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dh-badge {
    position: absolute;
    top: -6px;
    right: 12px;
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    z-index: 1;
}

.dh-badge.new {
    background: #f59e0b;
}

.dh-badge.hot {
    background: #ef4444;
}

.dh-badge.private {
    background: #8b5cf6;
}

/* ============================================
   分页
   ============================================ */
.dh-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
    padding: 16px 0;
}

.dh-page-item {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    background: #fff;
    border: 1px solid #e8e8e8;
}

.dh-page-item:hover {
    border-color: #667eea;
    color: #667eea;
}

.dh-page-item.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.dh-page-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.dh-page-info {
    margin-left: 16px;
    color: #888;
    font-size: 13px;
}

/* ============================================
   空状态
   ============================================ */
.dh-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 20px;
}

.dh-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.dh-empty p {
    color: #999;
    margin-bottom: 20px;
}

.dh-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #667eea;
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.dh-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

/* ============================================
   右键菜单
   ============================================ */
.dh-context-menu {
    position: fixed;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    min-width: 180px;
    z-index: 10000;
    display: none;
    border: 1px solid #f0f0f0;
}

.dh-context-item {
    padding: 10px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.15s;
    font-size: 14px;
    color: #333;
}

.dh-context-item:hover {
    background: #f5f7fa;
}

.dh-context-item .icon {
    font-size: 16px;
}

/* ============================================
   弹窗
   ============================================ */
.dh-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.dh-modal {
    background: #fff;
    border-radius: 20px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dh-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 18px;
    font-weight: 600;
}

.dh-modal-body {
    padding: 16px 24px;
    max-height: 320px;
    overflow-y: auto;
}

.dh-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.dh-category-option {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.2s;
}

.dh-category-option:last-child {
    border-bottom: none;
}

.dh-category-option:hover {
    color: #667eea;
}

.dh-btn-modal {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.dh-btn-primary {
    background: #667eea;
    color: #fff;
}

.dh-btn-primary:hover {
    background: #5a67d8;
}

.dh-btn-default {
    background: #fff;
    color: #666;
    border: 1px solid #e0e0e0;
}

.dh-btn-default:hover {
    background: #f5f5f5;
}

/* ============================================
   Toast提示
   ============================================ */
.dh-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 12px;
    color: #fff;
    z-index: 99999;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dh-toast.success {
    background: #10b981;
}

.dh-toast.error {
    background: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 900px) {
    .dh-layout {
        flex-direction: column;
    }

    .dh-sidebar {
        width: 100%;
    }

    .dh-hero {
        flex-direction: column;
        gap: 20px;
        padding: 24px 20px;
        height: auto;
    }

    .dh-hero-search {
        width: 100%;
        margin: 0;
    }

    .dh-hero-right {
        width: 100%;
        justify-content: center;
    }

    .dh-datetime {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .dh-links-grid {
        grid-template-columns: 1fr;
    }

    .dh-private-grid {
        grid-template-columns: 1fr;
    }

    .dh-private-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .dh-tab {
        flex-shrink: 0;
    }
}