:root {
  --winter: #169bff;
  --flood: #149943;
  --severe: #f4df2e;
  --tornado: #ff2c2c;
  --pds: #ff73c8;
  --emergency: #cfb8ff;
  --text-dark: #0f1115;
  --text-light: #ffffff;
  --panel: rgba(8, 10, 16, 0.9);
  --shadow: 0 8px 0 rgba(0, 0, 0, 0.22), 0 0 0 2px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  color: var(--text-light);
  font-family: Arial, sans-serif;
}

.overlay {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-width: 1920px;
  min-height: 1080px;
  background: transparent;
}

.top-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 58px;
  padding: 8px 20px 9px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  border-bottom: 3px solid rgba(0, 0, 0, 0.32);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.top-alert-label {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 22px;
  color: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.top-alert {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

.popup-stack {
  position: absolute;
  left: 20px;
  bottom: 78px;
  width: 520px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
  z-index: 3;
}

.popup {
  border-left: 8px solid rgba(255, 255, 255, 0.75);
  padding: 10px 14px;
  border-radius: 2px;
  outline: 2px solid rgba(0, 0, 0, 0.28);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.popup.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.popup-title {
  font-weight: 800;
  font-size: 21px;
  line-height: 1.05;
  text-transform: uppercase;
}

.popup-text {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.2;
}

.bottom-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  min-height: 58px;
  padding: 10px 20px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.88);
  border-top: 3px solid rgba(0, 0, 0, 0.32);
  box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.22);
}

.bottom-alert-text {
  max-width: calc(100% - 180px);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
  opacity: 1;
  transition: opacity 0.8s ease;
}

.bottom-alert-text.is-hidden {
  opacity: 0;
}

.bottom-subline {
  max-width: calc(100% - 180px);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.clock {
  position: absolute;
  right: 22px;
  bottom: 13px;
  z-index: 4;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-light);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.78);
  white-space: nowrap;
}

.count-stack {
  position: absolute;
  top: 46%;
  right: 20px;
  transform: translateY(-50%);
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2;
  pointer-events: none;
}

.count-card {
  padding: 12px 14px;
  border-left: 8px solid rgba(255, 255, 255, 0.78);
  outline: 2px solid rgba(0, 0, 0, 0.28);
  box-shadow: var(--shadow);
  background: rgba(12, 15, 22, 0.94);
}

.count-card.severe {
  background: linear-gradient(180deg, rgba(244, 223, 46, 0.95), rgba(192, 173, 20, 0.95));
  color: #101216;
}

.count-card.tornado {
  background: linear-gradient(180deg, rgba(255, 44, 44, 0.96), rgba(171, 8, 8, 0.96));
}

.count-card.flood {
  background: linear-gradient(180deg, rgba(20, 153, 67, 0.96), rgba(10, 96, 39, 0.96));
}

.count-card.winter {
  background: linear-gradient(180deg, rgba(22, 155, 255, 0.96), rgba(7, 87, 160, 0.96));
}

.count-label {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.count-value {
  margin-top: 6px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 44px;
  line-height: 1;
}

.admin-hotspot {
  position: absolute;
  top: 66px;
  right: 20px;
  width: 92px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  background: rgba(10, 12, 18, 0.82);
  color: #ffffff;
  cursor: pointer;
  opacity: 1;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}

.admin-hotspot.is-debug {
  background: rgba(255, 255, 255, 0.18);
}

.admin-panel {
  position: absolute;
  top: 64px;
  left: 24px;
  width: 560px;
  max-height: 760px;
  padding: 18px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  background: rgba(10, 12, 18, 0.96);
  color: var(--text-light);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.32);
  overflow: hidden;
  z-index: 6;
}

.admin-panel.is-hidden {
  display: none;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-title {
  font-size: 24px;
  font-weight: 800;
}

.admin-subtitle {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
}

.admin-close,
.admin-action,
.alert-choice,
.test-choice {
  border: 0;
  border-radius: 2px;
  font: inherit;
}

.admin-close,
.admin-action {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-light);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.admin-actions,
.category-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-action.is-active {
  background: rgba(255, 255, 255, 0.22);
}

.admin-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 580px;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-list.is-hidden,
.test-list.is-hidden {
  display: none;
}

.test-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.alert-choice,
.test-choice {
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.alert-choice.is-selected {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.86);
}

.alert-choice-title,
.test-choice-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.alert-choice-meta,
.test-choice-meta {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.3;
}
