:root {
  --bg: #081512;
  --bg-soft: #10241f;
  --panel: rgba(12, 30, 26, 0.82);
  --panel-strong: rgba(13, 24, 21, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 224, 165, 0.18);
  --gold: #f6d28a;
  --gold-strong: #ffbf47;
  --mint: #7cf7c3;
  --mint-soft: rgba(124, 247, 195, 0.12);
  --text: #f8f4ea;
  --text-soft: rgba(248, 244, 234, 0.72);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.24);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans TC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(246, 210, 138, 0.18), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(124, 247, 195, 0.14), transparent 24%),
    linear-gradient(180deg, #07110f 0%, #0d1d19 48%, #081512 100%);
  position: relative;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.page-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.55;
  z-index: 0;
}

.page-glow-left {
  top: -110px;
  left: -120px;
  background: radial-gradient(circle, rgba(255, 191, 71, 0.26) 0%, transparent 65%);
}

.page-glow-right {
  right: -130px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(124, 247, 195, 0.22) 0%, transparent 65%);
}

.site-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  padding: 22px;
}

.sidebar,
.content-area {
  align-self: start;
}

.sidebar {
  position: sticky;
  top: 22px;
}

.logo-card,
.sidebar-panel,
.hero-card,
.feature-card,
.gallery-section,
.auth-card,
.side-thumb,
.gallery-item,
.ghost-button {
  box-shadow: var(--shadow-soft);
}

.logo-card,
.sidebar-panel,
.content-area,
.feature-card,
.gallery-section {
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.logo-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius-lg);
}

.brand-tag,
.brand-copy,
.topbar-kicker,
.feature-kicker,
.section-kicker,
.sidebar-panel-head span {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
}

.brand-tag,
.topbar-kicker,
.feature-kicker,
.section-kicker {
  color: var(--mint);
}

.brand-copy,
.sidebar-panel-head span {
  color: var(--text-soft);
}

.logo-word,
.auth-brand {
  font-family: "Baloo 2", sans-serif;
  line-height: 0.95;
}

.logo-word {
  margin-top: 8px;
  font-size: 3rem;
  font-weight: 800;
  color: var(--gold);
}

.brand-copy {
  margin-top: 8px;
}

.logo-icons {
  display: grid;
  gap: 10px;
}

