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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c1c1c;
  font-family: 'Segoe UI', system-ui, sans-serif;
  position: relative;
  overflow: hidden;
}

#bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7);
  z-index: 0;
}

#canvas {
  display: none;
}

.upload-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.upload-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.upload-btn:active {
  transform: scale(0.95);
}

.upload-btn svg {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.8);
}

.clock-wrapper {
  position: absolute;
  width: 300px;
  height: 300px;
  z-index: 1;
  cursor: grab;
  transition: transform 0.1s ease-out;
  user-select: none;
}

.clock-wrapper.dragging {
  cursor: grabbing;
  transform: scale(1.12);
  transition: transform 0.15s ease-out;
}

.clock-wrapper.dropping {
  animation: bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounce {
  0% { transform: scale(1.12); }
  40% { transform: scale(0.95); }
  70% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.wavy-border {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: rotate 180s linear infinite reverse;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hour-dial,
.clock-face {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
}

.hour-hand {
  width: 18px;
  height: 60px;
  margin-left: -9px;
  border-radius: 9px;
}

.minute-hand {
  width: 15px;
  height: 82px;
  margin-left: -7.5px;
  border-radius: 7.5px;
}

.center-dot {
  position: absolute;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.seconds-dot {
  position: absolute;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  z-index: 15;
}

.day-pentagon {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
}

.day-pentagon svg {
  position: absolute;
  width: 100%;
  height: 100%;
}

.day-pentagon span {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 600;
}

.month-circle {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
}

.month-circle span {
  font-size: 19px;
  font-weight: 600;
}