:root {
  --blue-50: #eaf2ff;
  --blue-100: #d6e6ff;
  --blue-500: #2f7cf6;
  --blue-600: #0b57d0;
  --blue-700: #073a9e;
  --blue-900: #041c4f;
  --ink: #0b1b3a;
  --muted: #6b7a99;
  --good: #34e0a1;
  --bad: #ff8a8a;
  --gold: #ffd36b;
  --card: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.18);
  --nav-h: 78px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(120% 80% at 88% -8%, rgba(105, 182, 255, 0.55), transparent 62%),
    radial-gradient(95% 55% at -5% 100%, rgba(0, 224, 255, 0.16), transparent 66%),
    linear-gradient(165deg, #1e6ff2 0%, #0b57d0 38%, #073a9e 72%, #05256b 100%);
  background-attachment: fixed;
  overscroll-behavior-y: none;
}

button {
  font-family: inherit;
}

.app {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(180deg, rgba(15, 88, 210, 0.92) 0%, rgba(15, 88, 210, 0.55) 70%, rgba(15, 88, 210, 0) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 18px rgba(0, 20, 70, 0.22);
  flex: 0 0 auto;
}

.brand-logo svg {
  width: 25px;
  height: 25px;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  margin-top: 1px;
  font-size: 12px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.68);
}

.balance-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 8px 13px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.09));
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.balance-pill:active {
  transform: scale(0.96);
}

.balance-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.balance-value {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

/* ---------- Screen ---------- */

.screen {
  flex: 1;
  padding: 10px 16px calc(var(--nav-h) + 46px + env(safe-area-inset-bottom));
}

.screen > * {
  animation: fadeUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.screen > *:nth-child(2) { animation-delay: 0.03s; }
.screen > *:nth-child(3) { animation-delay: 0.06s; }
.screen > *:nth-child(4) { animation-delay: 0.09s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero ---------- */

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 44px rgba(0, 20, 70, 0.24);
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -56px;
  bottom: -78px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(2px);
}

.hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.hero-title {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero-meta {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.72);
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.24);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* ---------- Section ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 2px 12px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.section-head span {
  font-size: 12px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.56);
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- Car cards ---------- */

.car-card {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.07));
  border: 1px solid var(--card-border);
  box-shadow: 0 16px 36px rgba(0, 18, 62, 0.2);
}

.car-photo {
  position: relative;
  height: 156px;
  overflow: hidden;
  background:
    radial-gradient(80% 100% at 70% 0%, rgba(120, 190, 255, 0.4), transparent 70%),
    linear-gradient(135deg, #1a4da8, #0a2c73);
}

.car-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.car-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 20, 60, 0) 48%, rgba(4, 20, 60, 0.55) 100%);
  pointer-events: none;
}

.car-photo-emoji {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 54px;
  opacity: 0.7;
}

.car-photo-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(4, 20, 60, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.car-body {
  padding: 14px;
}

.car-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.car-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10.5px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}

.chip-plate {
  background: rgba(255, 211, 107, 0.14);
  border-color: rgba(255, 211, 107, 0.3);
  color: #ffe3a1;
}

.price-col {
  flex: 0 0 auto;
  text-align: right;
}

.price {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.6px;
  white-space: nowrap;
}

.market-price {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}

.car-actions {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}

.car-actions .btn {
  flex: 1;
  white-space: normal;
  line-height: 1.2;
}

.car-actions .btn-ghost {
  flex: 0 0 34%;
}

.fixed-price-note {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  font-size: 10.5px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.garage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.garage-actions .btn {
  flex: 1 1 30%;
  min-height: 38px;
  padding: 9px 5px;
  font-size: 11px;
  white-space: normal;
  line-height: 1.2;
}

/* ---------- Offer detail ---------- */

.car-card[data-action] {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.car-card[data-action]:active {
  transform: scale(0.99);
}

.car-photo-open {
  position: absolute;
  z-index: 2;
  right: 11px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 99px;
  background: rgba(4, 20, 60, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 750;
  color: #fff;
}

.detail-gallery {
  position: relative;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(80% 100% at 70% 0%, rgba(120, 190, 255, 0.34), transparent 70%),
    linear-gradient(135deg, #1a4da8, #0a2c73);
  border: 1px solid var(--card-border);
  box-shadow: 0 18px 38px rgba(0, 18, 62, 0.26);
}

.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 16 / 10;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
}

.gallery-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 99px;
  background: rgba(4, 20, 60, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.gallery-counter b {
  font-weight: 850;
}

.gallery-hint {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(4, 20, 60, 0.5);
  font-size: 9.5px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.82);
  pointer-events: none;
}

.detail-head {
  padding: 2px 2px 0;
}

.detail-kicker {
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.detail-title {
  margin: 5px 0 10px;
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.detail-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.detail-price {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.9px;
}

.detail-market {
  text-align: right;
  font-size: 10px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.6);
}

.detail-market b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
}

.detail-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.detail-trust span {
  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(52, 224, 161, 0.13);
  border: 1px solid rgba(52, 224, 161, 0.3);
  font-size: 10.5px;
  font-weight: 700;
  color: #d7ffee;
}

.detail-section {
  margin-top: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.06));
  border: 1px solid var(--card-border);
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.2px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
}

.spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.spec span {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.spec strong {
  font-size: 12.5px;
  font-weight: 750;
}

.detail-description {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  white-space: pre-line;
}

.options-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.option-chip {
  padding: 7px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.9);
}

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

.seller-avatar {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #6fb4ff, #2f7cf6);
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 20, 70, 0.28);
}

