/* ================================================================
   BASE — PREMIUM DARK UI  |  Автомойка
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --gold:        #c9a84c;
  --gold-light:  #e8c97a;
  --gold-dim:    rgba(201,168,76,0.18);
  --bg:          #0f0f12;
  --bg-card:     #17171d;
  --bg-card2:    #1e1e27;
  --border:      rgba(201,168,76,0.22);
  --border-soft: rgba(255,255,255,0.07);
  --text:        #f0ede8;
  --text-muted:  #7c7c8a;
  --green:       #22c55e;
  --orange:      #f97316;
  --red:         #ef4444;
  --radius-card: 22px;
  --radius-btn:  50px;
  --shadow-gold: 0 0 24px rgba(201,168,76,0.15);
  --transition:  0.22s cubic-bezier(.4,0,.2,1);
}

/* ── Main page header — scrolls with content ─────────────── */
header {
  position: static;
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom: none;
  display: flex; justify-content: center; align-items: center;
  height: auto; padding: 20px 16px 4px;
  box-shadow: none;
}
.main-logo { height: 80px; width: auto; display: block; margin: 0 auto; }

/* ── Sticky footer ───────────────────────────────────────── */
footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: rgba(15,15,18,0.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(201,168,76,0.1);
  display: flex; gap: 8px;
  padding: 10px 14px max(10px, env(safe-area-inset-bottom));
}
footer button {
  flex: 1; padding: 11px 8px; border-radius: 50px;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 700;
  background: #131318; color: #4a4a58;
  border: 1px solid #2a2a35;
  cursor: pointer; transition: all 0.18s;
}
footer button:hover { color: var(--gold); border-color: var(--border); background: #1a1800; }

body { padding-bottom: 88px; }

/* ── Splash — большой логотип ────────────────────────────── */
#splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
#splash-screen img {
  width: clamp(200px, 72vw, 320px);
  animation: splash-scale 0.5s cubic-bezier(.4,0,.2,1) both;
}
@keyframes splash-scale {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}

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

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Тонкая золотая линия сверху страницы */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  z-index: 100;
}

h1 { font-family: 'Bebas Neue', sans-serif; font-size: 26px; letter-spacing: 1px; }

button {
  border: none;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
}
button:active { transform: scale(0.97); }

input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}
input::placeholder { color: var(--text-muted); }
input:focus {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}

.card {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 24px;
  border: 1px solid var(--border-soft);
}

/* ── Header ─────────────────────────────────────────────── */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 0 6px;
}

.main-logo {
  width: 100%;
  height: 90px;
  object-fit: cover;
}

/* ── Points list ────────────────────────────────────────── */
#points-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 86px;
}

/* ── Point card ─────────────────────────────────────────── */
.point-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
}

/* тонкая золотая черта сверху каждой карточки */
.point-card::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(210,210,230,0.6) 50%, transparent 100%);
  opacity: 0.6;
}

.point-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold), 0 8px 32px rgba(0,0,0,0.5);
  border-color: var(--border);
}
.point-card:hover::before { opacity: 1; }

/* ── Card inner layout ──────────────────────────────────── */
.point-card-inner {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Point header (name + dot) ──────────────────────────── */
.point-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 1.5px;
  color: #f0ede8;
}

/* ── Status indicator dot ───────────────────────────────── */
.status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-open   { background: var(--green);  box-shadow: 0 0 8px rgba(34,197,94,0.7);  }
.status-paused { background: var(--orange); box-shadow: 0 0 8px rgba(249,115,22,0.7); }
.status-closed { background: #4b4b58;       box-shadow: none; }

/* ── Status badge (ЗАПИСАТЬСЯ / Закрыто…) ──────────────── */
.status-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: var(--radius-btn);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  width: fit-content;
}

.status-block.status-open {
  background: rgba(34,197,94,0.12);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.3);
}
.status-block.status-paused {
  background: rgba(249,115,22,0.12);
  color: var(--orange);
  border: 1px solid rgba(249,115,22,0.3);
}
.status-block.status-closed {
  background: rgba(75,75,88,0.25);
  color: var(--text-muted);
  border: 1px solid rgba(75,75,88,0.4);
}

/* ── Queue block ────────────────────────────────────────── */
.queue-block {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(200,200,215,0.6);
  padding: 0 2px;
}

.queue-block::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a84c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* ── Registered card state — overrides default layout ───── */
.point-card.is-registered {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34,197,94,0.3), 0 4px 24px rgba(34,197,94,0.12);
}
.point-card.is-registered::before {
  background: linear-gradient(90deg, transparent 0%, #22c55e 50%, transparent 100%);
  opacity: 1;
}

/* card-top: name+status left, big number right — used on ALL cards */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-top-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* Registered inner: remove default padding, handle in sub-elements */
.point-card.is-registered .point-card-inner {
  gap: 0;
  padding: 0;
}

.point-card.is-registered .card-top {
  padding: 12px 14px 10px;
}

/* Big queue counter on the right */
.queue-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 14px;
  padding: 8px 14px;
  min-width: 64px;
  flex-shrink: 0;
}

