/* 东方美学·西游真经 主题样式 */
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@400;600;700;900&display=swap');

:root {
  --gold-primary: #f3ca65;
  --gold-light: #fef1c9;
  --gold-dark: #b8860b;
  --gold-glow: rgba(243, 202, 101, 0.4);
  --vermilion: #d9383a;
  --vermilion-glow: rgba(217, 56, 58, 0.4);
  --jade: #2eb886;
  --bg-dark: #09070f;
  --bg-card: rgba(20, 16, 33, 0.75);
  --bg-card-border: rgba(243, 202, 101, 0.25);
  --text-main: #e2daf0;
  --text-muted: #9e93b5;
  --font-serif: 'Noto Serif SC', serif;
  --font-calligraphy: 'Ma Shan Zheng', cursive;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-serif);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Canvas */
#cloud-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Main Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(9, 7, 15, 0.85);
  border-bottom: 1px solid var(--bg-card-border);
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-calligraphy);
  font-size: 1.8rem;
  color: var(--gold-primary);
  text-shadow: 0 0 12px var(--gold-glow);
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold-primary), var(--vermilion));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--gold-glow);
  font-size: 1.4rem;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.3rem 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-primary);
  text-shadow: 0 0 8px var(--gold-glow);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.departure-badge-nav {
  background: linear-gradient(135deg, rgba(217, 56, 58, 0.25), rgba(243, 202, 101, 0.25));
  border: 1px solid var(--vermilion);
  color: var(--gold-primary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 0 10px var(--vermilion-glow);
  animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 8px var(--vermilion-glow); }
  100% { box-shadow: 0 0 18px var(--gold-glow); }
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 5rem 1rem 4rem;
  position: relative;
}

.hero-tag {
  display: inline-block;
  font-size: 1rem;
  letter-spacing: 3px;
  color: var(--gold-primary);
  background: rgba(243, 202, 101, 0.1);
  border: 1px solid var(--gold-primary);
  padding: 0.4rem 1.4rem;
  border-radius: 30px;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 15px var(--gold-glow);
}

.hero-title {
  font-family: var(--font-calligraphy);
  font-size: 4.2rem;
  background: linear-gradient(180deg, #ffffff 0%, var(--gold-primary) 60%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 2.5rem;
  letter-spacing: 1px;
}

/* Countdown Card */
.countdown-box {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  max-width: 650px;
  margin: 0 auto 3rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.countdown-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), var(--vermilion), transparent);
}

.countdown-title {
  font-size: 1.1rem;
  color: var(--gold-primary);
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.timer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.timer-item {
  background: rgba(10, 8, 18, 0.8);
  border: 1px solid rgba(243, 202, 101, 0.2);
  border-radius: 10px;
  padding: 0.8rem 0.5rem;
}

.timer-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold-light);
  font-family: monospace;
  text-shadow: 0 0 10px var(--gold-glow);
}

.timer-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Hero Actions */
.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-primary), #d49a24);
  color: #0d0814;
  font-size: 1.15rem;
  font-weight: 900;
  padding: 1rem 2.2rem;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px var(--gold-glow);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 35px rgba(243, 202, 101, 0.7);
  background: linear-gradient(135deg, #ffe596, var(--gold-primary));
}

.btn-secondary {
  background: rgba(217, 56, 58, 0.15);
  border: 1px solid var(--vermilion);
  color: #ffa4a5;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 1rem 2.2rem;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 0 15px var(--vermilion-glow);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(217, 56, 58, 0.3);
  transform: translateY(-3px);
  color: #fff;
  box-shadow: 0 0 25px var(--vermilion-glow);
}

/* Section Title Styling */
.section-header {
  text-align: center;
  margin: 5rem 0 3rem;
}

.section-tag {
  color: var(--vermilion);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-calligraphy);
  font-size: 2.8rem;
  color: var(--gold-primary);
  text-shadow: 0 0 15px var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.section-title::before,
