/* 基础样式 */
body {
    cursor: none;
    background-color: #fdfbf7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 深色模式 */
body.dark-mode {
    background-color: #1c1917;
}

body.dark-mode .text-stone-900 { color: #fafaf9; }
body.dark-mode .text-stone-800 { color: #f5f5f4; }
body.dark-mode .text-stone-500 { color: #a8a29e; }
body.dark-mode .text-stone-400 { color: #78716c; }
body.dark-mode .text-stone-300 { color: #57534e; }
body.dark-mode .border-stone-200 { border-color: #44403c; }
body.dark-mode .border-stone-300 { border-color: #57534e; }
body.dark-mode .border-stone-800 { border-color: #a8a29e; }
body.dark-mode .bg-stone-100 { background-color: #292524; }
body.dark-mode .bg-stone-200 { background-color: #44403c; }
body.dark-mode .hover\:text-stone-900:hover { color: #fafaf9; }
body.dark-mode .hover\:text-orange-800:hover { color: #fdba74; }
body.dark-mode .hover\:border-orange-800:hover { border-color: #fdba74; }
body.dark-mode .hover\:text-orange-600:hover { color: #fdba74; }
body.dark-mode .hover\:grayscale-0:hover { filter: grayscale(0%); }
body.dark-mode .group-hover\:pl-4:hover { padding-left: 1rem; }
body.dark-mode .group-hover\:text-stone-900:hover { color: #fafaf9; }
body.dark-mode .group-hover\:text-orange-600:hover { color: #fdba74; }
body.dark-mode .group-hover\:fill-stone-900:hover { fill: #fafaf9; }
body.dark-mode .hover\:text-orange-500:hover { color: #fdba74; }

/* 图片懒加载样式 */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy-image.loaded {
    opacity: 1;
}

@media (max-width: 768px) {
    body { cursor: auto; }
    .cursor-dot, .cursor-outline { display: none; }
    
    /* 移动端字体大小优化 */
    .text-4xl { font-size: 1.5rem; } /* 36px -> 24px */
    .text-5xl { font-size: 1.75rem; } /* 48px -> 28px */
    .text-2xl { font-size: 1.25rem; } /* 24px -> 20px */
    .text-3xl { font-size: 1.5rem; } /* 30px -> 24px */
    
    /* 标题字体优化 */
    #hero-title {
        font-size: 10vw !important;
    }
    
    /* 正文内容字体优化 */
    .article-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .article-content p {
        margin-bottom: 1rem;
    }
    
    /* 文章卡片字体优化 */
    .group:hover .text-4xl,
    .group:hover .text-5xl {
        font-size: inherit !important;
    }
    
    /* 导航链接字体优化 */
    nav a {
        font-size: 0.7rem !important;
    }
    
    /* 按钮字体优化 */
    .text-xs {
        font-size: 0.65rem !important;
    }
    
    /* 分类标签优化 */
    [class*="text-\\[10px\\"] {
        font-size: 0.6rem !important;
    }
}

@media (max-width: 480px) {
    /* 小屏幕进一步优化 */
    #hero-title {
        font-size: 12vw !important;
    }
    
    .text-4xl { font-size: 1.25rem; }
    .text-5xl { font-size: 1.5rem; }
    
    .article-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* 更大的点击区域 */
    button, a, [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* 平板设备字体优化 */
    #hero-title {
        font-size: 8vw !important;
    }
    
    .text-4xl { font-size: 2rem; }
    .text-5xl { font-size: 2.5rem; }
}

/* 噪点纹理 */
.bg-noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 40;
}

/* 经典高级光标 */
.cursor-dot {
    width: 6px; 
    height: 6px; 
    background-color: #1c1917;
    position: fixed; 
    top: 0; 
    left: 0; 
    transform: translate(-50%, -50%); 
    border-radius: 50%; 
    z-index: 9999; 
    pointer-events: none;
}

.cursor-outline {
    width: 40px; 
    height: 40px; 
    border: 1px solid rgba(28, 25, 23, 0.2);
    position: fixed; 
    top: 0; 
    left: 0; 
    transform: translate(-50%, -50%); 
    border-radius: 50%; 
    z-index: 9998; 
    pointer-events: none;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), height 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s;
}

.no-scrollbar::-webkit-scrollbar { display: none; }

#preloader { 
    position: fixed; 
    inset: 0; 
    background: #fdfbf7; 
    z-index: 10000; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: opacity 0.8s, visibility 0.8s; 
}

/* 3D Tilt 基础 */
.tilt-card { 
    transform-style: preserve-3d; 
    transform: perspective(1000px); 
}

.tilt-inner { 
    transform: translateZ(20px); 
}

/* 图片容器 - 彻底移除遮罩，只保留图片本身的悬停动效 */
.img-container { 
    position: relative; 
    overflow: hidden; 
    background-color: #f5f5f4; /* 浅灰背景，图片加载前的占位 */
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 默认稍微放大一点点，为了 hover 时的视差效果 */
    transform: scale(1.05); 
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s;
    /* 确保图片层级正确 */
    position: relative;
    z-index: 1;
}

/* 悬停时图片稍微再放大一点 */
.group:hover .img-container img {
    transform: scale(1.1);
}

/* 杂志级排版 */
.article-content { 
    font-family: 'Noto Sans SC', sans-serif; 
    max-width: 680px; 
    margin: 0 auto; 
    font-size: 1.125rem; 
    color: #292524; 
}

.article-content > p:first-of-type::first-letter { 
    float: left; 
    font-size: 3.8rem; 
    line-height: 0.85; 
    font-weight: 700; 
    font-family: 'Playfair Display', serif; 
    margin-right: 0.15em; 
    margin-top: 0.05em; 
    color: #1c1917; 
}

.article-content p { 
    margin-bottom: 2.5em; 
    line-height: 2; 
    letter-spacing: 0.01em; 
}

.article-content h2 { 
    font-family: 'Inter', sans-serif; 
    font-weight: 700; 
    font-size: 1.75rem; 
    margin-top: 4em; 
    margin-bottom: 1.5em; 
    color: #1c1917; 
    letter-spacing: -0.03em; 
    line-height: 1.2; 
}

.article-content blockquote { 
    border: none; 
    padding: 2rem 0; 
    margin: 3.5em 0; 
    font-family: 'Playfair Display', serif; 
    font-size: 1.5rem; 
    line-height: 1.5; 
    font-style: italic; 
    color: #1c1917; 
    text-align: center; 
    position: relative; 
}

.article-content blockquote::before { 
    content: "\""; 
    font-size: 4rem; 
    position: absolute; 
    top: -1rem; 
    left: 50%; 
    transform: translateX(-50%); 
    color: #e7e5e4; 
    z-index: -1; 
}

/* 文章内图片 */
.article-content img { 
    width: 110%; 
    margin-left: -5%; 
    border-radius: 2px; 
    margin-top: 3.5em; 
    margin-bottom: 3.5em; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1); 
    display: block; 
}

@media (max-width: 768px) { 
    .article-content img { 
        width: 100%; 
        margin-left: 0; 
    } 
}

.hover-reveal { 
    position: fixed; 
    width: 300px; 
    height: 200px; 
    pointer-events: none; 
    transform: translate(-50%, -50%) scale(0); 
    opacity: 0; 
    z-index: 50; 
    transition: opacity 0.3s, transform 0.3s; 
    object-fit: cover; 
    border-radius: 4px; 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); 
}

::selection { 
    background-color: #fdba74; 
    color: #1c1917; 
}

/* 移动端菜单样式 */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 慢速旋转动画 */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* 动画延迟 */
.animation-delay-2000 {
    animation-delay: 2s;
}
