* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #10151a;
  color: #eef4f8;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body.sample-page {
  overflow: hidden;
}

body.gallery-page {
  min-height: 100%;
  overflow: auto;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-shell {
  min-height: 100%;
  padding: clamp(28px, 6vw, 72px);
  background:
    linear-gradient(140deg, rgba(20, 35, 42, 0.92), rgba(11, 16, 21, 0.96)),
    #10151a;
}

.gallery-head {
  width: min(860px, 100%);
  margin-bottom: clamp(28px, 5vw, 56px);
}

.eyebrow {
  margin: 0 0 8px;
  color: #7bd9ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-head h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 0.98;
}

.gallery-head p:not(.eyebrow) {
  width: min(620px, 100%);
  margin: 18px 0 0;
  color: rgba(238, 244, 248, 0.78);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  width: min(1080px, 100%);
}

.sample-card {
  display: grid;
  grid-template-rows: 160px 1fr;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  color: inherit;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.sample-card:hover {
  transform: translateY(-2px);
  border-color: rgba(123, 217, 255, 0.72);
  background: rgba(255, 255, 255, 0.11);
}

.sample-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: #14232a;
}

.sample-thumb::before,
.sample-thumb::after {
  position: absolute;
  content: "";
}

.water-thumb {
  background:
    linear-gradient(rgba(62, 190, 214, 0.36) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 190, 214, 0.36) 1px, transparent 1px),
    linear-gradient(165deg, #dceae4, #79cadc 44%, #174a5a);
  background-size:
    20px 20px,
    20px 20px,
    auto;
}

.water-thumb::before {
  inset: 44px 24px 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  filter: blur(12px);
  transform: rotate(-10deg);
}

.fire-thumb {
  background:
    radial-gradient(circle at 50% 88%, #3b2117 0 18%, transparent 19%),
    linear-gradient(180deg, #0e1218, #1b1720);
}

.fire-thumb::before {
  left: 50%;
  bottom: 20px;
  width: 88px;
  height: 118px;
  border-radius: 52% 48% 42% 58%;
  background:
    radial-gradient(circle at 48% 58%, #fff7ad 0 12%, transparent 13%),
    radial-gradient(circle at 58% 42%, #ffcf4a 0 26%, transparent 27%),
    radial-gradient(circle at 44% 58%, #ff5c17 0 44%, transparent 45%);
  filter: blur(1px);
  transform: translateX(-50%) skewX(-6deg);
}

.bird-thumb {
  background: linear-gradient(180deg, #bfe5f0, #547d86 72%, #253b3c);
}

.bird-thumb::before {
  top: 36px;
  left: 26px;
  width: 176px;
  height: 82px;
  background:
    radial-gradient(ellipse at 20% 45%, #202e31 0 6px, transparent 7px),
    radial-gradient(ellipse at 50% 50%, #202e31 0 7px, transparent 8px),
    radial-gradient(ellipse at 80% 40%, #202e31 0 5px, transparent 6px);
}

.bird-thumb::after {
  right: 22px;
  bottom: 18px;
  width: 52%;
  height: 1px;
  background: rgba(238, 244, 248, 0.38);
  box-shadow:
    -42px -22px 0 rgba(238, 244, 248, 0.3),
    -88px -8px 0 rgba(238, 244, 248, 0.24);
}

.moon-thumb {
  background:
    radial-gradient(circle at 74% 72%, rgba(130, 164, 176, 0.32), transparent 17%),
    radial-gradient(circle at 18% 76%, rgba(130, 164, 176, 0.28), transparent 19%),
    linear-gradient(180deg, #061225, #0b3042);
}

.moon-thumb::before {
  top: 18px;
  left: 52px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #ffe48d;
  box-shadow:
    0 0 24px rgba(255, 221, 128, 0.72),
    60px 22px 0 -8px #0a2133;
}

.moon-thumb::after {
  left: 108px;
  top: 94px;
  width: 46px;
  height: 56px;
  border: solid rgba(80, 50, 28, 0.9);
  border-width: 0 3px;
  box-shadow:
    -76px -52px 0 -30px #fff3be,
    132px -34px 0 -31px #fff3be,
    198px -4px 0 -31px #fff3be;
}

.sample-copy {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
}

.sample-copy strong {
  font-size: 20px;
}

.sample-copy span {
  color: rgba(238, 244, 248, 0.7);
  font-size: 14px;
  line-height: 1.45;
}

.back-link {
  position: fixed;
  right: 14px;
  top: 14px;
  z-index: 10;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(10, 18, 24, 0.74);
  color: #eef4f8;
  font-size: 12px;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.hud {
  position: fixed;
  top: 14px;
  left: 14px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 18, 24, 0.78);
  backdrop-filter: blur(10px);
}

.title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 680;
  line-height: 1.2;
}

.chip {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(138, 213, 255, 0.36);
  border-radius: 999px;
  color: #abe0ff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #eef4f8;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

button:hover,
button.active {
  border-color: rgba(91, 210, 255, 0.8);
  background: rgba(32, 132, 172, 0.45);
}

.camera-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.metric {
  min-width: 0;
  padding: 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
}

.metric span {
  display: block;
  color: rgba(238, 244, 248, 0.66);
  font-size: 10px;
}

.metric strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend {
  margin: 0;
  color: rgba(238, 244, 248, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.error {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: none;
  max-width: min(520px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 89, 89, 0.5);
  border-radius: 8px;
  background: rgba(68, 18, 18, 0.9);
  color: #ffd7d7;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.error.visible {
  display: block;
}

@media (max-width: 640px) {
  .hud {
    top: 8px;
    left: 8px;
    width: calc(100vw - 16px);
  }

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

.home{
color: #fff;
}
