/* =========================================
1. 基礎設定
========================================= */
body {
  background: linear-gradient(135deg, #fff9fa 0%, #ffe4e8 100%);
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: "Microsoft JhengHei", sans-serif;
  background-image: url('../assets/04.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
}

.container {
  text-align: center;
  padding: 2rem 3rem;
  max-width: 960px;
  width: 90%;
  margin: auto;
  background: transparent; 
  backdrop-filter: none; 
  -webkit-backdrop-filter: none; 
  border: none; 
  box-shadow: none; 
  border-radius: 30px; 
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.auth-subtitle {
    font-size: 1.25rem; 
    color: #594a4e;
    font-weight: 700; 
    letter-spacing: 2px; 
    text-shadow: 
      -1px -1px 0 #fff,  
       1px -1px 0 #fff,
      -1px  1px 0 #fff,
       1px  1px 0 #fff,
       0 0 8px rgba(255, 255, 255, 0.9); 
    margin: 0 auto;
}

.header {
  margin-bottom: 4rem;
}

h1 {
  font-size: 3.4rem;
  font-weight: 800;
  color: #ff8fa3; 
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 4px 15px rgba(255, 143, 163, 0.3); 
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-5px); opacity: 0.9; }
}

.tagline {
  font-size: 1.45rem;
  color: #b598a1;
  font-weight: 600;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.8rem;
  max-width: 800px;
  margin: 3.5rem auto 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid #ffb7c5;
  border-radius: 25px;
  padding: 12px 25px;
  font-size: 1.15rem;
  font-weight: bold;
  color: #d81b60;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 183, 197, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: fit-content;
  white-space: nowrap;
  text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
  text-decoration: none;
}

.petal-icon {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #ffdde1, #ff9a9e);
  border-radius: 0 50% 50% 50%;
  transform: rotate(45deg);
  box-shadow: 2px 2px 5px rgba(255, 154, 158, 0.6);
  transition: all 0.3s ease;
}

.menu-item:hover {
  background: linear-gradient(135deg, #ffb7c5, #ff69b4);
  color: white;
  border-color: transparent;
  transform: translateY(-5px); 
  box-shadow: 0 6px 15px rgba(255, 105, 180, 0.5);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.menu-item:hover .petal-icon {
  transform: rotate(30deg) scale(1.2);
  background: #fff;
  box-shadow: 0 0 5px rgba(255,255,255,0.8);
}

.navbar {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px);
  padding: 0.6rem 2rem; 
  position: sticky;
  top: 15px;
  z-index: 1000;
  width: 95%;
  max-width: 1200px;
  margin: 15px auto;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 15px rgba(224, 122, 154, 0.15);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-end; 
  align-items: center;
  position: relative; 
  min-height: 50px; 
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.logo {
  font-size: 1.8rem; 
  font-weight: 800;
  color: #ff8fa3; 
  text-decoration: none;
  text-shadow: 
    -1px -1px 0 #fff,  
     1px -1px 0 #fff,
    -1px  1px 0 #fff,
     1px  1px 0 #fff,
     0 4px 8px rgba(255, 143, 163, 0.4); 
  animation: breathe 4s ease-in-out infinite;
}

.nav-links a {
  background: linear-gradient(180deg, #fff 0%, #fff5f7 100%);
  color: #ff8fa3;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 8px 24px;
  border-radius: 30px;
  border: 2px solid #ffe4e8;
  box-shadow: 0 4px 0 #ffd1dc;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: #ff748c;
  transform: translateY(2px);
  box-shadow: 0 2px 0 #ffd1dc, 0 4px 10px rgba(255, 143, 163, 0.3);
  text-shadow: none;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notice-box {
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid #ffd1dc;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  margin: 3rem auto 0;
  width: 100%;
  max-width: 700px;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.8), 0 5px 15px rgba(224, 122, 154, 0.1);
}

.notice-header {
  font-size: 1.4rem;
  color: #a88d95;
  font-weight: 800;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.notice-icon {
  color: #ff8fa3; 
}

.notice-content {
  font-size: 1.35rem;
  color: #ff8fa3;
  font-weight: 700;
  letter-spacing: 2px;
}

.hero, .hero-wrapper, .tree-bg, .cta-orbit, .btn-orbit, .main-tree, .header, h1 {
  display: none;
}

/* =========================================
   🌟 轉場遮罩專屬設定 (修復首頁排版消失問題)
========================================= */
#page-transition {
    /* 1. 讓遮罩浮動於視窗上方，絕對不會推擠到原本的首頁元素 */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9997; /* 確保它能覆蓋整個網站 (原本的 navbar 是 1000) */
    
    /* 2. 背景圖片設定 */
    background-image: url('../assets/10.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* 3. 核心修復：預設為透明隱藏，且不阻擋滑鼠點擊 */
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.4s ease; /* 柔和的淡入淡出效果 */
}

/* 🌟 當 JavaScript 觸發轉場時，才顯示這個遮罩 */
#page-transition.transition-active {
    opacity: 1;
    pointer-events: auto; /* 轉場期間阻擋點擊，防止使用者亂按 */
}

/* =========================================
   🌟 轉場角色容器設定 (恢復橫向跑法，草地位置)
========================================= */
/* 🌟 設定角色容器的大小與初始位置 */
#dog-container {
    position: absolute;
    /* 🌟 將角色放置在畫面高度約 68% 的位置，讓他剛好踩在下方的草地上 */
    top: 68%;              
    /* 核心修改：角色水平翻轉，讓他面向右邊跑 */
    transform: translateY(-50%) scaleX(-1); 
    /* 初始位置：畫面左側外面 */
    left: -300px;          
    width: 250px;          
    height: 250px;
    z-index: 9999;
    opacity: 1;            /* 恢復直接顯示 */
    pointer-events: none;
}

/* 🌟 當 JS 觸發轉場時，執行橫向跑步動畫 */
.run-dog {
    /* 1.5 秒內完成跑步，線性移動 */
    animation: runRight 3s linear forwards; 
}

/* 🌟 從左側移動到右側的簡單位移 */
@keyframes runRight {
    0% {
        left: -300px;
    }
    100% {
        left: 100vw; /* 跑到右側畫面外 */
    }
}

/* =========================================
   🌟 轉場進度條樣式 (藤蔓風格版 - 精簡文字)
========================================= */
.custom-loader {
    position: absolute;
    bottom: 5%; 
    left: 50%; 
    transform: translateX(-50%);
    width: 85%; 
    max-width: 650px; 
    text-align: center;
    z-index: 9998; 
}

/* 🌟 進度條上方的文字排版 */
.loader-text-top {
    display: flex;
    /* 🌟 核心修改：將原本的 space-between 改為 center，讓剩下的文字置中 */
    justify-content: center; 
    color: #4e342e; /* 深咖啡色文字 */
    font-weight: 900;
    font-size: 1.1rem;
    margin-bottom: 8px;
    padding: 0 10px;
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
}

/* 🌟 藤蔓風格的外框 */
.custom-loader .transition-progress-wrapper.vine-style {
    position: relative;
    width: 100%;
    height: 24px;
    background-color: rgba(255, 228, 225, 0.9); 
    border: 4px solid #6d4c41; /* 樹幹般的深色邊框 */
    border-radius: 15px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 🌟 漸層進度條本體 */
.custom-loader .transition-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff748c, #d81b60); 
    width: 0%;
    border-radius: 10px; 
}

/* 🌟 當觸發轉場時，進度條在 1.5 秒內填滿 (配合剛剛改慢的狗狗跑動時間) */
.transition-active .transition-progress-fill {
    animation: fillProgress 3s linear forwards;
}

@keyframes fillProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}