/* DESIGN SYSTEM & GLOBAL STYLES */
:root {
  --bg-color: #040814;
  --bg-gradient: linear-gradient(135deg, #040814 0%, #08112c 100%);
  --card-bg: rgba(10, 18, 40, 0.45);
  --card-border: rgba(0, 229, 255, 0.15);
  --text-primary: #f0f4f8;
  --text-secondary: #a0aec0;
  
  /* Color Tokens */
  --blue-tears-glow: #00e5ff;
  --blue-tears-dark: #008ba3;
  --temple-red: #d9383a;
  --temple-red-glow: #ff5252;
  --temple-gold: #fbc02d;
  --temple-gold-glow: #fff59d;
  --stone-gray: #718096;
  --success-green: #2ecc71;
  
  /* Typography */
  --font-family-sans: 'Outfit', 'Noto Sans TC', sans-serif;
  
  /* System constants */
  --header-height: 70px;
  --border-radius: 16px;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset and Core Layout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--blue-tears-dark) var(--bg-color);
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--blue-tears-dark);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--blue-tears-glow);
}

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

/* GLOBAL DECORATORS */
.gradient-text {
  background: linear-gradient(90deg, #ffffff 0%, var(--blue-tears-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 30px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--blue-tears-glow);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.accent-text {
  color: var(--blue-tears-glow);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.hidden {
  display: none !important;
}

/* MAIN HEADER */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(4, 8, 20, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
}

.logo-icon {
  color: var(--blue-tears-glow);
  filter: drop-shadow(0 0 5px rgba(0, 229, 255, 0.6));
}

.nav-links {
  display: flex;
  gap: 15px;
}

.nav-item {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 30px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--blue-tears-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition-smooth);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.cta-nav-btn {
  background: linear-gradient(135deg, var(--temple-red) 0%, #b21f24 100%);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(217, 56, 58, 0.3);
  transition: var(--transition-smooth);
}

.cta-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 56, 58, 0.5);
  background: linear-gradient(135deg, var(--temple-red-glow) 0%, var(--temple-red) 100%);
}

/* BUTTONS */
.btn {
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-tears-glow) 0%, #00b4d8 100%);
  color: #040814;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 229, 255, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-green) 0%, #27ae60 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.25);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.btn-block {
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 15px;
  width: 100%;
  justify-content: center;
  margin-top: 25px;
}

.btn-group .btn {
  flex: 1;
  max-width: 200px;
}

/* GLASS CARD */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

/* SECTION STRUCTURE */
.content-container {
  flex: 1;
  margin-top: var(--header-height);
  padding: 40px 5%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.page-section {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  width: 100%;
  flex: 1;
}

.page-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-subtitle {
  color: var(--blue-tears-glow);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* HOME PAGE - HERO SECTION */
.hero-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  min-height: calc(80vh - var(--header-height));
  margin-bottom: 60px;
}

.hero-text-content h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  color: #fff;
  letter-spacing: -1px;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 35px;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

/* Hero Forecast Visual Card */
.hero-visual-card {
  position: relative;
  width: 100%;
  height: 380px;
  perspective: 1000px;
}

.main-visual {
  height: 100%;
  width: 100%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-color: rgba(0, 229, 255, 0.25);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.1);
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: float-glow 8s infinite alternate ease-in-out;
}

.visual-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 15px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--blue-tears-glow);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--blue-tears-glow);
  animation: pulse-ring 1.5s infinite;
}

.weather-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0;
}

.temp-box {
  display: flex;
  flex-direction: column;
}

.temp {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  line-height: 1;
}

.condition {
  color: var(--blue-tears-glow);
  font-weight: 600;
  margin-top: 5px;
}

.tear-level-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.tear-level-box .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.tear-level-box .level {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--blue-tears-glow);
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

.forecast-details {
  display: flex;
  gap: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 15px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.detail-item i {
  color: var(--blue-tears-glow);
}

.forecast-tips {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 8px;
  border-left: 3px solid var(--blue-tears-glow);
}

/* Home Highlights Grid */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.highlight-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 30px;
  transition: var(--transition-smooth);
}

.highlight-card:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-5px);
  border-color: rgba(0, 229, 255, 0.2);
}

