* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: white;
  background: #080808;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(78, 255, 120, 0.16), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(135deg, #050505 0%, #111 50%, #050505 100%);
  z-index: -1;
}

.app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 10px;
  color: #6dff95;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.sub {
  max-width: 600px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1.55;
}

.hero-glasses {
  width: min(340px, 32vw);
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.65));
}

.workspace {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

.canvas-wrap,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.canvas-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 620px;
  padding: 22px;
}

canvas {
  width: min(100%, 620px);
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background:
    linear-gradient(45deg, #202020 25%, transparent 25%),
    linear-gradient(-45deg, #202020 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #202020 75%),
    linear-gradient(-45deg, transparent 75%, #202020 75%);
  background-size: 34px 34px;
  background-position: 0 0, 0 17px, 17px -17px, -17px 0;
  background-color: #151515;
  cursor: grab;
}

canvas:active {
  cursor: grabbing;
}

.hint {
  position: absolute;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.panel {
  padding: 22px;
}

.upload-box {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 130px;
  border: 2px dashed rgba(109, 255, 149, 0.42);
  border-radius: 22px;
  background: rgba(109, 255, 149, 0.08);
  cursor: pointer;
  transition: 0.2s ease;
}

.upload-box:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 255, 149, 0.8);
}

.upload-box input {
  display: none;
}

.upload-box span {
  font-size: 20px;
  font-weight: 900;
}

.upload-box small,
.tip {
  color: rgba(255, 255, 255, 0.56);
}

.controls {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

label {
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  margin-top: 10px;
  accent-color: #6dff95;
}

.buttons {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 900;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  color: #050505;
  background: #6dff95;
}

.tip {
  margin: 18px 0 0;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-glasses {
    width: 100%;
    max-width: 320px;
  }

  .canvas-wrap {
    min-height: auto;
  }
}
