/* 韩国漫画免费看样式 */
/* 基础样式变量 */
:root {
    --main-color: #ff3e7d;
    --secondary-color: #7a58c9;
    --accent-color: #00c2a3;
    --bg-light: #fef5f7;
    --text-dark: #333333;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* 工具类样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

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

.grid-layout {
    display: grid;
}

.hidden {
    display: none;
}

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

.font-bold {
    font-weight: bold;
}

.rounded-lg {
    border-radius: 12px;
}

.box-shadow {
    box-shadow: var(--shadow-sm);
}

.box-shadow-lg {
    box-shadow: var(--shadow-md);
}

.transition-all {
    transition: all 0.3s ease;
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* 页面头部样式 */
.header {
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(90deg, var(--main-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.search-container {
    position: relative;
    margin-left: 20px;
    flex-grow: 1;
    max-width: 400px;
    display: flex;
    align-items: center; /* 新增：确保内部元素垂直居中 */
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 10px 0 40px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background-color: #f5f5f5;
    outline: none;
    font-size: 14px;
}

.search-input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 2px rgba(255, 62, 125, 0.2);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    width: 18px;
    height: 18px;
}

.search-btn {
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: #ff2a6e;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
}

.menu-icon {
    width: 24px;
    height: 24px;
    color: #555;
}

/* 导航栏样式 */
.nav {
    background-color: var(--main-color);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-link i {
    margin-right: 6px;
}

/* 移动端菜单样式 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    background-color: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
}

.mobile-menu-close-icon {
    width: 24px;
    height: 24px;
    color: #555;
}

.mobile-nav-links {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-link {
    color: #555;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link:hover {
    color: var(--main-color);
}

/* 主要内容区域样式 */
.main-content {
    padding: 20px 0;
}

/* 轮播推荐区样式 */
.hero-banner {
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    border-radius: 16px;
    padding: 30px 20px;
    margin-bottom: 30px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.banner-title {
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.banner-desc {
    font-size: 1.1rem;
    max-width: 700px;
    margin-bottom: 25px;
    opacity: 0.9;
}

.banner-btn {
    background-color: white;
    color: var(--main-color);
    font-weight: 600;
    border-radius: 25px;
    text-decoration: none;
    padding: 12px 30px;
    transition: all 0.3s ease;
    display: inline-block;
}

.banner-btn:hover {
    background-color: var(--main-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 62, 125, 0.3);
}

/* 统计信息区域样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--main-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

/* 章节标题样式 */
.section-header {
    font-size: 1.8rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    color: var(--text-dark);
}

.section-header i {
    color: var(--main-color);
    margin-right: 10px;
    font-size: 1.2rem;
}

.section-more {
    color: var(--main-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.section-more:hover {
    color: #ff2a6e;
}

.section-more i {
    margin-left: 5px;
}

/* 热门韩漫区域样式 */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.manga-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
opacity: 1;
transform: translateY(0);
    }
}

.manga-card:nth-child(1) { animation-delay: 0.1s; }
.manga-card:nth-child(2) { animation-delay: 0.2s; }
.manga-card:nth-child(3) { animation-delay: 0.3s; }
.manga-card:nth-child(4) { animation-delay: 0.4s; }
.manga-card:nth-child(5) { animation-delay: 0.5s; }
.manga-card:nth-child(6) { animation-delay: 0.6s; }

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

.manga-cover {
    height: 180px;
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.manga-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: white;
    color: var(--main-color);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.manga-hot {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff9800;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.manga-info {
    padding: 15px;
}

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

.manga-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.manga-tag-small {
    background-color: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
}

.manga-btn {
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.manga-btn:hover {
    background-color: #ff2a6e;
}

/* 最新更新区域样式 */
.updates-section {
    background-color: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 30px;
}

.update-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.update-thumbnail {
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    border-radius: 8px;
    margin-right: 15px;
    flex-shrink: 0;
}

.update-content {
    flex-grow: 1;
}

.update-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.update-chapter {
    font-size: 13px;
    color: #666;
}

.update-time {
    color: var(--main-color);
    font-size: 13px;
    margin-left: 15px;
}

.update-btn {
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* 分类浏览区域样式 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.category-item {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.category-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.category-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

/* 页脚区域样式 */
.footer {
    background-color: #222;
    color: #aaa;
    padding: 40px 0;
    margin-top: 40px;
}

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

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
}

.footer-desc {
    margin-bottom: 20px;
    line-height: 1.7;
}

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

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    color: white;
}

.footer-title {
    font-size: 16px;
    font-weight: bold;
    color: white;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--main-color), var(--secondary-color));
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--main-color);
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 13px;
    color: #777;
}

/* 回到顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 5px 15px rgba(255, 62, 125, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

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

/* 响应式设计 */
@media (max-width: 992px) {
    .banner-title {
font-size: 1.8rem;
    }
    
    .section-header {
font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-container {
flex-wrap: wrap;
    }
    
    .search-container {
order: 3;
margin: 10px 0;
max-width: 100%;
display: flex; /* 新增：确保内部元素在小屏幕下正确排列 */
    }
    
    .nav-link {
padding: 6px 12px;
font-size: 12px;
    }
    
    .manga-grid {
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .categories-grid {
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

@media (max-width: 576px) {
    .logo {
font-size: 1.5rem;
    }
    
    .banner-title {
font-size: 1.5rem;
    }
    
    .banner-desc {
font-size: 1rem;
    }
    
    .stats-grid {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .manga-grid {
grid-template-columns: 1fr;
    }
    
    .update-item {
flex-direction: column;
align-items: flex-start;
    }
    
    .update-thumbnail {
margin-bottom: 10px;
    }
    
    .mobile-menu-btn {
display: block;
    }
    
    .nav-links {
display: none;
    }
    
    /* 修复小屏幕下搜索按钮移位问题 */
    .search-container {
flex-direction: column; /* 小屏幕下搜索框和按钮垂直排列 */
align-items: stretch; /* 搜索框占满宽度 */
    }
    
    .search-input {
margin-bottom: 10px; /* 搜索框和按钮之间添加间距 */
    }
    
    .search-btn {
margin-left: 0; /* 移除左侧边距 */
width: 100%; /* 按钮占满宽度 */
border-radius: 20px; /* 改为矩形按钮 */
    }
}