/* 繁花漫画官网样式 - 正版风格 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b9d;
    --primary-dark: #e91e63;
    --secondary-color: #7c4dff;
    --bg-dark: #1a1a2e;
    --bg-darker: #16162a;
    --bg-card: #252542;
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --text-muted: #8888a0;
    --border-color: #3a3a5a;
    --gradient-primary: linear-gradient(135deg, #ff6b9d 0%, #7c4dff 100%);
    --gradient-hot: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(255, 107, 157, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

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

/* 顶部导航 */
.header {
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-badge {
    background: var(--gradient-hot);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

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

.nav-menu a {
    color: var(--text-secondary);
    font-size: 15px;
    padding: 8px 0;
    position: relative;
}

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

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

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

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-download {
    background: var(--gradient-primary);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, #2a1a3e 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 35px;
}

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

.stat-num {
    font-size: 32px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 5px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.5);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 157, 0.1);
}

.hero-image {
    flex: 0 0 400px;
    position: relative;
}

.hero-phone {
    width: 280px;
    height: 560px;
    background: linear-gradient(145deg, #2a2a4a 0%, #1a1a3a 100%);
    border-radius: 40px;
    padding: 15px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    margin: 0 auto;
}

.hero-phone::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 25px;
    background: #0a0a1a;
    border-radius: 15px;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1e1e3a 0%, #2a2a4a 100%);
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.phone-logo {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.phone-title {
    font-size: 20px;
    font-weight: 700;
}

/* 分类导航 */
.category-nav {
    background: var(--bg-darker);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.category-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-item {
    background: var(--bg-card);
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.category-item:hover,
.category-item.active {
    background: rgba(255, 107, 157, 0.15);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 内容区域 */
.section {
    padding: 50px 0;
}

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

.section-title {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-more {
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

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

.manga-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.manga-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.manga-cover {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.manga-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.manga-card:hover .manga-cover img {
    transform: scale(1.05);
}

.manga-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--gradient-hot);
    color: white;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.manga-badge.new {
    background: linear-gradient(135deg, #00c853 0%, #00e676 100%);
}

.manga-badge.vip {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #333;
}

.manga-update {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 10px 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.manga-info {
    padding: 15px;
}

.manga-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.manga-author {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.manga-views {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-color);
}

/* 热门排行 */
.hot-section {
    background: var(--bg-darker);
}

.hot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.hot-column {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px;
}

.hot-column-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hot-column-title i {
    color: var(--primary-color);
}

.hot-list {
    list-style: none;
}

.hot-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.hot-item:last-child {
    border-bottom: none;
}

.hot-rank {
    width: 28px;
    height: 28px;
    background: var(--bg-darker);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.hot-rank.top1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #333;
}

.hot-rank.top2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
    color: #333;
}

.hot-rank.top3 {
    background: linear-gradient(135deg, #cd7f32 0%, #b8860b 100%);
    color: white;
}

.hot-cover {
    width: 50px;
    height: 65px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.hot-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-info {
    flex: 1;
    min-width: 0;
}

.hot-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-chapter {
    font-size: 12px;
    color: var(--text-muted);
}

/* 下载区域 */
.download-section {
    background: linear-gradient(135deg, var(--bg-darker) 0%, #2a1a3e 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.download-content {
    position: relative;
    z-index: 1;
}

.download-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 15px;
}

.download-title span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.download-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

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

.download-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 40px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 16px;
    min-width: 200px;
    justify-content: center;
}

.download-btn.android {
    background: linear-gradient(135deg, #3ddc84 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(61, 220, 132, 0.4);
}

.download-btn.ios {
    background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.4);
}

.download-btn:hover {
    transform: translateY(-5px);
}

.download-btn i {
    font-size: 28px;
}

.download-info {
    margin-top: 30px;
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-info-item {
    text-align: center;
}

.download-info-item strong {
    display: block;
    font-size: 18px;
    margin-bottom: 5px;
}

.download-info-item span {
    font-size: 13px;
    color: var(--text-muted);
}

/* 页脚 */
.footer {
    background: var(--bg-darker);
    padding: 50px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

/* 漫画详情页 */
.manga-detail {
    padding: 40px 0;
}

.manga-detail-header {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.manga-detail-cover {
    flex-shrink: 0;
    width: 280px;
    aspect-ratio: 3/4;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.manga-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manga-detail-info {
    flex: 1;
}

.manga-detail-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
}

.manga-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.manga-detail-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.manga-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.manga-tag {
    background: rgba(255, 107, 157, 0.15);
    color: var(--primary-color);
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 13px;
}

.manga-detail-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 30px;
}

.manga-detail-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 40px;
    font-size: 16px;
}

/* 下载提示框 */
.download-box {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-top: 40px;
    border: 1px solid var(--border-color);
}

.download-box-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.download-box-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.download-box-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 分类页 */
.category-header {
    padding: 40px 0;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
}

.category-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.category-count {
    font-size: 14px;
    color: var(--text-muted);
}

.filter-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
}

.filter-item {
    background: var(--bg-darker);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-image {
        flex: none;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hot-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }
    
    .hamburger span {
        width: 25px;
        height: 3px;
        background: var(--text-primary);
        border-radius: 2px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .manga-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .manga-detail-cover {
        width: 200px;
    }
    
    .manga-detail-actions {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* 移动端菜单按钮 */
.hamburger {
    display: none;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
