/* 好看韩漫推荐样式 */
:root {
   --primary: #E63946;
   --secondary: #457B9D;
   --accent: #7209B7;
   --light: #F1FAEE;
   --dark: #1D3557;
}

* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
   font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
   background-color: #f5f5f5;
   color: #333;
   line-height: 1.6;
}

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

/* 头部样式 */
header {
   background-color: white;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
   position: sticky;
   top: 0;
   z-index: 100;
   transition: all 0.3s ease;
}

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

.logo {
   font-size: 24px;
   font-weight: 700;
   color: var(--dark);
   display: flex;
   align-items: center;
}

.logo span {
   color: var(--primary);
   margin-right: 8px;
}

.search-container {
   display: flex;
   align-items: center;
   flex-grow: 1;
   max-width: 500px;
   margin: 0 20px;
}

.search-input {
   flex-grow: 1;
   padding: 12px 15px;
   border: 1px solid #ddd;
   border-radius: 30px;
   font-size: 16px;
   outline: none;
   transition: border-color 0.3s ease;
}

.search-input:focus {
   border-color: var(--primary);
   box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.2);
}

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

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

.user-actions {
   display: flex;
   align-items: center;
}

.user-action {
   color: #666;
   margin-left: 20px;
   font-size: 18px;
   cursor: pointer;
   transition: color 0.3s ease;
}

.user-action:hover {
   color: var(--primary);
}

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

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

.nav-item {
   color: white;
   text-decoration: none;
   padding: 8px 16px;
   margin: 4px;
   border-radius: 20px;
   font-weight: 500;
   transition: all 0.3s ease;
   display: flex;
   align-items: center;
}

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

.nav-item:hover {
   background-color: var(--primary);
   color: white;
}

