/* ========================================
   童趣听书 - 网页版样式
   ======================================== */

:root {
    --primary-color: #6bb04d;
    --primary-light: #8dd66f;
    --primary-dark: #4a8a33;
    --accent-orange: #f5a623;
    --accent-red: #e74c3c;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-light: #cccccc;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --border-color: #e8e8e8;
    --border-light: #f0f0f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   顶部导航 - 网页版
   ======================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    padding: 4px 4px 4px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-box input {
    border: none;
    background: transparent;
    width: 200px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.login-btn {
    padding: 10px 28px;
    border-radius: 25px;
    border: 2px solid white;
    background: transparent;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    background: white;
    color: var(--primary-color);
}

/* ========================================
   Banner区域
   ======================================== */
.banner-section {
    padding: 24px 0 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    margin-top: -1px;
    /* 与顶部导航无缝衔接 */
}

/* Title横幅 */
.title-banner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.title-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    display: block;
}

.banner-wrapper {
    position: relative;
    margin-bottom: 32px;
}

.banner-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.banner-item {
    display: none;
}

.banner-item.active {
    display: block;
}

.banner-card {
    height: 320px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    padding: 48px 64px;
    position: relative;
    overflow: hidden;
}

.banner-green {
    background: linear-gradient(135deg, #2d5a27 0%, #4a9c40 50%, #6bb04d 100%);
}

.banner-orange {
    background: linear-gradient(135deg, #d35400 0%, #e67e22 50%, #f39c12 100%);
}

.banner-purple {
    background: linear-gradient(135deg, #4a148c 0%, #7b1fa2 50%, #9c27b0 100%);
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.banner-title {
    font-size: 52px;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin-bottom: 8px;
}

.banner-title span {
    color: #ffd700;
}

.banner-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.banner-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 24px;
}

.banner-btn {
    padding: 14px 36px;
    border-radius: 30px;
    border: none;
    background: white;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.banner-animals {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 20px;
}

.banner-animals .animal {
    font-size: 64px;
    animation: float 3s ease-in-out infinite;
}

.banner-animals .animal:nth-child(2) {
    animation-delay: 0.3s;
}

.banner-animals .animal:nth-child(3) {
    animation-delay: 0.6s;
}

.banner-animals .animal:nth-child(4) {
    animation-delay: 0.9s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.banner-tag {
    position: absolute;
    right: 24px;
    bottom: 24px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    backdrop-filter: blur(4px);
}

.banner-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.banner-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-dots .dot.active {
    width: 32px;
    border-radius: 5px;
    background: white;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
}

.banner-arrow.prev {
    left: -24px;
}

.banner-arrow.next {
    right: -24px;
}

.banner-arrow:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* 快捷分类区域 */
.categories-section {
    padding: 32px 0;
    background: var(--bg-secondary);
}

/* 快捷分类 */
.quick-categories {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-primary);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    background: var(--primary-color);
    color: white;
}

.category-icon {
    font-size: 36px;
}

.category-card span {
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   内容区域
   ======================================== */
.content-section {
    padding: 48px 0;
}

.content-section:nth-child(even) {
    background: var(--bg-primary);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
}

.title-main {
    color: var(--text-primary);
}

.title-divider {
    color: var(--text-light);
}

.title-sub {
    color: var(--primary-color);
}

.see-more {
    color: var(--primary-color);
    font-size: 15px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.see-more:hover {
    text-decoration: underline;
}

/* 有声书卡片网格 */
.audiobook-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.audiobook-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s;
}

.audiobook-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.audiobook-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.book-cover {
    position: relative;
    width: 100px;
    height: 130px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
    color: white;
    font-size: 11px;
    padding: 12px 6px 6px;
    text-align: center;
}

.book-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-update {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.book-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.meta-item {
    font-size: 12px;
    color: var(--text-secondary);
}

.subscribe-btn {
    align-self: flex-start;
    padding: 8px 28px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(107, 176, 77, 0.3);
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(107, 176, 77, 0.4);
}

.subscribe-btn.subscribed {
    background: var(--text-light);
    box-shadow: none;
}

/* 章节列表 */
.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chapter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: var(--radius-sm);
}

.chapter-item:hover {
    background: var(--bg-secondary);
}

.chapter-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.chapter-tag.audio {
    background: rgba(107, 176, 77, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(107, 176, 77, 0.3);
}

.chapter-title {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chapter-duration {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* 书籍网格 */
.book-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.book-card {
    cursor: pointer;
    transition: transform 0.3s;
}

.book-card:hover {
    transform: translateY(-8px);
}

.card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 750 / 422;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 12px;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.book-card:hover .card-cover img {
    transform: scale(1.08);
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
}

.free-badge {
    background: var(--accent-orange);
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.book-card:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.card-info {
    padding: 0 4px;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    line-height: 1.5;
}

.card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: 4px;
}

.free-price {
    color: var(--primary-color);
}

.card-subscribers {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0;
    text-align: center;
}

.footer-text {
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 30px;
    opacity: 0.9;
}

.footer-icp {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-icp p {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-icp a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-icp a:hover {
    color: white;
}

.beian-link {
    display: flex;
    align-items: center;
    gap: 4px;
}

.beian-icon {
    width: 16px;
    height: 16px;
}

.separator {
    color: rgba(255, 255, 255, 0.2);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .book-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .quick-categories {
        grid-template-columns: repeat(4, 1fr);
    }

    .banner-animals {
        right: 40px;
    }

    .banner-animals .animal {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .audiobook-grid {
        grid-template-columns: 1fr;
    }

    .book-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .banner-card {
        height: 240px;
        padding: 32px;
    }

    .banner-title {
        font-size: 36px;
    }

    .banner-animals {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        gap: 40px;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .quick-categories {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 12px 8px;
    }

    .category-icon {
        font-size: 28px;
    }

    .section-title {
        font-size: 18px;
    }
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.audiobook-card,
.book-card,
.category-card {
    animation: fadeInUp 0.6s ease forwards;
}