.city-gate {
  position: fixed;
  inset: 0;
  z-index: 10050;
}

body.city-gate-open {
  overflow: hidden;
}

.city-gate__scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: radial-gradient(
    120% 90% at 50% 42%,
    rgba(3, 20, 45, 0.18) 0%,
    rgba(2, 14, 32, 0.5) 62%,
    rgba(1, 9, 22, 0.66) 100%
  );
}

.city-gate__beam {
  position: fixed;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  height: 680px;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle, rgba(246, 147, 28, 0.16) 0%, transparent 62%);
  filter: blur(10px);
  animation: city-gate-breathe 6s ease-in-out infinite;
}

@keyframes city-gate-breathe {
  0%,
  100% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
  }
}

.city-gate__wrap {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: auto;
}

.city-gate__card {
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 56px);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  box-shadow:
    0 50px 120px -30px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(3, 53, 107, 0.05),
    0 0 80px -20px rgba(246, 147, 28, 0.25);
  overflow: hidden;
  animation: city-gate-rise 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
  position: relative;
}

@keyframes city-gate-rise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.city-gate__cardtop {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 20px;
  background: linear-gradient(
    90deg,
    rgba(3, 53, 107, 0.05),
    rgba(246, 147, 28, 0.06),
    rgba(3, 53, 107, 0.05)
  );
  border-bottom: 1px solid #eef1f7;
}

.city-gate__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #0f9d58;
}

.city-gate__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0f9d58;
  animation: city-gate-blink 1.8s infinite;
}

.city-gate__stat {
  font-size: 12px;
  font-weight: 500;
  color: #5a6477;
}

.city-gate__stat b {
  color: #03356b;
  font-weight: 700;
}

.city-gate__sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e3e8f1;
}

@keyframes city-gate-blink {
  0% {
    box-shadow: 0 0 0 0 rgba(15, 157, 88, 0.5);
  }

  70% {
    box-shadow: 0 0 0 7px rgba(15, 157, 88, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(15, 157, 88, 0);
  }
}

.city-gate__head {
  flex-shrink: 0;
  text-align: center;
  padding: 34px 40px 4px;
  position: relative;
}

.city-gate__pin {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  border-radius: 22px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow:
    0 18px 40px -12px rgba(3, 53, 107, 0.35),
    0 0 0 1px #e3e8f1;
}

.city-gate__pin img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.city-gate__pin::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  border: 2px solid #f6931c;
  animation: city-gate-ripple 2.4s ease-out infinite;
  opacity: 0;
}

@keyframes city-gate-ripple {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.city-gate__title {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.15;
  text-wrap: balance;
  color: #0f1923;
  margin: 0;
}

.city-gate__title em {
  color: #f6931c;
  font-style: normal;
}

.city-gate__subtitle {
  margin-top: 9px;
  font-size: 14px;
  color: #5a6477;
  font-weight: 400;
  line-height: 1.5;
  text-wrap: pretty;
}

.city-gate__searchwrap {
  flex-shrink: 0;
  padding: 22px 32px 0;
}

.city-gate__searchbox {
  position: relative;
}

.city-gate__searchbox .city-gate__search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #9aa3b2;
}

.city-gate__searchbox input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #0f1923;
  padding: 17px 110px 17px 52px;
  border: 1.5px solid #e3e8f1;
  border-radius: 16px;
  outline: none;
  transition: border 0.16s, box-shadow 0.16s;
  background: #f4f6fb;
}

.city-gate__searchbox input::placeholder {
  color: #9aa3b2;
  font-weight: 400;
}

.city-gate__searchbox input:focus {
  border-color: #03356b;
  background: #fff;
  box-shadow: 0 10px 30px -12px rgba(3, 53, 107, 0.35);
}

.city-gate__detect {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #03356b, #0a4f9e);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 11px;
  white-space: nowrap;
  transition: filter 0.15s;
}

.city-gate__detect:hover {
  filter: brightness(1.12);
}

.city-gate__detect--loading i {
  animation: city-gate-spin 1s linear infinite;
}

@keyframes city-gate-spin {
  to {
    transform: rotate(360deg);
  }
}

.city-gate__body {
  flex: 1;
  min-height: 0;
  padding: 18px 32px 30px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e3e8f1 transparent;
}

.city-gate__body::-webkit-scrollbar {
  width: 7px;
}

.city-gate__body::-webkit-scrollbar-thumb {
  background: #e3e8f1;
  border-radius: 8px;
}

.city-gate__lbl {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #9aa3b2;
  margin: 6px 2px 13px;
}

.city-gate__lbl i {
  color: #f6931c;
  font-size: 13px;
}