.queue-counter .qc-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  line-height: 1;
  color: #f0ede8;
  letter-spacing: 1px;
}

.queue-counter .qc-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(200,200,215,0.6);
  opacity: 1;
  margin-top: 1px;
}

/* ── Registered badge ───────────────────────────────────── */
.registered-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg, rgba(34,197,94,0.18) 0%, rgba(34,197,94,0.08) 100%);
  border-top: 1px solid rgba(34,197,94,0.25);
  color: #4ade80;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: badge-flash 1.4s ease-in-out infinite;
}

.registered-badge .badge-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: badge-dot-ping 1.4s ease-in-out infinite;
}

@keyframes badge-flash {
  0%, 100% { background: linear-gradient(90deg, rgba(34,197,94,0.18) 0%, rgba(34,197,94,0.08) 100%); }
  50%       { background: linear-gradient(90deg, rgba(34,197,94,0.30) 0%, rgba(34,197,94,0.15) 100%); }
}

@keyframes badge-dot-ping {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.7); }
  70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ── Point buttons (Как проехать / Позвонить) ───────────── */
.point-buttons {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.point-buttons button.secondary {
  flex: 1;
  padding: 9px 10px;
  border-radius: var(--radius-btn);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  border: 1px solid var(--border-soft);
  background: var(--bg-card2);
  color: var(--text-muted);
  transition: var(--transition);
}

.point-buttons button.secondary:hover {
  background: var(--gold-dim);
  border-color: var(--border);
  color: var(--gold-light);
}

.button-call, .button-map {
  background: linear-gradient(135deg, rgba(201,168,76,0.16), rgba(201,168,76,0.06)) !important;
  border-color: var(--border) !important;
  color: var(--gold) !important;
}
.button-call:hover, .button-map:hover {
  background: linear-gradient(135deg, rgba(201,168,76,0.3), rgba(201,168,76,0.14)) !important;
  color: var(--gold-light) !important;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: rgba(15,15,18,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-around;
  padding: 10px 10px 14px;
  z-index: 50;
}

footer button {
  flex: 1;
  margin: 0 4px;
  padding: 10px 6px;
  border-radius: var(--radius-btn);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  transition: var(--transition);
}

footer button:hover {
  background: var(--gold-dim);
  border-color: var(--border);
  color: var(--gold-light);
}

/* ── Splash screen ──────────────────────────────────────── */
#splash-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#splash-screen::after {
  display: none;
}

@keyframes splash-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50%       { transform: scale(1.15); opacity: 1; }
}

#splash-screen img {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

/* ── Modal ──────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
}

.hidden { display: none !important; }

.modal-content {
  background: var(--bg-card2);
  width: 100%;
  max-width: 480px;
  padding: 28px 24px 36px;
  border-radius: 28px 28px 0 0;
  border: 1px solid var(--border-soft);
  border-bottom: none;
  text-align: center;
  font-size: 14px;
  color: var(--text);
  animation: slide-up 0.3s cubic-bezier(.4,0,.2,1);
}

@keyframes slide-up {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-content h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.modal-content p {
  padding: 9px 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  line-height: 1.6;
}
.modal-content p:last-of-type { border-bottom: none; }

.modal-content button {
  margin-top: 20px;
  padding: 13px 32px;
  border-radius: var(--radius-btn);
  background: linear-gradient(135deg, var(--gold), #a8892e);
  color: #0f0f12;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}
.modal-content button:hover {
  box-shadow: 0 6px 24px rgba(201,168,76,0.5);
  transform: translateY(-1px);
}

/* ── Dot pulse for open status ──────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(1.5); }
}
.status-indicator.status-open {
  animation: pulse-dot 2.2s ease-in-out infinite;
}

/* ── Staggered card entrance ────────────────────────────── */
@keyframes card-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.point-card { animation: card-in 0.4s cubic-bezier(.4,0,.2,1) both; }
.point-card:nth-child(1) { animation-delay: 0.04s; }
.point-card:nth-child(2) { animation-delay: 0.09s; }
.point-card:nth-child(3) { animation-delay: 0.14s; }
.point-card:nth-child(4) { animation-delay: 0.19s; }
.point-card:nth-child(5) { animation-delay: 0.24s; }
.point-card:nth-child(6) { animation-delay: 0.29s; }
.point-card:nth-child(7) { animation-delay: 0.34s; }

/* ── My position badge ──────────────────────────────────── */
.my-position {
  font-size: 13px;
  color: #4ade80;
  font-weight: 600;
}
.my-position strong {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  color: #4ade80;
  letter-spacing: 1px;
  margin: 0 2px;
}
