:root {
  --page-bg-1: #111827;
  --page-bg-2: #312e81;
  --text-main: #f8fafc;
  --text-muted: rgba(248, 250, 252, 0.72);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.18);
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --transition: 220ms ease;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text-main);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.45), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.32), transparent 32rem),
    linear-gradient(135deg, var(--page-bg-1), var(--page-bg-2));
}

::selection {
  color: #111827;
  background: #fde68a;
}

#particles-js {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.38;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero-panel,
.toolbar-panel,
.clock-card {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-panel {
  padding: clamp(22px, 4vw, 42px);
  border-radius: var(--radius-xl);
}

.hero-topline,
.hero-grid,
.add-zone-row,
.toolbar-panel,
.card-head,
.card-footer-line {
  display: flex;
  align-items: center;
}

.hero-topline {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #111827;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.browser-zone {
  text-align: right;
}

.hero-grid {
  justify-content: space-between;
  gap: 28px;
}

.hero-copy {
  max-width: 620px;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.add-zone-card {
  width: min(430px, 100%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.28);
}

.add-zone-card label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.add-zone-row {
  gap: 10px;
}

.add-zone-row .btn {
  white-space: nowrap;
  font-weight: 700;
}

.form-select,
.form-select:focus {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.22);
  background-color: rgba(15, 23, 42, 0.66);
}

.form-select option {
  color: #111827;
  background: #ffffff;
}

.form-hint {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.toolbar-panel {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 20px;
}

.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text-muted);
  cursor: pointer;
}

.switch-line input {
  width: 18px;
  height: 18px;
  accent-color: #fde68a;
}

.clocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.clock-card {
  position: relative;
  min-height: 255px;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-xl);
  isolation: isolate;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.clock-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--card-bg, linear-gradient(135deg, #475569, #111827));
}

.clock-card::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -46px;
  z-index: -1;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(1px);
}

.clock-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

.clock-card.is-dawn {
  --card-bg: linear-gradient(135deg, #fb923c, #f472b6 45%, #7c3aed);
}

.clock-card.is-day {
  --card-bg: linear-gradient(135deg, #0ea5e9, #22c55e 55%, #facc15);
}

.clock-card.is-evening {
  --card-bg: linear-gradient(135deg, #f97316, #db2777 52%, #4c1d95);
}

.clock-card.is-night {
  --card-bg: linear-gradient(135deg, #020617, #1e1b4b 56%, #0369a1);
}

.clock-card.is-main {
  grid-column: span 2;
  min-height: 300px;
}

.card-head {
  justify-content: space-between;
  gap: 10px;
}

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

.zone-title h2 {
  margin: 0;
  overflow: hidden;
  font-size: 1.25rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-title span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.day-part {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.time-value {
  font-size: 4.0rem; /* или как было у тебя (важно!) */
  font-weight: 700;
  letter-spacing: -0.035em;
  white-space: nowrap; /* важно */
}

.time-value .seconds {
  font-size: 0.42em;
  opacity: 0.72;
  letter-spacing: 0;
}

.time-value .sec-num {
  display: inline-block;
  transform: translateX(4px); /* регулируй 3–6px */
}

.date-value {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.card-footer-line {
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.remove-zone {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.18);
}

.remove-zone:hover {
  color: #111827;
  background: #ffffff;
}

.noscript-message {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  padding: 14px;
  border-radius: 16px;
  color: #111827;
  background: #fde68a;
  text-align: center;
  font-weight: 700;
}

@media (max-width: 860px) {
  .hero-grid,
  .hero-topline {
    align-items: stretch;
    flex-direction: column;
  }

  .browser-zone {
    text-align: left;
  }

  .clock-card.is-main {
    grid-column: span 1;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero-panel,
  .clock-card {
    border-radius: 22px;
  }

  .add-zone-row {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .time-value {
    margin-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media print {
  body {
    color: #000;
    background: #fff;
  }

  #particles-js,
  .hero-panel,
  .toolbar-panel,
  .remove-zone {
    display: none !important;
  }

  .clock-card {
    break-inside: avoid;
    color: #000;
    border: 1px solid #000;
    box-shadow: none;
  }

  .clock-card::before,
  .clock-card::after {
    display: none;
  }
}
