* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a1008;
  touch-action: none;
     -webkit-user-select: none;
  user-select: none;
   -webkit-tap-highlight-color: transparent;
}

#sim {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#ui {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#free-btn {
  background: rgba(255, 180, 60, 0.12);
  color: #ffcc66;
  border: 1px solid rgba(255, 180, 60, 0.25);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

#free-btn:hover {
  background: rgba(255, 180, 60, 0.22);
  border-color: rgba(255, 180, 60, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 180, 60, 0.15);
}

#free-btn:active {
  background: rgba(255, 180, 60, 0.32);
  transform: translateY(0px) scale(0.97);
}

#download-ui {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 20;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#dl-btn {
  background: rgba(255, 140, 80, 0.15);
  color: #ffaa66;
  border: 1px solid rgba(255, 140, 80, 0.3);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

#dl-btn:hover {
  background: rgba(255, 140, 80, 0.25);
  border-color: rgba(255, 140, 80, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 140, 80, 0.15);
}

#dl-btn:active {
  background: rgba(255, 140, 80, 0.4);
  transform: translateY(0px) scale(0.97);
}

.frozen #overlay {
  opacity: 1;
  display: block !important;
}

.frozen #ui {
  display: none !important;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.frozen #free-btn {
  display: none !important;
}

.frozen #download-ui {
  display: block !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.frozen #hint-text {
  opacity: 0 !important;
}

#free-btn.active {
  background: rgba(255, 120, 60, 0.2);
  color: #ff9955;
  border-color: rgba(255, 120, 60, 0.4);
}

#hint-text {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 200, 120, 0.45);
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
