/* ===============================
   🍂 全站通用設定（字體與主色調）
   =============================== */
   body {
    font-family: "Chocolate Classical Sans","Noto Serif TC", "微軟正黑體", serif;
    color: #3b2b1c;
    background-color: #fdf6e3;
}
/* 奶油侘寂風：radio button 選中樣式 */
.ui-controlgroup .ui-btn.ui-btn-active {
  background-color: #3D7C6D !important; /* 奶茶焦糖色 */
  color:  #ffffff!important;           /* 白字 */
  border-color: #3D7C6D !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

/* 未選中按鈕樣式 */
.ui-controlgroup .ui-btn {
  background-color: #fcf8f3 !important; /* 奶油米底色 */
  color: #3b2b1c !important;           /* 深棕色文字 */
  border: 1px solid #e0d8c0 !important;
  text-shadow: none !important;
  font-weight: bold;
}
/* 🧽 清除 jQuery Mobile 的 .ui-field-contain 樣式 */
.ui-field-contain {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: none !important;
}


/* ===============================
   🍁 Footer 樣式
   =============================== */
.footer-bar {
    text-align: center;
    padding: 25px 0;
    background: #f8f9fa;
    font-size: 14px;
    color: #444;
}

.footer-bar a {
    color: #555;
    text-decoration: none;
    margin: 0 10px;
    display: inline-block;
    font-weight: 500;
}

.footer-bar a:hover {
    color: #D4A373;
}
.footer-wrapper {
}

.footer-nav-main {
  text-align: center;
  font-size: 15px;
  margin-bottom: 6px;
}

.footer-nav-main a {
  color: #4a4436;
  text-decoration: none;
  margin: 0 8px;
  transition: color 0.3s ease;
}

.footer-nav-main a:hover {
  color: #7e6651;
}
.footer-nav-main a:visited{
  color: #4a4436;
}
.footer-legal {
  margin-top: 13px;
  text-align: center;
  font-size: 13px;
  color: #999;
}

.footer-legal a {
  color: #999;
  text-decoration: none;
  margin: 0 4px;
}

.footer-legal a:hover {
  color: #555;
}
.footer-legal a:visited{
  color: #999;
}

/* ===============================
   📌 命理結果標題區（例如：請在下方輸入車牌）
   =============================== */
#result1 {
    font-size: 2em;
    font-weight: bold;
}

#result2 {
    font-size: 1em;
    color: #5A4636;
}

/* ===============================
   🧧 命理解釋卡片外框（共用卡片）
   =============================== */
.result-card {
    background: #FFFFFF;
    border: 2px solid #e0d8c0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* ===============================
   ⭐️ 命理分數徽章（吉／兇／平）
   =============================== */
.fortune-score-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.fortune-badge {
    font-size: 2rem;
    font-weight: bold;
    color: #FFFFFF;
    border-radius: 10px;
    padding: 12px 20px;
    width: fit-content;
}

.fortune-good {
    background-color: #4CAF50;
}

.fortune-bad {
    background-color: #D32F2F;
}

.fortune-neutral {
    background-color: #9E9E9E;
    color: #fff;
}

/* ===============================
   🚗 車牌與命理分數展示
   =============================== */
.fortune-header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;                    /* 間距稍大，更舒適 */
    margin: 24px 0;
    padding: 0 12px;
}

