/* ===== 全局变量 ===== */
:root {
  --gold: #D4AF37;
  --purple: #4A148C;
  --parchment: #FDF5E6;
  --white: #FFFFFF;
  --text: #3E2723;
  --gold-light: #F5E6A3;
  --purple-light: #7B1FA2;
  --shadow: rgba(62, 39, 35, 0.15);
  --radius: 12px;
  --transition: 0.3s ease;
}

/* ===== 重置与基础 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Serif SC', 'Georgia', serif;
  background-color: var(--parchment);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

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

/* ===== 导航栏 ===== */
.navbar {
  background: linear-gradient(135deg, var(--purple), #2E0854);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px var(--shadow);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  color: var(--gold) !important;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 5px;
}

.navbar-nav a {
  color: var(--parchment);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  background: var(--gold);
  color: var(--purple);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== 英雄区 ===== */
.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.5);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 800px;
  padding: 40px 20px;
}

.hero-content h1 {
  color: var(--gold);
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: var(--parchment);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-align: center;
}

.btn-gold {
  background: var(--gold);
  color: var(--purple);
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  color: var(--purple);
}

.btn-purple {
  background: var(--purple);
  color: var(--white);
}

.btn-purple:hover {
  background: var(--purple-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 20, 140, 0.4);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--purple);
}

/* ===== 区块 ===== */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  color: var(--purple);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.section-title p {
  color: #666;
  font-size: 1.1rem;
  margin-top: 15px;
}

/* ===== 卡片 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
  transition: all var(--transition);
  perspective: 1000px;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(62, 39, 35, 0.2);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s;
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-body {
  padding: 25px;
}

.card-body h3 {
  margin-bottom: 12px;
  color: var(--purple);
}

.card-body p {
  color: #555;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.card-tag {
  display: inline-block;
  background: var(--gold-light);
  color: var(--purple);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 5px;
  margin-bottom: 5px;
}

/* ===== 手风琴 ===== */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px var(--shadow);
  overflow: hidden;
}

.accordion-header {
  padding: 18px 25px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--purple);
  transition: background var(--transition);
}

.accordion-header:hover {
  background: var(--gold-light);
}

.accordion-header::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--gold);
  transition: transform var(--transition);
}

.accordion-item.active .accordion-header::after {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 25px;
}

.accordion-item.active .accordion-content {
  max-height: 500px;
  padding: 0 25px 20px;
}

/* ===== 雷达图容器 ===== */
.radar-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 15px var(--shadow);
}

/* ===== 页脚 ===== */
.footer {
  background: linear-gradient(135deg, #1a0533, var(--purple));
  color: var(--parchment);
  padding: 60px 0 30px;
}

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

.footer-col h4 {
  color: var(--gold);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

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

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

.footer-col ul li a {
  color: var(--parchment);
  opacity: 0.8;
  font-size: 0.9rem;
}

.footer-col ul li a:hover {
  opacity: 1;
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(253, 245, 230, 0.2);
  padding-top: 25px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 15px 0;
  font-size: 0.9rem;
}

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

.breadcrumb span {
  color: #999;
  margin: 0 8px;
}

/* ===== 详情页 ===== */
.detail-header {
  padding: 60px 0 40px;
  background: linear-gradient(to bottom, rgba(74, 20, 140, 0.05), transparent);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  padding: 40px 0;
}

.detail-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: 0 4px 15px var(--shadow);
  margin-bottom: 20px;
}

.sidebar-card h4 {
  color: var(--purple);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-light);
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

.info-row:last-child {
  border-bottom: none;
}

/* ===== 搜索页 ===== */
.search-box {
  max-width: 600px;
  margin: 40px auto;
  display: flex;
  gap: 10px;
}

.search-box input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--gold);
  border-radius: 30px;
  font-size: 1rem;
  outline: none;
  background: var(--white);
}

.search-box input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(74, 20, 140, 0.1);
}

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

.error-page h1 {
  font-size: 8rem;
  color: var(--gold);
  line-height: 1;
}

.error-page h2 {
  margin: 20px 0;
  color: var(--purple);
}

/* ===== 地图容器 ===== */
.map-container {
  width: 100%;
  height: 400px;
  background: #e8e0d4;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 1.1rem;
  border: 2px dashed var(--gold);
}

/* ===== 画廊 ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
  transition: transform var(--transition);
}

.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes diceRoll {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(90deg); }
  50% { transform: rotate(180deg); }
  75% { transform: rotate(270deg); }
  100% { transform: rotate(360deg); }
}

.dice-animation {
  animation: diceRoll 1s ease-in-out;
}

/* ===== 卡片翻转 ===== */
.flip-card {
  perspective: 1000px;
  height: 300px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
  background: var(--purple);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .detail-content {
    grid-template-columns: 1fr;
  }
  
  .detail-sidebar {
    position: static;
  }
  
  h1 { font-size: 2rem; }
  .hero-content h1 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
  .navbar-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--purple);
    flex-direction: column;
    padding: 20px;
    gap: 5px;
  }
  
  .navbar-nav.active {
    display: flex;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .hero {
    height: 50vh;
    min-height: 350px;
  }
  
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .section {
    padding: 50px 0;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-content h1 {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}
