/* Reset & base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Helvetica Neue", sans-serif;
  line-height: 1.5;
  background: #fafafa;
  color: #333;
}
/* Logo */
.logo-link {
  display: inline-block;
  margin-left: 1rem;
}
.logo-img {
  height: 32px;
  vertical-align: middle;
}
/* header */
.site-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #5a3e85;
  color: #fff;
}
.menu-btn {
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  margin-right: 1rem;
}
.header-title {
  font-size: 1.25rem;
  font-weight: 500;
}

/* 側邊欄 */
.side-nav {
  position: fixed;
  top: 0; left: -250px;
  width: 250px;
  height: 100%;
  background: #3e3352;
  color: #fff;
  overflow-y: auto;
  transition: left 0.3s ease;
  z-index: 1000;
}
.side-nav.open {
  left: 0;
}
.side-nav ul {
  list-style: none;
  padding: 1rem;
}
.side-nav li + li {
  margin-top: 1rem;
}
.side-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
}
.side-nav a:hover {
  text-decoration: underline;
}

/* 遮罩 */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 900;
}
.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* 主內容區往右推移，若想要也可加 */

.site-main {
  transition: margin-left 0.3s ease;
}
.side-nav.open ~ .site-main {
  margin-left: 250px;
}
*/

/* Hero */
.hero {
  padding: 2rem 1rem;
  text-align: center;
  background: #e0f7ff;
}
.hero h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }

/* Content sections */
.content {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
}
.content h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.875rem;
  background: #f4f4f4;
}

