/* BeautyTheme 主样式表 */
:root {
  --primary-color: #3f51b5;
  --primary-light: #757de8;
  --primary-dark: #002984;
  --secondary-color: #ff4081;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f9f9f9;
  --card-bg: #fff;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --section-padding: 50px 0;
  --container-padding: 0 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  font-size: 16px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
  width: 100%;
}

/* 顶部导航栏 */
.main-header {
  background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.logo a {
  color: white;
}

.logo a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links a {
  color: white;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: white;
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 搜索栏样式 */
.search-bar {
  background-color: #f0f2f5;
  padding: 15px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-form {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-form input {
  flex: 1;
  padding: 12px 20px;
  border: none;
  font-size: 16px;
  outline: none;
}

.search-form button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0 25px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-form button:hover {
  background-color: var(--primary-dark);
}

.search-form button i {
  font-size: 18px;
}

/* Banner 部分 */
.banner {
  background: linear-gradient(rgba(63, 81, 181, 0.8), rgba(63, 81, 181, 0.9)), url('../images/banner-bg.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 80px 0;
}

.banner h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.banner p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* 小说列表样式 */
.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

.novel-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.novel-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.novel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.novel-cover {
  height: 200px;
  overflow: hidden;
}

.novel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.novel-card:hover .novel-cover img {
  transform: scale(1.05);
}

.novel-info {
  padding: 20px;
}

.novel-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text-color);
  font-weight: 600;
}

.novel-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 4.2em;
}

.novel-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 15px;
}

.novel-link {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.novel-link:hover {
  background-color: var(--primary-dark);
  color: white;
}

/* 分类和标签 */
.novel-categories {
  margin-bottom: 10px;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 99;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
}

/* 深色模式 */
.dark-theme {
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --text-color: #e0e0e0;
  --text-light: #aaa;
  --primary-color: #bb86fc;
  --primary-light: #d7b8ff;
  --primary-dark: #9158fc;
}

.dark-theme .search-bar {
  background-color: #1a1a1a;
}

.dark-theme .search-form input {
  background-color: #2a2a2a;
  color: white;
}

.dark-theme .category-filter {
  background-color: #1e1e1e;
}

.dark-theme .filter-title {
  color: #e0e0e0;
}

.dark-theme .filter-option {
  border-color: #444;
  color: #aaa;
}

.dark-theme .filter-option:hover {
  background-color: #2a2a2a;
}

/* 页脚样式 */
footer {
  background-color: #333;
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 0;
  margin-top: 50px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-section {
  flex: 1;
  min-width: 250px;
  margin-bottom: 20px;
}

.footer-section h3 {
  color: white;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 20px;
  font-size: 0.9rem;
}

/* 页面区域 */
.section-featured,
.section-popular {
  padding: 50px 0;
}

.section-popular {
  background-color: #f5f7fa;
  margin-top: 30px;
}

.dark-theme .section-popular {
  background-color: #1a1a1a;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    padding: 20px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 10px 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .banner {
    padding: 50px 0;
  }

  .banner h2 {
    font-size: 2rem;
  }

  .novel-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .search-form {
    max-width: 100%;
  }
}