* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Zen Maru Gothic", serif;
  font-weight: 400;
  font-style: normal;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(45deg, #2b2353, #1b1f3b, #16213e, #0f3460);
  background-size: 400% 400%;
  animation: bgMove 20s ease infinite;
  color: #333;
  overflow-x: hidden;
  position: relative;
  z-index: 0;
}

/* 動態背景波紋 */
@keyframes bgMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- 背景裝飾形狀 ---- */
.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: #ff6b6b;
  top: -100px;
  left: -100px;
  animation: float1 25s infinite;
}

.shape-2 {
  width: 350px;
  height: 350px;
  background: #feca57;
  bottom: -80px;
  right: -80px;
  animation: float2 30s infinite;
}

.shape-3 {
  width: 300px;
  height: 300px;
  background: #48dbfb;
  top: 50%;
  left: 60%;
  animation: float3 28s infinite;
}

.shape-4 {
  width: 250px;
  height: 250px;
  background: #ff9ff3;
  top: 20%;
  right: 20%;
  animation: float4 22s infinite;
}

.shape-5 {
  width: 200px;
  height: 200px;
  background: #54a0ff;
  bottom: 30%;
  left: 30%;
  animation: float5 18s infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 80px) scale(1.2); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-70px, -60px) scale(0.9); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 70px) scale(1.1); }
}
@keyframes float4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, -50px) scale(0.85); }
}
@keyframes float5 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, -80px) scale(1.15); }
}

/* ---- 主容器 ---- */
.container {
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 45px 30px;
  border-radius: 40px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  width: 850px;
  max-width: 95vw;
  position: relative;
  z-index: 10;
  transform: translateY(0);
}

/* ---- 電影開場動畫 ---- */
.title {
  font-size: 48px;
  font-weight: bold;
  background: linear-gradient(135deg, #fff3cd, #ffd8a8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
  letter-spacing: 3px;
  opacity: 0;
  transform: scale(0.3);
  animation: titleIntro 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  text-shadow: 0 0 30px rgba(255,255,200,0.5);
}

@keyframes titleIntro {
  0% { opacity: 0; transform: scale(0.3); filter: blur(10px); }
  50% { opacity: 1; transform: scale(1.05); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* 選擇框、結果列、按鈕依序浮現 */
.choices {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.line-box {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.1s forwards;
}

button {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.4s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- 選擇方塊 ---- */
.choice {
  flex: 1;
  min-width: 0;
  padding: 20px 15px;
  height: 110px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(15px);
  border-radius: 24px;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.choice:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.choice-text {
  display: inline-block;
  will-change: transform;
}

/* ---- 結果列 ---- */
.line-box {
  font-size: 28px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  font-weight: 600;
  letter-spacing: 1px;
}

/* ---- 按鈕 ---- */
button {
  padding: 16px 45px;
  font-size: 22px;
  font-weight: bold;
  color: #1b1f3b;
  background: linear-gradient(135deg, #ffddb0, #ffb7b7);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(255, 180, 120, 0.4);
  transition: all 0.3s ease;
  letter-spacing: 2px;
  margin-top: 10px;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(255, 160, 100, 0.6);
  background: linear-gradient(135deg, #ffd194, #ff9a9e);
}

button:active {
  transform: translateY(2px);
}

/* ---- 頁腳 ---- */
footer p {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  color: #ddd;
  width: 100%;
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 12px 0;
  font-size: 18px;
  letter-spacing: 1px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* ---- 彩帶容器 ---- */
#confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-burst 1.2s ease-out forwards;
}

@keyframes confetti-burst {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(0.4);
    opacity: 0;
  }
}

/* ---- 手機響應式 ---- */
@media (max-width: 650px) {
  .container { padding: 30px 15px; }
  .title { font-size: 34px; }
  .choices { flex-direction: column; gap: 15px; }
  .choice { height: 85px; font-size: 20px; }
  button { font-size: 18px; padding: 14px 35px; }
  .line-box { font-size: 22px; }
}