/* === NEGME Global Page Style === */
:root { color-scheme: light dark; }

/* 預設：深色模式 */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Noto Sans TC', 'Poppins', sans-serif;
  color: #f8f8f8;
  background: radial-gradient(circle at center, #101010, #000);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  transition: background .5s ease, color .5s ease;
}

/* 🌞 淺色模式 */
@media (prefers-color-scheme: light) {
  body {
    background: radial-gradient(circle at center, #fafafa, #ddd);
    color: #111;
  }
}

main {
  max-width: 800px;
  margin: 120px auto 60px;
  padding: 0 20px;
  line-height: 1.8;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  padding: 30px 20px;
}

h1, h2 {
  font-weight: 700;
}

footer {
  margin-top: auto;
  font-size: 0.9rem;
  opacity: 0.85;
  padding: 20px;
}

footer a {
  color: inherit;
  text-decoration: none;
  margin: 0 6px;
}

#logo {
  width: 220px;
  height: auto;
  margin-top: 40px;
}
/* === 🌙 / ☀️ 主題切換按鈕 === */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.2rem;
  color: #fff;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: all .3s ease;
}
#theme-toggle:hover {
  transform: scale(1.1);
  background: rgba(255,255,255,0.25);
}

/* 🌞 淺色主題樣式 */
body.light-mode #theme-toggle {
  color: #111;
  background: rgba(0,0,0,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
body.light-mode #theme-toggle:hover {
  background: rgba(0,0,0,0.15);
}

/* === ☰ 漢堡選單按鈕 === */
.menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 70px;
  border: none;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 1.3rem;
  cursor: pointer;
  color: #fff;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: all .3s ease;
}
.menu-toggle:hover {
  transform: scale(1.1);
  background: rgba(255,255,255,0.25);
}

/* 🌞 淺色主題下的漢堡按鈕 */
body.light-mode .menu-toggle {
  color: #111;
  background: rgba(0,0,0,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
body.light-mode .menu-toggle:hover {
  background: rgba(0,0,0,0.15);
}


/* === 📋 導覽選單區 === */
.navbar {
  position: fixed;
  top: 20px;
  right: 70px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 999;
}

.navbar a {
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.85;
  transition: opacity .2s;
}
.navbar a:hover { opacity: 1; }



.menu {
  display: none;
  position: fixed;
  top: 60px;
  right: 20px;
  background: rgba(0,0,0,0.85);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  padding: 15px 20px;
  flex-direction: column;
  gap: 10px;
  z-index: 998;
}
.menu a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  opacity: 0.9;
}
.menu a:hover { opacity: 1; }
body.light-mode .menu {
  background: rgba(255,255,255,0.95);
}
body.light-mode .menu a { color: #111; }

/* === RWD === */
@media (max-width: 768px) {
  .navbar { display: none; }
  .menu-toggle { display: block; }
}

/* === 強制亮色主題（按下 ☀️ 時）=== */
body.light-mode {
  background: radial-gradient(circle at center, #fafafa, #ddd) !important;
  color: #111 !important;
}

/* 亮色主題下：內容卡片改為淺色半透明 */
body.light-mode main {
  background: rgba(255, 255, 255, 0.6) !important;
  color: #111;
}

/* 亮色主題下：連結/文字顏色維持可讀 */
body.light-mode a { color: inherit; }

/* 亮色主題下：可選，讓陰影更自然 */
body.light-mode #theme-toggle,
body.light-mode .menu-toggle {
  background: rgba(0,0,0,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
