:root {
    --bg: #f6f7f9;
    --card: #ffffff;
    --text: #1f2329;
    --sub: #8a919f;
    --line: #eceef1;
    --accent: #1d4ed8;
    --accent-2: #3b82f6;
    --ink: #3b82f6;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
    --radius: 16px;
    --tagcolor: var(--accent-2);
    --tagbacolor: rgba(59, 130, 246, 0.149);
    --tagbacolorborder: 1px solid rgba(59, 130, 246, 0.42);
}

html.night-mode {
    --bg: #101216;
    --card: #1a1d24;
    --text: #e8eaed;
    --sub: #8b93a3;
    --line: #2a2f3a;
    --ink: #f3f4f6;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --tagcolor: #ffffff;
    --tagbacolor: rgb(81 81 81 / 15%);
    --tagbacolorborder: 1px solid rgb(187 187 187 / 42%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s, color 0.3s;
}

a {
    color: #3b82f6;
    text-decoration: none;
}

/* 背景图（可选） */
.background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-position: center !important;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============ 顶部导航 ============ */
header {
    display: flex;
    align-items: center;
    height: 68px;
    gap: 14px;
}

.logo-nav a {
    display: flex;
    align-items: center;
}

.logo-nav .logo {
    height: 36px;
    width: auto;
    border-radius: 8px;
}

.title-nav h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgb(255, 255, 255);
    text-shadow: rgb(80, 75, 75) 1px 1px 8px;
}

.right-content {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 下拉菜单（导航标签） */
.dropdown {
    position: relative;
}

.dropbtn.more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    cursor: pointer;
}

.dropbtn.more:hover,
.dropdown.open .dropbtn.more {}

.dropbtn.more::before {
    content: "";
    width: 16px;
    height: 12px;
    background: repeating-linear-gradient(to bottom, #ffffff 0 2px, transparent 2px 4px);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 100;
    transform-origin: top right;
    animation: dropdown-in 0.18s ease;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background: rgba(20, 184, 166, 0.08);
    color: var(--accent);
}

.dropdown-content .menu_icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.dropdown.open .dropdown-content {
    display: block;
}

@keyframes dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 夜间切换按钮（内联 SVG） */
.night-mode-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    /* background: var(--card);
    border: 1px solid var(--line);
    color: var(--text); */
    cursor: pointer;
    transition: border-color 0.25s, box-shadow 0.25s, color 0.25s;
}

.night-mode-btn svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.night-mode-btn:hover {
    stroke: #fff;
    color: var(--accent);
}

.night-mode-btn .icon-moon {
    display: none;
}

html.night-mode .night-mode-btn .icon-sun {
    display: none;
}

html.night-mode .night-mode-btn .icon-moon {
    display: block;
}

/* ============ 面包屑 ============ */
.crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    padding: 14px 0;
}

.crumb a {
    color: var(--sub);
    text-decoration: none;
    transition: color 0.2s;
}

.crumb a:hover {
    color: var(--accent);
}

.crumb .sep {
    opacity: 0.5;
}

.crumb .cur {
    color: var(--text);
    font-weight: 500;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ 通用卡片 ============ */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2px 26px 26px;
    margin-bottom: 18px;
    transition: background 0.3s, border-color 0.3s;
}

/* ============ 连续详情主体 ============ */
.detail-shell {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2px 26px 26px;
    overflow: hidden;
    transition: background 0.3s, border-color 0.3s;
}

.detail-summary {
    position: relative;
    padding-bottom: 24px;
}

.detail-section {
    padding: 22px 0;
    border-top: 1px solid var(--line);
}

.detail-section:last-child {
    padding-bottom: 0;

}

/* 顶部点缀线 */
.detail-shell::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 98%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 0 0 3px 3px;
    /* 可选：两端圆角 */
}

.site-head {
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo {
    flex-shrink: 0;
    width: 92px;
    height: 92px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--bg);
    border: 1px solid var(--line);
    box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.02);
    overflow: hidden;
}

.site-logo img,
.site-logo svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.site-titles {
    min-width: 0;
}

.site-name {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 6px;
}

.site-desc {
    font-size: 14px;
    color: var(--sub);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 操作按钮 */
.site-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--ink);
    color: var(--card);
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.28);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 二维码悬浮 */
.qr-wrap,
.urls-tools-qr {
    position: relative;
}

#code {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    z-index: 60;
    border: var(--tagbacolorborder);
    color: var(--accent);
}