.side-icon {
  min-width: 48px;
  height: 48px;
  border: 1px solid rgba(246, 210, 138, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.sidebar-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
}

.sidebar-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sidebar-panel-head p {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.sidebar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.side-thumb,
.gallery-item {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.side-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
}

.side-thumb::after,
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 12, 11, 0.14) 64%, rgba(6, 12, 11, 0.42) 100%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.side-thumb img,
.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.content-area {
  min-width: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(246, 210, 138, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(124, 247, 195, 0.05), transparent 70%),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.hero-copy h1,
.hero-copy p,
.section-head h2,
.section-head p,
.feature-card h2,
.feature-card p {
  margin: 0;
}

.hero-copy h1 {
  margin-top: 10px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.98;
  color: var(--gold);
  text-wrap: balance;
}

.hero-text {
  margin-top: 14px;
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(124, 247, 195, 0.18);
  background: var(--mint-soft);
  color: var(--mint);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-actions {
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.ghost-button,
.auth-submit {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.ghost-button {
  justify-self: end;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-strong) 100%);
  color: #19211b;
  font-weight: 900;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric-card {
  display: grid;
  gap: 6px;
  padding: 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
}

.metric-card strong {
  font-size: 1.3rem;
  color: var(--gold);
}

.metric-card span {
  font-size: 0.88rem;
  color: var(--text-soft);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.feature-card {
  padding: 20px;
  border-radius: 24px;
}

.feature-card h2 {
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--text);
}

.feature-card p {
  margin-top: 8px;
  line-height: 1.75;
  color: var(--text-soft);
}

.gallery-section {
  margin-top: 18px;
  padding: 20px;
  border-radius: var(--radius-xl);
}

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

.section-head h2 {
  margin-top: 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-note {
  max-width: 280px;
  text-align: right;
  line-height: 1.7;
  color: var(--text-soft);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
}

.gallery-item {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.gallery-item.is-wide {
  grid-column: span 2;
  aspect-ratio: 1.58 / 1;
}

.gallery-item.is-tall {
  grid-row: span 2;
  aspect-ratio: 0.84 / 1.44;
}

.gallery-item.is-large {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 1 / 1;
}

.gallery-item.is-compact {
  aspect-ratio: 0.94 / 0.94;
}

.auth-brand {
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  font-size: clamp(2.7rem, 8vw, 4.2rem);
  font-weight: 800;
  color: var(--gold);
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  z-index: 30;
}

.auth-modal.is-hidden {
  display: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 7, 0.64);
  backdrop-filter: blur(8px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 468px);
}

.auth-card {
  width: min(100%, 448px);
  overflow: hidden;
  border: 1px solid rgba(246, 210, 138, 0.22);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(246, 210, 138, 0.06), transparent 22%),
    rgba(11, 22, 19, 0.96);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.auth-tab {
  min-height: 70px;
  border: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.is-active {
  background: rgba(255, 255, 255, 0.02);
  color: var(--gold);
}

.auth-panel {
  display: none;
  padding: 28px 24px 24px;
}

.auth-panel.is-active {
  display: block;
}

.auth-panel h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.7rem, 4vw, 2.1rem);
}

.auth-subtitle {
  margin: 10px 0 22px;
  text-align: center;
  line-height: 1.7;
  color: var(--text-soft);
}

.provider-list,
.login-form {
  display: grid;
  gap: 14px;
}

.provider-button {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(246, 210, 138, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.provider-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}

.provider-icon.apple {
  background: #111;
  color: #fff;
}

.provider-icon.google {
  background: linear-gradient(135deg, #4285f4, #34a853 55%, #fbbc05 75%, #ea4335 100%);
  color: #fff;
}

.provider-icon.microsoft {
  background: linear-gradient(90deg, #f35325 0 50%, #81bc06 50% 100%);
  color: #fff;
}

.provider-icon.key {
  background: rgba(124, 247, 195, 0.18);
  color: var(--mint);
}

.login-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}

.login-form input {
  min-height: 52px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.auth-submit {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-strong) 100%);
  color: #19211b;
  font-weight: 900;
}

.provider-button:focus-visible,
.auth-tab:focus-visible,
.auth-submit:focus-visible,
.ghost-button:focus-visible,
.side-icon:focus-visible,
.side-thumb:focus-visible,
.gallery-item:focus-visible,
.login-form input:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.provider-button,
.ghost-button,
.auth-submit,
.side-thumb,
.gallery-item,
.side-icon,
.auth-tab {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.gallery-item:hover,
.side-thumb:hover,
.provider-button:hover,
.ghost-button:hover,
.auth-submit:hover,
.side-icon:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.gallery-item:hover::after,
.side-thumb:hover::after {
  opacity: 1;
}

.provider-button:hover,
.auth-tab:hover:not(.is-active),
.side-icon:hover {
  border-color: rgba(246, 210, 138, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.auth-tab:hover:not(.is-active) {
  color: var(--text);
}

.login-form input::placeholder {
  color: rgba(248, 244, 234, 0.34);
}

@media (max-width: 1180px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .sidebar-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .ghost-button {
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .feature-strip {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .section-note {
    max-width: none;
    text-align: left;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-shell {
    padding: 12px;
  }

  .logo-card,
  .sidebar-panel,
  .hero-card,
  .gallery-section {
    border-radius: 20px;
  }

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

  .auth-card {
    border-radius: 22px;
  }

  .auth-panel {
    padding: 22px 16px 18px;
  }

  .auth-tab {
    min-height: 64px;
  }

  .gallery-item.is-wide,
  .gallery-item.is-large {
    grid-column: span 2;
  }

  .gallery-item.is-tall {
    grid-row: span 1;
    aspect-ratio: 1 / 1;
  }
}