.highlight-icon {
  font-size: 2rem;
  color: var(--blue-tears-glow);
  margin-bottom: 20px;
  display: inline-block;
}

.highlight-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.highlight-card p {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 0.95rem;
}

/* EXPLORE PAGE */
.island-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 35px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
  background: var(--blue-tears-glow);
  color: #040814;
  border-color: var(--blue-tears-glow);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.island-content {
  display: none;
}

.island-content.active {
  display: block;
  animation: fade-in 0.5s ease;
}

.spots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.spot-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.spot-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.15);
}

.spot-img {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
  transition: var(--transition-smooth);
}

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

.spot-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 4px 10px;
  border-radius: 30px;
  background: rgba(4, 8, 20, 0.8);
  border: 1px solid var(--blue-tears-glow);
  color: var(--blue-tears-glow);
  font-size: 0.75rem;
  font-weight: 600;
}

.spot-info {
  padding: 20px;
}

.spot-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.spot-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ONLINE TEMPLE SECTION */
.temple-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.temple-card {
  display: none;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.5s ease, transform 0.5s ease;
  padding: 40px;
  border-color: rgba(217, 56, 58, 0.2);
  box-shadow: 0 0 30px rgba(217, 56, 58, 0.05);
}

.temple-card.active {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.temple-card-header {
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 2px solid rgba(217, 56, 58, 0.3);
  padding-bottom: 20px;
  margin-bottom: 25px;
}

.temple-header-icon {
  font-size: 1.8rem;
  color: var(--temple-red);
  filter: drop-shadow(0 0 5px rgba(217, 56, 58, 0.5));
}

.step-icon-spin {
  color: var(--temple-gold);
}

.temple-card-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.step-guide {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 25px;
}

/* Form Styles */
.temple-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group label i {
  color: var(--temple-gold);
}

.form-group input, .form-group textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  width: 100%;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--temple-red);
  background: rgba(217, 56, 58, 0.05);
  box-shadow: 0 0 10px rgba(217, 56, 58, 0.15);
}

/* Altar / Divination Area */
.altar-area {
  background: radial-gradient(circle, rgba(178, 31, 36, 0.12) 0%, transparent 80%);
  border: 1px dashed rgba(217, 56, 58, 0.25);
  border-radius: var(--border-radius);
  height: 250px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  overflow: hidden;
}

/* Censer and Incense (爐 & 香) */
.censer-box {
  position: absolute;
  top: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.censer {
  width: 50px;
  height: 35px;
  position: relative;
}

.censer-body {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, var(--temple-gold) 0%, #b28900 100%);
  border-radius: 0 0 25px 25px;
  border: 2px solid var(--temple-gold);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.incense-stick {
  width: 2px;
  height: 50px;
  background-color: #8e44ad;
  position: absolute;
  bottom: 30px;
  transform-origin: bottom center;
}

.incense-stick:nth-child(2) { left: 15px; transform: rotate(-5deg); }
.incense-stick:nth-child(3) { left: 25px; height: 55px; background-color: #a537fd; }
.incense-stick:nth-child(4) { left: 35px; transform: rotate(5deg); }

.incense-stick.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: -2px;
  width: 6px;
  height: 6px;
  background-color: red;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff7675, 0 0 15px red;
  animation: glow-pulse 1s infinite alternate;
}

/* Incense Smoke Effect */
.smoke-effect {
  position: absolute;
  top: -35px;
  width: 40px;
  height: 50px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  filter: blur(4px);
  animation: smoke-rise 4s infinite linear;
  pointer-events: none;
}

/* Divination Blocks (筊杯) */
.blocks-container {
  display: flex;
  gap: 40px;
  position: absolute;
  bottom: 40px;
  perspective: 600px;
}

.cup-block {
  width: 80px;
  height: 40px;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

/* 筊杯的平凸面 */
.cup-block::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 80px 80px 0 0; /* Crescent moon half */
  background: linear-gradient(135deg, var(--temple-red) 0%, #801012 100%);
  border: 2px solid var(--temple-gold);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  transform-origin: center;
  transition: var(--transition-smooth);
}

/* Left block rotation styling */
#block-left::before, #block-left-c::before {
  transform: rotate(-90deg); /* points to the left */
}

/* Right block rotation styling */
#block-right::before, #block-right-c::before {
  transform: rotate(90deg); /* points to the right */
}

/* Animation States */
.cup-block.spinning {
  animation: block-bounce 1s infinite alternate ease-in-out;
}

#block-left.spinning {
  animation: block-spin-left 0.8s infinite linear;
}