.header-item {
    border-radius: 16px;
    padding: 14px 18px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.header-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* 分數 - 最大、最暖 */
.score-box {
    background: linear-gradient(135deg, #FFF3E0, #FFE8D0);
    padding: 20px 32px;
    min-width: 120px;
}
.score-box .header-label {
    font-size: 1.1rem;
    color: #A67C52;
    margin-bottom: 6px;
}
.score-box .header-value {
    font-size: 3.4rem;
    font-weight: 900;
    color: #D4A574;
    letter-spacing: 2px;
}

/* 車牌 - 灰底區別 */
.plate-box {
    background-color: #F5F5F5;
    padding: 16px 28px;
    border: 2px solid #E0E0E0;
}
.plate-box .header-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    letter-spacing: 3px;
}

/* 幸運顏色 - 溫柔綠 */
.color-box {
    background: linear-gradient(135deg, #E8F5E9, #DCF0DD);
    border: 1px solid #A5D6A7;
}
.color-box .header-label {
    font-size: 0.95rem;
    color: #4CAF50;
}
.color-box .header-value {
    font-size: 1.7rem;
    font-weight: bold;
    color: #388E3C;
}

/* 幸運數字 - 清新藍 */
.number-box {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    border: 1px solid #90CAF9;
}
.number-box .header-label {
    font-size: 0.95rem;
    color: #42A5F5;
}
.number-box .header-value {
    font-size: 1.7rem;
    font-weight: bold;
    color: #1976D2;
}

/* 守護靈獸 - 神秘紫紅 */
.beast-box {
    background: linear-gradient(135deg, #FDE8F5, #F3E0EE);
    border: 1px solid #CE93D8;
}
.beast-box .header-label {
    font-size: 0.95rem;
    color: #AB47BC;
}
.beast-box .header-value {
    font-size: 1.9rem;
    font-weight: bold;
    color: #8E24AA;
    letter-spacing: 1px;
}

/* 手機版調整 */
@media (max-width: 768px) {
    .fortune-header {
        gap: 12px;
    }
    .score-box {
        padding: 16px 24px;
    }
    .score-box .header-value {
        font-size: 3rem;
    }
    .header-item {
        padding: 12px 16px;
    }
    .header-value {
        font-size: 1.5rem !important;
    }
    .beast {
        font-size: 1.7rem !important;
    }
}

/* ===============================
   🧾 詩籤與內容解釋區
   =============================== */
.car-number {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.poem {
    font-size: 1.2rem;
    font-weight: bold;
    color: #8B5E3C;
    margin-top: 15px;
    padding: 10px;
    background: #FDF6E3;
    border-radius: 8px;
}

.poem-content {
    font-size: 1.5rem;
    font-family: "LXGW WenKai Mono TC", sans-serif;
    line-height: 1.6;
    color: #5A4636;
    margin: 20px 0;
}

/* ===============================
   📖 命理解釋段落（左邊有色條）
   =============================== */
.interpretation {
    margin-top: 15px;
    text-align: left;
    background: #FFF;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid #D4A373;
}

.interpretation p {
    font-size: 1rem;
    margin: 5px 0;
    line-height: 1.6;
    color: #5A4636;
}

/* ===============================
   ✨ 星星評分區塊
   =============================== */
.stars {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-direction: row-reverse;
}

.stars input {
    display: none;
}

.stars label {
    font-size: 2em;
    color: #ccc;
    cursor: pointer;
    transition: color 0.3s;
}

/* 點選後的星星 */
.stars input:checked ~ label {
    color: #f39c12;
}

/* 滑鼠懸停星星 */
.stars label:hover,
.stars label:hover ~ label {
    color: #f39c12;
}

/* 小螢幕上的星星大小調整（emm 打錯） */
@media (max-width: 768px) {
    .stars label {
        font-size: 2.5em; /* 修正原本是 emm 打錯了 */
    }
}

@media (min-width: 769px) {
    .stars label {
        font-size: 2.5em;
    }
}

/* ⭐️ 評分送出按鈕 */
#submitRating {
    width: 100%;
    padding: 14px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    background-color: hsl(148, 25%, 88%);
    color: hsl(148, 25%, 28%);
    cursor: pointer;
    transition: background-color 0.3s;
}
#submitRating:hover {
    background-color: hsl(151, 20%, 79%);
}

/* ===============================
   🧾 補充：文字段落樣式
   =============================== */
.fortune-text-section {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    text-align: left;
}

.fortune-text-section h3 {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #444;
    border-bottom: 2px solid #e0d8c0;
    padding-bottom: 0.5rem;
}

.fortune-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #666;
}

.aspect {
    margin-bottom: 0.625rem;
}

.aspect-title {
    font-weight: bold;
    color: #555;
    margin-right: 0.3125rem;
}

/* ===============================
   🖼️ 命理解釋圖像區塊
   =============================== */
.image-container {
    margin: 0 auto 1.5rem auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: inline-block;
}

.image-container img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: inherit;
}
/* 記住車牌 */
/* ✅ 奶油侘寂風 Checkbox：記住車牌 */
#rememberLicense {
  appearance: none;              /* 移除原生樣式 */
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #3D7C6D;     /* 墨綠邊框 */
  border-radius: 50%;            /* 圓形框 */
  background-color: transparent; /* 無背景 */
  cursor: pointer;
  vertical-align: middle;
  position: relative;
  transition: all 0.2s ease;
}

