:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5b4cdb;
    --secondary-color: #fd79a8;
    --accent-color: #00cec9;
    --bg-color: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6c6c7c;
    --border-color: #2a2a4a;
    --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --gradient-secondary: linear-gradient(135deg, #fd79a8 0%, #fab1a0 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-login {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-login:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-register {
    background: var(--gradient-primary);
    color: var(--text-primary);
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-search {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px;
}

.btn-search:hover {
    color: var(--primary-color);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

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

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

.logo-icon {
    font-size: 28px;
}

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

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.2);
}

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

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

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.main {
    padding-top: 70px;
}

.hero-section {
    padding: 60px 0 80px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-color) 100%);
}

.hero-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-search {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.hero-tags a {
    padding: 6px 14px;
    background: var(--bg-card);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.hero-tags a:hover {
    background: var(--primary-color);
    color: var(--text-primary);
}

.hero-carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.carousel-wrapper {
    position: relative;
    aspect-ratio: 16/10;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

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

.slide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 24px 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.slide-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.slide-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    right: 24px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary-color);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
}

.hero-carousel:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: var(--primary-color);
}

.carousel-btn.prev {
    left: 16px;
}

.carousel-btn.next {
    right: 16px;
}

.section {
    padding: 60px 0;
}

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

.section-header h2 {
    font-size: 26px;
    font-weight: 700;
}

.view-more {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
}

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

.manga-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.manga-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

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

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

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

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

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge.hot {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.badge.new {
    background: linear-gradient(135deg, #00cec9, #0984e3);
}

.badge.complete {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

.update-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    font-size: 12px;
    color: var(--accent-color);
}

.card-info {
    padding: 16px;
}

.card-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info .author {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.card-info .genre {
    font-size: 12px;
    color: var(--text-secondary);
}

.hot-series {
    background: var(--bg-secondary);
}

.romance-zone {
    background: var(--bg-secondary);
}

.about-section {
    background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
}

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

.about-text {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
    text-align: justify;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--primary-color);
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.feature-item {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

.feature-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 13px;
    color: var(--text-muted);
}

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

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

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

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

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

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

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-friend-links {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-friend-links a {
    color: var(--text-secondary);
    margin: 0 12px;
}

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

.footer-bottom {
    text-align: center;
}

.copyright {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.icp {
    font-size: 12px;
}

.icp a {
    color: var(--text-muted);
}

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

.icp .divider {
    margin: 0 12px;
    color: var(--border-color);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 1200px) {
    .manga-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-features {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-section .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-tags {
        justify-content: center;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .manga-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-actions .btn-login,
    .header-actions .btn-register {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 26px;
    }
    
    .hero-search {
        flex-direction: column;
    }
    
    .card-info h3 {
        font-size: 14px;
    }
    
    .card-info .author,
    .card-info .genre {
        font-size: 11px;
    }
    
    .about-text {
        padding: 20px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
