/* 自定义CSS - 替换Tailwind CDN，提升性能 */

/* 基础重置和变量 */
* {
    box-sizing: border-box;
}

:root {
    --neutral-900: #171717;
    --neutral-800: #262626;
    --neutral-700: #404040;
    --neutral-600: #525252;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --white: #ffffff;
    /* 主题色 - 与项目 index 模板一致 */
    --brand: 255, 153, 0;
    --brand-rgb: rgb(var(--brand));
    --brand-hex: #ff9900;
}

/* 与项目 index 一致：PC 端根字号放大 */
@media (min-width: 768px) {
    html {
        font-size: 18px;
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--neutral-900);
    color: var(--white);
    min-height: 100vh;
}

/* 链接样式 */
a {
    text-decoration: none;
    color: var(--white);
}

a:hover {
    color: var(--white);
}

/* 布局类 */
.flex { display: flex; }
.grid { display: grid; }
.block { display: block; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.text-center { text-align: center; }
.text-right {text-align: right;}

/* Flexbox */
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }

/* 间距类 */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.m-2 { margin: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-0\.5 { margin-bottom: 0.125rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.25rem; }
.gap-3 { gap: 0.75rem; }

/* 尺寸类 */
.w-16 { width: 4rem; }
.h-10 { height: 2.5rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-\[60px\] { width: 60px; }
.h-\[60px\] { height: 60px; }
.h-\[126px\] { height: 126px; }

/* 颜色类 */
.bg-neutral-900 { background-color: var(--neutral-900); }
.bg-neutral-800 { background-color: var(--neutral-800); }
.bg-neutral-700 { background-color: var(--neutral-700); }
.bg-neutral-600 { background-color: var(--neutral-600); }
.text-white { color: var(--white); }
.text-gray-300 { color: var(--gray-300); }
.text-gray-400 { color: var(--gray-400); }

/* 文字样式 */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-bold { font-weight: 700; }
.leading-snug { line-height: 1.375; }

/* 边框和圆角 */
.rounded { border-radius: 0.25rem; }

/* 网格布局 */
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }

/* 交互效果 */
.cursor-pointer { cursor: pointer; }
.hover\:opacity-80:hover { opacity: 0.8; }
.hover\:opacity-90:hover { opacity: 0.9; }
.hover\:bg-neutral-500:hover { background-color: #737373; }
.hover\:bg-neutral-700:hover { background-color: var(--neutral-700); }
.hover\:text-brand:hover { color: var(--brand-rgb); }
.transition-colors { transition: background-color 0.15s ease-in-out; }
.transition-opacity { transition: opacity 0.15s ease-in-out; }

/* 图片样式 */
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* 文本截断 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 容器样式（与 DefaultLayout.page 一致：底部留 64px 给固定底栏） */
.container {
    max-width: 100%;
    margin: 0 auto;
    background: var(--neutral-900);
    padding-bottom: 64px;
}

/* ========== 顶部样式（参考项目模板） ========== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(23, 23, 23, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 0;
}

.site-header-inner {
    max-width: 32rem;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo-link {
    display: block;
    color: var(--white);
    transition: color 0.2s;
}
.header-logo-link:hover {
    color: var(--brand-rgb);
}

.header-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}
@media (min-width: 768px) {
    .header-logo-text {
        font-size: 1.875rem;
    }
}

.header-email-link {
    display: block;
    transition: opacity 0.2s;
}
.header-email-link:hover {
    opacity: 0.9;
}

.header-email-addr {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 0.125rem;
}

/* 顶部导航条（分类按钮） */
.site-nav-wrap {
    background: rgba(38, 38, 38, 0.6);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.5rem 0;
}
.site-nav-inner {
    max-width: 32rem;
    margin: 0;
    padding: 0 12px 0 12px;
}
.nav-btn {
    display: inline-block;
    padding: 0.25rem 0.85rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: rgb(255, 255, 255);
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}
.nav-btn:hover {
    background: rgba(var(--brand), 0.2);
    /* color: var(--brand-rgb); */
    
}

/* ========== 底部样式（参考项目模板） ========== */
.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: rgba(23, 23, 23, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* 顶部 footer：不固定，随文档流显示在导航上方 */
.site-footer--top {
    position: static;
    bottom: auto;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* 与 DefaultLayout.bottomRow 一致：56px 高度、14px 字号、12px 左右内边距 */
.site-footer-inner {
    max-width: 36rem;
    margin: 0 auto;
    padding: 0 12px;
    height: 56px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    font-size: 14px;
    gap: 0;
}

.footer-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: rgb(255, 255, 255);
    transition: color 0.2s;
    cursor: pointer;
    white-space: nowrap;
    min-width: 0;
}
.footer-tab:hover {
    color: var(--white);
}
.footer-tab .footer-tab-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.footer-tab-bar {
    width: 24px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}
.footer-tab-bar-active {
    background: var(--brand-rgb);
}
.footer-tab-text-active {
    color: var(--brand-rgb);
}

#allcontentBanner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* ⬅️ 水平居中 */
    width: 100%;
    gap: 0; /* 移动端间距 */
    
}

/* PC端增加间距 */
@media (min-width: 900px) {
    #allcontentBanner {
        gap: 0.75rem;
    }
}

#allcontentBanner > div {
    width: 100%;
    max-width: 450px; /* PC 下最大宽度，避免贴边 */
    height: 100px !important;
    margin: 0 auto;   /* ⬅️ 保证居中 */
    
}

