/* ============================================
   糖心占星塔罗与心灵疗愈 - 主样式表
   设计风格：深紫+金的神秘占星风格
   ============================================ */

:root {
  --primary: #4A148C;
  --secondary: #CE93D8;
  --bg: #1A0A2E;
  --card: #2D1B4E;
  --accent: #FFD700;
  --text: #E8D5F5;
  --text-muted: #B39DDB;
  --border: #3D2B5E;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(74,20,140,0.4);
  --shadow-gold: 0 4px 24px rgba(255,215,0,0.2);
  --gradient-primary: linear-gradient(135deg, #4A148C 0%, #7B1FA2 50%, #CE93D8 100%);
  --gradient-card: linear-gradient(145deg, #2D1B4E 0%, #1A0A2E 100%);
  --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
  --font-display: 'Noto Serif SC', 'STSong', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-decorative: 'Ma Shan Zheng', cursive;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 星空背景粒子 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,215,0,0.6), transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(206,147,216,0.5), transparent),
    radial-gradient(2px 2px at 90px 40px, rgba(255,215,0,0.4), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(206,147,216,0.3), transparent),
    radial-gradient(2px 2px at 160px 120px, rgba(255,215,0,0.5), transparent);
  background-size: 200px 150px;
  animation: twinkle 4s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes twinkle {
  0% { opacity: 0.4; }
  50% { opacity: 0.8; }
  100% { opacity: 0.5; }
}

/* 链接样式 */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

a:hover {
  color: var(--secondary);
  opacity: 0.9;
}

/* 图片响应式 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* ============ 导航栏 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(26, 10, 46, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.site-logo span {
  color: var(--secondary);
}

.nav-menu {
  display: none;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }
}

.nav-menu a {
  color: var(--text);
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s var(--ease-out);
}

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

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 10, 46, 0.98);
  z-index: 999;
  padding: 4rem 2rem;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  font-size: 1.2rem;
  color: var(--text);
  padding: 0.75rem;
}

.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 2rem;
  cursor: pointer;
}

/* ============ 首屏英雄区 ============ */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--accent);
  margin-bottom: 1rem;
  text-shadow: 0 0 40px rgba(255,215,0,0.3);
  line-height: 1.3;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-gold);
  color: #1A0A2E;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255,215,0,0.35);
  color: #1A0A2E;
}

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

.btn-outline:hover {
  background: rgba(255,215,0,0.1);
  color: var(--accent);
}

/* ============ 区块标题 ============ */
.section {
  padding: 4rem 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============ 星座卡片网格 ============ */
.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

@media (min-width: 768px) {
  .zodiac-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .zodiac-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.zodiac-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
}

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

.zodiac-symbol {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.zodiac-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.zodiac-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.zodiac-score {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.zodiac-score .star {
  color: var(--accent);
  font-size: 0.85rem;
}

/* ============ 塔罗牌 ============ */
.tarot-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  perspective: 1000px;
}

.tarot-card {
  width: 180px;
  height: 300px;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease-in-out);
}

.tarot-card.flipped {
  transform: rotateY(180deg);
}

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

.tarot-front {
  transform: rotateY(180deg);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tarot-back {
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tarot-back-pattern {
  width: 80%;
  height: 80%;
  border: 2px solid var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.tarot-front img {
  width: 100%;
  height: 70%;
  object-fit: cover;
  border-radius: 8px;
}

.tarot-front .tarot-name {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.9rem;
}

/* ============ 运势评分条 ============ */
.fortune-bar-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.fortune-bar-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.fortune-bar-label {
  min-width: 60px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.fortune-bar {
  flex: 1;
  height: 8px;
  background: rgba(206,147,216,0.2);
  border-radius: 4px;
  overflow: hidden;
}

.fortune-bar-fill {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: 4px;
  transition: width 1.5s var(--ease-out);
  width: 0;
}

.fortune-bar-fill.animate {
  width: var(--fill-width);
}

/* ============ 内容卡片 ============ */
.content-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s var(--ease-out);
}

.content-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
  margin-bottom: 1rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============ 占卜师卡片 ============ */
.reader-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s var(--ease-out);
}

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

.reader-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin: 0 auto 1rem;
}

.reader-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.reader-specialty {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.reader-rating {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ============ 冥想播放器 ============ */
.meditation-player {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.meditation-timer {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--accent);
  margin: 1.5rem 0;
}

.meditation-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

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

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
}

.faq-question {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question::after {
  content: '▼';
  font-size: 0.7rem;
  color: var(--accent);
  transition: transform 0.3s var(--ease-out);
}

.faq-item.active .faq-question::after {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.4s var(--ease-out);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-top: 1rem;
}

/* ============ 面包屑 ============ */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

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

/* ============ 页脚 ============ */
.site-footer {
  background: rgba(26, 10, 46, 0.95);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.3s;
}

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

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

.footer-bottom a {
  color: var(--secondary);
}

/* ============ 星盘图 ============ */
.astro-chart {
  width: 300px;
  height: 300px;
  margin: 0 auto;
  position: relative;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: radial-gradient(circle, var(--card) 0%, var(--bg) 100%);
}

.astro-chart-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.astro-chart-ring:nth-child(1) {
  width: 90%;
  height: 90%;
}

.astro-chart-ring:nth-child(2) {
  width: 70%;
  height: 70%;
}

.astro-chart-ring:nth-child(3) {
  width: 50%;
  height: 50%;
}

/* ============ 页面内容区 ============ */
.page-content {
  padding: 2rem 0 4rem;
  min-height: 60vh;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--accent);
  margin-bottom: 1rem;
}

.page-intro {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 800px;
}

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

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 3.5rem;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s var(--ease-out);
}

.search-input:focus {
  border-color: var(--accent);
}

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

.search-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ============ 合规页面 ============ */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent);
  margin: 2rem 0 1rem;
}

.legal-content h3 {
  font-size: 1.1rem;
  color: var(--secondary);
  margin: 1.5rem 0 0.75rem;
}

.legal-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.legal-content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* ============ APP下载页 ============ */
.app-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .app-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

.app-feature-item {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.app-feature-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.app-feature-title {
  font-family: var(--font-display);
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.app-feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============ 404页面 ============ */
.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
  text-shadow: 0 0 60px rgba(255,215,0,0.3);
}

.error-text {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

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

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,215,0,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(255,215,0,0); }
}

.animate-fade-in {
  animation: fadeInUp 0.6s var(--ease-out) forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ============ 响应式减少动效 ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ 表格 ============ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  background: var(--card);
  color: var(--accent);
  font-family: var(--font-display);
}

.data-table td {
  color: var(--text-muted);
}

/* ============ 标签 ============ */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(206,147,216,0.15);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--secondary);
  margin: 0.25rem;
}

/* ============ 分割线 ============ */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 2rem 0;
}
