:root {
  --primary-dark: #4f46e5;
  --primary: #6366f1;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  --primary-light: #eef2ff;
  --dark-surface: #1e293b;
  --dark-text: #0f172a;
  --text-muted: #64748b;
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  --surface-card: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --success: #10b981;
  --success-light: #d1fae5;
  --border: #cbd5e1;
  --border-focus: #818cf8;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 32px -8px rgba(79, 70, 229, 0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans Georgian', system-ui, -apple-system, sans-serif;
  background: var(--bg-gradient);
  color: var(--dark-text);
  margin: 0;
  padding: 16px 12px;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-animated-track {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  background: 
    radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(79, 70, 229, 0.12) 0%, transparent 40%);
}

.container { max-width: 1000px; margin: 0 auto; width: 100%; }
.top-bar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-bottom: 12px; }


/* 🖥️ დესკტოპის ძირითადი სტილები */
.site-logo-wrap {
  display: flex;
  align-items: center;
  margin-right: auto;
}

.site-logo-img {
  height: 96px;
  width: auto;
  max-width: 340px;
  object-fit: contain;
  display: block;
}

/* 📱 მობილური მოწყობილობების ოპტიმიზაცია (600px-მდე) */
@media (max-width: 600px) {
  .top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
  }

  /* ლოგო მობილურში გადადის ზუსტად შუაში */
  .site-logo-wrap {
    order: 1;
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 !important;
  }

  .site-logo-img {
    height: 44px;
    max-width: 150px;
  }

  /* შესვლა / რეგისტრაციის ღილაკი და ენები ალაგდება გვერდიგვერდ ზედა რიგში */
  .btn-auth-trigger {
    order: 2;
    width: auto !important;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .lang-switcher {
    order: 3;
  }
  
  /* ბალანსის ბეჯი */
  .user-balance-badge {
    order: 4;
    width: 100%;
    text-align: center;
  }
}

.user-balance-badge {
  background: var(--surface-card);
  border: 1.5px solid var(--primary);
  color: var(--primary-dark);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 800;
  display: none;
  box-shadow: var(--shadow-sm);
}

.btn-auth-trigger {
  background: var(--primary-gradient);
  color: white; border: none; padding: 8px 16px; border-radius: 20px;
  font-size: 0.88rem; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.22); transition: all 0.15s;
  display: flex; align-items: center; gap: 6px; font-family: inherit;
}
.btn-auth-trigger:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79, 70, 229, 0.32); }

.lang-switcher {
  display: flex; background: var(--surface-glass); backdrop-filter: blur(12px);
  padding: 3px; border-radius: 20px; border: 1.5px solid var(--border); gap: 2px;
}
.lang-btn { border: none; background: transparent; padding: 6px 14px; border-radius: 14px; font-size: 0.85rem; font-weight: 800; cursor: pointer; color: var(--text-muted); }
.lang-btn.active { background: var(--primary-dark); color: white; }

.hero-header { text-align: center; margin-bottom: 24px; }
.hero-title { font-size: clamp(1.6rem, 5vw, 3rem); font-weight: 900; letter-spacing: -0.02em; margin: 0 0 10px 0; color: var(--dark-surface); }

.live-badge-group { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.live-badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--surface-card);
  border: 1.5px solid rgba(16, 185, 129, 0.3); color: #065f46; padding: 6px 16px;
  border-radius: 30px; font-size: 0.88rem; font-weight: 800; box-shadow: var(--shadow-sm);
}
.attempts-badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--primary-light);
  border: 1.5px solid var(--border-focus); color: var(--primary-dark); padding: 6px 16px;
  border-radius: 30px; font-size: 0.88rem; font-weight: 800; box-shadow: var(--shadow-sm);
}

.pulse-dot { width: 8px; height: 8px; background-color: var(--success); border-radius: 50%; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { transform: scale(0.9); opacity: 0.8; } 50% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(0.9); opacity: 0.8; } }