.seller-main {
  min-width: 0;
}

.seller-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  font-weight: 850;
}

.seller-badge {
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

.seller-badge-good {
  background: rgba(52, 224, 161, 0.16);
  border: 1px solid rgba(52, 224, 161, 0.3);
  color: #d7ffee;
}

.seller-meta,
.seller-location {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
}

.detail-actions {
  position: sticky;
  bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 9px;
  border-radius: 18px;
  background: rgba(6, 36, 98, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 34px rgba(0, 10, 40, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.detail-actions .btn {
  flex: 1;
}

.detail-actions .btn-ghost {
  flex: 0 0 32%;
}

.detail-fixed-note {
  margin-top: 14px;
  margin-bottom: -4px;
}

/* ---------- Buttons ---------- */

.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 15px;
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: -0.1px;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, background 0.14s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn-primary {
  background: #fff;
  color: var(--blue-600);
  box-shadow: 0 8px 20px rgba(0, 15, 55, 0.16);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

.btn-soft {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #ff7a7a, #e63b57);
  color: #fff;
}

.btn-sm {
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

/* ---------- Stat strip ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 14px;
}

.stat {
  padding: 12px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

.stat span {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -0.3px;
}

/* ---------- Negotiation banner ---------- */

.neg-banner {
  position: relative;
  margin: 14px 0;
  padding: 14px;
  border-radius: 20px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 211, 107, 0.28), transparent 60%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 211, 107, 0.32);
}

.neg-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.neg-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffe3a1;
}

.neg-title {
  margin: 5px 0 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.neg-meta {
  margin-top: 4px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.68);
}

.neg-prices {
  display: flex;
  gap: 18px;
  margin-top: 10px;
}

.neg-prices div span {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.55);
}

.neg-prices div strong {
  font-size: 16px;
  font-weight: 850;
}

.neg-actions {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.neg-actions .btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 12px;
}

/* ---------- Plates ---------- */

.spin-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.spin-actions .btn {
  flex: 1;
}

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

.plate-card {
  position: relative;
  overflow: hidden;
  padding: 12px;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.plate-rarity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 750;
  color: rgba(255, 255, 255, 0.7);
}

.plate-number {
  display: flex;
  align-items: stretch;
  margin: 9px 0;
  border-radius: 7px;
  background: #fff;
  border: 2px solid #101828;
  box-shadow: 0 5px 12px rgba(0, 15, 50, 0.25);
  color: #101828;
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
}

.plate-ua {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 0 0 24px;
  padding: 4px 0;
  background: #0057b7;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.plate-flag {
  width: 14px;
  height: 9px;
  border-radius: 1.5px;
  background: linear-gradient(180deg, #0057b7 0 50%, #ffd700 50% 100%);
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.45);
}

.plate-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  padding: 7px 6px;
  background: linear-gradient(180deg, #ffffff, #eef3fa);
}

.plate-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.plate-price {
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -0.2px;
}

/* ---------- Slot animation ---------- */

.slot-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0 4px;
  padding: 20px 12px;
  border-radius: 22px;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(11, 87, 208, 0.16), transparent 65%),
    #eef4ff;
  border: 1px solid #dbe7fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.slot-plate {
  margin: 0;
  width: 100%;
  max-width: 330px;
  font-size: 21px;
  letter-spacing: 0;
}

.slot-plate .plate-text {
  gap: 8px;
  padding: 10px 8px;
}

.slot-group {
  display: inline-flex;
  gap: 0;
}

.slot-reel {
  display: inline-block;
  width: 17px;
  height: 30px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.slot-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
  filter: blur(0.45px);
}

.slot-reel.is-stopped .slot-strip {
  filter: none;
}

.slot-strip > span {
  display: block;
  height: 30px;
  line-height: 30px;
  text-align: center;
}

.slot-reel.is-stopped {
  animation: reelStop 0.28s ease;
}

