:root {
  --primary: #0294D8;
  /* Pulse Blue */
  --secondary: #1a1a1a;
  /* Graphite */
  --accent: #444444;
  /* Chrome */
  --text: #ffffff;
  --subtext: rgba(255, 255, 255, 0.4);
  --bg: #020204;
  --layer-bg: rgba(0, 0, 0, 0.5);
  --layer-border: rgba(255, 255, 255, 0.05);
  --font-main: 'Outfit', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100;300;400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: transparent;
  color: var(--text);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
}

body.custom-cursor-enabled {
  cursor: none;
}

#hud-cursor {
  display: none;
  opacity: 0;
  /* Triple-locked invisibility */
}

body.custom-cursor-enabled #hud-cursor {
  display: flex;
}

.hidden {
  display: none;
}

canvas#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  /* Moved to lower layer, but above body */
  display: block;
  background-color: var(--bg);
  /* Keep base color here if WebGL fails to load */
}

main#ui-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  pointer-events: none;
  /* Disable interference with engine interaction */
  z-index: 1;
  padding: 7vh 2rem 10vh 8%;
  overflow-y: auto;
}

/* Minimalist Scrollbar */
main#ui-layer::-webkit-scrollbar {
  width: 4px;
}

main#ui-layer::-webkit-scrollbar-track {
  background: transparent;
}

main#ui-layer::-webkit-scrollbar-thumb {
  background: rgba(0, 243, 255, 0.2);
  border-radius: 2px;
}

main#ui-layer::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 243, 255, 0.5);
}

.content {
  background: var(--layer-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4rem;
  border-radius: 4px;
  text-align: left;
  max-width: 600px;
  animation: fadeIn 2s ease-out;
  pointer-events: none;
  /* Let clicks pass to the engine */
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.logo-img {
  display: block;
  margin: 0;
  width: 100%;
  max-width: 280px;
  opacity: 1;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.brand-info .subtitle {
  font-size: 0.9rem;
  color: var(--primary);
  letter-spacing: 0.05em;
  text-transform: none;
  font-weight: 400;
  margin: 0;
  opacity: 0.8;
}

.brand-info .description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  text-transform: none;
  letter-spacing: 0;
  max-width: 480px;
  margin: 0;
}

.brand-info .products {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: none;
  letter-spacing: 0.05em;
  font-weight: 300;
  margin: 0;
}

.brand-info .products span {
  color: #fff;
  font-weight: 700;
}

.brand-info .status {
  font-size: 0.75rem;
  color: var(--primary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 1rem 0 0 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-info .status::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--primary);
  display: block;
}

.brand-info h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.1;
  color: #fff;
  text-transform: uppercase;
  margin: 0;
}

p {
  font-size: 0.9rem;
  line-height: 2;
  color: var(--subtext);
  margin: 0 0 3rem 0;
  /* Changed from auto margin to left-flush */
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  max-width: 500px;
}

.btn {
  display: inline-block;
  display: none;
  padding: 1rem 3rem;
  background: transparent;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--primary);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.btn:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.4);
  transform: translateX(10px);
}

footer {
  position: relative;
  margin-top: auto;
  /* Pushes to bottom of scroll area if content is short */
  padding: 6rem 1.5rem 3rem 0;
  /* Add space-top to prevent overlap */
  opacity: 0.2;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Sidebar Info (Minimal) */
.specs {
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: right;
  opacity: 0.5;
  pointer-events: none;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-value-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem; /* Tighter gap */
}

.reset-icon {
  display: none; /* Occupies no space when hidden */
  align-items: center;
  justify-content: center;
  pointer-events: none;
  cursor: pointer;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 0;
  height: 14px; /* Fix height for alignment */
  line-height: 0;
}

.reset-icon.show-reset {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.reset-icon:hover {
  color: #fff;
  filter: drop-shadow(0 0 5px var(--primary));
}

.spec-label {
  font-size: 0.7rem;
  color: var(--primary);
  letter-spacing: 0.2em;
  margin-bottom: 0.3rem;
  text-shadow: 0px 0px 1px rgba(255, 255, 255, 1), -0px -0px 3px rgb(0 0 0);
  font-weight: 700;
}

/* HUD CURSOR - MECHANICAL HAND */
#hud-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
  opacity: 0;
  /* Pure sharpness */
  mix-blend-mode: normal;
  /* Avoid blur from screen blend */
  transform: translateZ(0);
  /* Force hardware layer */
}

#hud-cursor svg {
  width: 100%;
  height: 100%;
  shape-rendering: geometricPrecision;
  filter: none;
  transition: filter 0.2s ease;
}

#hud-cursor.grabbing svg {
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
}

.logo-path {
  fill: white;
  transition: fill 0.15s ease;
}

#hud-cursor.grabbing .logo-path {
  fill: var(--primary);
}



.cursor-trail {
  position: fixed;
  width: 6px;
  height: 6px;
  background: white;
  /* Final state */
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  box-shadow: 0 0 10px rgba(2, 146, 214, 0.6);
  opacity: 0;
  transition: opacity 1.0s ease-out, transform 1.0s ease-out, background 0.1s linear;
  transform: scale(0.5);
  mix-blend-mode: add;
}

@keyframes cursorPulse {
  0% {
    transform: translate(-16px, -16px) scale(1);
  }

  50% {
    transform: translate(-16px, -16px) scale(1.1);
  }

  100% {
    transform: translate(-16px, -16px) scale(1);
  }
}

.cursor {
  display: inline-block;
  width: 0.5rem;
  height: 1rem;
  background-color: var(--primary);
  margin-left: 0.4rem;
  animation: blink 1s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    filter: blur(10px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes criticalFlash {
  0% {
    opacity: 1;
    text-shadow: 0 0 15px rgba(255, 0, 51, 0.8);
  }

  50% {
    opacity: 0.3;
    text-shadow: 0 0 5px rgba(255, 0, 51, 0.2);
  }

  100% {
    opacity: 1;
    text-shadow: 0 0 15px rgba(255, 0, 51, 0.8);
  }
}

.critical-alert {
  animation: criticalFlash 0.3s ease-in-out infinite;
}

/* Response Design */
@media (max-width: 768px) {
  main#ui-layer {
    justify-content: flex-start;
    align-items: center;
    padding: 2rem 1.5rem;
    height: auto;
    min-height: 100%;
    position: absolute;
    overflow-y: visible;
  }

  .content {
    padding: 2.5rem 1.5rem;
    width: 100%;
    max-width: none;
    margin-bottom: 0;
  }

  .brand-info h1 {
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
  }

  p {
    font-size: 0.75rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
  }

  .btn {
    padding: 0.8rem 2rem;
    width: 100%;
    font-size: 0.75rem;
  }

  .specs {
    position: relative;
    right: 0;
    top: 0;
    transform: none;
    text-align: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    background: var(--layer-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 2.5rem 1rem;
    border-radius: 4px;
    width: 100%;
    opacity: 1;
  }

  .spec-item {
    align-items: center;
  }

  footer {
    position: relative;
    bottom: 2rem;
    left: 0;
    width: 100%;
    text-align: center;
    margin-top: 2rem;
  }
}