#block-right.spinning {
  animation: block-spin-right 0.8s infinite linear;
}

#block-left-c.spinning {
  animation: block-spin-left 0.8s infinite linear;
}

#block-right-c.spinning {
  animation: block-spin-right 0.8s infinite linear;
}

/* Landing positions */
/* 聖杯 (One Flat, One Convex) */
.cup-block.state-flat::before {
  transform: scaleY(-1) rotate(90deg); /* Show flat side (bottom flat) - flipped over */
  background: linear-gradient(135deg, #cc2c2e 0%, #ff5c5e 100%) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}
#block-left.state-flat::before, #block-left-c.state-flat::before {
  transform: scaleY(-1) rotate(-90deg);
}

.cup-block.state-convex::before {
  /* Convex side has depth shadow */
  background: radial-gradient(circle at 50% 20%, #a81a1c 0%, #500809 100%) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6) !important;
}

/* Status Text Display */
.throw-status {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--temple-gold);
  margin: 15px 0;
  text-shadow: 0 0 10px rgba(251, 192, 45, 0.3);
  min-height: 27px;
}

/* STEP 3 DRAWING AREA */
.drawing-area {
  height: 250px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  background: radial-gradient(circle, rgba(251, 192, 45, 0.08) 0%, transparent 80%);
  border: 1px dashed rgba(251, 192, 45, 0.2);
  border-radius: var(--border-radius);
}

.stick-cylinder {
  width: 90px;
  height: 140px;
  position: relative;
  transition: transform 0.1s ease;
}

.stick-cylinder.shaking {
  animation: cylinder-shake 0.5s infinite ease-in-out;
}

.cyl-base {
  width: 100%;
  height: 20px;
  background-color: #8c0d10;
  border-radius: 0 0 10px 10px;
  position: absolute;
  bottom: 0;
  border: 2px solid var(--temple-gold);
  z-index: 10;
}

.cyl-body {
  width: 100%;
  height: 120px;
  background: linear-gradient(185deg, var(--temple-red) 0%, #7f1214 100%);
  border-radius: 10px 10px 0 0;
  border: 2px solid var(--temple-gold);
  border-bottom: none;
  position: absolute;
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--temple-gold);
  font-weight: 700;
  font-size: 0.85rem;
  writing-mode: vertical-lr;
  letter-spacing: 4px;
  padding: 10px 0;
  z-index: 10;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

.sticks-bundle {
  position: absolute;
  top: -40px;
  left: 15px;
  width: 60px;
  height: 80px;
  z-index: 5;
}

.stick {
  width: 6px;
  height: 90px;
  background: var(--temple-gold);
  border: 1px solid #c99c1d;
  position: absolute;
  bottom: 0;
  border-radius: 3px 3px 0 0;
  transform-origin: bottom center;
}

.stick:nth-child(1) { left: 5px; transform: rotate(-8deg); }
.stick:nth-child(2) { left: 15px; transform: rotate(-3deg); }
.stick:nth-child(3) { left: 25px; transform: rotate(2deg); }
.stick:nth-child(4) { left: 35px; transform: rotate(-1deg); }
.stick:nth-child(5) { left: 45px; transform: rotate(7deg); }
.stick:nth-child(6) { left: 20px; height: 95px; background: #ffe082; }

/* The Stick that is drawn and ejected */
.out-stick {
  position: absolute;
  width: 12px;
  height: 140px;
  background: #ffca28;
  border: 2px solid var(--temple-red);
  border-radius: 6px 6px 0 0;
  bottom: 120px;
  z-index: 12;
  display: none;
  justify-content: center;
  align-items: center;
  writing-mode: vertical-lr;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--temple-red);
  padding: 10px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transform: translateY(100px);
  opacity: 0;
}

.out-stick.ejected {
  display: flex;
  animation: stick-eject 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* STEP 4 CONFIRMATION SCORE DOTS */
.confirm-settings {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.03);
  padding: 10px;
  border-radius: 8px;
}

.confirm-settings label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.confirm-settings input {
  accent-color: var(--temple-red);
}

.cup-score-board {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.score-dot {
  font-size: 1.5rem;
  color: var(--stone-gray);
  transition: var(--transition-smooth);
}

.score-dot.success {
  color: var(--success-green);
  filter: drop-shadow(0 0 5px rgba(46,204,113,0.5));
}
.score-dot.fail {
  color: var(--temple-red);
  filter: drop-shadow(0 0 5px rgba(217,56,58,0.5));
}

/* STEP 5 FORTUNE RESULT */
.fortune-reveal-header {
  border-bottom: 3px double var(--temple-red);
  justify-content: space-between;
}

.ganzhi-badge {
  background: var(--temple-red);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid var(--temple-gold);
}

.fortune-card-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.fortune-main-panel {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 30px;
}

.fortune-grade {
  font-size: 2rem;
  font-weight: 900;
  color: var(--temple-gold);
  text-align: center;
  margin-bottom: 25px;
  text-shadow: 0 0 15px rgba(251, 192, 45, 0.4);
  background: rgba(251, 192, 45, 0.08);
  border-radius: 8px;
  padding: 10px;
  border: 1px dashed rgba(251, 192, 45, 0.3);
}

.fortune-poem {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 2;
  text-align: center;
  color: #fff;
  white-space: pre-line;
  margin-bottom: 25px;
  letter-spacing: 3px;
}

.fortune-story {
  background: rgba(255,255,255,0.03);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid var(--temple-red);
  font-size: 0.95rem;
  line-height: 1.5;
}

.fortune-story strong {
  color: var(--temple-gold);
}

.fortune-translation {
  line-height: 1.6;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.fortune-translation strong {
  color: #fff;
  display: block;
  margin-bottom: 6px;
}

/* Advice panel */
.fortune-details-panel h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--temple-gold);
}

.advice-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.advice-list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 12px;
}

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

.advice-list .label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.advice-list .label i {
  color: var(--temple-red);
}

.advice-list .val {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  padding-left: 20px;
}

/* Talisman Generator */
.talisman-generator-box {
  background: rgba(217, 56, 58, 0.05);
  border: 1px solid rgba(217, 56, 58, 0.25);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  margin-bottom: 30px;
}

.talisman-generator-box h4 {
  font-size: 1.25rem;
  color: var(--temple-gold);
  margin-bottom: 8px;
}

.talisman-generator-box p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.talisman-input-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto 25px auto;
}