.slot-status {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

@keyframes reelStop {
  0% { transform: translateY(0); }
  45% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

.rarity-common { border-color: rgba(255, 255, 255, 0.16); }
.rarity-uncommon { border-color: rgba(52, 224, 161, 0.5); box-shadow: 0 0 0 1px rgba(52, 224, 161, 0.16), 0 12px 26px rgba(0, 40, 30, 0.16); }
.rarity-rare { border-color: rgba(92, 169, 255, 0.62); box-shadow: 0 0 0 1px rgba(92, 169, 255, 0.2), 0 12px 26px rgba(0, 30, 90, 0.2); }
.rarity-epic { border-color: rgba(196, 130, 255, 0.65); box-shadow: 0 0 0 1px rgba(196, 130, 255, 0.2), 0 12px 26px rgba(50, 0, 90, 0.2); }
.rarity-legendary { border-color: rgba(255, 211, 107, 0.75); box-shadow: 0 0 0 1px rgba(255, 211, 107, 0.25), 0 12px 30px rgba(90, 60, 0, 0.26); }

/* ---------- Shop ---------- */

.shop-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 211, 107, 0.26), transparent 58%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.shop-balance .eyebrow { color: rgba(255, 255, 255, 0.62); }

.shop-balance-value {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -1px;
}

.shop-balance-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.shop-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.shop-card + .shop-card {
  margin-top: 9px;
}

.shop-card-main {
  min-width: 0;
}

.shop-card-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.shop-card-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.62);
}

.stars {
  color: var(--gold);
  font-weight: 800;
}

.fineprint {
  margin: 14px 4px 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.52);
  text-align: center;
}

/* ---------- Profile ---------- */

.profile-card {
  padding: 20px 18px;
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(100% 120% at 50% -20%, rgba(255, 255, 255, 0.3), transparent 62%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.19), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 40px rgba(0, 20, 70, 0.22);
}

.avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 24px rgba(0, 15, 55, 0.24);
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -0.5px;
}

.profile-name {
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.4px;
}

.profile-level {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.66);
}

.xp-bar {
  height: 7px;
  margin: 12px auto 0;
  max-width: 240px;
  border-radius: 99px;
  background: rgba(0, 20, 70, 0.28);
  overflow: hidden;
}

.xp-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #9fd0ff, #fff);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.stats-grid .stat {
  text-align: left;
  padding: 13px;
}

.stats-grid .stat strong {
  font-size: 18px;
}

.stats-grid .stat small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.menu-list {
  overflow: hidden;
  margin-top: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 14px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.menu-item + .menu-item {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.menu-item:active {
  background: rgba(255, 255, 255, 0.08);
}

.menu-item .menu-arrow {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.42);
  font-size: 18px;
  font-weight: 400;
}

.menu-emoji {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 16px;
}

.menu-value {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.62);
}

.menu-item .menu-value + .menu-arrow {
  margin-left: 4px;
}

/* ---------- Currency ---------- */

.currency-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.currency-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1.5px solid #dbe6f5;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.currency-option:active {
  transform: scale(0.985);
}

.currency-option.is-active {
  border-color: #0b57d0;
  box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.12);
}

