/* ==========================================================================
   Blackout Radar - Telegram Mini App Modern Stylesheet
   Design Philosophy: Cyber-Radar, Glassmorphism, Micro-animations, Mobile First
   ========================================================================== */

:root {
  --bg-primary: #070a13;
  --bg-secondary: #0e1526;
  --bg-card: rgba(18, 26, 45, 0.72);
  --bg-card-hover: rgba(26, 38, 66, 0.85);
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 240, 255, 0.5);
  --border-active: #00f0ff;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --neon-cyan: #00f0ff;
  --neon-cyan-glow: rgba(0, 240, 255, 0.35);
  --neon-amber: #f59e0b;
  --neon-amber-glow: rgba(245, 158, 11, 0.35);
  --neon-emerald: #10b981;
  --neon-emerald-glow: rgba(16, 185, 129, 0.3);
  --neon-rose: #f43f5e;
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  font-size: 15px;
  line-height: 1.5;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Radar Atmospheric Background
   -------------------------------------------------------------------------- */
.app-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.radar-circle {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.06);
  pointer-events: none;
}

.radar-circle-1 {
  width: 280px;
  height: 280px;
  animation: radar-pulse 6s infinite ease-out;
}

.radar-circle-2 {
  width: 480px;
  height: 480px;
  animation: radar-pulse 6s infinite ease-out 2s;
}

.radar-circle-3 {
  width: 720px;
  height: 720px;
  animation: radar-pulse 6s infinite ease-out 4s;
}

.radar-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.12) 0%, rgba(14, 21, 38, 0) 70%);
  filter: blur(40px);
}

@keyframes radar-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0.8;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   App Container & Header
   -------------------------------------------------------------------------- */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 18px 40px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--neon-cyan);
  text-transform: uppercase;
}

.radar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.brand-title span {
  color: var(--neon-cyan);
  text-shadow: 0 0 16px var(--neon-cyan-glow);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.user-avatar {
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Stepper Progress Navigation
   -------------------------------------------------------------------------- */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 21, 38, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 24px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  cursor: pointer;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  transition: var(--transition);
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 6px;
  margin-bottom: 14px;
  border-radius: 2px;
  transition: var(--transition);
}

.step-item.active .step-num {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  color: #070a13;
  box-shadow: 0 0 14px var(--neon-cyan-glow);
}

.step-item.active .step-label {
  color: var(--neon-cyan);
  font-weight: 700;
}

.step-item.completed .step-num {
  background: var(--neon-emerald);
  border-color: var(--neon-emerald);
  color: #070a13;
}

.step-item.completed .step-label {
  color: var(--neon-emerald);
}

.step-line.completed {
  background: var(--neon-emerald);
  box-shadow: 0 0 6px var(--neon-emerald-glow);
}

/* --------------------------------------------------------------------------
   Screens & View Transitions
   -------------------------------------------------------------------------- */
.step-screen {
  display: none;
  flex-direction: column;
  gap: 18px;
  animation: fadeInSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-screen.active {
  display: flex;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --------------------------------------------------------------------------
   Cards & Glassmorphism Components
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.hero-card {
  text-align: center;
  padding: 24px 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-icon-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.2) 0%, rgba(14, 21, 38, 0.8) 100%);
  border: 1px solid rgba(0, 240, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 24px var(--neon-cyan-glow);
}

.pulse-ring {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 240, 255, 0.4);
  animation: rotate-ring 12s linear infinite;
}

@keyframes rotate-ring {
  100% { transform: rotate(360deg); }
}

.hero-icon {
  font-size: 34px;
}

.hero-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.5;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 21, 38, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.feature-icon {
  font-size: 22px;
}

.feature-pill strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.feature-pill small {
  font-size: 11px;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   Inputs & Controls
   -------------------------------------------------------------------------- */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  pointer-events: none;
}

.text-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 42px;
  background: rgba(8, 12, 22, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: var(--transition);
}

.text-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 16px var(--neon-cyan-glow);
  background: rgba(8, 12, 22, 0.9);
}