.top-nav { display: flex; justify-content: center; margin-bottom: 20px; }
.nav-tabs { display: flex; background: var(--surface-card); padding: 5px; border-radius: 20px; gap: 6px; border: 2px solid var(--border); box-shadow: var(--shadow-sm); width: 100%; max-width: 500px; }
.nav-btn { flex: 1; border: none; background: transparent; padding: 12px 16px; border-radius: 15px; font-size: 1rem; font-weight: 800; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 8px; }
.nav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.nav-btn.active { background: var(--primary-gradient); color: white; box-shadow: 0 6px 18px rgba(79, 70, 229, 0.28); }

.step-card { background: var(--surface-card); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; border: 2px solid var(--border); box-shadow: var(--shadow-sm); }
.step-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.step-title { font-size: 1.1rem; font-weight: 900; color: var(--dark-surface); display: flex; align-items: center; gap: 10px; }
.step-title svg { width: 22px; height: 22px; stroke: var(--primary-dark); stroke-width: 2.5; fill: none; }

.step-summary-badge { font-size: 0.82rem; font-weight: 800; color: var(--primary-dark); background: var(--primary-light); padding: 5px 12px; border-radius: 12px; display: none; }
.chevron-icon { font-size: 1.2rem; transition: transform 0.3s; color: var(--primary-dark); font-weight: bold; }
.step-body { max-height: 2000px; opacity: 1; margin-top: 16px; transition: all 0.3s ease; }

.step-card.collapsed .step-body { max-height: 0; opacity: 0; margin-top: 0; pointer-events: none; overflow: hidden; }
.step-card.collapsed .chevron-icon { transform: rotate(-90deg); }
.step-card.collapsed .step-summary-badge { display: inline-block; }

/* 🚗 TRANSMISSION GRID & BUTTONS */
.transmission-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 12px; 
  width: 100%;
}

.btn-transmission { 
  background: #f8fafc; 
  border: 2px solid var(--border); 
  padding: 14px 18px; 
  border-radius: var(--radius-md); 
  font-size: 1.05rem; 
  font-weight: 800; 
  cursor: pointer; 
  color: var(--text-muted); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 10px; 
  width: 100%;
  box-sizing: border-box;
}

.btn-transmission svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.btn-transmission.selected { border-color: var(--primary-dark); background: var(--primary-light); color: var(--primary-dark); }

/* 🏙️ CITIES GRID */
.cities-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }

