
/* --- 双一怪谈 - 伊藤润二风格模板样式 Part 1: 基础与布局 --- */

/* --- 颜色变量 --- */
:root {
    --bg-dark: #0a0a14; /* 暗蓝黑底 */
    --text-paper: #f5f0e8; /* 纸白 */
    --accent-red: #c41e3a; /* 朱红 */
    --border-blue: #1a2744; /* 墨蓝 */
    --highlight-yellow: #b8a04a; /* 枯黄 */
    --font-main: 'Noto Serif SC', serif;
    --font-handwritten: 'Zhi Mang Xing', cursive;
}

/* --- 全局重置与基础设定 --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-paper);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.paper-texture {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><filter id="n" x="0" y="0"><feTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="10" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23n)" opacity="0.1"/></svg>');
    background-repeat: repeat;
}

a {
    color: var(--text-paper);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

a:hover {
    color: var(--accent-red);
    transform: translateY(-2px);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    gap: 2rem;
}

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

.sidebar {
    flex-basis: 300px;
    flex-shrink: 0;
}

.has-sidebar .main-area {
    width: calc(100% - 320px);
}

/* --- 头部样式 --- */
.site-header {
    border-bottom: 2px solid var(--border-blue);
    padding: 1rem 0;
    position: relative;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-blue);
    border-top: 0;
    border-bottom: 0;
}

.logo-container {
    position: relative;
}

.logo-image {
    height: 50px;
    width: auto;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.logo-link:hover .logo-image {
    transform: scale(1.1) rotate(-5deg);
}

.logo-text {
    font-family: var(--font-handwritten);
    font-size: 1.5rem;
    color: var(--highlight-yellow);
    margin-left: 10px;
    vertical-align: middle;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-family: var(--font-handwritten);
    font-size: 1.2rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-red);
    transition: all 0.3s ease-in-out;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.search-box {
    position: relative;
}

.search-input {
    background: transparent;
    border: 1px solid var(--border-blue);
    border-radius: 0;
    color: var(--text-paper);
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    width: 200px;
    font-family: var(--font-main);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 10px rgba(196, 30, 58, 0.5);
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--text-paper);
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
}

/* --- 墨水滴落效果 --- */
.ink-drip {
    position: relative;
    display: inline-block;
}

.ink-drip::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20%;
    width: 8px;
    height: 8px;
    background-color: var(--accent-red);
    border-radius: 50%;
    animation: ink-drip-anim 3s infinite ease-out;
}

@keyframes ink-drip-anim {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateY(30px) scale(0.8);
        opacity: 0;
    }
}
/* --- 双一怪谈 - 伊藤润二风格模板样式 Part 2: 内容区域 --- */

/* --- 首页Hero --- */
.hero-section {
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 2px solid var(--border-blue);
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 4rem;
    font-family: var(--font-handwritten);
    color: var(--accent-red);
    margin-bottom: 1rem;
    animation: flicker 3s infinite alternate;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--highlight-yellow);
}

/* --- 内容卡片 --- */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.story-card {
    border: 1px solid var(--border-blue);
    background-color: rgba(26, 39, 68, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.story-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.story-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    pointer-events: none;
    border-image: linear-gradient(45deg, var(--accent-red), var(--highlight-yellow)) 1;
    animation: border-anim 4s linear infinite;
}

@keyframes border-anim {
    0% { border-image-source: linear-gradient(45deg, var(--accent-red), var(--highlight-yellow)); }
    25% { border-image-source: linear-gradient(135deg, var(--accent-red), var(--highlight-yellow)); }
    50% { border-image-source: linear-gradient(225deg, var(--accent-red), var(--highlight-yellow)); }
    75% { border-image-source: linear-gradient(315deg, var(--accent-red), var(--highlight-yellow)); }
    100% { border-image-source: linear-gradient(405deg, var(--accent-red), var(--highlight-yellow)); }
}

.card-image {
    position: relative;
}

.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: grayscale(80%);
    transition: filter 0.4s, transform 0.4s;
}

.story-card:hover .card-image img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent, var(--bg-dark) 90%);
    opacity: 0.6;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-family: var(--font-handwritten);
    font-size: 1.5rem;
    color: var(--text-paper);
    margin-bottom: 0.5rem;
}

.card-excerpt {
    font-size: 0.9rem;
    color: var(--text-paper);
    opacity: 0.8;
    height: 60px;
    overflow: hidden;
}

.card-meta {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--highlight-yellow);
    opacity: 0.7;
}

/* --- 详情页 --- */
.story-content {
    padding: 2rem;
    border: 1px solid var(--border-blue);
}

.story-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed var(--border-blue);
}

.story-title {
    font-size: 3rem;
    font-family: var(--font-handwritten);
    color: var(--accent-red);
}

.story-meta {
    margin-top: 1rem;
    color: var(--highlight-yellow);
}

.story-meta span {
    margin: 0 1rem;
}

.story-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.story-body p {
    margin-bottom: 1.5rem;
}

.story-navigation {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border-blue);
    display: flex;
    justify-content: space-between;
}

/* --- 列表页 --- */
.list-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 2px solid var(--border-blue);
    margin-bottom: 2rem;
}

.list-title {
    font-size: 3rem;
    font-family: var(--font-handwritten);
    color: var(--accent-red);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-blue);
    color: var(--text-paper);
}

.pagination .current {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--text-paper);
}
/* --- 双一怪谈 - 伊藤润二风格模板样式 Part 3: 侧边栏、页脚与响应式 --- */

/* --- 侧边栏 --- */
.sidebar-widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--border-blue);
    background-color: rgba(26, 39, 68, 0.2);
}

.widget-title {
    font-family: var(--font-handwritten);
    font-size: 1.8rem;
    color: var(--highlight-yellow);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-blue);
}

.sidebar-list li {
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-list .rank-number {
    display: inline-block;
    width: 20px;
    text-align: center;
    margin-right: 10px;
    color: var(--accent-red);
    font-weight: bold;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--border-blue);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.tag-item:hover {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--text-paper);
}

/* --- 页脚 --- */
.site-footer {
    border-top: 2px solid var(--border-blue);
    padding: 3rem 2rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-family: var(--font-handwritten);
    font-size: 1.5rem;
    color: var(--highlight-yellow);
    margin-bottom: 1rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border-blue);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- 响应式设计 --- */
@media (max-width: 1024px) {
    .content-wrap {
        flex-direction: column;
    }
    .has-sidebar .main-area {
        width: 100%;
    }
    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    .hero-title {
        font-size: 3rem;
    }
    .story-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    .content-wrap {
        padding: 1rem;
    }
    .sidebar {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .story-title {
        font-size: 2rem;
    }
}

/* --- 动画效果 --- */
@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 4px var(--accent-red),
            0 0 10px var(--accent-red),
            0 0 18px var(--accent-red),
            0 0 38px var(--accent-red),
            0 0 70px #fff3e0;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.story-card:hover::after {
    content: '💀'; /* 诡异表情符号 */
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2rem;
    animation: creepy-peek 0.5s ease-in-out;
}

@keyframes creepy-peek {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- 反干扰随机CSS类名 --- */
.x-ab12-c3d4 { color: transparent; }
.y-ef56-g7h8 { font-size: 0; }
.z-ij90-k1l2 { opacity: 0; }
