* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;

  background:
    radial-gradient(at 20% 30%, #ff3b5c 0px, transparent 50%),
    radial-gradient(at 80% 20%, #7c0f1d 0px, transparent 50%),
    radial-gradient(at 50% 80%, #ff6b6b 0px, transparent 50%),
    linear-gradient(135deg, #0b0b0b, #1a0a0f);

  animation: bgMove 12s ease-in-out infinite alternate;
}


@keyframes bgMove {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}


.page {
  width: 100%;
  max-width: 440px;
  padding: clamp(18px, 4vw, 32px);
  border-radius: 22px;

  /* Glassmorphism */
  background: rgba(15, 15, 15, 0.6);   /* Semi-transparent dark */
  backdrop-filter: blur(12px);          /* Frosted glass blur */
  -webkit-backdrop-filter: blur(12px);  /* Safari support */
  border: 1px solid rgba(255, 255, 255, 0.1);

  text-align: center;
  color: white;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.page {
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.05),
      rgba(0, 0, 0, 0.2)
    ),
    rgba(15, 15, 15, 0.6);
}



.logo {
  width: clamp(64px, 18vw, 90px);
  margin-bottom: 10px;
}

h1 {
  margin: 6px 0;
  font-size: clamp(18px, 4.5vw, 22px);
}

.subtitle {
  font-size: clamp(13px, 3.5vw, 14px);
  opacity: 0.75;
}

.upload-btn {
  display: inline-block;
  margin: 16px 0;
  padding: 10px 18px;
  background: #e11d48;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}

.upload-btn:hover {
  background: #be123c;
}

/* 🔥 Responsive canvas wrapper */
.canvas-wrapper {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}

canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: black;
  touch-action: none;
  cursor: grab;
}

.controls {
  margin-top: 14px;
  font-size: 13px;
}

.controls span {
  display: block;
  margin-bottom: 6px;
  opacity: 0.7;
}

input[type="range"] {
  width: 100%;
}

.quality {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  font-size: 13px;
}

button {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  background: #e11d48;
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  background: #be123c;
}

.footer {
  margin-top: 18px;
  font-size: 12px;
  opacity: 0.5;
}

/* 📱 Small phones */
@media (max-width: 380px) {
  .quality {
    flex-direction: column;
    gap: 6px;
  }
}

/* -------- Modern Slider -------- */
.slider-container {
  position: relative;
  width: 100%;
  height: 12px;
  margin: 6px 0 14px;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 12px;
  background: #444;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: #e11d48;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: background 0.3s, transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #ff2f6f;
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: #e11d48;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: background 0.3s, transform 0.2s;
}

/* -------- Modern HD / Ultra HD toggle -------- */
.modern-toggle {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.modern-toggle label {
  position: relative;
  cursor: pointer;
  padding: 6px 16px;
  background: #222;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  color: #ccc;
  transition: background 0.3s, color 0.3s;
  user-select: none;
}

.modern-toggle label span {
  pointer-events: none;
}

.modern-toggle input[type="radio"] {
  display: none;
}

.modern-toggle input[type="radio"]:checked + span,
.modern-toggle input[type="radio"]:checked {
  color: white;
}

.modern-toggle input[type="radio"]:checked + span {
  position: relative;
}

.modern-toggle label:hover {
  background: #333;
}

input[type="range"]::-webkit-slider-thumb {
  box-shadow: 0 4px 12px rgba(255, 29, 72, 0.4);
}