.talisman-input-row input {
  flex: 1;
  background: rgba(4, 8, 20, 0.5);
  border: 1px solid rgba(217, 56, 58, 0.4);
  padding: 10px 15px;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  text-align: center;
  font-size: 1rem;
}

.talisman-input-row input:focus {
  outline: none;
  border-color: var(--temple-gold);
  box-shadow: 0 0 8px rgba(251, 192, 45, 0.3);
}

.canvas-wrapper {
  margin: 20px auto 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fade-in 0.5s ease;
}

#talismanCanvas {
  background-color: #1a0808;
  border: 3px solid var(--temple-gold);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  max-width: 100%;
}

.download-row {
  margin-top: 15px;
}

/* ITINERARY PLANNER */
.planner-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  align-items: start;
}

.planner-sidebar {
  padding: 24px;
}

.planner-sidebar h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-guide {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.planner-attractions-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.planner-spot-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.planner-spot-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--blue-tears-glow);
}

.spot-item-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spot-item-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.spot-item-details .island-tag {
  font-size: 0.75rem;
  color: var(--blue-tears-glow);
}

.add-spot-btn {
  background: rgba(0, 229, 255, 0.1);
  border: 1px dashed rgba(0, 229, 255, 0.4);
  color: var(--blue-tears-glow);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.add-spot-btn:hover {
  background: var(--blue-tears-glow);
  color: #040814;
  transform: scale(1.1);
}

.planner-schedule {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.day-bucket {
  padding: 24px;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 12px;
  margin-bottom: 15px;
}

.day-header h3 {
  font-size: 1.15rem;
  color: var(--blue-tears-glow);
}

.clear-day-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 4px;
}

.clear-day-btn:hover {
  color: var(--temple-red-glow);
}

.day-spots-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 60px;
  align-items: center;
}

