/* 韩漫网站 - 主样式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b9d;
    --secondary-color: #c44569;
    --dark-bg: #1a1a2e;
    --darker-bg: #16213e;
    --light-text: #ffffff;
    --gray-text: #b8b8b8;
    --border-color: #2d2d44;
    --hover-color: #ff8fb3;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--light-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* 头部导航 */
.header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    color: var(--hover-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    flex-wrap: wrap;
}

.nav-menu a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 24px;
    cursor: pointer;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* 页面标题 */
.page-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
    padding: 20px 0;
}

.page-subtitle {
    font-size: 18px;
    color: var(--gray-text);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.8;
}

/* 分类导航 */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    padding: 20px;
    background: rgba(45, 45, 68, 0.5);
    border-radius: 15px;
}

.category-nav a {
    padding: 12px 24px;
    background: var(--darker-bg);
    color: var(--light-text);
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

.category-nav a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

/* 漫画网格 */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.comic-card {
    background: rgba(45, 45, 68, 0.6);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.comic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.2);
    border-color: var(--primary-color);
}

.comic-cover {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.comic-info {
    padding: 15px;
}

.comic-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--light-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comic-meta {
    font-size: 12px;
    color: var(--gray-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comic-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    margin-top: 8px;
}

/* 推荐区域 */
.featured-section {
    margin: 50px 0;
    padding: 30px;
    background: rgba(45, 45, 68, 0.4);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

/* 更新列表 */
.update-list {
    list-style: none;
}

.update-item {
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s;
}

.update-item:hover {
    background: rgba(45, 45, 68, 0.8);
    transform: translateX(5px);
}

.update-item a {
    color: var(--light-text);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.update-title {
    font-size: 16px;
    font-weight: 500;
}

.update-time {
    color: var(--gray-text);
    font-size: 14px;
}

/* 内容区域 */
.content-section {
    background: rgba(45, 45, 68, 0.4);
    padding: 40px;
    border-radius: 20px;
    margin: 30px 0;
    line-height: 2;
    border: 1px solid var(--border-color);
}

.content-section p {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--light-text);
    text-align: justify;
}

.content-section h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.content-section h3 {
    color: var(--hover-color);
    font-size: 20px;
    margin: 25px 0 15px;
}

.content-section ul {
    margin-left: 30px;
    margin-bottom: 20px;
}

.content-section li {
    margin-bottom: 10px;
    color: var(--gray-text);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.btn:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.4);
}

.btn-secondary {
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(45, 45, 68, 0.8);
}

/* 搜索框 */
.search-box {
    max-width: 600px;
    margin: 30px auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: rgba(45, 45, 68, 0.8);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    color: var(--light-text);
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.2);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 25px;
    background: var(--primary-color);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

/* 页脚 */
.footer {
    background: var(--darker-bg);
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section a {
    color: var(--gray-text);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--gray-text);
}

/* 阅读器样式 */
.reader-container {
    max-width: 900px;
    margin: 30px auto;
    background: rgba(45, 45, 68, 0.6);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.reader-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.reader-page {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* 警告提示 */
.alert {
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
    background: rgba(255, 107, 157, 0.1);
}

.alert-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* FAQ样式 */
.faq-item {
    background: rgba(45, 45, 68, 0.6);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.faq-question {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.faq-answer {
    color: var(--gray-text);
    line-height: 1.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 20px;
        gap: 15px;
    }

    .nav-menu.active {
        display: flex;
    }

    .page-title {
        font-size: 24px;
    }

    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .comic-cover {
        height: 200px;
    }

    .content-section {
        padding: 20px;
    }

    .category-nav {
        gap: 10px;
    }

    .category-nav a {
        padding: 10px 18px;
        font-size: 13px;
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .reader-controls {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .comic-cover {
        height: 180px;
    }

    .page-title {
        font-size: 20px;
    }

    .section-title {
        font-size: 22px;
    }

    .content-section {
        padding: 15px;
    }
}

/* 夜间模式切换（纯CSS实现） */
.night-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.4);
    z-index: 999;
    font-size: 24px;
    border: none;
    color: white;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-text);
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tag {
    padding: 6px 15px;
    background: rgba(255, 107, 157, 0.2);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    color: var(--light-text);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}
