/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部导航样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 20px;
}

.logo a {
    font-size: 18px;
    font-weight: bold;
    color: #ff6b6b;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.nav li {
    white-space: nowrap;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: block;
}

.nav a:hover,
.nav a.active {
    color: #ff6b6b;
    background-color: #fff5f5;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 180px;
    font-size: 14px;
}

.search-box button {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.search-box button:hover {
    background-color: #ff5252;
}

/* 主要内容区域 */
main {
    margin-top: 60px;
    padding: 20px 0;
}

/* 轮播图样式 */
.banner {
    margin-bottom: 30px;
    padding: 0 15px;
}

.swiper-container {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    z-index: 1;
}

.banner-info h2 {
    font-size: 24px;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.banner-info p {
    font-size: 16px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Swiper 导航按钮样式 */
.swiper-button-next,
.swiper-button-prev {
    color: #fff !important;
    background: rgba(0,0,0,0.3);
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0,0,0,0.5);
}

.swiper-pagination-bullet {
    background: #fff !important;
    opacity: 0.5 !important;
}

.swiper-pagination-bullet-active {
    opacity: 1 !important;
    background: #ff6b6b !important;
}

/* 动漫卡片网格 */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.anime-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.anime-card:hover {
    transform: translateY(-5px);
}

.anime-thumbnail {
    position: relative;
    padding-top: 140%;
}

.anime-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.anime-info {
    padding: 12px;
}

.anime-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anime-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background-color: #ff6b6b;
    border-radius: 2px;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ff6b6b;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ff6b6b;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .header .container {
        gap: 15px;
    }
    
    .logo a {
        font-size: 16px;
    }
    
    .nav ul {
        gap: 10px;
    }
    
    .nav a {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .search-box input {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 10px;
    }
    
    .logo {
        order: 1;
    }
    
    .nav {
        order: 2;
        width: 100%;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .nav a {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .search-box {
        order: 3;
        width: 100%;
        max-width: 300px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .auth-links {
        order: 4;
        justify-content: center;
    }
    
    .auth-links a {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .swiper-container {
        height: 300px;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .header .container {
        padding: 8px;
    }
    
    .logo a {
        font-size: 14px;
    }
    
    .nav ul {
        gap: 5px;
    }
    
    .nav a {
        font-size: 11px;
        padding: 5px 6px;
    }
    
    .search-box {
        max-width: 250px;
    }
    
    .auth-links {
        gap: 8px;
    }
    
    .auth-links a {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* 导航栏认证链接样式 */
.auth-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.auth-links a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.auth-links a:hover {
    color: #ff6b6b;
    background-color: #fff5f5;
}

.auth-links .login-link {
    color: #666;
}

.auth-links .login-link:hover {
    color: #ff6b6b;
}

.auth-links .register-link {
    background-color: #ff6b6b;
    color: white;
}

.auth-links .register-link:hover {
    background-color: #ff5252;
    color: white;
}

/* 已登录用户样式 */
.auth-links span {
    color: #666;
    font-size: 14px;
}

.auth-links span + a {
    color: #ff6b6b;
    margin-left: 10px;
} 