/* ===== 大漢國中紀念網站 - 全域樣式 (陽光綠地版) ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@300;400;600;700;900&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
  /* 陽光綠地 (Default) */
  --green: #68A030;
  --green-light: #8CC63F;
  --green-dark: #3F7517;
  --yellow: #F7CA18;
  --light-bg: #F5FAED;
  --light-surface: #E8F3D8;
  --text-primary: #1C3312;
  --text-muted: #576B4D;
  --accent-red: #D25B4C;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.8);
  --shadow-green: 0 4px 30px rgba(104, 160, 48, 0.15);
  
  /* 擴充變數 */
  --bg-white: #FFFFFF;
  --bg-white-trans-60: rgba(255,255,255,0.6);
  --bg-white-trans-70: rgba(255,255,255,0.7);
  --bg-white-trans-80: rgba(255,255,255,0.8);
  --hero-bg-gradient: linear-gradient(180deg, #A2D6F9 0%, #DFF4F3 40%, #D4EFB3 75%, #A8D86A 100%);
  --timeline-line-gradient: linear-gradient(to bottom, #A8D86A, var(--green-light), #A8D86A);
  --hero-title-color: #1a4a15;
  --lightbox-bg: rgba(255,255,255,0.95);
}

[data-theme="ocean"] {
  --green: #2B82C9;
  --green-light: #52B3D9;
  --green-dark: #1F3A93;
  --yellow: #F4D03F;
  --light-bg: #E4F1FE;
  --light-surface: #C5EFF7;
  --text-primary: #22313F;
  --text-muted: #34495E;
  --shadow-green: 0 4px 30px rgba(43, 130, 201, 0.15);
  --hero-bg-gradient: linear-gradient(180deg, #E4F1FE 0%, #C5EFF7 40%, #89C4F4 75%, #52B3D9 100%);
  --timeline-line-gradient: linear-gradient(to bottom, #89C4F4, var(--green-light), #89C4F4);
  --hero-title-color: #1a2a4a;
}

[data-theme="sepia"] {
  --green: #A0522D;
  --green-light: #CD853F;
  --green-dark: #5C3A21;
  --yellow: #DAA520;
  --light-bg: #F4ECD8;
  --light-surface: #EADCB6;
  --text-primary: #3E2723;
  --text-muted: #5D4037;
  --shadow-green: 0 4px 30px rgba(160, 82, 45, 0.15);
  --bg-white: #FCF9F2;
  --bg-white-trans-60: rgba(252, 249, 242, 0.6);
  --bg-white-trans-70: rgba(252, 249, 242, 0.7);
  --bg-white-trans-80: rgba(252, 249, 242, 0.8);
  --glass-bg: rgba(252, 249, 242, 0.55);
  --hero-bg-gradient: linear-gradient(180deg, #FDF9EC 0%, #F4ECD8 40%, #EADCB6 75%, #D7CCC8 100%);
  --timeline-line-gradient: linear-gradient(to bottom, #D7CCC8, var(--green-light), #D7CCC8);
  --hero-title-color: #3E2723;
  --lightbox-bg: rgba(252,249,242,0.95);
}

[data-theme="dark"] {
  --green: #9B59B6;
  --green-light: #BE90D4;
  --green-dark: #674172;
  --yellow: #F5D76E;
  --light-bg: #1A1A24;
  --light-surface: #2C2C39;
  --text-primary: #E4E4E4;
  --text-muted: #A1A1B5;
  --shadow-green: 0 4px 30px rgba(155, 89, 182, 0.15);
  --bg-white: #242430;
  --bg-white-trans-60: rgba(36, 36, 48, 0.6);
  --bg-white-trans-70: rgba(36, 36, 48, 0.7);
  --bg-white-trans-80: rgba(36, 36, 48, 0.8);
  --glass-bg: rgba(36, 36, 48, 0.65);
  --glass-border: rgba(255, 255, 255, 0.1);
  --hero-bg-gradient: linear-gradient(180deg, #0B0B14 0%, #1A1A24 40%, #2A2A3D 75%, #3B3B54 100%);
  --timeline-line-gradient: linear-gradient(to bottom, #3B3B54, var(--green-light), #3B3B54);
  --hero-title-color: #F0F0F0;
  --lightbox-bg: rgba(26,26,36,0.95);
}

[data-theme="dragonball"] {
  --green: #F58220; /* 龜仙流道服橘 */
  --green-light: #FF9E4A;
  --green-dark: #C65A0D;
  --yellow: #FFCC00; /* 超級賽亞人金黃 */
  --light-bg: #FFF3E0;
  --light-surface: #FFE0B2;
  --text-primary: #1A2D5C; /* 內衣深藍 */
  --text-muted: #264A9F;
  --shadow-green: 0 4px 30px rgba(245, 130, 32, 0.2);
  --bg-white: #FFFFFF;
  --bg-white-trans-60: rgba(255, 255, 255, 0.6);
  --bg-white-trans-70: rgba(255, 255, 255, 0.7);
  --bg-white-trans-80: rgba(255, 255, 255, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 204, 0, 0.4);
  --hero-bg-gradient: linear-gradient(180deg, #FFEDD5 0%, #FFDDB8 40%, #FFB677 75%, #F58220 100%);
  --timeline-line-gradient: linear-gradient(to bottom, #FFCC00, var(--green-light), #FFCC00);
  --hero-title-color: #C65A0D;
  --lightbox-bg: rgba(255, 243, 224, 0.95);
}

[data-theme="slamdunk"] {
  --green: #D91023; /* 湘北紅 */
  --green-light: #F23D4E;
  --green-dark: #A30918;
  --yellow: #000000; /* 湘北黑 */
  --light-bg: #F8F9FA;
  --light-surface: #E9ECEF;
  --text-primary: #212529;
  --text-muted: #495057;
  --shadow-green: 0 4px 30px rgba(217, 16, 35, 0.15);
  --bg-white: #FFFFFF;
  --bg-white-trans-60: rgba(255, 255, 255, 0.6);
  --bg-white-trans-70: rgba(255, 255, 255, 0.7);
  --bg-white-trans-80: rgba(255, 255, 255, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(217, 16, 35, 0.2);
  --hero-bg-gradient: linear-gradient(180deg, #F8F9FA 0%, #E9ECEF 40%, #DEE2E6 75%, #CED4DA 100%);
  --timeline-line-gradient: linear-gradient(to bottom, #D91023, #000000, #D91023);
  --hero-title-color: #D91023;
  --lightbox-bg: rgba(255, 255, 255, 0.95);
}

[data-theme="maruko"] {
  --green: #FF66B2; /* 櫻桃粉 */
  --green-light: #FF99CC;
  --green-dark: #D13C84;
  --yellow: #FFFF66; /* 小丸子帽黃 */
  --light-bg: #FFF0F5;
  --light-surface: #FFE6F0;
  --text-primary: #593546;
  --text-muted: #805C6D;
  --shadow-green: 0 4px 30px rgba(255, 102, 178, 0.2);
  --bg-white: #FFFFFF;
  --bg-white-trans-60: rgba(255, 255, 255, 0.6);
  --bg-white-trans-70: rgba(255, 255, 255, 0.7);
  --bg-white-trans-80: rgba(255, 255, 255, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 153, 204, 0.5);
  --hero-bg-gradient: linear-gradient(180deg, #FFF9FA 0%, #FFF0F5 40%, #FFE6F0 75%, #FFCCE0 100%);
  --timeline-line-gradient: linear-gradient(to bottom, #FF99CC, var(--yellow), #FF99CC);
  --hero-title-color: #D13C84;
  --lightbox-bg: rgba(255, 240, 245, 0.95);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Noto Sans TC', sans-serif;
  background: var(--light-bg);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.7;
}

/* ===== 捲軸 ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light-surface); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-dark); }

/* ===== 導覽列 ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-white-trans-70);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 20px rgba(0,0,0,0.02);
}
#navbar .logo {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.2rem; font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 0.05em;
  text-decoration: none;
}
#navbar nav { display: flex; gap: 1.5rem; }
#navbar nav a {
  color: var(--text-muted);
  text-decoration: none; font-size: 0.95rem; font-weight: 500;
  transition: color 0.2s, transform 0.2s;
  white-space: nowrap;
}
#navbar nav a:hover, #navbar nav a.active { color: var(--green-dark); transform: translateY(-1px); }
.theme-select {
  background: var(--bg-white);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 0.2rem 0.8rem;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}
.theme-select:hover {
  border-color: var(--green);
}

/* ===== HERO ===== */
#hero {
  position: relative; height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
#hero-bg {
  position: absolute; inset: 0;
  background: var(--hero-bg-gradient);
}
#hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at top center, var(--bg-white-trans-80) 0%, transparent 60%);
}
.hero-particles { position: absolute; inset: 0; pointer-events: none; }
.hero-content { position: relative; z-index: 2; padding: 2rem; }
.hero-subtitle {
  font-size: 1rem; letter-spacing: 0.3em; color: var(--green-dark);
  text-transform: uppercase; margin-bottom: 1rem; font-weight: 600;
  opacity: 0; animation: fadeUp 0.8s 0.3s forwards;
}
.hero-title {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 900; line-height: 1.1;
  color: var(--hero-title-color);
  text-shadow: 2px 4px 10px rgba(255,255,255,0.7);
  margin-bottom: 0.5rem;
  opacity: 0; animation: fadeUp 0.8s 0.5s forwards;
}
.hero-en {
  font-size: clamp(0.75rem, 2vw, 1rem);
  color: var(--green); letter-spacing: 0.25em; font-weight: 600;
  margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp 0.8s 0.7s forwards;
}
.hero-years {
  font-size: 1.1rem; color: var(--text-primary);
  margin-bottom: 2.5rem; font-weight: 500;
  opacity: 0; animation: fadeUp 0.8s 0.9s forwards;
}
.hero-years span { color: var(--green-dark); font-weight: 700; background: var(--bg-white-trans-60); padding: 0.2rem 0.8rem; border-radius: 20px; }
.hero-cta {
  display: inline-flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
  opacity: 0; animation: fadeUp 0.8s 1.1s forwards;
}
.btn-primary {
  display: inline-block; padding: 0.85rem 2.5rem;
  background: linear-gradient(135deg, var(--green-light), var(--green));
  color: #fff; text-decoration: none; border-radius: 50px;
  font-weight: 600; font-size: 1rem; letter-spacing: 0.05em;
  border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 20px rgba(104,160,48,0.4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(104,160,48,0.5); }
.btn-outline {
  display: inline-block; padding: 0.85rem 2.5rem;
  border: 2px solid var(--green); color: var(--green-dark);
  text-decoration: none; border-radius: 50px;
  font-weight: 600; font-size: 1rem;
  background: var(--bg-white-trans-70); cursor: pointer;
  backdrop-filter: blur(5px);
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.btn-outline:hover { background: var(--green); color: #fff; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(104,160,48,0.3); }
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--green-dark); font-size: 0.8rem; letter-spacing: 0.1em; font-weight: 600;
  opacity: 0; animation: fadeUp 0.8s 1.5s forwards;
}
.scroll-line { width: 2px; height: 40px; background: linear-gradient(to bottom, var(--green), transparent); animation: scrollPulse 2s infinite; border-radius: 2px; }

/* ===== 通用段落 ===== */
section { padding: 6rem 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  display: inline-block; font-size: 0.85rem; letter-spacing: 0.3em;
  color: var(--green-dark); text-transform: uppercase; margin-bottom: 0.75rem; font-weight: 600;
  background: var(--bg-white-trans-60);
  border: 1px solid rgba(140,198,63,0.3); padding: 0.35rem 1.25rem; border-radius: 50px;
}
.section-title {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 1rem;
}
.section-divider { width: 60px; height: 3px; background: var(--yellow); margin: 1rem auto 0; border-radius: 2px; }

/* ===== 玻璃卡片 ===== */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

/* ===== 校史沿革 ===== */
#history { background: linear-gradient(180deg, var(--light-bg) 0%, var(--bg-white) 100%); position: relative; }
.history-intro {
  font-family: 'Noto Serif TC', serif; font-size: 1.1rem; line-height: 2;
  color: var(--text-primary); max-width: 800px; margin: 0 auto 4rem;
  text-align: justify;
}
.history-intro p { margin-bottom: 1.5rem; text-indent: 2em; }

/* ===== 時間軸 ===== */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 4px; background: var(--timeline-line-gradient);
  transform: translateX(-50%); border-radius: 2px;
}
.timeline-item {
  display: grid; grid-template-columns: 1fr 60px 1fr;
  align-items: start; margin-bottom: 3rem;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-left { text-align: right; padding-right: 1.5rem; padding-top: 0.25rem; }
.timeline-right { padding-left: 1.5rem; padding-top: 0.25rem; }
.timeline-dot {
  width: 20px; height: 20px;
  background: var(--yellow); border-radius: 50%;
  border: 4px solid var(--bg-white);
  box-shadow: 0 0 15px rgba(247,202,24,0.6);
  margin: 0 auto; margin-top: 0.2rem;
  transition: transform 0.3s, background 0.3s;
}
.timeline-item:hover .timeline-dot { transform: scale(1.3); background: var(--green-light); }
.timeline-year { font-size: 1.25rem; font-weight: 800; color: var(--green-dark); }
.timeline-year small { display: block; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.timeline-text { font-size: 0.95rem; color: var(--text-primary); line-height: 1.6; }
.timeline-text strong { color: var(--green-dark); }
.timeline-item.right .timeline-left { order: 3; text-align: left; padding-right: 0; padding-left: 1.5rem; }
.timeline-item.right .timeline-right { order: 1; text-align: right; padding-left: 0; padding-right: 1.5rem; }
.timeline-item.right .timeline-dot { order: 2; }

/* ===== 校長列表 ===== */
#principals { background: var(--bg-white); }
.principals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.principal-card {
  padding: 1.5rem;
  text-align: center;
  border-radius: 16px;
  background: var(--light-bg);
  border: 1px solid var(--light-surface);
  transition: transform 0.3s, box-shadow 0.3s;
}
.principal-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(104,160,48,0.1); background: var(--bg-white); }
.principal-order { font-size: 0.85rem; color: var(--green); letter-spacing: 0.1em; margin-bottom: 0.25rem; font-weight: 600; }
.principal-name { font-family: 'Noto Serif TC', serif; font-size: 1.4rem; font-weight: 700; color: var(--green-dark); margin-bottom: 0.25rem; }
.principal-period { font-size: 0.85rem; color: var(--text-muted); }

/* ===== 畢業紀念冊 ===== */
#yearbook { background: linear-gradient(180deg, var(--bg-white) 0%, var(--light-surface) 100%); }
.class-selector-wrap { margin-bottom: 2rem; }
.class-selector-label { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 0.75rem; font-weight: 600; }
.class-tabs {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  max-height: 250px; overflow-y: auto; padding: 1.25rem;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 16px; box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.class-tab {
  padding: 0.6rem 1.2rem; border-radius: 50px;
  border: 1px solid rgba(104,160,48,0.2); background: var(--bg-white);
  color: var(--text-muted); font-size: 1.05rem; cursor: pointer; font-weight: 600;
  transition: all 0.2s; font-family: inherit;
}
.class-tab:hover { border-color: var(--green); color: var(--green-dark); box-shadow: 0 4px 10px rgba(104,160,48,0.1); }
.class-tab.active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; box-shadow: 0 4px 15px rgba(104,160,48,0.3); }
.yearbook-info { font-size: 1.15rem; color: var(--green-dark); font-weight: 600; margin-bottom: 1.5rem; min-height: 1.5rem; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.photo-thumb {
  aspect-ratio: 3/4; overflow: hidden; border-radius: 12px;
  cursor: pointer; position: relative;
  background: var(--bg-white);
  border: 4px solid var(--bg-white);
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.photo-thumb:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 12px 30px rgba(104,160,48,0.25); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 8px; }
.photo-thumb .page-num {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(28,51,18,0.8), transparent);
  color: #fff; font-size: 0.8rem; text-align: center; padding: 0.75rem 0.5rem 0.5rem; font-weight: 500;
}
.loading-text { color: var(--text-muted); text-align: center; padding: 3rem; font-size: 1rem; }

/* ===== 活動相簿 ===== */
#activities { background: var(--light-surface); }
.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.activity-card {
  padding: 1.5rem; border-radius: 16px; cursor: pointer;
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--bg-white); border: 1px solid rgba(104,160,48,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}
.activity-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(104,160,48,0.15); border-color: rgba(104,160,48,0.3); }
.activity-icon { font-size: 2.2rem; flex-shrink: 0; background: var(--light-bg); width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.activity-info { flex: 1; min-width: 0; }
.activity-name { font-size: 1.15rem; color: var(--green-dark); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-count { font-size: 0.95rem; color: var(--text-muted); margin-top: 0.25rem; }
.activity-arrow { color: var(--green); font-size: 1.2rem; font-weight: 700; transition: transform 0.2s; }
.activity-card:hover .activity-arrow { transform: translateX(5px); }

/* ===== 紀念影片 ===== */
#videos { background: var(--bg-white); }
.video-category { margin-bottom: 3rem; }
.category-title { font-size: 1.4rem; color: var(--green-dark); margin-bottom: 1.2rem; padding-bottom: 0.5rem; border-bottom: 2px dashed rgba(104,160,48,0.2); display: inline-block; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.video-card {
  padding: 1.5rem; border-radius: 16px; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--light-bg); border: 1px solid rgba(104,160,48,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 5px 15px rgba(0,0,0,0.04);
}
.video-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(104,160,48,0.2); border-color: rgba(104,160,48,0.4); background: var(--bg-white); }
.video-icon { font-size: 2.2rem; flex-shrink: 0; background: var(--bg-white); width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.video-info { flex: 1; min-width: 0; }
.video-name { font-size: 1.1rem; color: var(--green-dark); font-weight: 700; margin-bottom: 0.25rem; }
.video-desc { font-size: 0.9rem; color: var(--text-muted); }
.video-dl { font-size: 0.9rem; font-weight: 700; color: #fff; background: var(--green); padding: 0.4rem 1rem; border-radius: 50px; transition: background 0.2s; white-space: nowrap; }
.video-card:hover .video-dl { background: var(--green-dark); }

/* ===== 燈箱 ===== */
#lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--lightbox-bg); backdrop-filter: blur(5px);
  display: none; align-items: center; justify-content: center;
  flex-direction: column;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 12px; box-shadow: 0 10px 50px rgba(0,0,0,0.15); }
#lightbox-info { color: var(--green-dark); font-size: 1rem; font-weight: 600; margin-top: 1.25rem; background: var(--bg-white); padding: 0.5rem 1.5rem; border-radius: 50px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
#lightbox-close {
  position: absolute; top: 1.5rem; right: 2rem;
  background: var(--light-surface); border: none; color: var(--green-dark); font-size: 2rem;
  width: 50px; height: 50px; border-radius: 50%;
  cursor: pointer; line-height: 1; transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
#lightbox-close:hover { background: var(--green); color: #fff; transform: scale(1.1); }
#lightbox-prev, #lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: var(--bg-white); border: 1px solid var(--light-surface);
  color: var(--green-dark); font-size: 1.5rem; width: 50px; height: 80px;
  cursor: pointer; border-radius: 12px; transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: center;
}
#lightbox-prev { left: 2rem; }
#lightbox-next { right: 2rem; }
#lightbox-prev:hover, #lightbox-next:hover { background: var(--green); color: #fff; box-shadow: 0 8px 25px rgba(104,160,48,0.3); }

/* ===== 影片燈箱 ===== */
#video-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  flex-direction: column;
}
#video-lightbox.open { display: flex; }
.video-container { width: 90vw; max-width: 1000px; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 50px rgba(0,0,0,0.5); }
#lb-video { width: 100%; height: 100%; object-fit: contain; }
#video-lightbox-info { color: #fff; font-size: 1.1rem; font-weight: 600; margin-top: 1.5rem; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
#video-lightbox-close {
  position: absolute; top: 1.5rem; right: 2rem;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; font-size: 2rem;
  width: 50px; height: 50px; border-radius: 50%;
  cursor: pointer; line-height: 1; transition: all 0.2s;
}
#video-lightbox-close:hover { background: var(--green); transform: scale(1.1); border-color: transparent; }

/* ===== 統計數字 ===== */
#stats { background: linear-gradient(135deg, var(--green-light), var(--green)); padding: 5rem 0; color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; text-align: center; }
.stat-num { font-family: 'Noto Serif TC', serif; font-size: 3.5rem; font-weight: 900; color: #fff; line-height: 1; text-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.stat-label { font-size: 0.95rem; color: rgba(255,255,255,0.9); margin-top: 0.75rem; font-weight: 500; letter-spacing: 0.05em; }

/* ===== Footer ===== */
footer {
  background: var(--light-bg);
  border-top: 1px solid var(--glass-border);
  padding: 4rem 0 3rem;
  text-align: center;
}
.footer-logo { font-family: 'Noto Serif TC', serif; font-size: 1.5rem; color: var(--green-dark); margin-bottom: 0.5rem; font-weight: 700; }
.footer-addr { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 2rem; }
.footer-copy { font-size: 0.8rem; color: var(--green); font-weight: 500; }

/* ===== 動畫 ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1; transform: scaleY(1.3); }
}
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== 響應式 ===== */
@media (max-width: 768px) {
  #navbar nav { display: none; }
  .timeline::before { left: 20px; }
  .timeline-item { grid-template-columns: 40px 1fr; }
  .timeline-item .timeline-left,
  .timeline-item.right .timeline-left { display: none; }
  .timeline-item.right .timeline-right { order: 3; text-align: left; padding-right: 0; padding-left: 1.25rem; }
  .timeline-item.right .timeline-dot { order: 1; }
  .timeline-dot { margin: 0; margin-top: 0.35rem; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  section { padding: 4rem 0; }
}
