/* ========================================
   小蜜阅读 - 现代化首页样式
   全新设计 - 2025版
   ======================================== */

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f8f9fa;
    color: #2d3748;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ==================== 现代化导航栏 ==================== */
.modern-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.modern-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* ==================== Hero区域 ==================== */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 107, 0.3), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(72, 219, 251, 0.3), transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.hero-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float 15s infinite;
}

.hero-particles span:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.hero-particles span:nth-child(2) { left: 20%; top: 40%; animation-delay: 2s; }
.hero-particles span:nth-child(3) { left: 30%; top: 60%; animation-delay: 4s; }
.hero-particles span:nth-child(4) { left: 40%; top: 80%; animation-delay: 6s; }
.hero-particles span:nth-child(5) { left: 50%; top: 30%; animation-delay: 8s; }
.hero-particles span:nth-child(6) { left: 60%; top: 50%; animation-delay: 10s; }
.hero-particles span:nth-child(7) { left: 70%; top: 70%; animation-delay: 12s; }
.hero-particles span:nth-child(8) { left: 80%; top: 40%; animation-delay: 14s; }
.hero-particles span:nth-child(9) { left: 90%; top: 60%; animation-delay: 16s; }
.hero-particles span:nth-child(10) { left: 85%; top: 20%; animation-delay: 18s; }

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(0);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 60px 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
}

.hero-title .title-line {
    display: block;
}

.gradient-text {
    background: linear-gradient(90deg, #fff, #f0f0f0, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hero-btn.primary {
    background: white;
    color: #667eea;
}

.hero-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.hero-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.hero-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    border-color: white;
}

.hero-stats {
    display: flex;
    gap: 60px;
    justify-content: center;
    animation: fadeInUp 1s ease 0.6s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: white;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 特色功能区 ==================== */
.features-section {
    padding: 100px 0;
    background: white;
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #718096;
    margin-top: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2d3748;
}

.feature-card p {
    color: #718096;
    line-height: 1.8;
    margin-bottom: 20px;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.feature-link:hover {
    gap: 12px;
}

/* ==================== 热门作品区 ==================== */
.hot-books-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.more-link-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 24px;
    border: 2px solid #667eea;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.more-link-modern:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

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

.book-card-modern {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.book-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.book-cover-wrapper {
    position: relative;
    width: 100%;
    padding-top: 133%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.book-cover-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card-modern:hover .book-cover-wrapper img {
    transform: scale(1.1);
}

.book-info-modern {
    padding: 20px;
}

.book-title-modern {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-author-modern {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 10px;
}

.book-stats-modern {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #a0aec0;
}

.books-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==================== 最新资讯区 ==================== */
.news-section {
    padding: 100px 0;
    background: white;
}

.news-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.news-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #764ba2);
}

.news-item {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
}

.news-item:nth-child(odd) {
    flex-direction: row;
}

.news-item:nth-child(even) {
    flex-direction: row-reverse;
}

.news-content-wrapper {
    width: calc(50% - 40px);
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-content-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.news-date-badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    z-index: 2;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.news-excerpt {
    color: #718096;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-loading {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

/* ==================== 排行榜区域 ==================== */
.ranking-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.ranking-tabs-modern {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    background: white;
    color: #718096;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

.rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
}

.ranking-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ranking-card-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.ranking-card-header h3 {
    font-size: 1.5rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ranking-card-header h3 i {
    color: #667eea;
}

.update-time {
    font-size: 0.85rem;
    color: #a0aec0;
}

.ranking-list-modern {
    list-style: none;
}

.ranking-item-modern {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 10px;
}

.ranking-item-modern:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.rank-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 8px;
}

.ranking-item-modern:nth-child(1) .rank-number {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #b8860b;
}

.ranking-item-modern:nth-child(2) .rank-number {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #696969;
}

.ranking-item-modern:nth-child(3) .rank-number {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: #654321;
}

.ranking-item-modern:nth-child(n+4) .rank-number {
    background: #e2e8f0;
    color: #718096;
}

.rank-book-info {
    flex: 1;
}

.rank-book-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-book-author {
    font-size: 0.85rem;
    color: #a0aec0;
}

.rank-book-stats {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
}

.loading-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

/* ==================== 资讯模态框 ==================== */
.news-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.news-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.news-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    z-index: 10001;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.news-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.news-header-content h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.news-modal-meta {
    color: #718096;
    font-size: 0.9rem;
}

.news-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.news-modal-close:hover {
    background: #f7fafc;
    color: #2d3748;
}

.news-modal-body {
    padding: 30px;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
}

.news-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #4a5568;
}

/* ==================== 现代化Footer ==================== */
.modern-footer {
    background: linear-gradient(135deg, #2d3748, #1a202c);
    color: #e2e8f0;
    padding: 60px 0 30px;
}

.modern-footer .footer-section h4 {
    color: white;
}

.modern-footer .footer-section a {
    color: #cbd5e0;
}

.modern-footer .footer-section a:hover {
    color: #667eea;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header-modern {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .hot-books-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .news-timeline::before {
        left: 30px;
    }
    
    .news-item,
    .news-item:nth-child(even) {
        flex-direction: row;
    }
    
    .news-content-wrapper {
        width: calc(100% - 80px);
        margin-left: 80px;
    }
    
    .news-date-badge {
        left: 30px;
        transform: none;
    }
    
    .rankings-grid {
        grid-template-columns: 1fr;
    }
    
    .ranking-tabs-modern {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hot-books-grid {
        grid-template-columns: 1fr;
    }
}

