@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;500;700;900&family=Noto+Sans+TC:wght@400;500;700&display=swap");

:root {
  --color-bg: #000;
  --color-text: #f8f8f8;
  --color-muted: rgba(255, 255, 255, 0.72);
  --color-line: rgba(255, 255, 255, 0.16);
  --color-panel: rgba(12, 12, 14, 0.78);
  --color-panel-strong: rgba(20, 20, 24, 0.94);
  --color-brand: rgb(255, 36, 199);
  --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.45);
  --site-x-padding: clamp(16px, 4vw, 48px);
}

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

html {
  min-height: 100%;
  background: var(--color-bg);
  color-scheme: dark;
}

body {
  min-height: 100dvh;
  color: var(--color-text);
  font-family: "Noto Serif TC", serif;
  background-color: var(--color-bg);
  background-image:
    radial-gradient(circle at 50% 15%, transparent, transparent 34rem),
    linear-gradient(rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.72)),
    url("../../public/background.webp");
  background-repeat: no-repeat, no-repeat, repeat;
  background-size:
    1100px 700px,
    cover,
    cover;
  background-position:
    center top,
    center,
    0 0;
  animation: bgMove 60s linear infinite;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.site-layout {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 56px) var(--site-x-padding);
}

::selection {
  background: rgba(255, 36, 199, 0.55);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 4px;
}

@keyframes bgMove {
  0% {
    background-position:
      center top,
      center,
      0 0;
  }

  100% {
    background-position:
      center top,
      center,
      -500px -500px;
  }
}

@media (max-width: 768px) {
  .site-main {
    padding: 24px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Header 基本樣式 */
.site-header {
  display: flex;
  justify-content: center; /* 讓大螢幕 nav 居中 */
  align-items: center;
  padding: 1rem;
  background: linear-gradient(to bottom, black, transparent);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav a,
.mobile-menu a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  margin: 0 1rem;
  transition: color 0.3s ease;
}

/* 大螢幕顯示 nav */
.nav-desktop {
  display: flex;
  font-size: 1.5rem;
}

/* 小螢幕漢堡 */
.hamburger {
  display: none;
  position: absolute;
  top: 0rem;
  right: 0.5rem;
  background: transparent;
  color: azure;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 2.5rem;
  transition:
    color 0.3s ease,
    background-color 0.3s ease;
  z-index: 1000;
}
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .hamburger:hover {
    color: rgb(255, 36, 199);
    border-color: rgb(255, 36, 199);
  }
}

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  nav a:hover,
  .mobile-menu a:hover {
    color: rgb(255, 36, 199);
    transition: all 0.2s ease;
  }
}

/* RWD */
@media (max-width: 768px) {
  .site-header {
    display: flex;
    justify-content: end;
  }

  .nav-desktop {
    display: none; /* 小螢幕隱藏 nav */
  }
  .hamburger {
    display: block; /* 小螢幕顯示漢堡 */
  }
}

.footer {
  background: linear-gradient(to top, black, transparent);
  text-align: center;
  padding: 1rem;
  margin-top: auto;
}

.copyright {
  color: #aaa;
}

@media (max-width: 768px) {
}

.copyright {
  font-size: 1rem;
}

[hidden] {
  display: none !important;
}

.hamburger {
  z-index: 1006;
}
button {
  touch-action: manipulation;
}