#allcontentBanner img {
    display: block;
    margin: 0 auto;   /* ⬅️ 图片本身居中 */
    height: 100px !important;
    object-fit: contain;
    max-width: 100%;
}

/* 浏览器兼容性提示样式 */
.browser-warning {
    margin: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background-color: rgba(217, 119, 6, 0.2); /* bg-yellow-600/20 */
    /* border: 1px solid rgba(217, 119, 6, 0.5);  */
    border-radius: 0.375rem; /* rounded-md */
}

.browser-warning .warning-content {
    display: flex;
    align-items: flex-start;
}

.browser-warning .warning-icon {
    flex-shrink: 0;
    margin-right: 0.375rem;
    margin-top: 0.6rem;
}

.browser-warning .warning-icon svg {
    width: 1rem; /* w-4 */
    height: 1rem; /* h-4 */
    color: #fbbf24; /* text-yellow-400 */
    margin-top: 0.125rem; /* mt-0.5 */
}

.browser-warning .warning-text {
    font-size: 0.75rem; /* text-xs */
    color: #fef3c7; /* text-yellow-200 */
    line-height: 1.25;
}

.browser-warning .warning-title {
    font-weight: 500; /* font-medium */
    margin-bottom: 0.125rem; /* mb-0.5 */
}

.browser-warning .warning-description {
    color: #fef3c7; /* text-yellow-100 */
}

/* qdhz 文字位广告样式 */
#allcontentIconbar {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0 0.75rem;
}

#allcontentIconbar .qdhz-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#allcontentIconbar .qdhz-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
}

#allcontentIconbar .qdhz-tab {
    border: 1px solid rgba(75, 85, 99, 0.85);
    /* background: rgba(31, 41, 55, 0.9); */
    background-color: var(--neutral-900);
    color: #d1d5db;
    border-radius: 0.375rem;
    padding: 0 0.6rem;
    font-size: 0.75rem;
    line-height: 1.1;
    cursor: pointer;
    width: 100%;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#allcontentIconbar .qdhz-tab-active {
    background: rgba(59, 130, 246, 0.25);
    color: #fffc;
}

#allcontentIconbar .qdhz-group {
    border: 1px solid rgba(55, 65, 81, 0.9);
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
}

#allcontentIconbar .qdhz-group-title {
    display: none;
}

#allcontentIconbar .qdhz-links-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

#allcontentIconbar .qdhz-link-item {
    display: block;
    text-decoration: none;
    font-size: 0.75rem;
    line-height: 1.2;
    color: #fffc;
    background: #1e1e1e;
    border: 1px solid rgba(75, 85, 99, 0.85);
    border-radius: 0.375rem;
    padding: 0.4rem 0.5rem;
    text-align: center;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

#allcontentIconbar .qdhz-link-item:hover {
    opacity: 0.9;
    background: rgba(75, 85, 99, 0.9);
}

#allcontentIconbar .qdhz-empty {
    grid-column: 1 / -1;
    display: block;
    color: #9ca3af;
    font-size: 0.75rem;
    text-align: center;
    padding: 0.375rem 0;
}

/* 顶部菜单栏样式 - 铺满一行显示 */
.flex-wrap {
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    width: 100%;
    display: flex;
}

/* 菜单按钮样式 - 平均分布，铺满 */
.px-3 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    flex: 1;
    text-align: center;
    min-width: 0;
}

.py-1 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

/* 主题色工具类 */
.text-brand { color: var(--brand-rgb); }
.bg-brand { background-color: var(--brand-rgb); }

/* 响应式设计 - PC端布局优化 */
@media (min-width: 900px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
        background: var(--neutral-900);
    }
    .site-header-inner,
    .site-nav-inner {
        max-width: 72rem;
    }
    .container .grid-cols-2 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    /* PC端banner固定尺寸 */
    .container #allcontentBanner img {
        width: 450px !important;
        height: 100px !important;
        object-fit: contain;
    }
}

/* 动画效果 */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, #374151 25%, #4B5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

a[href*="cnzz.com"],
iframe[src*="cnzz.com"] {
    display: none !important;
}

/* 图片懒加载样式 */
.lazy-load {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

.lazy-load.loading {
    opacity: 0.5;
}

.lazy-load.error {
    opacity: 0.75;
}

.image-container {
    position: relative;
}

.mr-auto { margin-right: auto; }
.mt-auto { margin-top: auto; }
.mb-auto { margin-bottom: auto; }
.ml-auto { margin-left: auto; }

/* 高级反爬虫随机数据样式 - 多层隐藏 */
.random-data-* {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    z-index: -9999 !important;
}

/* 隐藏的随机元素样式 - 多位置分布 */
.hidden-* {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    visibility: hidden !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    z-index: -9999 !important;
}

/* 随机类名样式 - 确保不影响布局 */
.cls_*,
.rnd-*,
.code-*,
.ts-*,
.sid-*,
.str-*,
.mix-*,
.h1-*,
.h2-*,
.h3-*,
.h4-*,
.h5-* {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    z-index: -9999 !important;
}``;