/* Menu 開關 */
.menu-open .site-nav {
  display: flex;
}
/* calculator */
.calculator {
  padding: 1rem;
}
.calculator h2 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}
.form-group {
  margin-bottom: 0.75rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.25rem;
}
.form-group input {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.calculator button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  background: #5a3e85; /* 淺紫風格 */
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.calculator button:hover {
  background: #472d6b;
}
.result {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f9f9f9;
  border-radius: 4px;
}
.result p {
  margin: 0.5rem 0;
}
.win { color: #2a7f2a; }
.lose { color: #a12a2a; }
/* Home */
.home {
  padding: 1rem;
  text-align: center;
}
.home h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}
.home ul {
  list-style: disc inside;
  text-align: left;
  margin: 1rem auto;
  max-width: 300px;
}
.home-links {
  margin-top: 1.5rem;
}
.btn {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #5a3e85;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}
.btn:hover {
  background: #472d6b;
}
/* calculator */
.calculator {
  padding: 1rem;
}
.form-group {
  margin-bottom: 0.75rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.25rem;
}
.form-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.calculator button {
  width: 100%;
  padding: 0.75rem;
  background: #5a3e85;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.calculator button:hover {
  background: #472d6b;
}
.result {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f9f9f9;
  border-radius: 4px;
}
.win { color: #2a7f2a; }
.lose { color: #a12a2a; }

/* data */
.data {
  padding: 1rem;
}
.data h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}
.data-table th,
.data-table td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: center;
}
.data-table thead {
  background: #e0e0e0;
}
/* data */
.data h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.5rem;
}
.data-table th,
.data-table td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: center;
}
.data-table thead {
  background: #f0f0f0;
}
/* events */
.events {
  padding: 1rem;
}
.events h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  text-align: center;
}
.events-table {
  width: 100%;
  border-collapse: collapse;
}
.events-table th,
.events-table td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: center;
}
.events-table thead {
  background: #f0e6f6;  /* 淡紫調 */
}
.events-table tbody tr:nth-child(odd) {
  background: #fafafa;
}
/* Home */
.home {
  padding: 1rem;
}
.home-title {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
.home-desc {
  text-align: center;
  margin-bottom: 1rem;
  color: #555;
}

/* 卡片容器 */
.home-cards {
  display: grid;
  gap: 1rem;
  /* 行動版一欄，平板以上兩欄 */
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .home-cards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 900px) {
  .home-cards {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* 單張卡片 */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.card p {
  flex-grow: 1;
  color: #666;
  margin-bottom: 1rem;
}

/* 按鈕 */
.btn {
  display: inline-block;
  text-align: center;
  padding: 0.75rem 1rem;
  background: #5a3e85;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
}
.btn:hover {
  background: #472d6b;
}
/* 動畫背景容器 */
.animation-bg {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(to top, #1f1c34, #3e3552);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 雲霧元素 */
.cloud {
  position: absolute;
  bottom: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  filter: blur(20px);
  animation: float infinite ease-in-out;
}
.cloud.c1 {
  width: 200px; height: 80px;
  animation-duration: 20s;
  animation-delay: -2s;
  left: -20%;
}
.cloud.c2 {
  width: 300px; height: 100px;
  animation-duration: 30s;
  animation-delay: -5s;
  left: -40%;
}
.cloud.c3 {
  width: 150px; height: 60px;
  animation-duration: 25s;
  animation-delay: -8s;
  left: -10%;
}

@keyframes float {
  0%   { transform: translateX(0) translateY(0); opacity: 0.3; }
  50%  { transform: translateX(120vw) translateY(-20px); opacity: 0.5; }
  100% { transform: translateX(240vw) translateY(0); opacity: 0.3; }
}

/* 發光標題 */
.glow-title {
  position: absolute;
  color: #e0f8ff;
  font-size: 2rem;
  text-shadow:
    0 0 10px #a0e7ff,
    0 0 20px #70d5ff,
    0 0 30px #40c3ff;
  animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
  0%,100% { text-shadow:
    0 0 5px #a0e7ff,
    0 0 10px #70d5ff,
    0 0 15px #40c3ff; }
  50% { text-shadow:
    0 0 20px #a0e7ff,
    0 0 30px #70d5ff,
    0 0 40px #40c3ff; }
}
/* timecalc */
.calculator { padding: 1rem; }
.calculator h2 { margin-bottom: 1rem; font-size: 1.25rem; }
.form-group { margin-bottom: 0.75rem; }
.form-group label { display: block; margin-bottom: 0.25rem; }
.form-group select,
.form-group input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}
.calculator button {
  width: 100%;
  padding: 0.75rem;
  background: #5a3e85; color: #fff;
  border: none; border-radius: 4px;
  cursor: pointer;
}
.calculator button:hover { background: #472d6b; }
.result {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f9f9f9; border-radius: 4px;
}
/* static/css/style.css */

/* 事件頁標題 */
.events-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* 搜尋欄 */
.events-search {
  text-align: center;
  margin-bottom: 1rem;
}
.events-search input {
  width: 80%;
  max-width: 300px;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* 卡片容器 */
.events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) {
  .events-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 900px) {
  .events-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* 單張卡片 */
.event-card {
  background: #fff;
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}
.event-card:hover {
  transform: translateY(-4px);
}
.event-card .pair {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.event-card .pair:last-child {
  margin-bottom: 0;
}
.event-card .opt {
  font-weight: 600;
}
.event-card .res {
  color: #5a3e85;
  font-weight: 500;
}
/* static/css/style.css */

/* Data 標題 */
.data-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* 搜尋欄 */
.data-search {
  text-align: center;
  margin-bottom: 1rem;
}
.data-search input {
  width: 80%;
  max-width: 300px;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* 小標題 */
.section-subtitle {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  text-align: left;
  padding-left: 0.5rem;
  border-left: 4px solid #5a3e85;
}

/* 卡片網格 */
.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2,1fr); }
}
@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(3,1fr); }
}

/* 單張資訊卡 */
.info-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}
.info-card:hover {
  transform: translateY(-4px);
}
.info-card h4 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  color: #5a3e85;
}
.info-card ul {
  list-style: none;
  padding-left: 0;
}
.info-card ul li {
  margin: 0.25rem 0;
}
/* checkbox-group 父容器改成 flex，子項垂直置中 */
.checkbox-group {
  display: flex;
  align-items: center;
}

/* label 內的文字距離勾選框一點空隙 */
.checkbox-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 1rem;  /* 如果想跟上方留距 */
}

.checkbox-label .form-checkbox {
  margin-right: 0.5rem;
  width: 1.2em;
  height: 1.2em;
}
/* 跑馬燈容器 */
.marquee {
  overflow: hidden;
  background-color: #fff8e1; /* 淺色背景，視覺分層 */
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

/* 內部滾動區塊 */
.marquee__inner {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 15s linear infinite;
  padding: 0.5rem 0;
}

/* 跑馬燈文字 */
.marquee__inner {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 15s linear infinite;
  padding: 0.5rem 0;
  /* 一開始就不做 translateX，預設顯示在原地 */
  transform: translateX(0);
}

/* 關鍵影格動畫 */
@keyframes marquee {
  0% {
    transform: translateX(0);     /* 文字一出現就在容器最左邊 */
  }
  100% {
    transform: translateX(-100%); /* 滾動到整個文字往左跑出畫面 */
  }
}
.family-event-single {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1rem;
  text-align: center;
}

.family-event-single .section-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.family-event-single .event-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.family-event-single .event-desc {
  margin: 1.5rem 0;
  font-size: 1rem;
  line-height: 1.6;
}

.family-event-single .back-home {
  margin-top: 2rem;
}
.fab {
  position: fixed;
  bottom: 10px;
  right: 10px;

  /* 寬高自動包內容＋小範圍 padding 提高可點擊性 */
  width: auto;
  height: auto;
  padding: -4px;

  display: flex;
  flex-direction: column;
  align-items: center;

  background: none;
  border: none;
  text-decoration: none;
  z-index: 1000;

  /* 加回彈跳與縮放過渡 */
  animation: fab-bounce 2s ease-in-out infinite;
  transition: transform 0.2s;
}

.fab img {
  width: 64px;
  height: 64px;
}

.fab-label {
  margin-top: 1px;
  font-size: 0.85rem;
  line-height: 1;
  color: #820faf;
}

.fab:hover {
  transform: scale(1.1);
}

/* 一定要有這段 keyframes！ */
@keyframes fab-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}