/* 轮播推荐区样式 */
.hero-section {
   background: linear-gradient(135deg, var(--primary), #ff6b81);
   border-radius: 20px;
   padding: 40px 20px;
   margin: 30px 0;
   color: white;
   position: relative;
   overflow: hidden;
}

.hero-section::after {
   content: "";
   position: absolute;
   right: -100px;
   bottom: -100px;
   width: 300px;
   height: 300px;
   background-color: rgba(255, 255, 255, 0.1);
   border-radius: 50%;
}

.hero-title {
   font-size: 28px;
   font-weight: 700;
   margin-bottom: 20px;
   position: relative;
   z-index: 1;
}

.hero-content {
   display: flex;
   flex-direction: column;
   md:flex-row;
   align-items: center;
   gap: 30px;
}

.hero-text {
   flex-grow: 1;
   position: relative;
   z-index: 1;
}

.hero-manga-title {
   font-size: 24px;
   font-weight: 600;
   margin-bottom: 15px;
}

.hero-manga-desc {
   font-size: 16px;
   margin-bottom: 20px;
   opacity: 0.9;
}

.read-now-btn {
   background-color: white;
   color: var(--primary);
   border: none;
   padding: 12px 25px;
   border-radius: 30px;
   font-weight: 500;
   cursor: pointer;
   transition: all 0.3s ease;
   display: inline-flex;
   align-items: center;
}

.read-now-btn i {
   margin-right: 8px;
}

.read-now-btn:hover {
   background-color: #f0f0f0;
   transform: translateY(-2px);
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-poster {
   width: 100%;
   max-width: 280px;
   height: 400px;
   background-color: rgba(255, 255, 255, 0.2);
   border-radius: 15px;
   position: relative;
   z-index: 1;
}

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

.stat-item {
   background-color: white;
   border-radius: 15px;
   padding: 25px;
   text-align: center;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
   transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
   transform: translateY(-5px);
   box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-number {
   font-size: 28px;
   font-weight: 700;
   color: var(--primary);
   margin-bottom: 8px;
}

.stat-label {
   font-size: 16px;
   color: #666;
   font-weight: 500;
}

/* 漫画列表样式 */
.section-title {
   display: flex;
   align-items: center;
   margin-bottom: 30px;
   position: relative;
}

.section-title h2 {
   font-size: 24px;
   font-weight: 700;
   color: var(--dark);
   display: flex;
   align-items: center;
}

.section-title h2 i {
   margin-right: 10px;
   color: var(--accent);
}

.section-title a {
   color: var(--secondary);
   text-decoration: none;
   margin-left: auto;
   font-weight: 500;
   transition: color 0.3s ease;
}

.section-title a:hover {
   color: #33658a;
}

.section-title a i {
   margin-left: 6px;
}

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

.manga-item {
   background-color: white;
   border-radius: 15px;
   overflow: hidden;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
   transition: transform 0.3s ease, box-shadow 0.3s ease;
   opacity: 0;
   transform: translateY(20px);
   animation: fadeInUp 0.6s ease forwards;
}

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

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

.manga-item:hover {
   transform: translateY(-10px);
   box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.manga-poster {
   height: 200px;
   background-color: #f0f0f0;
   position: relative;
   overflow: hidden;
}

.manga-poster::before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
}

.manga-info {
   padding: 15px;
}

.manga-title {
   font-size: 18px;
   font-weight: 600;
   margin-bottom: 10px;
   color: var(--dark);
}

.manga-desc {
   font-size: 14px;
   color: #666;
   margin-bottom: 15px;
   line-height: 1.5;
   display: -webkit-box;
   -webkit-line-clamp: 3;
   -webkit-box-orient: vertical;
   overflow: hidden;
}

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

.manga-tag {
   background-color: var(--accent);
   color: white;
   padding: 4px 10px;
   border-radius: 20px;
   font-size: 12px;
   font-weight: 500;
}

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

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

/* 最新更新样式 */
.updates-section {
   background-color: white;
   border-radius: 15px;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
   padding: 25px;
}

.update-item {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 15px 0;
   border-bottom: 1px solid #f0f0f0;
}

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

.update-content {
   display: flex;
   align-items: center;
   gap: 15px;
}

.update-pill {
   width: 50px;
   height: 50px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 18px;
   font-weight: 600;
   color: white;
}

.update-pill.pink { background-color: #ff6b81; }
.update-pill.blue { background-color: #457B9D; }
.update-pill.purple { background-color: #7209B7; }
.update-pill.orange { background-color: #FF9F1C; }

.update-details h3 {
   font-size: 17px;
   font-weight: 600;
   color: var(--dark);
   margin-bottom: 5px;
}

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

.update-read-btn {
   background-color: var(--primary);
   color: white;
   border: none;
   padding: 8px 15px;
   border-radius: 20px;
   font-size: 13px;
   font-weight: 500;
   cursor: pointer;
   transition: background-color 0.3s ease;
}

.update-read-btn:hover {
   background-color: #c52d38;
}

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

.category-item {
   background-color: white;
   border-radius: 12px;
   padding: 20px;
   text-align: center;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
   transition: all 0.3s ease;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
}

.category-item i {
   font-size: 28px;
   margin-bottom: 10px;
   transition: transform 0.3s ease;
}

.category-item:hover i {
   transform: translateY(-5px);
}

.category-item.pink i { color: #ff6b81; }
.category-item.blue i { color: #457B9D; }
.category-item.purple i { color: #7209B7; }
.category-item.orange i { color: #FF9F1C; }
.category-item.yellow i { color: #FFC300; }
.category-item.gray i { color: #666; }

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

.category-item:hover {
   transform: translateY(-5px);
   box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* 页脚样式 */
footer {
   background-color: var(--dark);
   color: #aaa;
   padding: 50px 0 20px;
   margin-top: 50px;
}

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

.footer-section h3 {
   font-size: 18px;
   font-weight: 600;
   color: white;
   margin-bottom: 20px;
   position: relative;
   padding-bottom: 10px;
}

.footer-section h3::after {
   content: "";
   position: absolute;
   bottom: 0;
   left: 0;
   width: 40px;
   height: 3px;
   background-color: var(--primary);
}

.footer-about p {
   margin-bottom: 15px;
   line-height: 1.7;
}

.footer-links a {
   display: block;
   color: #aaa;
   text-decoration: none;
   padding: 8px 0;
   transition: color 0.3s ease;
}

.footer-links a:hover {
   color: white;
   padding-left: 5px;
}

.footer-contact p {
   margin-bottom: 10px;
}

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

.footer-social a {
   color: #aaa;
   font-size: 20px;
   transition: color 0.3s ease;
}

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

.footer-bottom {
   text-align: center;
   padding-top: 20px;
   border-top: 1px solid rgba(255, 255, 255, 0.1);
   color: #888;
   font-size: 14px;
}

/* 回到顶部按钮 */
#backToTop {
   position: fixed;
   bottom: 30px;
   right: 30px;
   background-color: var(--primary);
   color: white;
   width: 50px;
   height: 50px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 20px;
   cursor: pointer;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
   opacity: 0;
   visibility: hidden;
   transition: all 0.3s ease;
   z-index: 99;
}

#backToTop.visible {
   opacity: 1;
   visibility: visible;
}

#backToTop:hover {
   background-color: #c52d38;
   transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 768px) {
   .header-content {
       flex-direction: column;
       padding: 15px 0;
   }
   
   .logo {
       margin-bottom: 15px;
   }
   
   .search-container {
       width: 100%;
       margin: 0;
   }
   
   .hero-content {
       flex-direction: column;
   }
   
   .hero-poster {
       max-width: 100%;
       height: 300px;
   }
   
   .manga-grid {
       grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
   }
}

@media (max-width: 480px) {
   .hero-title {
       font-size: 24px;
   }
   
   .hero-manga-title {
       font-size: 20px;
   }
   
   .manga-grid {
       grid-template-columns: 1fr;
   }
   
   .stats-section {
       grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
   }
}