/* 基本重置與版型設定 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #fef8e6, #ffe4b5);
  color: #5c5c5c;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}

/* Splash 畫面 */
#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: url('images/hero-placeholder.jpg') center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
  animation: splashFadeOut 1.5s ease-out 2.5s forwards; /* 2.5秒後開始淡出 */
}
.splash-content {
  text-align: center;
  background: rgba(0,0,0,0.5);
  padding: 20px;
  border-radius: 5px;
}
.splash-store {
  font-size: 28px; /* 調小字型 */
  color: #fff;
  margin-bottom: 10px;
  /* 淡入再淡出動畫，總共 4.5 秒 */
  animation: fadeInOut 4.5s ease;
}
.splash-slogan {
  font-size: 18px;
  color: #eee;
}

/* splash 淡出動畫 */
@keyframes splashFadeOut {
  to { opacity: 0; visibility: hidden; }
}

/* 尋光屋淡入淡出動畫 */
@keyframes fadeInOut {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* Main Content 初始隱藏 */
.hidden {
  display: none;
}
#mainContent {
  display: none;
}

/* Hero 區塊 */
.hero {
  position: relative;
  width: 100%;
  height: 60vh;
  background: url('images/hero-placeholder.jpg') center/cover no-repeat;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,248,240,0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}
/* 調整 Hero 內部文字排列為靠左 */
.conversation {
  text-align: left;
  max-width: 90%;
}

/* 靈魂解讀操作說明 */
.soul-title {
  font-size: 20px;
  color: #b85c38;
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeIn 2s forwards;
  text-align: center; /* 靈魂解讀標題置中 */
}
.soul-text {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 10px;
  opacity: 0;
}
/* 依序淡入 */
.first-line {
  animation: fadeIn 2s forwards;
  animation-delay: 2s;
}
.second-line {
  animation: fadeIn 2s forwards;
  animation-delay: 4s;
}

/* 問題解讀操作說明 */
.question-instructions {
  max-width: 600px;
  margin: 40px auto;
  background: rgba(255,255,255,0.95);
  border-left: 4px solid #b85c38;
  padding: 20px;
  text-align: left;
  font-family: "Georgia", serif;
  color: #5c3a21;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  opacity: 0;
  animation: fadeIn 2s forwards;
  animation-delay: 0.5s;
}
.question-instructions .static-text {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 10px;
}

/* 按鈕區 */
.btn-container {
  margin: 20px;
  text-align: center; /* 按鈕置中 */
}
button {
  padding: 10px 15px;
  margin: 10px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.styled-btn {
  background-color: #d4a373;
  color: white;
}
.red-btn {
  background-color: #ff3333;
  color: white;
}
.yellow-btn {
  background-color: #ffcc00;
  color: white;
}
/* 新增綠色按鈕 */
.green-btn {
  background-color: #66bb6a; /* 綠色 */
  color: white;
}
button:hover {
  opacity: 0.8;
}

/* 領域按鈕與浮現效果 */
.btn-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 3px 0;
  animation: fadeInUp 1s forwards;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* sticky 區塊 */
.sticky-section {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 2px solid #d4a373;
  padding: 15px 0;
  z-index: 10;
}
.sticky-section h2 {
  color: #b85c38;
  margin-bottom: 10px;
  text-align: center; /* 靈魂解讀標題置中 */
}

/* 卡片樣式 */
.cards {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}
#soulCards {
  display: flex;
  flex-direction: row;
  animation: magicReveal 1s ease-out;
}
.card {
  width: 100px;
  height: 150px;
  perspective: 600px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  animation: magicReveal 1s ease-out;
}
@keyframes magicReveal {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}
.card.flipped .card-inner {
  transform: rotateY(180deg);
}
.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.card-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
}
.card-back {
  transform: rotateY(180deg);
  border-radius: 5px;
  overflow: hidden;
}
.card-back img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
}

/* 滾動內容區 */
.scroll-content {
  padding: 20px;
}

/* 領域卡牌排列 */
/* 為各領域的牌容器建立新 class，改為垂直排列 */
.domain-cards-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 每個 row 內的卡牌排列 */
.cards-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  animation: magicReveal 1s ease-out;
}

/* 領域區塊標題與分隔線 */
#questionCards h3 {
  margin: 20px 0 5px;
  text-align: center; /* 領域標題置中 */
}
#questionCards hr {
  margin: 0 0 10px;
}

/* 2025 祝福牌 */
.blessing-container {
  margin: 20px auto;
  max-width: 600px;
  animation: magicReveal 1s ease-out;
  text-align: center; /* 祝福區塊置中 */
}
.blessing-card {
  margin-top: 15px;
  background: #fff;
  border: 2px solid #d4a373;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  animation: magicReveal 1s ease-out;
}
.couplets {
  display: flex;
  align-items: center;
  justify-content: center;
}
.couplets .left-couplet,
.couplets .right-couplet {
  background-color: #ff3333;
  color: white;
  padding: 10px;
  writing-mode: vertical-rl;
  font-size: 16px;
  border-radius: 5px;
  width: 40px;
  text-align: center;
}
.couplets .left-couplet {
  margin-right: 30px;
}
.couplets .right-couplet {
  margin-left: 30px;
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Media Query：針對手機版調整 */
@media (max-width: 768px) {
  .hero {
    height: 40vh;
  }
  .brand {
    top: 5px;
    left: 5px;
  }
  .store-name {
    font-size: 20px;
  }
  .store-slogan {
    font-size: 12px;
  }
  .soul-title {
    font-size: 18px;
  }
  .soul-text, .static-text {
    font-size: 14px;
  }
}
