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

html, body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top, #1b2550 0, #050716 40%, #010109 100%);
  color: #e8f7ff;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-bar {
  height: 56px;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #020715 0, #050c24 50%, #0b1536 100%);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.85);
}

.brand .title {
  font-size: 0.9rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #7ee0ff;
}

.brand .subtitle {
  font-size: 0.7rem;
  opacity: 0.7;
  letter-spacing: 0.18em;
  margin-top: 3px;
}

/* Layout */

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
  gap: 28px;
  padding: 24px 32px 32px;
}

/* MAIN COLUMN */

.main-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* MAIN CLOCK */

.main-clock-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clock-shell {
  position: relative;
  width: min(46vh, 380px);
  aspect-ratio: 1/1;
  display: flex;
  justify-content: center;
  align-items: center;
  filter:
    drop-shadow(0 0 22px rgba(0, 255, 255, 0.8))
    drop-shadow(0 0 32px rgba(255, 0, 255, 0.6));
}

.clock-face {
  position: relative;
  width: 100%;
  height: 100%;
  background-image: url('clock_face.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* MAIN HANDS */

.hand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(0deg);
  border-radius: 999px;
}

.hand-hour {
  width: 6px;
  height: 26%;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, #00f6ff 40%, #fff 100%);
  box-shadow:
    0 0 10px rgba(0, 255, 255, 0.8),
    0 0 20px rgba(255, 255, 255, 0.9);
}

.hand-minute {
  width: 4px;
  height: 34%;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, #00f6ff 30%, #ffffff 100%);
  box-shadow:
    0 0 12px rgba(0, 255, 255, 0.9),
    0 0 24px rgba(255, 255, 255, 0.95);
}

.hand-second {
  width: 2px;
  height: 38%;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, #ff3bff 40%, #ffffff 100%);
  box-shadow:
    0 0 14px rgba(255, 0, 255, 0.9),
    0 0 28px rgba(255, 255, 255, 0.95);
}

.clock-info {
  margin-top: 14px;
  text-align: center;
}

.zone-label {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.9;
}

.digital {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 1.6rem;
  margin-top: 6px;
}

.date {
  margin-top: 4px;
  font-size: 0.78rem;
  opacity: 0.7;
}

.controls {
  margin-top: 12px;
  font-size: 0.8rem;
}

.controls select {
  margin-left: 6px;
  background: rgba(3, 12, 40, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(126, 224, 255, 0.6);
  color: #e8f7ff;
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* STAGE + DANCER */

.stage-block {
  position: relative;
  width: 100%;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage-frame {
  position: relative;
  width: 100%;
  max-width: 720px;
  border-radius: 999px;
  padding: 6px;
  background: radial-gradient(circle at 10% 0, #00e1ff 0, #020615 40%, #000 100%);
  box-shadow:
    0 0 34px rgba(0, 255, 255, 0.7),
    0 0 60px rgba(255, 0, 255, 0.6),
    0 0 120px rgba(0, 120, 255, 0.7);
}

/* 21:9 aspect ratio */
.stage-inner {
  position: relative;
  width: 100%;
  padding-top: calc(100% * 9 / 21);
  border-radius: 999px;
  overflow: hidden;
}

.stage-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: block;
}

.stage-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.4);
}

/* Dancer */

.dancer-wrapper {
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

/* Full dance effect on single PNG */
.dancer {
  height: 220px;
  max-height: 26vh;
  image-rendering: auto;
  transform-origin: 50% 100%;
  filter:
    drop-shadow(0 0 18px rgba(0, 255, 255, 0.95))
    drop-shadow(0 0 32px rgba(255, 0, 255, 0.95));
  animation:
    dancer-bounce 2.8s ease-in-out infinite,
    dancer-shuffle 3.4s ease-in-out infinite,
    dancer-tilt 3s ease-in-out infinite,
    dancer-glow 2.2s ease-in-out infinite;
}

/* Vertical bounce */
@keyframes dancer-bounce {
  0%   { transform: translate(-2px, 0) scale(1); }
  20%  { transform: translate(0, -14px) scale(1.02); }
  40%  { transform: translate(3px, -24px) scale(1.04); }
  60%  { transform: translate(-1px, -16px) scale(1.02); }
  80%  { transform: translate(2px, -20px) scale(1.03); }
  100% { transform: translate(-2px, 0) scale(1); }
}

/* Left-right shuffle */
@keyframes dancer-shuffle {
  0%   { transform: translateX(-6px); }
  25%  { transform: translateX(4px); }
  50%  { transform: translateX(8px); }
  75%  { transform: translateX(-4px); }
  100% { transform: translateX(-6px); }
}

/* Tilt / pseudo arm-wave illusion */
@keyframes dancer-tilt {
  0%   { transform: rotate(-4deg); }
  25%  { transform: rotate(3deg); }
  50%  { transform: rotate(6deg); }
  75%  { transform: rotate(-2deg); }
  100% { transform: rotate(-4deg); }
}

/* Neon glow pulsing */
@keyframes dancer-glow {
  0% {
    filter:
      drop-shadow(0 0 14px rgba(0, 255, 255, 0.85))
      drop-shadow(0 0 26px rgba(255, 0, 255, 0.7));
  }
  30% {
    filter:
      drop-shadow(0 0 22px rgba(0, 255, 255, 1))
      drop-shadow(0 0 40px rgba(255, 0, 255, 0.95));
  }
  60% {
    filter:
      drop-shadow(0 0 20px rgba(0, 180, 255, 0.9))
      drop-shadow(0 0 34px rgba(255, 60, 255, 0.9));
  }
  100% {
    filter:
      drop-shadow(0 0 14px rgba(0, 255, 255, 0.85))
      drop-shadow(0 0 26px rgba(255, 0, 255, 0.7));
  }
}

/* WORLD COLUMN */

.world-column {
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.world-column h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.8;
  margin-bottom: 14px;
}

.world-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.world-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: radial-gradient(circle at top left, #19254b 0, #050816 55%, #000 100%);
  box-shadow:
    0 0 14px rgba(0, 0, 0, 0.85),
    0 0 18px rgba(0, 200, 255, 0.25);
}

/* Mini clocks */

.mini-clock {
  flex-shrink: 0;
}

.mini-face {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(140, 240, 255, 0.9);
  box-shadow:
    0 0 10px rgba(0, 255, 255, 0.7),
    0 0 18px rgba(255, 0, 255, 0.6);
  background:
    radial-gradient(circle at 25% 20%, rgba(0,255,255,0.4) 0, transparent 50%),
    radial-gradient(circle at 75% 80%, rgba(255,0,255,0.5) 0, transparent 55%),
    radial-gradient(circle at center, #020619 0, #050717 55%, #000 100%);
}

.mini-hand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(0deg);
  border-radius: 999px;
  background: #e8f7ff;
}

.mini-hour {
  width: 3px;
  height: 38%;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

.mini-minute {
  width: 2px;
  height: 48%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

/* World meta */

.world-meta .world-city {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.world-meta .world-time {
  margin-top: 4px;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9rem;
}

/* Responsive */

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .world-column {
    margin-top: 18px;
  }

  .world-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dancer-wrapper {
    position: relative;
    margin-top: 10px;
  }
}
