/* 自定义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;
}

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); }
.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;
}

/* 容器样式 */
.container {
    max-width: 100%;
    margin: 0 auto;
    background: var(--neutral-900);
}

/* 移动端头部 */
.mobile-header {
    background-color: var(--neutral-800);
    padding: 0.5rem;
}

.mobile-header .flex {
    align-items: center;
    justify-content: space-between;
    padding: 0 0.5rem;
}

.mobile-header .flex-shrink-0 svg {
    width: 3rem; /* w-12 */
    height: 1.875rem; /* h-7.5 */
}

.mobile-header .flex-1 {
    flex: 1;
    text-align: center;
}

.mobile-header .text-lg {
    font-size: 1rem; /* text-base */
    font-weight: 700;
    color: var(--white);
}

.mobile-header .text-sm {
    font-size: 0.75rem; /* text-xs */
    color: var(--gray-400);
    margin-top: 0.125rem; /* mt-0.5 */
}

.mobile-header .flex-shrink-0:last-child {
    width: 3rem; /* w-12 */
}

#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-yellow-500/50 */
    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 */
}

/* Iconbar 5列网格布局，超出换行，居中显示 */
#allcontentIconbar {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 1.5rem; /* 增加向下间距 */
}

#allcontentIconbar .grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    width: auto;
    max-width: 100%;
    justify-items: center;
}

/* 顶部菜单栏样式 - 铺满一行显示 */
.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;
}

/* 响应式设计 - PC端布局优化 */
@media (min-width: 900px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
        background: var(--neutral-900);
    }
    .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; }
