:root {
  --page: #540082;
  --panel: #287ed0;
  --panel-shadow: rgba(0, 0, 0, 0.28);
  --ink: #050505;
  --white: #f7f0ff;
  --second: #ff1616;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: Times, "Times New Roman", serif;
  background: var(--page);
  color: var(--white);
}

.clock-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.clock-shell {
  width: min(100%, 290px);
}

.digital-panel,
.analog-panel {
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 12px 22px var(--panel-shadow);
}

.digital-panel {
  display: grid;
  place-items: center;
  min-height: 85px;
  padding: 14px;
}

#digitalTime {
  display: block;
  font-size: clamp(2rem, 12vw, 2.5rem);
  line-height: 1;
  letter-spacing: 0;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.analog-panel {
  margin-top: 24px;
  padding: 24px;
}

.clock-face {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--panel);
}

.clock-marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.clock-marks line {
  stroke: var(--ink);
  stroke-linecap: butt;
}

.clock-marks .minor-mark {
  stroke-width: 1.7;
}

.clock-marks .major-mark {
  stroke-width: 3.2;
}

.hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 8px;
  border-radius: 999px 999px 2px 2px;
  background: var(--ink);
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(0deg);
}

.hour-hand {
  height: 34%;
}

.minute-hand {
  height: 47%;
}

.second-hand {
  width: 4px;
  height: 49%;
  background: var(--second);
}

.center-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.center-pin::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: var(--second);
}

.date-line {
  margin: 13px 0 0;
  text-align: center;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 15px;
  line-height: 2.0;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 720px) {
  .clock-shell {
    width: 320px;
  }

  .digital-panel {
    min-height: 82px;
  }
}