.city-gate__lbl::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #eef1f7;
}

.city-gate__lbl:not(:first-child) {
  margin-top: 22px;
}

.city-gate__metros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.city-gate__metro {
  position: relative;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  background: #f4f6fb;
  border: 1.5px solid #e3e8f1;
  border-radius: 16px;
  padding: 15px 10px 13px;
  transition: all 0.17s;
}

.city-gate__metro:hover {
  border-color: #03356b;
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -16px rgba(3, 53, 107, 0.4);
}

.city-gate__metro:focus-visible {
  outline: none;
  border-color: #f6931c;
  box-shadow: 0 0 0 3px rgba(246, 147, 28, 0.25);
}

.city-gate__metro-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  display: block;
  object-fit: contain !important;
  transition: transform 0.17s;
}

.city-gate__metro:hover .city-gate__metro-icon {
  transform: scale(1.15);
}

.city-gate__metro-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f1923;
  letter-spacing: -0.2px;
  display: block;
}

.city-gate__metro-flag {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f6931c;
}

.city-gate__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.city-gate__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1.5px solid #e3e8f1;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #0f1923;
  padding: 8px 14px;
  border-radius: 100px;
  transition: all 0.15s;
}

.city-gate__chip:hover {
  border-color: #03356b;
  color: #03356b;
  background: #f4f6fb;
  transform: translateY(-1px);
}

.city-gate__chip:focus-visible {
  outline: none;
  border-color: #f6931c;
  box-shadow: 0 0 0 3px rgba(246, 147, 28, 0.22);
}

.city-gate__chip mark {
  background: rgba(246, 147, 28, 0.22);
  color: #e07a10;
  border-radius: 3px;
  padding: 0 1px;
}

.city-gate__morewrap {
  text-align: center;
  margin-top: 16px;
}

.city-gate__morebtn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #03356b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
}

.city-gate__morebtn:hover {
  background: #f4f6fb;
}

.city-gate__morebtn--open i {
  transform: rotate(180deg);
}

.city-gate__morebtn i {
  transition: transform 0.2s;
}

.city-gate__result-note {
  font-size: 12px;
  color: #5a6477;
  font-weight: 500;
  margin: 2px 2px 13px;
}

.city-gate__result-note b {
  color: #03356b;
}

.city-gate__empty {
  text-align: center;
  padding: 34px 16px;
}

.city-gate__empty i {
  font-size: 34px;
  color: #e3e8f1;
  display: block;
  margin-bottom: 10px;
}

.city-gate__empty b {
  display: block;
  color: #5a6477;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 3px;
}

.city-gate__empty span {
  font-size: 12.5px;
  color: #9aa3b2;
}

.city-gate__foot {
  flex-shrink: 0;
  border-top: 1px solid #eef1f7;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f4f6fb;
}

.city-gate__foot-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #5a6477;
  font-weight: 500;
}

.city-gate__foot-left i {
  color: #0f9d58;
}

.city-gate__foot-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #9aa3b2;
}

.city-gate__kbd {
  background: #fff;
  border: 1px solid #e3e8f1;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
  color: #5a6477;
  font-family: var(--app-font), ui-monospace, monospace;
}

.city-gate__confirm {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: linear-gradient(165deg, #02214a, #03356b);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.city-gate__confirm--show {
  opacity: 1;
  pointer-events: auto;
}

.city-gate__confirm-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(246, 147, 28, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  animation: city-gate-cpop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes city-gate-cpop {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

.city-gate__confirm-ring i {
  font-size: 44px;
  color: #f6931c;
}

.city-gate__confirm-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.city-gate__confirm-city {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-top: 2px;
}

.city-gate__confirm-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 8px;
}

@media (max-width: 640px) {
  .city-gate__wrap {
    padding: 14px;
    align-items: flex-start;
  }

  .city-gate__head {
    padding: 26px 22px 4px;
  }

  .city-gate__title {
    font-size: 22px;
  }

  .city-gate__subtitle {
    font-size: 13px;
  }

  .city-gate__pin {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    margin-bottom: 12px;
  }

  .city-gate__searchwrap {
    padding: 18px 18px 0;
  }

  .city-gate__body {
    padding: 16px 18px 24px;
  }

  .city-gate__foot {
    padding: 12px 18px;
    flex-wrap: wrap;
  }

  .city-gate__foot-right {
    display: none;
  }
}

@media (max-width: 380px) {
  .city-gate__metros {
    grid-template-columns: 1fr 1fr;
  }

  .city-gate__detect span {
    display: none;
  }

  .city-gate__detect {
    padding: 9px 11px;
  }

  .city-gate__searchbox input {
    padding-right: 52px;
  }
}