#code img {
    display: block;
}

.qr-wrap:hover #code,
.urls-tools-qr:hover #code {
    display: block;
}

/* ============ 网站信息 ============ */
.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 16px 0 8px;
}

.card-title::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px dashed var(--line);
}

.info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    flex-shrink: 0;
    width: 96px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--sub);
}

.info-label i {
    width: 16px;
    text-align: center;
    color: var(--accent);
}

.info-value {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    color: var(--text);
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* ============ 网页快照 ============ */
.shot-card .view_img {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.shot-card .view_img img {
    display: block;
    width: 100%;
    border-radius: 12px;
    vertical-align: middle;
}

/* ============ 页脚 ============ */
.footer-inner {
    margin-top: auto;
    padding: 26px 0 8px;
    text-align: center;
    color: var(--card);
    font-size: 12.5px;
    text-shadow: var(--shadow);
}

.footer-text p {
    margin: 3px 0;
}

.footer-text a.icp {
    color: var(--card);
    text-decoration: none;
}

.footer-text a.icp:hover {
    color: var(--accent);
}

/* ============ toast ============ */
.toast-msg {
    position: fixed;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%) translateY(16px);
    padding: 10px 22px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.85);
    color: #fff;
    font-size: 13.5px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.toast-msg.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============ 详情扩展模块 ============ */
.site-stats {
    display: flex;
    gap: 18px;
    margin-top: 14px;
    color: var(--sub);
    font-size: 13px;
}

.site-stats strong {
    color: var(--text);
    font-size: 15px;
}

.detail-ad-list {
    display: grid;
    gap: 12px;
    margin: 0;
    overflow: visible;
    border-radius: 0;
}

.detail-ad-list a,
.detail-ad-list img {
    display: block;
    width: 100%;
}

.detail-ad-list img {
    max-height: 180px;
    object-fit: cover;
    border-radius: 10px;
}

.detail-content {
    color: var(--text);
    font-size: 15px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.detail-content h1,
.detail-content h2,
.detail-content h3,
.detail-content h4 {
    margin: 1.3em 0 .6em;
    line-height: 1.4;
}

.detail-content p,
.detail-content ul,
.detail-content ol,
.detail-content blockquote {
    margin: .8em 0;
}

.detail-content ul,
.detail-content ol {
    padding-left: 1.6em;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.detail-notice p {
    color: var(--sub);
    line-height: 1.8;
}

.featured-grid,
.popular-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding-top: 8px;
}

.detail-service-card,
.popular-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    color: var(--text);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}

.detail-service-card:hover,
.popular-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, .45);
    box-shadow: var(--shadow);
}

.detail-service-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-card-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 11px;
    background: var(--card);
    overflow: hidden;
}

.detail-card-icon img,
.detail-card-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-card-body,
.popular-main {
    min-width: 0;
}

.detail-card-body strong,
.detail-card-body small,
.popular-main strong,
.popular-main small {
    display: block;
}

.detail-card-body small,
.popular-main small {
    margin-top: 4px;
    color: var(--sub);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.popular-main {
    color: var(--text);
}

.popular-main .detail-card-icon {
    margin-bottom: 12px;
}

.popular-visit {
    width: 100%;
    margin-top: 14px;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--accent-2);
    color: #fff;
    cursor: pointer;
}

.visit-site:disabled {
    opacity: .65;
    cursor: wait;
}





/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .urls-tools-qr {
        display: none;
    }
}

@media (max-width: 640px) {

    .featured-grid,
    .popular-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .detail-service-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .container {
        padding: 0 14px 30px;
    }

    header {
        height: 60px;
    }

    .logo-nav .logo {
        height: 30px;
    }

    .title-nav h1 {
        font-size: 15px;
    }

    .card {
        padding: 20px 18px;
        border-radius: 14px;
    }

    .detail-shell {
        padding: 2px 18px 20px;
        border-radius: 14px;
    }

    .detail-summary {
        padding-bottom: 20px;
    }

    .detail-section {
        padding: 20px 0;
    }

    .site-head {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .site-logo {
        width: 76px;
        height: 76px;
    }

    .site-name {
        font-size: 20px;
    }


    .site-actions {
        justify-content: center;
    }

    .info-list li {
        flex-direction: column;
        gap: 4px;
    }

    .info-label {
        width: auto;
    }

    .crumb .cur {
        max-width: 160px;
    }
}