.empty-placeholder {
  font-size: 0.85rem;
  color: var(--stone-gray);
  width: 100%;
  text-align: center;
  padding: 15px 0;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.scheduled-spot-badge {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 30px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  animation: scale-up 0.3s forwards;
}

.remove-spot-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
}

.remove-spot-btn:hover {
  color: var(--temple-red-glow);
}

.schedule-summary {
  padding: 24px;
  border-color: rgba(251, 192, 45, 0.15);
}

.schedule-summary h3 {
  font-size: 1.1rem;
  color: var(--temple-gold);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-summary p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* FOOTER */
.main-footer {
  margin-top: 60px;
  padding: 40px 5%;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(4, 8, 20, 0.9);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--blue-tears-glow);
}

.copyright {
  color: var(--stone-gray);
  font-size: 0.8rem;
}

/* KEYFRAMES & ANIMATIONS */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scale-up {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 229, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}

@keyframes float-glow {
  0% { transform: translate(-10%, -10%) scale(1); }
  100% { transform: translate(10%, 10%) scale(1.1); }
}

@keyframes glow-pulse {
  from { opacity: 0.6; filter: drop-shadow(0 0 2px red); }
  to { opacity: 1; filter: drop-shadow(0 0 10px #ff7675); }
}

@keyframes smoke-rise {
  0% {
    transform: translateY(0) scale(0.8) skewX(0deg);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  50% {
    transform: translateY(-25px) scale(1.1) skewX(8deg);
    opacity: 0.4;
  }
  100% {
    transform: translateY(-50px) scale(1.5) skewX(-8deg);
    opacity: 0;
  }
}

/* 筊杯拋擲與翻轉 CSS 3D 動態 */
@keyframes block-spin-left {
  0% { transform: translateY(0) rotate(-90deg) rotateX(0deg) rotateY(0deg); }
  30% { transform: translateY(-70px) rotate(45deg) rotateX(180deg) rotateY(360deg); }
  70% { transform: translateY(-20px) rotate(180deg) rotateX(540deg) rotateY(720deg); }
  100% { transform: translateY(0) rotate(-90deg) rotateX(1080deg) rotateY(1080deg); }
}

@keyframes block-spin-right {
  0% { transform: translateY(0) rotate(90deg) rotateX(0deg) rotateY(0deg); }
  30% { transform: translateY(-80px) rotate(-45deg) rotateX(360deg) rotateY(180deg); }
  70% { transform: translateY(-30px) rotate(220deg) rotateX(720deg) rotateY(540deg); }
  100% { transform: translateY(0) rotate(90deg) rotateX(1080deg) rotateY(1080deg); }
}

@keyframes block-bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

/* 籤筒搖晃 */
@keyframes cylinder-shake {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(-8deg) translate(-5px, 2px); }
  40% { transform: rotate(12deg) translate(5px, -2px); }
  60% { transform: rotate(-10deg) translate(-3px, 0); }
  80% { transform: rotate(8deg) translate(3px, 1px); }
  100% { transform: rotate(0deg); }
}

/* 籤條彈出 */
@keyframes stick-eject {
  0% {
    transform: translateY(100px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* MEDIA QUERIES FOR RESPONSIVE DESIGN */
@media (max-width: 968px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  
  .hero-text-content h1 {
    font-size: 2.8rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-visual-card {
    height: 320px;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .planner-layout {
    grid-template-columns: 1fr;
  }
  
  .fortune-card-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .fortune-main-panel {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-right: 0;
    padding-bottom: 30px;
  }
}

@media (max-width: 600px) {
  .main-header {
    padding: 0 15px;
  }
  
  .logo-text {
    display: none; /* Only show icon on very small screens */
  }
  
  .nav-item {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  
  .cta-nav-btn {
    display: none; /* Hide shortcut CTA on mobile */
  }
  
  .hero-text-content h1 {
    font-size: 2.2rem;
  }
  
  .temple-card {
    padding: 20px 15px;
  }
  
  .blocks-container {
    gap: 20px;
  }
  
  .cup-block {
    width: 60px;
    height: 30px;
  }
}
