:root{
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --border: #e5e7eb;
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* Top bar: left controls, right "now" */
.top{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.controls{
  min-width: 320px;
  max-width: 520px;
  flex: 1;
}

.row{
  display: flex;
  gap: 10px;
  align-items: center;
}

select, button{
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0 12px;
}

select{ flex: 1; }
button{ cursor: pointer; }

/* Right side bold date/time */
.now{
  margin-left: auto;
  text-align: right;
  font-weight: 850;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
  color: #111;
  background: transparent;
  border: none;
  padding: 0;
}

/* Grid: always 4 per row + bigger gap */
.grid{
  margin-top: 18px;
  display: grid;
  gap: 22px; /* bigger spacing */
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Card: minimal (no box/shadow) */
.card{
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 10px 6px 0;
}

.cardHead{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.city{
  font-weight: 650;
  margin: 0;
  font-size: 14px;
}

/* Remove button only on hover */
.remove{
  border: 1px solid var(--border);
  background: #fff;
  height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.card:hover .remove{
  opacity: 1;
  pointer-events: auto;
}

@media (hover: none){
  .remove{ opacity: 1; pointer-events: auto; }
}

.remove[disabled]{
  opacity: 0.45;
  cursor: not-allowed;
}

/* Clock face (neutral, no yellow) */
.clock{
  width: 168px;
  height: 168px;
  margin: 10px auto 0;
  border-radius: 50%;
  position: relative;

  border: 2px solid rgba(17,17,17,0.85);
  background: radial-gradient(circle at 30% 28%, #ffffff 0%, #f8f8f8 55%, #efefef 100%);
  box-shadow:
    0 10px 24px rgba(0,0,0,0.06),
    inset 0 0 0 8px rgba(0,0,0,0.05);
}

.ticks{
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  z-index: 1;
}

.tick{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 8px;
  background: rgba(0,0,0,0.28);
  transform-origin: 50% 74px;
}

.tick.big{
  width: 2px;
  height: 14px;
  background: rgba(0,0,0,0.55);
}

/* Hands: ensure visible and above ticks */
.hand{
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: 0% 50%;
  transform: translateY(-50%) rotate(0deg);
  border-radius: 999px;
  z-index: 3;
}

.hand.hour{
  width: 46px;
  height: 6px;
  background: #111;
  box-shadow: 0 1px 2px rgba(0,0,0,0.20);
}

.hand.min{
  width: 66px;
  height: 4px;
  background: #111;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}

.hand.sec{
  width: 74px;
  height: 2px;
  background: #d11; /* classic red seconds hand */
  box-shadow: none;
  z-index: 4;
}

.center{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(0,0,0,0.15);
}

/* Digital time under clock centered */
.meta{
  margin-top: 10px;
  text-align: center;
}

.time{
  display: block;
  width: 100%;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}

/* Hide tz line if it ever exists */
.tz{ display: none !important; }

/* Bigger screens: bigger clocks + more spacing (still 4 per row) */
@media (min-width: 1400px){
  .grid{ gap: 30px; }
  .clock{ width: 190px; height: 190px; }
  .card{ padding: 16px 10px 0; }
  .city{ font-size: 15px; }
  .now{ font-size: 20px; }
}

@media (min-width: 1800px){
  .grid{ gap: 38px; }
  .clock{ width: 210px; height: 210px; }
  .card{ padding: 18px 12px 0; }
  .city{ font-size: 16px; }
  .now{ font-size: 22px; }
}