/* Global reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  background: #fff;
  padding: 8px;
  z-index: 1000;
}

/* Body styling */
body {
  font-family: "Orbitron", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  color: #333;
  overflow: hidden;
}

/* UI panel */
#ui {
  position: absolute;
  top: 20px;
  left: 20px;
  background: #d0d0d0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 200px;
  transition: all 0.3s ease;
}

#ui:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

#status {
  font-size: 0.8rem;
  color: #d62424;
  margin-bottom: 8px;
}

/* Labels and inputs */
label {
  font-size: 1rem;
  color: #374151;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

input[type="color"],
input[type="number"] {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 6px;
  font-size: 1rem;
  width: 90px;
  transition: border-color 0.3s ease;
}

input[type="color"]:hover,
input[type="number"]:hover {
  border-color: #ff2fa1;
}

/* Buttons */
button {
  font-family: "Orbitron", sans-serif;
  background: #000000;
  color: #eeeeee;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition-duration: 0.4s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
  background: #71346c;
}

#addRandomBrick {
  color: #1b1a1a;
  background: linear-gradient(132deg,
      #565656,
      #72fffb,
      #a6ffc7,
      #ff47c4);
  background-size: 100% 100%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#addRandomBrick::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.5),
      transparent);
  transform: skewX(-30deg);
  transition: all 0.8s ease;
}

#addRandomBrick:hover::before {
  left: 100%;
}

#addRandomBrick:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

#resetCamera {
  background-color: #a11717;
  transition-duration: 0.4s;
}

#resetCamera:hover {
  background-color: #ce2020;
}

#webgl-fallback {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  #ui {
    width: 90%;
    left: 50%;
    transform: translateX(-50%);
  }
}