/* ✅ 被選取時的背景 */
#rememberLicense:checked {
  background-color: #3D7C6D;
}

/* ✅ 勾勾符號 */
#rememberLicense:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);

  color: #F6F1EB;                /* 奶油白 */
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
}

/* 第一區塊：車牌推薦（無外框） */
.plate-recommend-section {
    margin-bottom: 3rem;
    padding: 1.5rem 0;
    text-align: center;                  /* 整體置中更優雅 */
}

.plate-recommend-section h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: #444;
}

.plate-intro {
    font-size: 1.15rem;
    line-height: 2;
    color: #555;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.info-tag {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    margin: 5px 0;
    border-radius: 16px;
    font-weight: bold;
    font-size: 1.15rem;
    text-align: center;
    min-width: 180px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

/* 主命數字標籤 - 尊貴金色漸層 */
.life-path-tag {
    background: linear-gradient(135deg, #fffbe6 0%, #fff0c2 100%);
    color: #b8860b;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.life-path-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 3px;
    border-radius: 16px;
    background: linear-gradient(45deg, #ffd700, #f7d08a, #d4af37);
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
/* 五行屬性標籤 - 保留原顏色，但加上金邊提升質感 */
.element-tag {
    padding: 0.7rem 1.6rem;
    margin: 0.8rem 0;
    font-size: 1.15rem;
    min-width: 180px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.element-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 3px;
    border-radius: 16px;
    background: linear-gradient(45deg, #d4af37, #ffd700, #d4af37);
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* 懸停效果（可選） */
.info-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* 五行顏色標籤（不變） */
.element-wood { background: #d0e8d0; color: #3a6b3a; border: 1px solid #a8cfa8; }
.element-fire { background: #ffe0e0; color: #a33; border: 1px solid #ffb3b3; }
.element-earth { background: #fff0d9; color: #996633; border: 1px solid #e6c8a0; }
.element-metal { background: #e8e8e8; color: #555; border: 1px solid #ccc; }
.element-water { background: #e0e8ff; color: #2a4a8c; border: 1px solid #b3c8ff; }

/* 車牌網格 */
.plates-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 ;
}

@media (min-width: 640px) {
    .plates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .plates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 車牌卡片 - 唯一有漂亮外框的元素 */
.plate-card {
    background: #ffffff;
    padding: 1.8rem 1rem;
    border-radius: 18px;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    color: #222;
    letter-spacing: 3px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
}

/* 手機微調 */
@media (max-width: 480px) {
    .plate-card {
        font-size: 26px;
        padding: 1.6rem 1rem;
    }
}

/* 華麗金色漸層邊框（唯一外框焦點） */
.plate-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 5px;
    border-radius: 18px;
    background: linear-gradient(45deg, #d4af37, #ffd700, #f7d08a, #d4af37);
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.plate-card:hover,
.plate-card:active {
    transform: translateY(-10px) scale(1.04);
    box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

/* 第二區塊：象徵意義（無外框） */
.symbolism-section {
    margin-bottom: 1.2rem;
    padding: 0;
    text-align: left;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.symbolism-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    color: #444;
    text-align: center;
}
.symbolism-title-tag {
    display: inline-block;
    padding: 1rem 2rem;
    margin:0;
    border-radius: 20px;
    background: linear-gradient(135deg, #fffbe6 0%, #fff4d1 100%);
    font-size: 1.6rem;
    font-weight: bold;
    color: #b8860b;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

/* 華麗金色漸層邊框（與其他元素統一風格） */
.symbolism-title-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 4px;
    border-radius: 20px;
    background: linear-gradient(45deg, #d4af37, #ffd700, #f7d08a, #d4af37);
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.symbolism-title-tag:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}
.fortune-text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #666;
}

/* 🧁 奶油風下拉選單 */
#zodiac {
  background-color: #fcf8f3;
  color: #3B2B1C;
  border: 1px solid #e0d8c0;
  border-radius: 8px;
  padding: 10px 40px 10px 12px;
  font-size: 1em;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%233B2B1C' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

#zodiac:focus {
  border-color: #C69763;
  box-shadow: 0 0 0 2px rgba(198, 151, 99, 0.2);
  outline: none;
}


/* 📋 表單主要區塊（ul） */
#formplate{
  background-color: #fcf8f3;   /* 更柔一點的奶油色 */
  border: 1px solid #e0d8c0;   /* 奶茶邊框 */
  border-radius: 8px;
  padding: 20px;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
#wantway {
    background: #F7F4EF;
    border: 1px solid #DCD5CE;
    color: #3E3A36;
    border-radius: 6px;
    padding: 6px;
}

#wantway:focus {
    border-color: #D8C7A6;
    background: #E3D7C6;
}
#qstatesf{
    background-color: #fcf8f3;   /* 更柔一點的奶油色 */
  border: 1px solid #e0d8c0;   /* 奶茶邊框 */
  border-radius: 8px;
  padding: 20px;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: center;
}
/* 🧁 奶茶色按鈕：「好」 */
#okgo {
    margin-top: 15px;
  background-color:  hsl(28, 39%, 73%);
  color: white;
  font-weight: bold;
  border: none;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  padding: 12px 0;
  width: 100%;
  font-size: 1.1em;
  box-shadow: none;
  cursor: pointer;
}

#okgo:hover {
  background-color:hsl(32, 46%, 78%);
}

/* 🍃 抹茶綠按鈕：「幫我選」 */
#helpmes{
    margin-top: 15px;
  background-color: hsl(148, 25%, 88%);
  color: hsl(148, 25%, 28%);
  font-weight: bold;
  border: none;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 12px 0;
  width: 100%;
  font-size: 1.1em;
  box-shadow: none;
  cursor: pointer;
}

#helpmes:hover{
  background-color: hsl(151, 20%, 79%);
}

 .input-underline {
  background-color: transparent;      /* 無背景 */
  border: none;                       /* 移除整體邊框 */
  border-bottom: 2px solid #e0d8c0;   /* 僅保留底線，淡米色 */
  border-radius: 0;                   /* 無圓角 */
  padding: 8px 4px;
  font-size: 1.6em;
  color: #3B2B1C;
  font-family: "LXGW WenKai Mono TC", sans-serif;
  box-shadow: none;
  outline: none;                      /* 點擊不出現藍邊 */
  transition: border-color 0.3s;
  max-width: 200px;
}
.input-underline:focus {
  border-bottom: 2px solid #3D7C6D;   /* 對焦時換成綠色底線 */
}
#doheart{color:tomato;}
#dook{margin-top: 10px;
  background-color:  hsl(28, 39%, 73%);
  color: white;
  border: none;
  padding: 12px 0;
  width: 100%;
  font-size: 1.1em;
  box-shadow: none;
  text-shadow: none;
  cursor: pointer;
}
#dook:hover {
  background-color:hsl(32, 46%, 78%);
}
#donext{
 margin-top: 10px;
 text-shadow: none;
  background-color: hsl(148, 25%, 88%);
  color: hsl(148, 25%, 28%);
  border: none;
  padding: 12px 0;
  width: 100%;
  font-size: 1.1em;
  box-shadow: none;
  cursor: pointer;
}
#donext:hover{
  background-color: hsl(151, 20%, 79%);
}
#contactme-ok{
 margin-top: 15px;
  background-color:  hsl(28, 39%, 73%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 0;
  width: 100%;
  font-size: 1.1em;
  box-shadow: none;
  cursor: pointer;
  text-shadow: none;
}

#contactme-ok:hover {
  background-color:hsl(32, 46%, 78%);
}

.matcha-close-btn {
    width: 100%;
  display: inline-block;
  background-color: hsl(148, 25%, 88%); /* 淺抹茶綠 */
  color: hsl(148, 25%, 28%);           /* 抹茶深綠 */
  border: none;
  border-radius: 8px;
  padding: 12px 0;
  font-size: 1.1em;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  font-weight: bold;
  cursor: pointer;
}

.matcha-close-btn:hover {
  background-color: hsl(148, 25%, 78%);
  color: hsl(148, 25%, 28%);
}

.badge-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 4px; /* 避免 radio 緊貼 */
}

