:root {
  --bg: #09111f;
  --panel: rgba(9, 17, 31, 0.72);
  --panel-border: rgba(201, 255, 244, 0.16);
  --text: #f5f7fb;
  --muted: #9cb0c9;
  --accent: #7df9d0;
  --accent-strong: #4ff0ff;
  --danger: #ff7b7b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(79, 240, 255, 0.18), transparent 30%),
    radial-gradient(circle at bottom left, rgba(125, 249, 208, 0.15), transparent 24%),
    linear-gradient(135deg, #04070d 0%, #09111f 45%, #14253f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 95%);
  pointer-events: none;
}

.app-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 28px;
  align-items: center;
  padding: 32px 0;
}

.hero,
.viewer-card {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 28px 12px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.description {
  max-width: 34rem;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.viewer-card {
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: 32px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.viewer-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(180deg, #0f1728 0%, #02050b 100%);
}

.viewer {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #02050b;
  transition: filter 180ms ease, transform 220ms ease;
}

.viewer.is-negative {
  filter: invert(1) hue-rotate(180deg) saturate(1.2) contrast(1.05);
}

.viewer-glow {
  position: absolute;
  inset: auto -12% -28% auto;
  width: 52%;
  height: 52%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(79, 240, 255, 0.36), transparent 70%);
  z-index: 1;
  pointer-events: none;
}

.status-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(4, 7, 13, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
  backdrop-filter: blur(14px);
}

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

.button {
  border: 0;
  border-radius: 16px;
  padding: 15px 16px;
  font: inherit;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #04111d;
  font-weight: 700;
}

.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(125, 249, 208, 0.28);
}

.hint {
  margin: 14px 6px 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 20px 0 28px;
  }

  .hero {
    padding: 12px 4px 0;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 560px);
    gap: 18px;
  }

  .viewer-card {
    padding: 12px;
    border-radius: 24px;
  }

  .viewer-wrap {
    aspect-ratio: 4 / 5;
    border-radius: 18px;
  }

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

  h1 {
    font-size: clamp(2.7rem, 15vw, 4rem);
  }

  .description {
    font-size: 0.98rem;
    line-height: 1.65;
  }
}
