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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
}

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

.header {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar {
    padding: 0;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand a {
    text-decoration: none;
    color: #2563eb;
}

.nav-brand h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

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

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
    background: #eff6ff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 25px;
    padding: 10px 45px 10px 20px;
    width: 280px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    background: #2563eb;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.search-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: #64748b;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.main {
    margin-top: 70px;
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/8.jpg') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: 40px;
    opacity: 0.9;
}

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

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: white;
    color: #2563eb;
}

.btn-primary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

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

.hero-image {
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.1;
    z-index: 1;
}

.hero-image img {
    width: 400px;
    height: 500px;
    object-fit: cover;
    border-radius: 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: #1e293b;
    position: relative;
}

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

.featured-section {
    padding: 80px 0;
    background: white;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.featured-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.featured-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.featured-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 30px;
    position: relative;
}

.card-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1e293b;
}

.card-content p {
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-link {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 10px 25px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.card-link:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.card-pink .card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.8), rgba(239, 68, 68, 0.8));
    z-index: 1;
}

.card-green .card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.8), rgba(16, 185, 129, 0.8));
    z-index: 1;
}

.card-purple .card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.8), rgba(99, 102, 241, 0.8));
    z-index: 1;
}

.categories-section {
    padding: 80px 0;
    background: #f8fafc;
}

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

.category-item {
    background: white;
    padding: 40px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.category-icon.red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.category-icon.pink {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.category-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.category-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.category-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.category-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1e293b;
}

.category-link {
    display: inline-block;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 20px;
    border: 2px solid #2563eb;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.category-link:hover {
    background: #2563eb;
    color: white;
}

.latest-section {
    padding: 80px 0;
    background: white;
}

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

.view-more {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.view-more:hover {
    color: #1d4ed8;
    transform: translateX(5px);
}

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

.manga-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.manga-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

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

.manga-card:hover .manga-image img {
    transform: scale(1.1);
}

.manga-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ef4444;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.manga-info {
    padding: 25px 20px;
}

.manga-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1e293b;
}

.manga-info p {
    color: #64748b;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.manga-date {
    color: #94a3b8;
    font-size: 0.85rem;
}

.ranking-section {
    padding: 80px 0;
    background: #f8fafc;
}

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

.tab-btn {
    background: white;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.ranking-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.ranking-panel {
    display: none;
}

.ranking-panel.active {
    display: block;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 15px;
    transition: all 0.3s ease;
}

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

.rank-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    margin-right: 20px;
    font-size: 18px;
}

.rank-number.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.rank-number.silver {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.rank-number.bronze {
    background: linear-gradient(135deg, #fb7185, #f43f5e);
}

.ranking-item img {
    width: 60px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 20px;
}

.item-info h5 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1e293b;
}

.item-info p {
    color: #64748b;
    font-size: 0.9rem;
}

.footer {
    background: #1e293b;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-brand h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2563eb;
}

.footer-brand p {
    color: #94a3b8;
    line-height: 1.6;
}

.link-group h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.link-group ul {
    list-style: none;
}

.link-group li {
    margin-bottom: 10px;
}

.link-group a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link-group a:hover {
    color: #2563eb;
}

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

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
}

.social-link.weibo {
    background: #e6162d;
}

.social-link.qq {
    background: #12b7f5;
}

.social-link.wechat {
    background: #07c160;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.9rem;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-3px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .nav-content {
        height: 60px;
    }

    .nav-brand h1 {
        font-size: 24px;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: flex;
    }

    .search-input {
        width: 200px;
    }

    .main {
        margin-top: 60px;
    }

    .hero-section {
        padding: 60px 0;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-image {
        display: none;
    }

    .section-title {
        font-size: 2rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .section-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .manga-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .ranking-tabs {
        flex-wrap: wrap;
        gap: 10px;
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .ranking-content {
        padding: 25px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 14px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .manga-grid {
        grid-template-columns: 1fr;
    }

    .search-input {
        width: 150px;
    }

    .ranking-item {
        padding: 15px;
    }

    .ranking-item img {
        width: 50px;
        height: 65px;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

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

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
