* { box-sizing: border-box; }

:root {
  --bg: #050505;
  --panel: #101010;
  --panel2: #171717;
  --text: #f7f7f7;
  --muted: #a5a5a5;
  --gold: #f5bd25;
  --gold2: #ffd95a;
  --red: #e52b24;
  --blue: #1552a0;
  --border: rgba(245,189,37,.22);
  --shadow: 0 18px 55px rgba(0,0,0,.48);
}

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 50% -10%, rgba(245,189,37,.13), transparent 32%),
    radial-gradient(circle at 0% 100%, rgba(21,82,160,.10), transparent 30%),
    #050505;
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

body { padding: 20px 24px 16px; }

.topbar {
  max-width: 1550px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.logo {
  width: 300px;
  max-width: 32vw;
  height: auto;
  max-height: 105px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 5px 12px rgba(245,189,37,.22));
}

.title-block { min-width: 0; }

.eyebrow {
  color: var(--gold2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 3px;
  margin-bottom: 7px;
}

h1 {
  margin: 0;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.02;
  letter-spacing: -1.2px;
  text-transform: uppercase;
}

.title-block p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

button {
  border: 1px solid rgba(255,255,255,.13);
  color: var(--text);
  background: rgba(255,255,255,.055);
  border-radius: 9px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 850;
  letter-spacing: .6px;
}

button:hover { background: rgba(255,255,255,.12); }

.mode-btn.active {
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  color: #120e03;
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(245,189,37,.16);
}

.icon-btn { font-size: 19px; line-height: 1; }

.clock-grid {
  max-width: 1550px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.clock-card {
  position: relative;
  overflow: hidden;
  min-height: 245px;
  background: linear-gradient(145deg, rgba(24,24,24,.98), rgba(10,10,10,.98));
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.clock-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--blue), var(--gold));
  opacity: .9;
}

.clock-card::after {
  content: "";
  position: absolute;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,189,37,.10), transparent 68%);
  right: -65px;
  top: -65px;
  pointer-events: none;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.city {
  font-size: 21px;
  font-weight: 900;
}

.country {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.flag { font-size: 27px; }

.digital {
  margin-top: 27px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(36px, 4.4vw, 57px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
}

.seconds { color: var(--gold2); }

.date {
  margin-top: 11px;
  color: #c3c3c3;
  font-size: 13px;
  text-transform: capitalize;
}

.offset {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(245,189,37,.075);
  border: 1px solid rgba(245,189,37,.12);
  color: #cfcfcf;
  font-size: 11px;
}

.analog-wrap {
  display: none;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.clock-card.analog-mode .digital { display: none; }
.clock-card.analog-mode .analog-wrap { display: flex; }

.analog {
  width: 145px;
  height: 145px;
  border: 5px solid #e9e9e9;
  border-radius: 50%;
  position: relative;
  background:
    repeating-conic-gradient(from -0.5deg, rgba(255,255,255,.72) 0deg 1deg, transparent 1deg 30deg),
    #141414;
  box-shadow: inset 0 0 24px rgba(0,0,0,.7), 0 10px 30px rgba(0,0,0,.35);
}

.analog::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #111;
  z-index: 0;
}

.number {
  position: absolute;
  z-index: 1;
  font-weight: 900;
  font-size: 13px;
  transform: translate(-50%, -50%);
}

.n12 { left: 50%; top: 9%; }
.n3  { left: 91%; top: 50%; }
.n6  { left: 50%; top: 91%; }
.n9  { left: 9%; top: 50%; }

.hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  border-radius: 8px;
  z-index: 3;
  transform: translateX(-50%) rotate(0deg);
}

.hour-hand { width: 6px; height: 36px; background: #f4f4f4; }
.minute-hand { width: 4px; height: 51px; background: #55a7ff; }
.second-hand { width: 2px; height: 57px; background: var(--gold2); }

.center-dot {
  position: absolute;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--gold);
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}

footer {
  max-width: 1550px;
  margin: 17px auto 0;
  color: #777;
  font-size: 11px;
  display: flex;
  gap: 8px;
  justify-content: center;
  letter-spacing: .5px;
}

@media (max-width: 1250px) {
  .clock-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logo { width: 245px; }
}

@media (max-width: 900px) {
  body { padding: 14px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .brand { align-items: flex-start; }
  .logo { width: 230px; max-width: 45vw; }
  .controls { justify-content: flex-start; }
  .clock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 570px) {
  .brand { flex-direction: column; gap: 12px; }
  .logo { width: 300px; max-width: 100%; }
  .clock-grid { grid-template-columns: 1fr; }
  .clock-card { min-height: 225px; }
  footer { flex-wrap: wrap; text-align: center; }
}
