/* 基础样式 */
:root {
    --primary-color: #3a4cb1;
    --secondary-color: #ff6b95;
    --dark-color: #1a1a2e;
    --light-color: #f5f5f5;
    --text-color: #333;
    --text-light: #777;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

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

.btn-primary:hover {
    background-color: #2a3b9d;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: #ff4d7f;
    transform: translateY(-2px);
}

.section-header {
    margin-bottom: 40px;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* Header 样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

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

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    align-items: center;
}

.nav-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 15px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.nav-buttons .search-btn,
.nav-buttons .theme-toggle {
    color: var(--text-color);
}

.nav-buttons .login-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.nav-buttons button:hover {
    color: var(--secondary-color);
}

.nav-buttons .login-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 2px 0;
    transition: var(--transition);
}

/* Hero 样式 */
.hero {
    height: 60vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://source.unsplash.com/random/1920x1080/?train,night') no-repeat center center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin-bottom: 60px;
    padding: 60px 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Chapters 样式 */
.chapters {
    padding: 80px 0;
}

.view-options {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.view-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    margin: 0 10px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.view-btn.active,
.view-btn:hover {
    color: var(--primary-color);
}

.sort-select {
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: white;
    margin-left: 15px;
    cursor: pointer;
    outline: none;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* 列表视图样式 */
.chapters-grid.list-layout {
    grid-template-columns: 1fr;
    gap: 15px;
}

.chapters-grid.list-layout .chapter-card {
    display: flex;
    align-items: center;
}

.chapters-grid.list-layout .chapter-number {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    border-radius: 10px 0 0 10px;
}

.chapters-grid.list-layout .chapter-info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.chapters-grid.list-layout .chapter-title {
    margin-bottom: 5px;
}

.chapters-grid.list-layout .chapter-meta {
    margin-left: auto;
    text-align: right;
}

.chapter-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.chapter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chapter-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, #f5f7ff 0%, #e0e6ff 100%);
}

.chapter-info {
    padding: 20px;
}

.chapter-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.chapter-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.9rem;
}

.chapter-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-new {
    background-color: var(--secondary-color);
    color: white;
}

.status-read {
    background-color: #4caf50;
    color: white;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.pagination-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.pagination-btn:hover {
    color: var(--primary-color);
}

.pagination-numbers {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.pagination-number {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 5px;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.pagination-number.active,
.pagination-number:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 搜索模态框样式 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.search-container {
    width: 90%;
    max-width: 600px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease;
}

.search-form {
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 20px;
    font-size: 1.2rem;
    border: none;
    outline: none;
}

.search-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.search-close:hover {
    color: var(--secondary-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* About 样式 */
.about {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.story-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-item {
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.info-item .label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

/* Characters 样式 */
.characters {
    padding: 80px 0;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.character-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.character-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.character-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.character-role {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 15px;
}

.character-desc {
    color: var(--text-color);
    flex-grow: 1;
}

/* Footer 样式 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: white;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-links-column {
    flex: 1;
    min-width: 150px;
}

.footer-links-column h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
}

.footer-links-column ul li {
    margin-bottom: 10px;
}

.footer-links-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links-column ul li a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-newsletter {
    flex: 1;
    min-width: 250px;
}

.footer-newsletter h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-newsletter p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 30px 0 0 30px;
    outline: none;
}

.newsletter-form button {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: #ff4d7f;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero {
        height: 50vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px 0;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        transition: var(--transition);
        box-shadow: var(--shadow);
        z-index: 999;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 20px;
    }
    
    .main-nav ul li {
        margin: 15px 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        height: 40vh;
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .chapters-grid,
    .characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .chapters-grid.list-layout .chapter-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chapters-grid.list-layout .chapter-meta {
        margin-left: 0;
        margin-top: 10px;
        text-align: left;
        width: 100%;
        justify-content: space-between;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .nav-buttons .search-btn,
    .nav-buttons .theme-toggle {
        font-size: 1rem;
    }
    
    .nav-buttons .login-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .hero {
        height: auto;
        min-height: 300px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .chapters-grid,
    .characters-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .search-input {
        padding: 15px;
        font-size: 1rem;
    }
}

/* 暗色主题 */
body.dark-theme {
    --text-color: #f5f5f5;
    --text-light: #aaa;
    --light-color: #121212;
    --dark-color: #1a1a2e;
    --border-color: #333;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background-color: #121212;
}

body.dark-theme .header {
    background-color: rgba(18, 18, 18, 0.95);
}

body.dark-theme .chapter-card,
body.dark-theme .info-item,
body.dark-theme .character-card {
    background-color: #1e1e1e;
}

body.dark-theme .chapter-number {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--secondary-color);
}

body.dark-theme .about {
    background-color: #0a0a0a;
}

body.dark-theme .newsletter-form input {
    background-color: #333;
    color: white;
}

body.dark-theme .mobile-menu-btn span {
    background-color: white;
}

body.dark-theme .sort-select {
    background-color: #333;
    color: white;
    border-color: #444;
}

body.dark-theme .search-container {
    background-color: #1e1e1e;
}

body.dark-theme .search-input {
    background-color: #1e1e1e;
    color: white;
}

/* Chapter link styles */
.chapter-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0;
}

.chapter-card {
    position: relative;
    cursor: pointer;
} 