/* 
 * 在校工室與JK共度的日常 - 主样式表
 * 日式漫画黑白风格 + 纸质质感设计
 * 符合2024-2025年SEO最佳实践和用户体验标准
 */

/* CSS 重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根元素和字体设置 */
:root {
    /* 主色调 - 黑白调配色方案 */
    --primary-black: #1a1a1a;
    --secondary-black: #2d2d2d;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666666;
    --white: #ffffff;
    --paper-white: #fefefe;
    
    /* 纸质质感色彩 */
    --paper-cream: #faf8f3;
    --paper-shadow: rgba(0, 0, 0, 0.1);
    --ink-black: #2c2c2c;
    --manga-border: #d4d4d4;
    
    /* 字体设置 */
    --font-primary: 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'SimSun', '宋体', sans-serif;
    --font-manga: 'Comic Sans MS', 'Hiragino Sans GB', cursive;
    
    /* 间距和尺寸 */
    --container-max-width: 1200px;
    --section-padding: 4rem 0;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px var(--paper-shadow);
    
    /* 动画 */
    --transition: all 0.3s ease;
}

/* 基础HTML元素样式 */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--ink-black);
    background: var(--paper-cream);
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0,0,0,0.05) 1px, transparent 0);
    background-size: 20px 20px;
    overflow-x: hidden;
}

/* 纸质质感效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 79px, rgba(0,0,0,0.04) 81px, transparent 82px),
        linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 82px 20px, 100% 20px;
    pointer-events: none;
    z-index: -1;
}

/* 容器样式 */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* 标题样式 - 漫画风格 */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-manga);
    font-weight: bold;
    color: var(--primary-black);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0px var(--white), -1px -1px 0px var(--manga-border);
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.4;
}

/* 段落和文本样式 */
p {
    margin-bottom: 1rem;
    text-align: justify;
}

/* 链接样式 */
a {
    color: var(--primary-black);
    text-decoration: underline;
    text-decoration-color: var(--manga-border);
    text-underline-offset: 3px;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-black);
    text-decoration-color: var(--primary-black);
}

/* 按钮样式 - 漫画风格 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-manga);
    font-weight: bold;
    text-decoration: none;
    border: 3px solid var(--primary-black);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--primary-black);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 4px 4px 0px var(--manga-border);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--manga-border);
}

.btn-primary {
    background: var(--primary-black);
    color: var(--white);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--primary-black);
}

/* 头部导航样式 */
.header {
    background: var(--paper-white);
    border-bottom: 3px solid var(--primary-black);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    border: 2px solid var(--primary-black);
    border-radius: 50%;
    box-shadow: 2px 2px 0px var(--manga-border);
}

.site-title {
    font-size: 1.5rem;
    margin: 0;
    color: var(--primary-black);
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar-nav a {
    font-weight: bold;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-nav a:hover {
    border-color: var(--primary-black);
    background: var(--light-gray);
}

/* 英雄区域样式 */
.hero-section {
    padding: var(--section-padding);
    background: var(--paper-white);
    border-bottom: 3px solid var(--manga-border);
    position: relative;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 10px;
    background: repeating-linear-gradient(
        45deg,
        var(--manga-border),
        var(--manga-border) 5px,
        transparent 5px,
        transparent 10px
    );
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 0px var(--white), -2px -2px 0px var(--manga-border);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--secondary-black);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.cover-image {
    width: 100%;
    height: auto;
    border: 4px solid var(--primary-black);
    border-radius: var(--border-radius);
    box-shadow: 8px 8px 0px var(--manga-border);
    transition: var(--transition);
}

.cover-image:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px var(--manga-border);
}

/* 内容区域样式 */
.main-content section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    font-size: 2.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary-black);
    border-radius: 2px;
}

/* 游戏介绍区域 */
.game-intro-section {
    background: var(--light-gray);
    border-top: 3px solid var(--manga-border);
    border-bottom: 3px solid var(--manga-border);
}

.intro-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.intro-paragraph {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-indent: 2em;
}

.game-features {
    background: var(--white);
    padding: 2rem;
    border: 3px solid var(--primary-black);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.features-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-black);
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--manga-border);
    position: relative;
    padding-left: 1.5rem;
}