.badge-new {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #e94e77;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight:normal;
  text-shadow: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  z-index: 20;
}

/* 讀取光球 */
.orb-system {
    width:200px;
    height:200px;
    position:relative;
    margin: 0 auto;
  }

  /* 主光球 */
  .core {
    position:absolute;
    width:80px;
    height:80px;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    background: radial-gradient(circle, rgba(255,245,230,1) 0%, rgba(240,223,200,0.9) 40%, rgba(220,205,185,0.3) 70%, rgba(220,205,185,0) 100%);
    border-radius:50%;
    animation: breathing 3s ease-in-out infinite;
    box-shadow:0 0 20px rgba(255,240,220,0.75), 0 0 35px rgba(255,240,220,0.55);
    display:flex;
    justify-content:center;
    align-items:center;
  }

  @keyframes breathing {
    0%{transform:translate(-50%,-50%) scale(1);}
    50%{transform:translate(-50%,-50%) scale(1.16);}
    100%{transform:translate(-50%,-50%) scale(1);}
  }

  /* 衛星 */
  .orbit {
    position:absolute;
    width:150px;
    height:150px;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    animation: orbit-rotate 8s linear infinite;
  }
  .orbit2 {
    width:110px;
    height:110px;
    animation-duration:5.5s;
    animation-direction: reverse;
  }
  @keyframes orbit-rotate {
    from{transform:translate(-50%,-50%) rotate(0deg);}
    to{transform:translate(-50%,-50%) rotate(360deg);}
  }
  .satellite {
    position:absolute;
    width:18px;
    height:18px;
    left:50%;
    top:0%;
    transform:translate(-50%,-50%);
    background: radial-gradient(circle, rgba(255,240,210,1) 0%, rgba(255,240,210,0.6) 60%, rgba(255,240,210,0) 100%);
    border-radius:50%;
    box-shadow:0 0 8px rgba(255,230,200,0.9), 0 0 14px rgba(255,230,200,0.6);
  }

  /* 讀取環 */
  .loader-ring {
    position:absolute;
    width:60px;
    height:60px;
    border-radius:50%;
    border:6px solid rgba(255,240,210,0.2);
    border-top-color: rgba(255,240,210,0.9);
    animation: spin 1s linear infinite;
    box-sizing:border-box;
  }

  @keyframes spin {
    0%{transform: rotate(0deg);}
    100%{transform: rotate(360deg);}
  }

  /* 結果提示 */
  .result-box {
    position:absolute;
    top:110%;
    width:220px;
    padding:12px;
    background:#fff;
    border-radius:12px;
    box-shadow:0 4px 12px rgba(10,10,10,0.08);
    text-align:center;
    opacity:0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform:translateY(12px);
    font-weight:600;
  }
  .result-box.show {
    opacity:1;
    transform:translateY(0);
  }