.currency-flag {
  flex: 0 0 34px;
  width: 34px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.currency-flag-usd {
  background: linear-gradient(180deg, #e8f7ee, #c9ecd8);
  border: 1px solid #b7e0c8;
  color: #0b7a4b;
}

.currency-flag-uah {
  background: linear-gradient(180deg, #0057b7 0 50%, #ffd700 50% 100%);
  border: 1px solid rgba(16, 24, 40, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.currency-text b {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.currency-text small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.currency-check {
  margin-left: auto;
  color: #0b57d0;
  font-size: 17px;
  font-weight: 900;
  opacity: 0;
}

.currency-option.is-active .currency-check {
  opacity: 1;
}

/* ---------- Top ---------- */

.top-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.top-row.is-me {
  border-color: rgba(255, 211, 107, 0.5);
  background: rgba(255, 211, 107, 0.1);
}

.top-rank {
  width: 30px;
  flex: 0 0 auto;
  text-align: center;
  font-size: 16px;
  font-weight: 850;
  color: rgba(255, 255, 255, 0.62);
}

.top-rank.medal {
  font-size: 20px;
}

.top-user {
  min-width: 0;
  flex: 1;
}

.top-name {
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-sub {
  margin-top: 2px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.52);
}

.top-balance {
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

/* ---------- Auction ---------- */

.auction-card {
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.17);
}

.auction-card + .auction-card {
  margin-top: 10px;
}

.auction-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.auction-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.auction-total {
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.4px;
  white-space: nowrap;
}

.auction-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.auction-breakdown span {
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10.5px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.72);
}

.delivery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.delivery-row + .delivery-row {
  margin-top: 8px;
}

.delivery-title {
  font-size: 13px;
  font-weight: 750;
}

.delivery-time {
  margin-top: 2px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.56);
}

.countdown {
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(255, 211, 107, 0.14);
  border: 1px solid rgba(255, 211, 107, 0.3);
  color: #ffe3a1;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

/* ---------- Empty / error / skeleton ---------- */

.empty {
  padding: 34px 20px;
  border-radius: 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.24);
}

.empty-emoji {
  font-size: 42px;
  margin-bottom: 8px;
}

.empty-title {
  font-size: 16px;
  font-weight: 800;
}

.empty-text {
  margin: 5px auto 14px;
  max-width: 280px;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

.skeleton {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.skeleton + .skeleton {
  margin-top: 12px;
}

.sk-line {
  height: 12px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 25%, rgba(255, 255, 255, 0.2) 37%, rgba(255, 255, 255, 0.08) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

.sk-line + .sk-line {
  margin-top: 9px;
}

.sk-line.w40 { width: 40%; }
.sk-line.w60 { width: 60%; }
.sk-line.w80 { width: 80%; }
.sk-photo {
  height: 130px;
  border-radius: 14px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 25%, rgba(255, 255, 255, 0.2) 37%, rgba(255, 255, 255, 0.08) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ---------- Bottom nav ---------- */

.bottom-nav {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 536px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 7px;
  border-radius: 23px;
  background: rgba(4, 30, 84, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 18px 46px rgba(0, 10, 40, 0.42);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 2px 7px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.14s ease;
}

.nav-item:active {
  transform: scale(0.94);
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
}

.nav-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

/* ---------- Sheet ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(2, 10, 34, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: backdropIn 0.2s ease both;
}

.sheet {
  width: min(560px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: #f7faff;
  color: var(--ink);
  box-shadow: 0 -20px 60px rgba(0, 8, 30, 0.4);
  animation: sheetUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.sheet-grabber {
  width: 38px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 99px;
  background: #cfd9ea;
}

.sheet-title {
  margin: 0;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.5px;
}

.sheet-sub {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.sheet-car {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 10px;
  border-radius: 16px;
  background: #edf3ff;
  border: 1px solid #dce7fa;
}

.sheet-car img {
  width: 84px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  background: #d9e6fb;
  flex: 0 0 auto;
}

.sheet-car-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.sheet-car-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.sheet-prices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.sheet-price-box {
  padding: 12px;
  border-radius: 14px;
  background: #edf3ff;
  border: 1px solid #dce7fa;
}

.sheet-price-box span {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet-price-box strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.5px;
}

.sheet-price-box.good strong { color: #0b9b6b; }
.sheet-price-box.bad strong { color: #d13a52; }

.sheet-round {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 14px;
}

.round-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd7ea;
}

.round-dot.is-on {
  background: var(--blue-600);
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.sheet .btn {
  padding: 14px 16px;
  font-size: 14px;
}

.sheet .btn-primary {
  background: linear-gradient(135deg, #2f7cf6, #0b57d0);
  color: #fff;
  box-shadow: 0 10px 22px rgba(11, 87, 208, 0.28);
}

.sheet .btn-ghost {
  background: #eaf1ff;
  border: 1px solid #d5e2f8;
  color: var(--blue-600);
}

.sheet .btn-light {
  background: #fff;
  border: 1px solid #dce7fa;
  color: #33456b;
}

.sheet .btn-danger {
  background: linear-gradient(135deg, #ff7a7a, #e63b57);
  color: #fff;
}

.sheet .plate-card {
  background: #fff;
  border-color: #dce7fa;
  color: var(--ink);
}

.sheet .plate-rarity {
  color: var(--muted);
}

.sheet .plate-price {
  color: var(--ink);
}

.price-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.price-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-option b {
  font-size: 14px;
}

.price-option small {
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
}

.price-option strong {
  color: var(--blue-600);
  font-size: 15px;
  font-weight: 850;
  white-space: nowrap;
}

.sheet-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff5db;
  border: 1px solid #ffe3a1;
  color: #7a5a00;
  font-size: 11.5px;
  line-height: 1.45;
}

.sheet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.sheet-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid #e2ebfa;
}

.sheet-list-item .plate-number {
  margin: 0;
  font-size: 12px;
}

.sheet-list-item .plate-text {
  padding: 5px 7px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
  transform: translate(-50%, 14px);
  max-width: min(86vw, 440px);
  padding: 11px 16px;
  border-radius: 14px;
  background: rgba(4, 20, 60, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 34px rgba(0, 8, 30, 0.4);
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  background: rgba(92, 16, 34, 0.94);
  border-color: rgba(255, 138, 138, 0.3);
}

/* ---------- Misc ---------- */

.back-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 11px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheetUp {
  from { transform: translateY(30px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 520px) {
  .screen {
    padding-left: 20px;
    padding-right: 20px;
  }

  .car-photo {
    height: 190px;
  }

  .plate-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
