* {
    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;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

.announcement-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 0;
    font-size: 14px;
    text-align: center;
}

.announcement-bar p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    animation: scroll-text 30s linear infinite;
}

@keyframes scroll-text {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1790E6;
    font-size: 24px;
    font-weight: 800;
}

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

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

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background: #1790E6;
    color: white;
}

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

.search-box {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 25px;
    padding: 8px 15px;
}

.search-input {
    border: none;
    background: none;
    outline: none;
    padding: 5px 10px;
    width: 200px;
}

.search-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-link {
    text-decoration: none;
    color: #666;
    font-size: 14px;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.main-content {
    padding: 20px 0;
}

.hero-section {
    margin-bottom: 40px;
}

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

.hero-slider {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.slider-container {
    position: relative;
    height: 400px;
}

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

.slide.active {
    opacity: 1;
}

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

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 40px 30px 30px;
}

.slide-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.slide-content p {
    font-size: 16px;
    opacity: 0.9;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.3);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
}

.hero-sidebar {
    display: flex;
    flex-direction: column;
}

.ranking-widget {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.widget-header {
    margin-bottom: 20px;
}

.widget-header h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

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

.tab-btn {
    padding: 8px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #1790E6;
    color: white;
    border-color: #1790E6;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.rank-num {
    width: 25px;
    height: 25px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    margin-right: 15px;
}

.ranking-item:first-child .rank-num {
    background: #ff6b6b;
    color: white;
}

.ranking-item:nth-child(2) .rank-num {
    background: #ffa726;
    color: white;
}

.ranking-item:nth-child(3) .rank-num {
    background: #66bb6a;
    color: white;
}

.ranking-item a {
    flex: 1;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.ranking-item a:hover {
    color: #1790E6;
}

.trend {
    font-size: 16px;
    margin-left: 10px;
}

.trend.up { color: #4caf50; }
.trend.down { color: #f44336; }
.trend.stable { color: #9e9e9e; }

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

.section-header h2 {
    font-size: 32px;
    color: #333;
}

.highlight {
    color: #1790E6;
}

.more-link {
    color: #1790E6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.more-link:hover {
    color: #0d6efd;
}

.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.manga-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

.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-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.manga-card:hover .manga-overlay {
    opacity: 1;
}

.read-btn {
    background: #1790E6;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
}

.update-badge, .new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.new-badge {
    background: #2ed573;
}

.manga-title {
    padding: 15px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.update-info, .author-info {
    padding: 0 15px 15px;
    font-size: 12px;
    color: #666;
}

.rankings-section {
    background: white;
    border-radius: 15px;
    padding: 40px 0;
    margin-bottom: 40px;
}

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

.ranking-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #1790E6;
}

.ranking-item-detailed {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
}

.rank-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    margin-right: 15px;
}

.rank-badge.gold {
    background: #ffd700;
}

.ranking-item-detailed img {
    width: 50px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.item-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.item-info p {
    font-size: 12px;
    color: #666;
}

.ranking-item-simple {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ranking-item-simple .rank-num {
    width: 20px;
    height: 20px;
    font-size: 12px;
}

.ranking-item-simple a {
    flex: 1;
    margin-left: 15px;
    font-size: 13px;
}

.footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-input {
        width: 150px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .slider-container {
        height: 250px;
    }
    
    .slide-content h2 {
        font-size: 20px;
    }
    
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .rankings-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .announcement-bar {
        font-size: 12px;
    }
    
    .nav-brand a {
        font-size: 20px;
    }
    
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .ranking-widget {
        padding: 20px;
    }
    
    .slide-content {
        padding: 20px 15px 15px;
    }
}
