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

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: linear-gradient(165deg, #0f0f12 0%, #1a1a22 50%, #121218 100%);
  color: #f0f0f0;
  -webkit-font-smoothing: antialiased;
}

.wizard {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 1.25rem;
  text-align: center;
}

.wizard-step {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.wizard-step[hidden] {
  display: none !important;
}

.step-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6ee7a0;
  background: rgba(52, 199, 89, 0.12);
  border: 1px solid rgba(52, 199, 89, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.25rem;
}

.wizard-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.25rem;
  font-size: 2rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.wizard-emoji.pulse {
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.wizard-step h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.wizard-sub {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: #aaa;
}

.install-guide {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.install-wait {
  font-size: 0.9rem;
  color: #888;
  padding: 0.5rem 0;
}

.wizard-lead {
  font-size: 1rem;
  line-height: 1.55;
  color: #9a9a9a;
  margin-bottom: 1.5rem;
}

.wizard-lead strong {
  color: #d0d0d0;
  font-weight: 600;
}

.wizard-steps-list {
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #b0b0b0;
  margin: 0;
  padding-left: 1.2rem;
}

.wizard-steps-list li {
  margin-bottom: 0.6rem;
}

.wizard-steps-list li:last-child {
  margin-bottom: 0;
}

.wizard-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#name {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  color: #f0f0f0;
  margin-bottom: 1rem;
  text-align: center;
}

#name:focus {
  outline: none;
  border-color: #34c759;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.2);
}

#name::placeholder {
  color: #666;
}

.btn-primary {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #3ddc72 0%, #34c759 100%);
  color: #0a1a0f;
  cursor: pointer;
  min-height: 54px;
  box-shadow: 0 4px 14px rgba(52, 199, 89, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.25);
}

.btn-secondary {
  width: 100%;
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.15s, color 0.15s;
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
}

.btn-large {
  font-size: 1.1rem;
  padding: 1.05rem 1.25rem;
  min-height: 56px;
}

.btn-link {
  margin-top: 1rem;
  background: none;
  border: none;
  color: #777;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-link:active {
  color: #aaa;
}

.btn-link-block {
  display: block;
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app[hidden] {
  display: none !important;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(26, 26, 26, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.status {
  font-size: 0.95rem;
  font-weight: 600;
}

.status-sharing {
  color: #34c759;
}

.btn-stop {
  flex-shrink: 0;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: rgba(231, 76, 60, 0.9);
  color: #fff;
  cursor: pointer;
  min-height: 42px;
}

.btn-stop:active {
  background: #c0392b;
}

#map {
  flex: 1;
  width: 100%;
  min-height: 0;
}

.leaflet-popup-content {
  font-size: 0.9rem;
  line-height: 1.5;
}

.leaflet-popup-content strong {
  font-size: 1rem;
}
