:root {
  --bg-overlay: rgba(4, 10, 24, 0.58);
  --card: rgba(255, 255, 255, 0.10);
  --stroke: rgba(255, 255, 255, 0.16);
  --text: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.72);
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--text);
  background:
    linear-gradient(var(--bg-overlay), var(--bg-overlay)),
    url("https://images.unsplash.com/photo-1516321497487-e288fb19713f?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.20), transparent 28%),
    radial-gradient(circle at bottom right, rgba(167, 139, 250, 0.18), transparent 30%);
  z-index: -1;
  pointer-events: none;
}

.ui {
  width: min(720px, calc(100vw - 24px));
  padding: 22px 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.07));
  border: 1px solid var(--stroke);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  text-align: center;
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
}

.title {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 2.2rem);
  letter-spacing: 0.2px;
  line-height: 1.1;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(0.86rem, 1.8vw, 1rem);
  line-height: 1.5;
}

.hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.88rem;
}

.hint-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px rgba(125, 211, 252, 0.14);
  flex: 0 0 auto;
}

.box {
  position: absolute;
  width: clamp(74px, 12vw, 128px);
  height: clamp(74px, 12vw, 128px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  font-size: clamp(0.82rem, 1.8vw, 1.02rem);
  font-weight: 700;
  letter-spacing: 0.3px;
  color: white;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(59, 130, 246, 0.72)),
    linear-gradient(135deg, #111827, #64748b);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.25s ease,
    filter 0.18s ease;
  overflow: hidden;
}

.box::before {
  content: "";
  position: absolute;
  inset: -35%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 50%);
  transform: translate(-25%, -25%);
  pointer-events: none;
}

.box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 48%);
  pointer-events: none;
}

.box:hover {
  transform: scale(1.06) rotate(-1deg);
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.42),
    0 0 0 6px rgba(125, 211, 252, 0.08);
  filter: brightness(1.08);
}

.box:active {
  cursor: grabbing;
  transform: scale(0.98);
}

.floating {
  animation: floaty 2.8s ease-in-out infinite;
}

@keyframes floaty {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-4px);
  }
}

.footer-note {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  text-align: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  max-width: calc(100vw - 28px);
}

@media (max-width: 600px) {
  .ui {
    width: calc(100vw - 18px);
    padding: 18px 16px;
    top: 10px;
  }

  .subtitle {
    font-size: 0.86rem;
  }

  .hint {
    font-size: 0.8rem;
    padding: 9px 12px;
  }

  .footer-note {
    bottom: 12px;
    font-size: 0.75rem;
  }

  body {
    background-attachment: scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating {
    animation: none;
  }

  .box {
    transition: none;
  }
}