/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #F9F9F9;
}

/* Header and Navigation */
header {
    background-color: #6C63FF;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(108,99,255,0.08);
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo样式设计 */
.logo {
    position: relative;
    z-index: 10;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    background: linear-gradient(135deg, 
        rgba(108, 99, 255, 0.1) 0%, 
        rgba(255, 214, 0, 0.05) 50%, 
        rgba(108, 99, 255, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 214, 0, 0.2);
    box-shadow: 
        0 4px 15px rgba(108, 99, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.logo:hover {
    background: linear-gradient(135deg, 
        rgba(108, 99, 255, 0.15) 0%, 
        rgba(255, 214, 0, 0.1) 50%, 
        rgba(108, 99, 255, 0.15) 100%);
    border-color: rgba(255, 214, 0, 0.4);
    box-shadow: 
        0 6px 25px rgba(108, 99, 255, 0.2),
        0 0 30px rgba(255, 214, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.logo h1 {
    color: #FFD600;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 0;
    position: relative;
    text-shadow: 
        0 0 8px rgba(255, 214, 0, 0.6),
        0 0 16px rgba(255, 214, 0, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.7);
    background: linear-gradient(135deg, #FFD600 0%, #FFEB3B 50%, #FFD600 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoGlow 3s ease-in-out infinite alternate;
    transition: all 0.3s ease;
    /* 确保文字清晰度 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.logo h1 a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
}

.logo h1 a:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Logo发光动画 */
@keyframes logoGlow {
    0% {
        background-position: 0% 50%;
        text-shadow: 
            0 0 8px rgba(255, 214, 0, 0.6),
            0 0 16px rgba(255, 214, 0, 0.4),
            2px 2px 4px rgba(0, 0, 0, 0.7);
    }
    100% {
        background-position: 100% 50%;
        text-shadow: 
            0 0 12px rgba(255, 214, 0, 0.8),
            0 0 24px rgba(255, 214, 0, 0.6),
            2px 2px 6px rgba(0, 0, 0, 0.8);
    }
}

/* Logo装饰元素 */
.logo h1::before {
    content: '✨';
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    animation: sparkle 2s ease-in-out infinite;
    opacity: 0.8;
}

.logo h1::after {
    content: '🔮';
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    animation: sparkle 2s ease-in-out infinite reverse;
    opacity: 0.8;
}

@keyframes sparkle {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-50%) scale(1.2);
        opacity: 1;
    }
}

/* Logo响应式设计 */
@media (max-width: 768px) {
    .logo {
        padding: 0.4rem 0.8rem;
    }
    
    .logo h1 {
        font-size: 1.8rem;
        letter-spacing: 1.5px;
    }
    
    .logo h1::before,
    .logo h1::after {
        font-size: 1.3rem;
    }
    
    .logo h1::before {
        left: -30px;
    }
    
    .logo h1::after {
        right: -35px;
    }
}

@media (max-width: 480px) {
    .logo {
        padding: 0.3rem 0.6rem;
    }
    
    .logo h1 {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }
    
    .logo h1::before,
    .logo h1::after {
        font-size: 1.1rem;
    }
    
    .logo h1::before {
        left: -25px;
    }
    
    .logo h1::after {
        right: -30px;
    }
}

/* 确保logo在所有浏览器中正确显示 */
.logo h1 a {
    /* 为不支持background-clip的浏览器提供后备颜色 */
    color: #FFD600;
    text-decoration: none;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
}

/* 支持background-clip的浏览器 */
@supports (-webkit-background-clip: text) or (background-clip: text) {
    .logo h1 {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .logo h1 a {
        color: transparent;
    }
}

/* 如果background-clip不工作，确保文字可见 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .logo h1 {
        background: none;
        color: #FFD600;
        -webkit-text-fill-color: #FFD600;
    }
    
    .logo h1 a {
        color: #FFD600;
    }
}

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

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1.1rem;
}

.nav-links a:hover {
    color: #FFD600;
}

/* Hero Section */
.hero {
    height: 60vh;
    background: linear-gradient(rgba(108,99,255,0.7), rgba(255,214,0,0.2)),
                url('https://ichi-the-witch.com/wp-content/uploads/2025/01/ichithewitch_header.webp') center/cover, #6C63FF;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-top: 60px;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #FFD600;
    text-shadow: 1px 2px 8px #6C63FF;
}

/* Chapters Grid */
.chapters-grid {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.chapters-grid h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #6C63FF;
}

/* 章节列表为纯文本边框列表 */
.chapters-container {
    display: block;
    padding: 0;
    margin: 0 auto;
    max-width: 600px;
}

.chapter-list-item {
    display: flex;
    align-items: center;
    border: 1px solid #222;
    border-bottom: none;
    padding: 0.9rem 1.2rem;
    font-size: 1.1rem;
    background: #fff;
    transition: background 0.2s;
}
.chapter-list-item:last-child {
    border-bottom: 1px solid #222;
}
.chapter-list-item a {
    color: #222;
    text-decoration: none;
    flex: 1;
}
.chapter-list-item:hover {
    background: #FFD60022;
}

/* 去除卡片和图片相关样式 */
.chapter-card, .chapter-card img, .chapter-info { display: none !important; }

/* About Section */
.about-section {
    background-color: #fff;
    padding: 4rem 0 2rem 0;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.manga-info h3 {
    color: #6C63FF;
    margin-bottom: 1rem;
}

/* 粘性底部footer */
html, body {
    height: 100%;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1 0 auto;
}
footer {
    flex-shrink: 0;
    background-color: #222;
    color: #FFD600;
    padding: 2rem 0 1rem 0;
    text-align: center;
    width: 100%;
    font-size: 1rem;
    box-shadow: 0 -2px 8px rgba(108,99,255,0.08);
    position: relative;
    left: 0;
    bottom: 0;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 900px) {
    .chapters-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .manga-info {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .main-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    .chapters-container {
        grid-template-columns: 1fr;
    }
    .manga-info {
        grid-template-columns: 1fr;
    }
    .hero-content h2 {
        font-size: 2rem;
    }
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        color: #FFD600;
        font-size: 1.7rem;
        cursor: pointer;
    }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #6C63FF;
        padding: 1rem;
        z-index: 1001;
    }
    .nav-links.active a {
        color: #FFD600;
        padding: 0.7rem 0;
        font-size: 1.2rem;
    }
}

.seo-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(108,99,255,0.08);
    max-width: 900px;
    margin: 2.5rem auto 2rem auto;
    padding: 2.5rem 2rem;
    font-size: 1.08rem;
    color: #222;
}
.seo-content h2, .seo-content h3 {
    color: #6C63FF;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.seo-content p, .seo-content ul, .seo-content dl {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}
.seo-content ul {
    padding-left: 1.5rem;
}
.seo-content img {
    display: none;
}
.seo-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 1rem;
}
.seo-content th, .seo-content td {
    border: 1px solid #eee;
    padding: 0.7rem 0.5rem;
    text-align: left;
}
.seo-content th {
    background: #F3F2FF;
    color: #6C63FF;
    font-weight: 700;
}
.seo-content tr:nth-child(even) {
    background: #FAFAFF;
}
.seo-content dt {
    font-weight: bold;
    color: #6C63FF;
    margin-top: 1rem;
}
.seo-content dd {
    margin-left: 0;
    margin-bottom: 0.7rem;
}
@media (max-width: 700px) {
    .seo-content {
        padding: 1.2rem 0.5rem;
        font-size: 0.98rem;
    }
    .seo-content table, .seo-content th, .seo-content td {
        font-size: 0.95rem;
    }
    .seo-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* manga-intro 大气美观设计 */
.manga-intro {
    background: linear-gradient(135deg, #6C63FF 0%, #8B78FF 100%);
    position: relative;
    padding: 4rem 0;
    margin: 3rem 0;
    overflow: hidden;
}

.manga-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.06)"/><circle cx="70" cy="10" r="1.2" fill="rgba(255,214,0,0.1)"/><circle cx="10" cy="60" r="1.8" fill="rgba(255,214,0,0.05)"/><circle cx="50" cy="30" r="0.8" fill="rgba(255,255,255,0.07)"/><circle cx="30" cy="70" r="1.5" fill="rgba(255,214,0,0.08)"/><circle cx="90" cy="80" r="1.2" fill="rgba(255,255,255,0.09)"/></svg>') repeat;
    pointer-events: none;
}

.manga-intro::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 70% 30%, rgba(255,214,0,0.1) 0%, transparent 50%),
                radial-gradient(circle at 30% 70%, rgba(139,120,255,0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.manga-intro-title {
    color: #FFD600;
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.manga-intro-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

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

/* PC端大屏幕优化 */
@media (min-width: 1200px) {
    .manga-intro-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .manga-intro-features {
        grid-column: 1 / -1;
        background: linear-gradient(135deg, rgba(255,214,0,0.15) 0%, rgba(108,99,255,0.15) 100%);
    }
    
    .manga-intro-characters-block {
        grid-column: 1 / -1;
        background: linear-gradient(135deg, rgba(108,99,255,0.1) 0%, rgba(255,214,0,0.05) 100%);
    }
    
    .manga-intro-faq {
        grid-column: 1 / -1;
        background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(247,246,255,0.98) 100%);
    }
    
    /* 确保内容块在PC端有合适的高度和间距 */
    .manga-intro-block {
        min-height: 280px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
    
    .manga-intro-features,
    .manga-intro-characters-block,
    .manga-intro-faq {
        min-height: auto;
    }
}

.manga-intro-block {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.manga-intro-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6C63FF, #FFD600);
}

.manga-intro-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(108,99,255,0.2);
}

.manga-intro-block h3 {
    color: #6C63FF;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.manga-intro-block h3::before {
    content: '✨';
    font-size: 1.2rem;
}

.manga-intro-block p {
    line-height: 1.8;
    color: #333;
    margin-bottom: 1rem;
}

.manga-intro-features {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(255,214,0,0.1) 0%, rgba(108,99,255,0.1) 100%);
}

.manga-intro-features ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.manga-intro-features li {
    background: rgba(255,255,255,0.8);
    padding: 1.2rem;
    border-radius: 12px;
    border-left: 4px solid #FFD600;
    transition: all 0.3s ease;
}

.manga-intro-features li:hover {
    background: rgba(255,255,255,1);
    transform: translateX(5px);
}

.manga-info-stats {
    background: linear-gradient(135deg, rgba(108,99,255,0.08) 0%, rgba(255,214,0,0.08) 100%);
}

.manga-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    background: rgba(255,255,255,0.9);
    padding: 1rem;
    border-radius: 10px;
    border-left: 3px solid #6C63FF;
    transition: all 0.3s ease;
    text-align: center;
}

.stat-item:hover {
    background: rgba(255,255,255,1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108,99,255,0.15);
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.1rem;
    color: #6C63FF;
    font-weight: 700;
}

.manga-intro-characters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.character-item {
    background: linear-gradient(135deg, #F7F6FF 0%, #FFFFFF 100%);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(108,99,255,0.1);
    border: 1px solid rgba(108,99,255,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.character-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6C63FF, #FFD600);
    border-radius: 0 15px 0 100%;
}

.character-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(108,99,255,0.15);
}

.character-name {
    color: #6C63FF;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
}

.character-desc {
    color: #555;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.manga-intro-faq {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    grid-column: 1 / -1;
}

.faq-item {
    background: linear-gradient(135deg, #F9F9FF 0%, #FFFFFF 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 5px solid #6C63FF;
    box-shadow: 0 3px 15px rgba(108,99,255,0.08);
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 25px rgba(108,99,255,0.12);
}

.faq-q {
    color: #6C63FF;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-q::before {
    content: '❓';
    font-size: 1rem;
}

.faq-a {
    color: #444;
    line-height: 1.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .manga-intro {
        padding: 3rem 0;
        margin: 2rem 0;
    }
    
    .manga-intro-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }
    
    .manga-intro-content {
        padding: 0 1rem;
    }
    
    .manga-intro-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .manga-intro-features ul {
        grid-template-columns: 1fr;
    }
    
    .manga-intro-characters {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .character-item {
        padding: 1.2rem;
    }
    
    .manga-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 0.8rem;
    }
} 