:root {
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.2);
  --neon-accent: #667eea;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.9);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

body {
  overflow: hidden;
  background: #050508;
  font-family: "Outfit", sans-serif;
  color: var(--text-main);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.glass-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 24px;
  color: var(--text-main);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: absolute;
  z-index: 10;
  overflow: hidden;
}

#instruction-title {
  font-weight: 500;
  font-size: 18px;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.instruction-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  font-weight: 300;
}

.density-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow:
    0 0 15px rgba(255, 255, 255, 0.8),
    0 2px 5px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  margin-top: -6px;
  position: relative;
  z-index: 2;
}

.density-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.3) var(--val, 100%),
      rgba(255, 255, 255, 0.05) var(--val, 100%));
  border-radius: 3px;
}

.density-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(255, 255, 255, 1);
}

#loginform {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  padding: 28px;
  z-index: 30;
}

#loginform .logo-container {
  text-align: center;
  margin-bottom: 24px;
}

#loginform .logo-container img {
  height: 180px;
  width: auto;
  margin-bottom: 12px;
}

#loginform p {
  font-size: 14px;
  color: #ffffff;
  text-align: center;
  font-weight: 500;
}

.login-field {
  margin-bottom: 12px;
}

.login-field label {
  display: block;
  font-size: 13px;
  color: #ffffff;
  margin-bottom: 6px;
  font-weight: 600;
}

.login-field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #12131c;
  color: #ffffff;
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  user-select: text;
  -webkit-user-select: text;
}

.login-field input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.login-field input:focus {
  border-color: rgba(165, 180, 252, 0.7);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.22);
}

.login-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 14px;
}

.login-meta a {
  color: #ffffff;
  text-decoration: none;
}

.login-submit {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(120deg, rgba(2, 2, 2, 0.9), rgba(49, 49, 49, 0.92));
  color: white;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  letter-spacing: 0.02em;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.login-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.login-bottom {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.login-bottom a {
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 780px) {
  #loginform {
    width: calc(100vw - 24px);
    padding: 18px;
    top: 54%;
  }
}