.features-list li::before {
    content: '★';
    position: absolute;
    left: 0;
    color: var(--primary-black);
    font-weight: bold;
}

.features-list li:last-child {
    border-bottom: none;
}

.intro-image .screenshot-image {
    width: 100%;
    height: auto;
    border: 3px solid var(--primary-black);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* 游戏故事区域 */
.game-story-section {
    background: var(--paper-white);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.story-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
    background: var(--white);
    padding: 2rem;
    border: 3px solid var(--primary-black);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
}

.story-item::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: var(--manga-border);
    border-radius: var(--border-radius);
    z-index: -1;
}

.story-item:nth-child(even) {
    grid-template-columns: 2fr 1fr;
}

.story-item:nth-child(even) .story-image {
    order: 2;
}

.story-item:nth-child(even) .story-text {
    order: 1;
}

.story-image {
    width: 100%;
    height: auto;
    border: 2px solid var(--primary-black);
    border-radius: var(--border-radius);
}

.story-text h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-black);
}

.story-text p {
    line-height: 1.7;
    text-align: justify;
}

/* 截图区域 */
.screenshots-section {
    background: var(--light-gray);
    border-top: 3px solid var(--manga-border);
    border-bottom: 3px solid var(--manga-border);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.screenshot-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.screenshot {
    width: 100%;
    height: auto;
    border: 3px solid var(--primary-black);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.screenshot:hover {
    transform: scale(1.05);
}

/* FAQ 区域 */
.faq-section {
    background: var(--paper-white);
}

.faq-content {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border: 3px solid var(--primary-black);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--box-shadow);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: var(--light-gray);
    border: none;
    text-align: left;
    font-family: var(--font-manga);
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-black);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--medium-gray);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    transition: var(--transition);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
    padding: 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    margin: 0;
    line-height: 1.6;
}

/* 页脚样式 */
.footer {
    background: var(--primary-black);
    color: var(--white);
    padding: 3rem 0 1rem;
    border-top: 5px solid var(--manga-border);
}

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

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    border: 2px solid var(--white);
    border-radius: 50%;
}

.footer-description {
    font-size: 1.1rem;
    margin: 0;
}

.update-info {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin: 0;
}

.footer-links h3,
.footer-legal h3,
.footer-seo h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-shadow: none;
}

.footer-links ul,
.footer-legal ul,
.footer-seo ul {
    list-style: none;
    padding: 0;
}

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

.footer-links a,
.footer-legal a,
.footer-seo a {
    color: var(--medium-gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-legal a:hover,
.footer-seo a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 2px solid var(--dark-gray);
    padding-top: 1rem;
    text-align: center;
}

.compliance-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.age-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0;
}

.rating-badge {
    background: var(--white);
    color: var(--primary-black);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-weight: bold;
    font-size: 0.9rem;
}

.copyright {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin: 0;
}

.copyright a {
    color: var(--medium-gray);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-black);
    color: var(--white);
    border: 3px solid var(--white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top:hover {
    background: var(--secondary-black);
    transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    :root {
        --section-padding: 2rem 0;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .story-item {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .story-item:nth-child(even) .story-image,
    .story-item:nth-child(even) .story-text {
        order: unset;
    }
    
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .compliance-info {
        align-items: center;
    }
    
    .age-rating {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .story-item {
        padding: 1rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 1rem;
        right: 1rem;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hero-buttons,
    .back-to-top,
    .footer-seo {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero-section,
    .game-intro-section,
    .screenshots-section {
        background: white;
        border: none;
    }
    
    .section-title::after {
        background: black;
    }
}

/* 无障碍访问优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --primary-black: #000000;
        --white: #ffffff;
        --manga-border: #000000;
    }
}

/* 深色模式支持 (可选) */
@media (prefers-color-scheme: dark) {
    /* 保持黑白主题，不需要深色模式变化 */
}

/* 性能优化 */
.screenshot,
.cover-image,
.story-image {
    will-change: transform;
}

/* 字体加载优化 */
@font-face {
    font-family: 'Hiragino Sans GB';
    font-display: swap;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-black);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-black);
}
