:root {
  color-scheme: dark;
  --bg-deep: #080705;
  --bg-mid: #17120d;
  --bg-glow: #34230f;
  --amber: #d49332;
  --amber-soft: #efc06e;
  --cream: #f3ead8;
  --muted: rgba(243, 234, 216, 0.56);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(239, 192, 110, 0.24);
  --accent: #59c6b8;
  --danger: #e0523f;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--cream);
  font-family: Arial, Helvetica, sans-serif;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 50%, transparent 50%),
    radial-gradient(circle at 50% 50%, transparent 46%, rgba(0, 0, 0, 0.42));
  background-size: 100% 4px, 100% 100%;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 48% at 50% 78%, var(--bg-glow) 0%, transparent 72%),
    radial-gradient(circle at 16% 20%, rgba(89, 198, 184, 0.18), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(224, 82, 63, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-mid), var(--bg-deep));
}

#container {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 150px 310px 128px 310px;
}

.viewer-stage {
  width: min(820px, 100%);
  aspect-ratio: 16 / 9;
  padding: 12px;
  border: 1px solid rgba(239, 192, 110, 0.32);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(89, 198, 184, 0.16), transparent 32%),
    rgba(255, 255, 255, 0.055);
  box-shadow:
    0 26px 74px rgba(0, 0, 0, 0.38),
    inset 0 0 30px rgba(239, 192, 110, 0.08);
}

.sketchfab-embed-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(243, 234, 216, 0.16);
  border-radius: 7px;
  background: #000000;
}

.sketchfab-embed-wrapper::before {
  content: "Loading Sketchfab model...";
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sketchfab-embed-wrapper iframe {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: calc(100% - 31px);
  min-height: 300px;
  border: 0;
  background: #000000;
}

.model-credit {
  position: relative;
  z-index: 1;
  height: 31px;
  margin: 0;
  padding: 7px 9px;
  overflow: hidden;
  background: rgba(8, 7, 5, 0.92);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.model-credit a {
  color: var(--amber-soft);
  font-weight: 800;
  text-decoration: none;
}

.model-credit a:hover {
  color: var(--accent);
}

.site-header {
  position: fixed;
  top: 36px;
  left: 42px;
  z-index: 10;
  width: min(520px, calc(100% - 84px));
  animation: fade-down 900ms var(--ease) both;
}

.header-eyebrow {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: 0;
  text-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
}

.site-header p:last-child {
  max-width: 460px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.controls {
  position: fixed;
  left: 50%;
  bottom: 42px;
  z-index: 10;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
  animation: fade-up 900ms var(--ease) 150ms both;
}

.controls button {
  position: relative;
  display: flex;
  min-width: 104px;
  min-height: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: var(--glass);
  color: var(--cream);
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition:
    transform 220ms var(--ease),
    border-color 220ms var(--ease),
    background 220ms var(--ease),
    box-shadow 220ms var(--ease);
}

.controls button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212, 147, 50, 0.25), transparent 58%);
  opacity: 0;
  transition: opacity 220ms var(--ease);
}

.controls button:hover,
.controls button:focus-visible {
  border-color: var(--amber-soft);
  transform: translateY(-4px);
  outline: none;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}

.controls button:hover::before,
.controls button.active::before {
  opacity: 1;
}

.controls button.active {
  border-color: var(--amber);
  background: rgba(212, 147, 50, 0.14);
  box-shadow:
    0 0 28px rgba(212, 147, 50, 0.22),
    inset 0 1px 0 rgba(239, 192, 110, 0.25);
}

.btn-mn,
.btn-en {
  position: relative;
  z-index: 1;
}

.btn-mn {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
}

.btn-en {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.info-panel {
  position: fixed;
  top: 40px;
  right: 42px;
  z-index: 10;
  width: 245px;
  padding: 16px;
  border: 1px solid rgba(89, 198, 184, 0.26);
  border-radius: 8px;
  background: rgba(8, 7, 5, 0.62);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  animation: fade-down 900ms var(--ease) 250ms both;
}

.panel-label {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.info-panel strong,
.info-panel span {
  display: block;
}

.info-panel strong {
  color: var(--cream);
  font-size: 1.4rem;
}

.info-panel span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.hint {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(243, 234, 216, 0.34);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: fade-in 1000ms var(--ease) 800ms both;
}

.hint span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .site-header {
    top: 22px;
    left: 20px;
    width: calc(100% - 40px);
  }

  .site-header p:last-child {
    max-width: 330px;
    font-size: 0.9rem;
  }

  .info-panel {
    top: auto;
    right: 20px;
    bottom: 128px;
    width: 178px;
    padding: 12px;
  }

  .info-panel strong {
    font-size: 1.05rem;
  }

  .controls {
    width: calc(100% - 20px);
    bottom: 34px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .controls button {
    min-width: 0;
    min-height: 56px;
    padding: 6px 4px;
  }

  .btn-mn {
    font-size: 0.9rem;
  }

  .btn-en {
    font-size: 0.48rem;
  }

  .hint {
    display: none;
  }

  #container {
    padding: 182px 20px 150px 20px;
    align-items: center;
  }

  .viewer-stage {
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 8px;
  }

  .sketchfab-embed-wrapper iframe {
    height: calc(100% - 45px);
    min-height: 0;
  }

  .model-credit {
    height: 45px;
    white-space: normal;
  }
}
