/* 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: #333;
    background-color: #f8f9fa;
}

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

/* Header and Navigation */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

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

.logo h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
}

.logo i {
    margin-right: 0.5rem;
    color: #ffd700;
}

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

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-link:hover,
.nav-link.active {
    color: #ffd700;
    background-color: rgba(255, 255, 255, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 150px 0 80px;
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: left;
}

.hero-text p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-align: left;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.hero-image {
    text-align: center;
}

.hero-image i {
    font-size: 8rem;
    opacity: 0.8;
    color: #ffd700;
}

/* Featured Novels Section */
.featured-novels {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 700;
}

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

.novel-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

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

.novel-cover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.novel-cover img {
    aspect-ratio: 2/3;
}

.novel-icon {
    font-size: 4rem;
    color: white;
    opacity: 0.9;
}

.novel-info {
    padding: 1.5rem;
}

.novel-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 700;
      word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.author {
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.description {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.novel-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.novel-stats span {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.novel-stats i {
    color: #ffd700;
}

.read-now-btn {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.read-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Genres Section */
.genres-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

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

.genre-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.genre-card:hover {
    transform: translateY(-5px);
}

.genre-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.genre-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.genre-card p {
    color: #666;
}

/* Footer */
.main-footer {
    background: #2c3e50;
    color: white;
    padding: 50px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section ul li a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffd700;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #34495e;
    color: white;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: #ffd700;
    color: #2c3e50;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bbb;
}

/* Reading Page Styles */
.reading-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 20px 40px;
    background: white;
    min-height: 100vh;
}

.chapter-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #eee;
}

.chapter-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.novel-title {
    font-size: 1.2rem;
    color: #666;
    font-weight: 400;
}

.chapter-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 3rem;
}

.chapter-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.chapter-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-top: 2px solid #eee;
    gap: 1rem;
}

.nav-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.nav-button.disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.chapter-list-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    padding: 0.8rem 2rem;
}

/* Novel Index Page */
.novel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 60px;
    width: 100%;
    text-align: center;
}

.novel-info-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.novel-cover-large {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    height: 400px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.novel-cover-large i {
    font-size: 6rem;
    color: white;
    opacity: 0.8;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .novel-info-grid {
        grid-template-columns: 1fr;
    }

    .novel-cover-large {
        width: 100%;
        height: auto;
    }

    .novel-cover-large img {
        width: 100%;
        aspect-ratio: 2/3;
        height: auto;
    }
}
    /* 💡 移动端优化：768px 以下 */
@media (max-width: 768px) {
  .novel-details {
    padding: 0 1rem;
  }

  .novel-details h1 {
    font-size: 2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .novel-details .author {
    font-size: 1rem;
  }

  .novel-details .description {
    font-size: 1rem;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
  }

  .description p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }
}

    /* 💡 移动端优化：768px 以下 */
@media (max-width: 768px) {
  .novel-info {
    padding: 0 1rem;
  }

  .novel-info h3 {
    font-size: 1.2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
  }
}



.novel-details h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.novel-details .author {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.novel-details .description {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.chapters-section {
    background: white;
    padding: 60px 0;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.chapter-card {
    background: white;
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.chapter-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.1);
}

.chapter-number {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.chapter-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.chapter-preview {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(102, 126, 234, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
        text-align: center;
    }
    
    .hero-text p {
        text-align: center;
    }
    
    .novels-grid {
        grid-template-columns: 1fr;
    }
    
    .novel-info-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .chapter-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .novels-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .novel-card {
        margin: 0 10px;
    }
}

/* 分页区域整体样式 */
/* 分页区容器 */
.chapter-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* 下拉框样式适配按钮风格 */
.cta-select {
    appearance: none;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: #000;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    text-align-last: center;
}

/* 悬停效果统一 */
.cta-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* 移动端适配：纵向堆叠 */
@media (max-width: 600px) {
    .chapter-pagination {
        flex-direction: column;
        gap: 0.8rem;
    }

    .cta-button,
    .cta-select {
        width: 100%;
        text-align: center;
    }
}
