:root {
  --accent: #F6CD9B;
  --accent-hover: #FFD9A8;
  --accent-dark: #D9A96A;
  --bg: #0F1115;
  --surface: #171A21;
  --card: #1D212B;
  --text: #FFFFFF;
  --text-soft: #B8B8B8;
  --line-dark: rgba(246, 205, 155, 0.18);
  --hg-container: 1400px;
  --home-container: var(--hg-container);
  --hg-page-x: 32px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #050707;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: #050707;
  font-family:
    "Noto Sans TC",
    "Microsoft JhengHei",
    "PingFang TC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

img {
  max-width: 100%;
}

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

.container {
  width: 100%;
  max-width: var(--hg-container);
  margin-inline: auto;
  padding-inline: var(--hg-page-x);
  box-sizing: border-box;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: block;
  min-height: 72px;
  padding: 0;
  color: #fff;
  background: rgba(5, 7, 7, 0.94);
  border-bottom: 1px solid rgba(246, 205, 155, 0.12);
  backdrop-filter: blur(14px);
}

.header-container {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  position: relative;
}

.brand-logo {
  display: block;
  width: min(210px, 40vw);
  height: auto;
  aspect-ratio: 387 / 96;
  object-fit: contain;
  object-position: left center;
}

.brand-beta-badge {
  position: absolute;
  right: -4px;
  bottom: -7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 15px;
  padding: 1px 6px;
  color: #F6CD9B;
  background: rgba(246, 205, 155, 0.12);
  border: 1px solid rgba(246, 205, 155, 0.52);
  border-radius: 999px;
  font-size: 0.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(246, 205, 155, 0.18);
}

.top-nav,
.social-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-nav {
  justify-self: center;
  min-width: 0;
  max-width: 100%;
}

.social-links {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
}

.top-nav a,
.social-link,
.member-header-link {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
  min-width: 0;
}

.language-switcher {
  display: inline-flex;
}

.language-select {
  min-height: 34px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(246, 205, 155, 0.22);
  border-radius: 8px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(246, 205, 155, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

body.is-maintenance-mode .site-header .top-nav,
body.is-maintenance-mode .site-header .nav-dropdown,
body.is-maintenance-mode .site-header .social-links,
body.is-maintenance-mode .site-header .menu-toggle {
  display: none !important;
}

body.is-maintenance-mode .site-header .header-container {
  grid-template-columns: minmax(0, 1fr) !important;
}

.maintenance-page {
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: center;
  padding: 48px 20px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.9)),
    url("/assets/hero-green-drums.png") center / cover;
}

.maintenance-panel {
  width: min(720px, 100%);
  padding: clamp(28px, 5vw, 52px);
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

.maintenance-panel img {
  width: min(260px, 70vw);
  height: auto;
  margin-bottom: 24px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 16px;
  padding: 8px 12px;
  color: var(--accent-dark);
  background: rgba(246, 205, 155, 0.12);
  border: 1px solid rgba(246, 205, 155, 0.28);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.maintenance-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.08;
}

.maintenance-panel p:not(.eyebrow) {
  max-width: 580px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.8;
}

main {
  min-height: calc(100vh - 72px);
  background:
    radial-gradient(circle at 15% 18%, rgba(246, 205, 155, 0.12), transparent 28%),
    linear-gradient(90deg, rgba(2, 5, 5, 0.96) 0%, rgba(2, 5, 5, 0.72) 54%, rgba(2, 5, 5, 0.96) 100%);
}

.page-shell {
  width: min(1140px, calc(100% - 64px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.home-page {
  color: #fff;
}

.hero {
  width: 100%;
  margin-top: 0;
}

.hero-bg-picture,
.hero-bg-image {
  display: block;
  width: 100%;
}

.hero-bg-picture {
  overflow: hidden;
  min-height: clamp(220px, 42vw, 430px);
  border: 1px solid rgba(246, 205, 155, 0.18);
  border-radius: 8px;
  background: #050707;
}

.hero-bg-image {
  height: clamp(220px, 42vw, 430px);
  object-fit: cover;
}

.home-song-section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 950;
}

.song-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.song-card {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, rgba(22, 28, 31, 0.82), rgba(12, 16, 18, 0.86));
  border: 1px solid rgba(246, 205, 155, 0.12);
  border-radius: 8px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.34);
}

.thumb-button {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #050708;
}

.song-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-meta-row {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.bpm-chip,
.play-chip,
.category-pill,
.asset-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.bpm-chip,
.play-chip {
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
}

.song-card-body {
  display: grid;
  gap: 7px;
  padding: 12px 14px 14px;
}

.song-card-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.song-card h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
}

.artist {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
}

.song-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-pill {
  color: #F6CD9B;
  background: rgba(246, 205, 155, 0.12);
}

.asset-pill {
  color: #0F1115;
  background: var(--accent);
}

.site-footer {
  padding: 24px 18px;
  color: #fff;
  background: #050505;
  text-align: center;
}

@media (max-width: 860px) {
  .container,
  .page-shell {
    width: min(100% - 24px, 720px);
  }

  .menu-toggle {
    display: inline-block;
  }

  .top-nav,
  .social-links {
    display: none;
  }

  .song-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep the Android app home header aligned with the full mobile site header. */
@media (max-width: 1024px) {
  body.is-hgdrums-android-app-home .site-header {
    padding-top: max(18px, calc(env(safe-area-inset-top, 0px) + 14px));
  }

  body.is-hgdrums-android-app-home .site-header .header-container {
    min-height: 68px;
  }
}

@media (max-width: 680px) {
  body.is-hgdrums-android-app-home .site-header {
    padding-top: max(22px, calc(env(safe-area-inset-top, 0px) + 18px));
  }

  body.is-hgdrums-android-app-home .site-header .header-container {
    min-height: 72px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .header-container {
    min-height: 64px;
  }

  .brand-logo {
    width: min(210px, 64vw);
    height: auto;
  }

  .page-shell {
    padding-top: 12px;
  }

  .hero-bg-picture,
  .hero-bg-image {
    min-height: 210px;
    height: 210px;
  }

  .song-grid {
    grid-template-columns: 1fr;
  }
}
