:root {
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1e293b, #0f172a 55%, #020617 100%);
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  padding: 3rem 1.5rem;
  gap: 2rem;
}

.app-header {
  text-align: center;
  max-width: 720px;
}

.app-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.app-header p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.72);
}

.app-main {
  width: min(900px, 100%);
}

.card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 35px 60px -15px rgba(15, 23, 42, 0.65);
}

.card h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: rgba(226, 232, 240, 0.85);
  font-size: 1rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 1.5rem;
}

.grid ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0;
}

.station-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.65);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  color: rgba(226, 232, 240, 0.9);
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
  flex-wrap: wrap;
}

.station-list-item:hover,
.station-list-item:focus-visible {
  outline: none;
  border-color: rgba(94, 234, 212, 0.7);
  background: rgba(15, 118, 110, 0.3);
  transform: translateY(-1px);
}

.station-list-item--selected {
  border-color: rgba(45, 212, 191, 0.9);
  background: rgba(13, 148, 136, 0.4);
  box-shadow: 0 8px 18px -10px rgba(45, 212, 191, 0.65);
}

.station-list-item--start {
  border-color: rgba(56, 189, 248, 0.8);
  background: rgba(14, 165, 233, 0.2);
}

.station-list-item--end {
  border-color: rgba(249, 115, 22, 0.8);
  background: rgba(234, 88, 12, 0.18);
}

.station-list-item__name {
  font-weight: 600;
}

.station-list-item__coords {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.7);
  font-family: 'Fira Code', 'Source Code Pro', monospace;
}

.station-list-item__badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.85);
}

.station-list-item--start .station-list-item__badge {
  background: rgba(56, 189, 248, 0.35);
  color: #0ea5e9;
}

.station-list-item--end .station-list-item__badge {
  background: rgba(249, 115, 22, 0.35);
  color: #f97316;
}

.grid h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.snapshot-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.map-wrapper {
  height: 360px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.network-map {
  height: 100%;
  width: 100%;
}

.route-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1.1rem 1.35rem;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 21, 0.3);
  background: rgba(161, 98, 7, 0.16);
}

.route-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.route-panel__hint {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.78);
}

.route-panel__meta {
  display: grid;
  gap: 0.45rem;
}

.route-panel__meta > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.route-panel__meta dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(226, 232, 240, 0.65);
}

.route-panel__meta dd {
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.92);
}

.route-panel__error {
  color: #f87171;
  font-weight: 600;
}

.route-panel__path {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.route-panel__path span {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.route-panel__path ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.route-panel__path li::after {
  content: '→';
  margin-left: 0.35rem;
  color: rgba(250, 204, 21, 0.75);
}

.route-panel__path li:last-child::after {
  content: '';
  margin: 0;
}

.selected-station {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(13, 148, 136, 0.18);
  display: grid;
  gap: 0.75rem;
}

.selected-station h3 {
  color: rgba(226, 232, 240, 0.9);
  font-size: 1.1rem;
}

.selected-station dl {
  display: grid;
  gap: 0.45rem;
}

.selected-station dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.selected-station dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 240, 0.6);
}

.selected-station dd {
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.92);
}

@media (min-width: 768px) {
  .snapshot-layout {
    gap: 2rem;
  }

  .map-wrapper {
    height: 420px;
  }
}

.error-text {
  color: #f87171;
  font-weight: 600;
}

.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.app-header h1 {
  margin-bottom: 0.5rem;
}

.auth-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.9);
}

@media (min-width: 640px) {
  .app-header {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .auth-meta {
    align-items: flex-end;
  }
}

.auth-card {
  display: grid;
  gap: 1rem;
}

.auth-card__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.auth-helper {
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.75);
}

.auth-card input {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  color: rgba(226, 232, 240, 0.95);
}

.auth-card button,
.ghost-button {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.auth-card button {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #0f172a;
}

.auth-card button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-card button:not(:disabled):hover {
  transform: translateY(-1px);
}

.ghost-button {
  background: transparent;
  color: rgba(226, 232, 240, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.35rem 1.1rem;
}

.ghost-button:hover {
  background: rgba(148, 163, 184, 0.15);
}

.link-button {
  background: none;
  border: none;
  color: #93c5fd;
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
}

.link-button:disabled {
  color: rgba(148, 163, 184, 0.6);
  cursor: not-allowed;
  text-decoration: none;
}