.city-card { background: #f8fafc; border: 2px solid var(--border); padding: 14px 10px; border-radius: var(--radius-md); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 85px; }
.city-card.selected { border-color: var(--primary-dark); background: var(--primary-light); }
.city-card.loading { opacity: 0.7; cursor: wait; border-color: var(--primary); }
.city-name { font-weight: 900; font-size: 1.05rem; color: var(--dark-text); }
.city-badge { font-size: 0.8rem; font-weight: 800; color: var(--primary-dark); background: #ffffff; border: 1.5px solid rgba(99, 102, 241, 0.3); padding: 3px 10px; border-radius: 16px; }
.city-badge.empty { color: var(--text-muted); background: #e2e8f0; border-color: var(--border); }

/* 📅 CALENDAR */
.vertical-calendar-container { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.month-card-vertical { background: var(--surface-card); border: 2px solid var(--border); border-radius: var(--radius-md); padding: 14px 12px; box-shadow: var(--shadow-sm); width: 100%; }
.calendar-month-title { font-size: 1.25rem; font-weight: 900; color: var(--dark-surface); margin: 0 0 12px 0; padding-bottom: 8px; border-bottom: 2px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.month-badge-tag { font-size: 0.8rem; font-weight: 800; color: var(--primary-dark); background: var(--primary-light); padding: 4px 10px; border-radius: 14px; }

.weekdays-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; font-weight: 900; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; gap: 3px; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-day { background: #f8fafc; border: 1.5px solid var(--border); border-radius: 10px; min-height: 64px; padding: 4px 2px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; opacity: 0.35; cursor: not-allowed; }
.cal-day.active { opacity: 1; cursor: pointer; border-color: var(--border-focus); background: var(--surface-card); }
.cal-num { font-weight: 900; font-size: 1.05rem; }
.cal-slots { font-size: 0.68rem; font-weight: 800; color: #065f46; background: var(--success-light); padding: 2px 4px; border-radius: 6px; }

/* 🔔 TOAST & MODALS */
.toast-notification {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(120px);
  opacity: 0; background: var(--dark-surface); color: white; padding: 12px 20px;
  border-radius: 30px; font-size: 0.95rem; font-weight: 800; display: flex;
  align-items: center; justify-content: center; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  z-index: 2000; transition: all 0.35s ease; pointer-events: none;
}
.toast-notification.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-overlay.active { display: flex; }
.modal-card { background: var(--surface-card); border: 2px solid var(--border); width: 100%; max-width: 440px; border-radius: var(--radius-lg); padding: 24px 20px; position: relative; box-shadow: var(--shadow-md); text-align: center; }
.modal-close { position: absolute; top: 16px; right: 16px; background: #f1f5f9; border: none; color: var(--text-muted); width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; font-weight: bold; }

.auth-tabs { display: flex; background: #f1f5f9; padding: 4px; border-radius: var(--radius-md); gap: 4px; margin-bottom: 20px; margin-top: 10px; }
.auth-tab-btn { flex: 1; border: none; background: transparent; padding: 10px; border-radius: 12px; font-weight: 800; font-size: 0.9rem; color: var(--text-muted); cursor: pointer; }
.auth-tab-btn.active { background: var(--surface-card); color: var(--primary-dark); }

.form-group { margin-bottom: 14px; text-align: left; }
.form-label { display: block; font-weight: 800; font-size: 0.88rem; margin-bottom: 5px; color: var(--dark-surface); }
.form-input { width: 100%; padding: 11px 14px; border: 2px solid var(--border); border-radius: 12px; font-size: 0.95rem; font-weight: 700; outline: none; }
.btn-submit { width: 100%; background: var(--primary-gradient); color: white; border: none; padding: 12px; border-radius: var(--radius-md); font-size: 1rem; font-weight: 900; cursor: pointer; margin-top: 8px; }

.timer-display { font-size: 2.2rem; font-weight: 900; color: var(--primary-dark); background: var(--primary-light); border: 2px dashed var(--primary-dark); padding: 12px; border-radius: var(--radius-md); margin: 16px 0; letter-spacing: 2px; }

.times-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 220px; overflow-y: auto; margin-bottom: 18px; }
.time-btn { background: #f8fafc; border: 1.5px solid var(--border); padding: 10px 0; border-radius: 10px; font-size: 0.95rem; font-weight: 800; color: var(--primary-dark); cursor: pointer; }
.time-btn.selected { background: var(--primary-dark); color: white; }

.booking-cta { display: none; background: var(--primary-light); border: 2px dashed var(--primary-dark); padding: 16px; border-radius: 14px; text-align: center; }
.booking-cta.active { display: block; }
.booking-btn { display: block; background: var(--primary-gradient); color: white; text-decoration: none; padding: 12px 18px; border-radius: 12px; font-size: 1rem; font-weight: 900; }

/* 📱 MOBILE RESPONSIVE FIXES (600px-მდე ეკრანებისთვის) */
@media (max-width: 900px) { 
  .cities-grid { grid-template-columns: repeat(2, 1fr); } 
}

@media (max-width: 600px) {
  /* მექანიკა და ავტომატიკა ერთმანეთის ქვეშ და ცენტრში */
  .transmission-grid { 
    grid-template-columns: 1fr !important; 
    gap: 10px;
  }

  .btn-transmission {
    padding: 12px 16px;
    font-size: 1rem;
    justify-content: center;
    text-align: center;
  }

  /* ქალაქების ბადე მობილურზე */
  .cities-grid { 
    grid-template-columns: 1fr; 
  }

  /* ზედა ბარის ელემენტების მობილური ოპტიმიზაცია */
  .top-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .btn-auth-trigger {
    width: 100%;
    justify-content: center;
  }

  .user-balance-badge {
    width: 100%;
    text-align: center;
  }
}