.section-title::after {
  content: '❖';
  font-size: 1.4rem;
  color: var(--vermilion);
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Scripture Preview Section (经书试读) */
.scripture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.scripture-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.scripture-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-primary);
  box-shadow: 0 12px 30px rgba(243, 202, 101, 0.2);
}

.scripture-vol {
  font-size: 0.85rem;
  color: var(--vermilion);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.scripture-name {
  font-family: var(--font-calligraphy);
  font-size: 1.9rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.scripture-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  background: rgba(0,0,0,0.3);
  padding: 1rem;
  border-left: 2px solid var(--gold-primary);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.scripture-read-btn {
  background: transparent;
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  text-align: center;
}

.scripture-read-btn:hover {
  background: var(--gold-primary);
  color: var(--bg-dark);
  box-shadow: 0 0 15px var(--gold-glow);
}

/* Modal Scripture Reader */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(5, 3, 10, 0.88);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.scripture-reader-modal {
  background: #171221;
  border: 2px solid var(--gold-primary);
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(243, 202, 101, 0.3);
  overflow: hidden;
  position: relative;
}

.modal-header {
  background: rgba(10, 8, 16, 0.9);
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--bg-card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: var(--font-calligraphy);
  font-size: 2rem;
  color: var(--gold-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--vermilion);
}

.reader-body {
  padding: 2.5rem;
  overflow-y: auto;
  background: radial-gradient(circle at center, #21192e 0%, #120d1c 100%);
  color: #ede6f5;
  font-size: 1.15rem;
  line-height: 2;
  position: relative;
}

.reader-parchment {
  border: 1px dashed rgba(243, 202, 101, 0.3);
  padding: 2rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.reader-chapter-title {
  text-align: center;
  font-family: var(--font-calligraphy);
  font-size: 2.4rem;
  color: var(--gold-primary);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 10px var(--gold-glow);
}

.reader-footer-actions {
  background: rgba(10, 8, 16, 0.9);
  padding: 1rem 2rem;
  border-top: 1px solid var(--bg-card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 99 Yuan Deposit Card Component */
.deposit-card-box {
  background: linear-gradient(135deg, rgba(217, 56, 58, 0.15) 0%, rgba(243, 202, 101, 0.15) 100%);
  border: 2px solid var(--gold-primary);
  border-radius: 16px;
  padding: 1.8rem 2.2rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 25px rgba(243, 202, 101, 0.2);
  position: relative;
  overflow: hidden;
}

.deposit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.deposit-title {
  font-family: var(--font-calligraphy);
  font-size: 2rem;
  color: var(--gold-primary);
  text-shadow: 0 0 10px var(--gold-glow);
}

.deposit-price-tag {
  background: linear-gradient(135deg, var(--vermilion), #b32426);
  color: #ffffff;
  padding: 0.5rem 1.4rem;
  border-radius: 30px;
  font-weight: 900;
  font-size: 1.35rem;
  box-shadow: 0 0 15px var(--vermilion-glow);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.deposit-refund-notice {
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(10, 8, 18, 0.5);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--gold-primary);
}

.deposit-perks-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
}

.deposit-perks-list li {
  background: rgba(10, 8, 18, 0.7);
  border: 1px solid rgba(243, 202, 101, 0.25);
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text-main);
}

/* Westward Rules Section (西行戒律) */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.rule-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.rule-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--gold-glow);
}

.rule-icon {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.rule-title {
  font-family: var(--font-calligraphy);
  font-size: 1.6rem;
  color: var(--gold-primary);
  margin-bottom: 0.8rem;
}

.rule-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Travel Pass Generator (通关文牒) */
.pass-section {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 3rem;
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .pass-section {
    grid-template-columns: 1fr;
  }
}

.pass-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  color: var(--gold-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.form-input, .form-select {
  background: rgba(10, 8, 18, 0.9);
  border: 1px solid rgba(243, 202, 101, 0.3);
  color: var(--text-main);
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  font-family: var(--font-serif);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Travel Certificate Card (通关文牒票据) */
.pass-card {
  background: linear-gradient(135deg, #2b1d0c 0%, #1a1207 100%);
  border: 4px double var(--gold-primary);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 0 30px rgba(243, 202, 101, 0.2);
  color: #f7e7c4;
}

.pass-header {
  text-align: center;
  border-bottom: 2px solid var(--gold-primary);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.pass-title {
  font-family: var(--font-calligraphy);
  font-size: 2.2rem;
  color: var(--gold-primary);
  letter-spacing: 4px;
}

.pass-subtitle {
  font-size: 0.85rem;
  color: #c9b082;
  letter-spacing: 2px;
  margin-top: 0.2rem;
}

.pass-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(243, 202, 101, 0.2);
  font-size: 1rem;
}

.pass-detail-label {
  color: #b59b67;
}

.pass-detail-val {
  font-weight: 700;
  color: var(--gold-light);
}

.pass-stamp {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 90px;
  height: 90px;
  border: 3px solid var(--vermilion);
  border-radius: 50%;
  color: var(--vermilion);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-calligraphy);
  font-size: 1.1rem;
  transform: rotate(-15deg);
  opacity: 0.85;
  box-shadow: 0 0 15px var(--vermilion-glow);
  pointer-events: none;
}

/* 81 Tribulations Timeline */
.tribulation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.tribulation-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.tribulation-card:hover {
  border-color: var(--vermilion);
  transform: scale(1.02);
  box-shadow: 0 0 20px var(--vermilion-glow);
}

.tribulation-num {
  display: inline-block;
  background: var(--vermilion);
  color: #fff;
  font-weight: 900;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
}

.tribulation-title {
  font-family: var(--font-calligraphy);
  font-size: 1.6rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

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

/* Magic Treasures Section */
.treasure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.treasure-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.treasure-card:hover {
  transform: translateY(-8px);
  border-color: var(--gold-primary);
  box-shadow: 0 10px 30px var(--gold-glow);
}

.treasure-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  filter: drop-shadow(0 0 10px var(--gold-primary));
  animation: float-icon 3s ease-in-out infinite alternate;
}

@keyframes float-icon {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.treasure-name {
  font-family: var(--font-calligraphy);
  font-size: 1.8rem;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}

.treasure-power {
  color: var(--vermilion);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

/* Wooden Fish Section (电子敲木鱼) */
.wooden-fish-section {
  background: radial-gradient(circle at center, rgba(43, 29, 12, 0.6) 0%, rgba(10, 8, 18, 0.9) 100%);
  border: 1px solid var(--gold-primary);
  border-radius: 20px;
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 4rem;
  position: relative;
}

.wooden-fish-btn {
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  margin: 1.5rem 0;
  transition: transform 0.1s ease;
  position: relative;
}

.wooden-fish-btn:active {
  transform: scale(0.92);
}

.wooden-fish-svg {
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 0 20px var(--gold-glow));
}

.merit-counter {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold-primary);
  text-shadow: 0 0 15px var(--gold-glow);
}

/* Floating Merit Text Animation */
.floating-merit {
  position: absolute;
  color: var(--gold-primary);
  font-weight: 900;
  font-size: 1.4rem;
  font-family: var(--font-calligraphy);
  pointer-events: none;
  animation: float-up-fade 1.2s ease-out forwards;
}

@keyframes float-up-fade {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(1.3);
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 4rem 1rem 2rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(243, 202, 101, 0.15);
  margin-top: 6rem;
  font-size: 0.95rem;
}

footer strong {
  color: var(--gold-primary);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--gold-primary);
  color: #0a0812;
  padding: 1rem 1.8rem;
  border-radius: 30px;
  font-weight: 800;
  box-shadow: 0 0 25px var(--gold-glow);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.8rem;
  }
  .nav-links {
    display: none;
  }
  .timer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
