:root {
  --accent: #34f5ff;
  --accent-strong: #8afcff;
  --accent-soft: rgba(52, 245, 255, 0.18);
  --surface: rgba(6, 18, 24, 0.68);
  --text: #f4fbff;
  --muted: #a4bec9;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: #071014;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="violet"] {
  --accent: #b46cff;
  --accent-strong: #e3c3ff;
  --accent-soft: rgba(180, 108, 255, 0.2);
}

body[data-theme="amber"] {
  --accent: #ffcc4d;
  --accent-strong: #ffe7a3;
  --accent-soft: rgba(255, 204, 77, 0.2);
}

#container {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(16px, 3vh, 30px) 0;
  position: relative;
  isolation: isolate;
}

#canvas3d {
  position: fixed;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 2;
  opacity: 0.82;
  pointer-events: none;
}

.animated-image-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 38%),
    url('circle.png') repeat,
    #071014;
  background-size: 200px 200px;
  animation: moveBackground 10s linear infinite;
  z-index: 1;
}

@keyframes moveBackground {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100% 100%;
  }
}

.holo-interface {
  position: relative;
  z-index: 5;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(14px, 2.3vh, 22px);
  width: min(92vw, 640px);
  min-height: calc(100svh - clamp(32px, 6vh, 60px));
  padding: clamp(12px, 2.4vh, 24px);
  text-align: center;
}

.status-panel {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: clamp(14px, 2.4vh, 18px) clamp(16px, 3vw, 22px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.eyebrow,
.status-panel h1,
.status-panel p {
  margin: 0;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-panel h1 {
  font-size: clamp(2.25rem, 6vw, 3.9rem);
  line-height: 0.95;
}

.status-panel p {
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.holo-button {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(176px, 30vw, 240px);
  aspect-ratio: 1;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  filter: drop-shadow(0 0 32px var(--accent-soft));
}

.button-ring,
.button-core {
  position: absolute;
  border-radius: 50%;
}

.button-ring {
  inset: 0;
  border: 2px solid var(--accent);
  background:
    radial-gradient(circle, transparent 46%, var(--accent-soft) 47%, transparent 68%),
    conic-gradient(from 0deg, transparent, var(--accent), transparent 34%, var(--accent-strong), transparent);
  box-shadow:
    0 0 38px var(--accent-soft),
    inset 0 0 28px var(--accent-soft);
  animation: spin 7s linear infinite;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.button-core {
  inset: 22%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.34), var(--accent-soft) 42%, rgba(2, 8, 12, 0.92));
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.12);
}

.button-label,
.button-subtext {
  position: relative;
  z-index: 1;
}

.button-label {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 800;
}

.button-subtext {
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.holo-button:hover .button-ring,
.holo-button:focus-visible .button-ring {
  transform: scale(1.07);
  box-shadow:
    0 0 54px var(--accent),
    inset 0 0 32px var(--accent-soft);
}

.holo-button:focus-visible,
.theme-option:focus-visible,
.utility-button:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 5px;
}

.holo-button.is-active .button-ring {
  animation-duration: 1.1s;
}

.holo-button.is-loading .button-subtext {
  color: var(--text);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.theme-switcher {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(4, 14, 18, 0.64);
}

.theme-option {
  width: 32px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
}

.theme-option[data-theme="cyan"] {
  background: #34f5ff;
}

.theme-option[data-theme="violet"] {
  background: #b46cff;
}

.theme-option[data-theme="amber"] {
  background: #ffcc4d;
}

.theme-option.is-active {
  border-color: #fff;
  box-shadow: 0 0 22px var(--accent);
}

.utility-button {
  min-height: 42px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(5, 18, 24, 0.76);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.utility-button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.toast {
  position: fixed;
  right: clamp(16px, 4vw, 34px);
  bottom: clamp(16px, 4vh, 34px);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--text);
  background: rgba(4, 14, 18, 0.88);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.36),
    0 0 28px var(--accent-soft);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  translate: 0 16px;
  transition: opacity 180ms ease, translate 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  translate: 0 0;
}

.toast-icon {
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
  flex: 0 0 auto;
}

#toastMessage {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

@media (max-width: 560px) {
  .holo-interface {
    min-height: calc(100svh - 32px);
    padding: 18px;
  }

  .controls,
  .utility-button {
    width: 100%;
  }

  .theme-switcher {
    justify-content: center;
    width: 100%;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
  }
}

@media (max-height: 760px) and (min-width: 561px) {
  #container {
    padding: 12px 0;
  }

  .holo-interface {
    gap: 12px;
    min-height: calc(100svh - 24px);
    padding: 10px 18px;
  }

  .status-panel {
    gap: 6px;
    padding: 12px 18px;
  }

  .eyebrow {
    font-size: 0.68rem;
  }

  .status-panel h1 {
    font-size: clamp(2rem, 5vw, 3.15rem);
  }

  .status-panel p {
    font-size: 0.92rem;
  }

  .holo-button {
    width: clamp(168px, 24vw, 205px);
  }

  .theme-option {
    width: 28px;
  }

  .utility-button {
    min-height: 38px;
    padding: 9px 14px;
    font-size: 0.86rem;
  }
}