.input-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Section Headings
   -------------------------------------------------------------------------- */
.section-heading {
  margin-bottom: 4px;
}

.breadcrumb-chip {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-full);
  color: var(--neon-cyan);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Search Box
   -------------------------------------------------------------------------- */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 46px;
  padding: 0 38px 0 40px;
  background: rgba(14, 21, 38, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px var(--neon-cyan-glow);
}

.search-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}

/* --------------------------------------------------------------------------
   Segment Control
   -------------------------------------------------------------------------- */
.segment-control {
  display: flex;
  background: rgba(8, 12, 22, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.segment-btn {
  flex: 1;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.segment-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   Interactive List Items (Regions, Cities)
   -------------------------------------------------------------------------- */
.regions-list, .places-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.regions-list::-webkit-scrollbar, .places-list::-webkit-scrollbar {
  width: 4px;
}

.regions-list::-webkit-scrollbar-thumb, .places-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
}

.list-card:hover, .list-card:active {
  background: var(--bg-card-hover);
  border-color: rgba(0, 240, 255, 0.3);
  transform: translateY(-1px);
}

.list-card.selected {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  box-shadow: 0 0 16px var(--neon-cyan-glow);
}

.list-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-card-icon {
  font-size: 20px;
}

.list-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.list-card-subtitle {
  font-size: 12px;
  color: var(--text-dim);
}

.badge-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.badge-supported {
  background: rgba(16, 185, 129, 0.15);
  color: var(--neon-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-soon {
  background: rgba(245, 158, 11, 0.12);
  color: var(--neon-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.manual-place-card {
  background: rgba(14, 21, 38, 0.4);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.manual-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Queues Matrix & Subqueues
   -------------------------------------------------------------------------- */
.queue-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-grid-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.queues-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.queue-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.queue-card:hover, .queue-card:active {
  background: var(--bg-card-hover);
  border-color: rgba(0, 240, 255, 0.4);
}

.queue-card.selected {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.12);
  box-shadow: 0 0 20px var(--neon-cyan-glow);
  transform: scale(1.02);
}

.queue-card.selected::before {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--neon-cyan);
}

.queue-badge-num {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.queue-card.selected .queue-badge-num {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan-glow);
}

.queue-sub-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Summary & Toggles
   -------------------------------------------------------------------------- */
.summary-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--neon-cyan);
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.summary-key {
  color: var(--text-muted);
}

.summary-val {
  font-weight: 700;
  color: #fff;
}

.summary-val.highlight {
  color: var(--neon-cyan);
}

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.toggle-text span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.toggle-text small {
  font-size: 11px;
  color: var(--text-dim);
}

/* iOS Style Switch */
.ios-switch {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 26px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  position: relative;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.ios-switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ios-switch:checked {
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan-glow);
}

.ios-switch:checked::before {
  transform: translateX(18px);
  background: #070a13;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #0088ff 100%);
  color: #070a13;
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.35);
}

.btn-primary:hover, .btn-primary:active {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 240, 255, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
}

.btn-secondary:hover, .btn-secondary:active {
  background: rgba(255, 255, 255, 0.14);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  width: auto;
}

.btn-glow {
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.45);
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Success Screen
   -------------------------------------------------------------------------- */
.success-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 10px;
  gap: 16px;
}

.success-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(14, 21, 38, 0.8) 100%);
  border: 2px solid var(--neon-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--neon-emerald-glow);
}

.success-icon {
  font-size: 38px;
}

.success-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.success-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.5;
}

.final-info-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 16px;
}

.final-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.final-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

.final-val {
  font-size: 15px;
  color: #fff;
}

.text-neon {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan-glow);
}

.final-info-divider {
  width: 1px;
  height: 36px;
  background: var(--border-glass);
}
