/* Cosplay - 资源导航风格样式 */

/* CSS 变量 */
:root {
  --accent-color: #9c27b0;
  --accent-light: #ba68c8;
  --accent-dark: #7b1fa2;
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --text-primary: #eaeaea;
  --text-secondary: #a0a0a0;
  --text-muted: #6c757d;
  --border-color: #2d3561;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(156, 39, 176, 0.2);
  --transition: all 0.3s ease;
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-color);
}

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

/* 头部 */
.header {
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav {
  display: flex;
  gap: 30px;
}

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-light);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color);
}

/* 搜索框 */
.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto 40px;
}

.search-box input {
  width: 100%;
  padding: 18px 25px;
  padding-left: 55px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 20px rgba(156, 39, 176, 0.2);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* Hero 区域 */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 30px;
}

/* 分类筛选 */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
}

.category-filter a {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.category-filter a:hover,
.category-filter a.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 25px;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-color);
}

.card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 15px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 链接列表 */
.link-list {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 40px;
}

.link-item {
  display: flex;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.link-item:hover {
  background: rgba(156, 39, 176, 0.05);
}

.link-favicon {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.2rem;
}

.link-content {
  flex: 1;
}

.link-content h4 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.link-content p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.link-meta {
  display: flex;
  align-items: center;
  gap: 15px;
}

.link-meta .verified {
  color: var(--success-color);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.link-meta .rating {
  color: var(--warning-color);
}

/* 面包屑 */
.breadcrumb {
  padding: 20px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

.breadcrumb .separator {
  margin: 0 10px;
  color: var(--text-muted);
}

/* 页面标题 */
.page-header {
  padding: 40px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.page-header p {
  color: var(--text-secondary);
}

/* 子分类 */
.sub-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.sub-categories a {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.sub-categories a:hover {
  background: var(--accent-color);
  color: #fff;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}

.pagination a,
.pagination span {
  padding: 10px 15px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  min-width: 40px;
  text-align: center;
}

.pagination a:hover,
.pagination .current {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

/* 文章详情 */
.article-detail {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  margin-bottom: 40px;
}

.article-header {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-content {
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-content h2 {
  color: var(--text-primary);
  margin: 30px 0 15px;
  font-size: 1.4rem;
}

.article-content h3 {
  color: var(--text-primary);
  margin: 25px 0 12px;
  font-size: 1.2rem;
}

.article-content p {
  margin-bottom: 15px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 15px;
  padding-left: 25px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content code {
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.article-content pre {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 20px;
}

.article-content pre code {
  background: none;
  padding: 0;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 20px;
  margin: 20px 0;
  color: var(--text-muted);
  font-style: italic;
}

.article-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

/* 标签 */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid var(--border-color);
}

.tags a {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.tags a:hover {
  background: var(--accent-color);
  color: #fff;
}

/* 相关推荐 */
.related-section {
  margin-bottom: 40px;
}

.related-section h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* 三栏布局 */
.three-column {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}

.column h4 {
  font-size: 1rem;
  margin-bottom: 15px;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
}

.column ul {
  list-style: none;
}

.column li {
  margin-bottom: 12px;
}

.column a {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.column a:hover {
  color: var(--accent-light);
}

.column a::before {
  content: '•';
  color: var(--accent-color);
}

/* 统计 */
.stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 30px 0;
  margin-bottom: 40px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

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

.stat-item .number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-light);
}

.stat-item .label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 404 页面 */
.error-page {
  text-align: center;
  padding: 100px 20px;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 20px;
}

.error-page h1 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition);
}

.btn:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* 页脚 */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand .logo {
  margin-bottom: 15px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 10px;
}

.footer-column a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-column a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .three-column {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 15px;
  }

  .nav {
    gap: 20px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .three-column {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .link-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .link-meta {
    width: 100%;
    justify-content: space-between;
  }

  .stats {
    flex-direction: column;
    gap: 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .article-detail {
    padding: 25px;
  }

  .article-header h1 {
    font-size: 1.4rem;
  }

  .error-code {
    font-size: 5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    padding: 40px 0 30px;
  }

  .category-filter {
    gap: 8px;
  }

  .category-filter a {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .pagination a,
  .pagination span {
    padding: 8px 12px;
    min-width: 35px;
  }
}