/* 整體容器 */
.rating-wrapper {
    text-align: center;
    padding: 28px 0;
    margin-top: 10px;
}

/* 主標題 */
.rating-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #333;
}

/* 星星 */
.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.stars input { display: none; }

.star {
    cursor: pointer;
    font-size: 34px;
    color: #d5d5d5;
    transition: 0.2s;
}

.star.hover,
.stars input:checked + label,
.stars input:checked ~ label {
    color: #f7b500;
    transform: scale(1.08);
}

/* 送出按鈕 */
.submitRating {
    background: #d9e7df;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
    width: 70%;
    max-width: 220px;
    font-size: 16px;
}

/* 分享區塊 */
.share-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    text-shadow:none !important;
    color: #fff !important; 
    margin:2px;
}
.share-btn:hover {
    opacity: 0.85;
}
.fb-share {
    background: #1877f2;
}

.line-share {
    background: #00b900;
}
.other-share{
    background: #baa087;
    border:0px;
}
.pic-share{
    background: #ff9872;
    border:0px;
}
.font-size-controller {
    /* 關鍵：固定定位 */
    position: fixed;                  /* 固定在視窗上，不隨頁面滾動 */
    right: 15px;                      /* 距離右邊 15px（手機不會太邊緣） */
    bottom: 0;                         /* 從頂部 50% 開始 */
    transform: translateY(-50%);      /* 向上位移自己高度的一半 → 完美垂直置中 */
    z-index: 1000;                    /* 確保在最上層，不被其他元素蓋住 */
    
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    padding: 12px 8px;                /* 內距讓按鈕更有呼吸感 */
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    gap: 12px;                        /* 按鈕之間的間距 */
}

