/* 电影取景地旅游 - 全局样式 */
:root {
  --primary: #2c5282;
  --primary-dark: #1a365d;
  --accent: #ed8936;
  --accent-light: #fbd38d;
  --bg: #f7fafc;
  --card-bg: #ffffff;
  --text: #2d3748;
  --text-light: #718096;
  --border: #e2e8f0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

/* 头部 */
.header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo::before {
  content: "🎬";
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

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

.search-box {
  display: flex;
  gap: 0.5rem;
}

.search-box input {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  width: 200px;
  font-size: 0.9rem;
}

.search-box button {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s;
}

.search-box button:hover {
  background: #dd6b20;
}

/* 面包屑 */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

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

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

.breadcrumb span {
  margin: 0 0.5rem;
  color: var(--border);
}

/* 主要内容区 */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

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

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

.card-count {
  background: var(--bg);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* 区块标题 */
.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 1.2rem;
  background: var(--accent);
  border-radius: 2px;
}

/* 三栏布局 */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.col {
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.col h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.col ul {
  list-style: none;
}

.col li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.col li:last-child {
  border-bottom: none;
}

.col li a {
  display: flex;
  justify-content: space-between;
  color: var(--text);
}

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

.col .date {
  color: var(--text-light);
  font-size: 0.8rem;
}

/* 树形结构 */
.tree {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.tree-item {
  margin-bottom: 1rem;
}

.tree-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
}

.tree-header::before {
  content: "📁";
}

.tree-header.open::before {
  content: "📂";
}

.tree-count {
  margin-left: auto;
  background: var(--accent);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

.tree-children {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

.tree-child {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tree-child::before {
  content: "📄";
  font-size: 0.9rem;
}

/* 文章详情 */
.article {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.article-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.article-title {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
}

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

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.article-content {
  font-size: 1rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem;
  color: var(--primary);
}

.article-content h3 {
  font-size: 1.2rem;
  margin: 1.25rem 0 0.75rem;
  color: var(--text);
}

.article-content p {
  margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* 标签 */
.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.tag {
  background: var(--bg);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.tag:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* 相关文章 */
.related {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.related h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.related-item {
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.related-item:hover {
  background: var(--accent-light);
}

/* 404 页面 */
.error-page {
  text-align: center;
  padding: 4rem 2rem;
}

.error-code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.error-desc {
  color: var(--text-light);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.3s;
}

.btn:hover {
  background: var(--primary-dark);
  color: white;
}

/* 页脚 */
.footer {
  background: var(--primary-dark);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--accent-light);
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding: 1rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* 响应式 */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
  }

  .nav {
    gap: 1rem;
  }

  .search-box input {
    width: 150px;
  }

  .hero {
    padding: 2rem 1rem;
  }

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

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

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

  .article {
    padding: 1.25rem;
  }

  .article-title {
    font-size: 1.4rem;
  }

  .tree-children {
    margin-left: 0.5rem;
    padding-left: 0.5rem;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
  }

  .nav {
    font-size: 0.9rem;
    gap: 0.75rem;
  }

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