/* ModernNovel 模板 - 样式文件 */

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #3498db;       /* 主色调：蓝色 */
  --secondary-color: #2ecc71;     /* 次要色调：绿色 */
  --accent-color: #9b59b6;        /* 强调色：紫色 */
  --dark-color: #2c3e50;          /* 深色：深蓝灰 */
  --light-color: #ecf0f1;         /* 浅色：浅灰白 */
  --text-color: #333333;          /* 文本色：深灰 */
  --text-light: #7f8c8d;          /* 浅文本色：灰色 */
  --danger-color: #e74c3c;        /* 危险色：红色 */
  --warning-color: #f39c12;       /* 警告色：橙色 */
  --success-color: #27ae60;       /* 成功色：深绿 */
  --border-radius: 8px;           /* 圆角半径 */
  --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* 阴影效果 */
  --transition: all 0.3s ease;    /* 过渡效果 */
}

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f5f5f7;
  font-size: 16px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

ul, li {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

.clearfix:after {
  content: "";
  display: table;
  clear: both;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--border-radius);
  background-color: var(--primary-color);
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
}

.btn:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  color: white;
}

.btn-primary {
  background-color: var(--primary-color);
}

.btn-secondary {
  background-color: var(--secondary-color);
}

.btn-accent {
  background-color: var(--accent-color);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

/* 页头样式 */
.header {
  background-color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  flex-wrap: wrap;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo a {
  color: var(--primary-color);
  text-decoration: none;
}

/* 导航菜单 */
.nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.nav-menu li {
  margin: 0 12px;
  position: relative;
}

.nav-menu li a {
  font-size: 16px;
  padding: 5px 0;
  position: relative;
  color: var(--text-color);
}

.nav-menu li a:hover {
  color: var(--primary-color);
}

.nav-menu li a:after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s;
}

.nav-menu li a:hover:after,
.nav-menu li.active a:after {
  width: 100%;
}

/* 搜索框 */
.search-box {
  margin-left: 20px;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
}

.search-input {
  border: 1px solid #e0e0e0;
  padding: 10px 15px;
  width: 200px;
  border-radius: 30px;
  outline: none;
  font-size: 14px;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  width: 220px;
}

.search-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 0 30px 30px 0;
  margin-left: -40px;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--accent-color);
}

/* 移动菜单触发器 */
.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--primary-color);
}

/* 面包屑导航 */
.breadcrumb {
  background: white;
  padding: 15px 0;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  border-radius: var(--border-radius);
}

.breadcrumb-inner {
  font-size: 14px;
  color: var(--text-light);
}

.breadcrumb-inner a {
  color: var(--text-light);
}

.breadcrumb-inner a:hover {
  color: var(--primary-color);
}

/* 卡片基础样式 */
.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 小说卡片 */
.novel-card {
  display: flex;
  flex-direction: column;
}

.novel-cover {
  position: relative;
  height: 220px;
  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: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.novel-title {
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.novel-title a {
  color: var(--text-color);
}

.novel-title a:hover {
  color: var(--primary-color);
}

.novel-author, .novel-category {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 5px;
}

.novel-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 10px;
}

.novel-meta span {
  margin-right: 15px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
}

.novel-meta i {
  margin-right: 5px;
  font-size: 16px;
}

.novel-status {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(46, 204, 113, 0.85);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 1;
}

.novel-status.completed {
  background: rgba(46, 204, 113, 0.85);
}

.novel-status.ongoing {
  background: rgba(243, 156, 18, 0.85);
}

/* 小说网格布局 */
.novel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

/* 分类标签 */
.category-tag {
  display: inline-block;
  padding: 3px 10px;
  margin-right: 5px;
  margin-bottom: 5px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--primary-color);
  color: white !important;
  text-decoration: none;
  transition: var(--transition);
}

.category-tag:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

.novel-categories {
  display: flex;
  flex-wrap: wrap;
  margin: 8px 0;
}

/* 页脚样式 */
.footer {
  background: var(--dark-color);
  color: white;
  padding: 40px 0 20px;
  margin-top: 50px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.footer-widget h3 {
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-widget h3:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--primary-color);
}

.footer-widget ul li {
  margin-bottom: 10px;
}

.footer-widget ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-widget ul li a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* 响应式样式 */
@media (max-width: 992px) {
  .novel-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    text-align: center;
  }

  .logo {
    margin-bottom: 15px;
  }

  .nav-menu {
    margin: 15px 0;
  }

  .search-box {
    margin-left: 0;
    margin-top: 15px;
    width: 100%;
  }

  .search-form {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }

  .novel-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 576px) {
  .novel-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
  }

  .nav-menu li {
    margin: 8px 0;
    width: 100%;
    text-align: center;
  }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #9b59b6;
    --dark-color: #1a1a1a;
    --light-color: #333333;
    --text-color: #f5f5f5;
    --text-light: #aaaaaa;
  }

  body {
    background-color: #121212;
    color: var(--text-color);
  }

  .header, .breadcrumb, .card {
    background-color: #1f1f1f;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }

  .search-input {
    background-color: #333;
    border-color: #444;
    color: var(--text-color);
  }

  .novel-title a {
    color: var(--text-color);
  }
}