.font-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #FF6B35;      /* 橘色，跟你截圖按鈕同色系 */
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.font-btn:hover {
    transform: scale(1.1);
    background: #FF8E53;
}

.font-btn:active {
    transform: scale(0.95);
}

/* ================== 浮動容器 ================== */
#chat-floating {
    position: fixed;
    bottom: 20px;
    right: 10px;
    z-index: 9999;
}

/* 浮動按鈕 */
#chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;

    width: 60px;
    height: 60px;
    background: #f5f0e6;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
}

/* ================== 聊天框（精緻小版） ================== */
#chat-box {
    position: fixed;
    bottom: 20px;
    right: 10px;
    z-index: 10000;
    width: 275px;                  /* 從 280 → 260，更小巧 */
    height: 440px;                 /* 從 420 → 380，更精緻 */
    background: #f5f0e6;
    border: 1px solid #C69C6D;      /* 保留細邊框，增加質感 */
    border-radius: 24px;           /* 圓角稍小一點，更緊緻 */
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);  /* 陰影稍濃，更立體但不重 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#chat-box.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header */
.chat-header {
    background: #e8e0d5;
    padding: 14px 16px;            /* 內距縮小，更緊湊 */
    font-size: 16px;               /* 標題字小一點 */
    color: #8a7f70;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.close-btn {
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
}

/* ================== 訊息區 ================== */
.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px;            /* 內距縮小，空間更有效利用 */
    display: flex;
    flex-direction: column;
    gap: 10px;                     /* 訊息間距從 12 → 10，更緊緻 */
}

/* scrollbar 更細緻 */
.chat-messages::-webkit-scrollbar {
    width: 5px;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: #d8d0c8;
    border-radius: 4px;
}

/* ================== 訊息泡泡（精緻版） ================== */
.message {
    max-width: 82%;                /* 稍微放寬，讓長訊息更好排版 */
    padding: 10px 14px;            /* 內距縮小，更輕盈 */
    border-radius: 18px;           /* 圓角從 20 → 18，更小巧 */
    font-size: 14.5px;             /* 字體微縮，更精緻 */
    line-height: 1.55;
}

/* 使用者訊息 */
.user-message {
    align-self: flex-end;
    background: #e8e0d5;
    color: #6a5d50;
    border-radius: 18px 18px 4px 18px;     /* 右下小尖角 */
}

/* AI 訊息 */
.ai-message {
    align-self: flex-start;
    position: relative;
    background: #ffffff;
    color: #6a5d50;
    border-radius: 18px 18px 18px 4px;     /* 左下小尖角 */
    box-shadow: 0 2px 6px rgba(0,0,0,0.06); /* 陰影更輕 */
}

/* ================== 輸入區（精緻小版） ================== */
.chat-input {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 12px 14px;            /* 左右 padding 從 16px → 14px，釋放空間 */
    background: #e8e0d5;
    border-top: 1px solid #d8d0c8;
    gap: 8px;                      /* 間距從 10px → 8px，更緊湊 */
}

#message-input {
    flex: 1;
    padding: 10px 14px;            /* 內距縮小（上下10px、左右14px），輸入框明顯變窄 */
    background: #ffffff;
    border: none;
    border-radius: 24px;           /* 圓角配合整體微調 */
    font-size: 14px;               /* 字也微微小一點，更協調 */
    outline: none;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

#message-input:focus {
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.12);
}

#message-input::placeholder {
    color: #a8a095;
    font-size: 13.5px;
}

/* 「好」按鈕 */
#send-text {
    padding: 10px 16px;            /* 上下內距縮小，按鈕變扁平精緻 */
    background: #d8d0c8;
    color: #7a6f63;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 52px;               /* 確保「好」字有足夠空間 */
}

#send-text:hover {
    background: #e2dad2;
    transform: translateY(-1px);
    box-shadow: 0 3px 7px rgba(0,0,0,0.1);
}

#send-text:active {
    transform: translateY(0);
}