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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, #4b0014 0%, transparent 30%),
    radial-gradient(circle at top right, #7a0018 0%, transparent 25%),
    radial-gradient(circle at bottom, #30000f 0%, transparent 25%),
    linear-gradient(180deg, #050505 0%, #0b0004 50%, #050505 100%);
  color: #f5f5f5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.background-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}

.glow-1 {
  width: 300px;
  height: 300px;
  background: #a0002d;
  top: 80px;
  left: -60px;
}

.glow-2 {
  width: 350px;
  height: 350px;
  background: #6b0018;
  top: 180px;
  right: -100px;
}

.glow-3 {
  width: 320px;
  height: 320px;
  background: #b3002f;
  bottom: -50px;
  left: 30%;
}

.top-nav {
  position: sticky;
  top: 12px;
  z-index: 100;
  width: calc(100% - 24px);
  max-width: 1220px;
  margin: 12px auto 0;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(35, 0, 10, 0.92), rgba(12, 12, 12, 0.92));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 40px rgba(0,0,0,0.32);
  backdrop-filter: blur(14px);
}

.nav-logo {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.nav-btn {
  position: relative;
  text-decoration: none;
  color: #fff;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 16px;
  border-radius: 999px;
  overflow: hidden;
  transition: 0.25s ease;
  font-size: 0.92rem;
  cursor: pointer;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 20px rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

.nav-btn::before,
.glow-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.12),
    rgba(255,255,255,0.95),
    rgba(255,255,255,0.12),
    transparent
  );
  transform: skewX(-18deg);
  transition: left 0.8s ease;
}

.nav-btn:hover::before,
.glow-btn:hover::before {
  left: 145%;
}

.profile-menu {
  position: relative;
}

.avatar-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 0 18px rgba(255,255,255,0.06);
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-dropdown {
  position: absolute;
  top: 58px;
  right: 0;
  min-width: 190px;
  background: linear-gradient(180deg, rgba(35, 0, 10, 0.96), rgba(12, 12, 12, 0.96));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  padding: 8px;
  display: none;
}

.profile-dropdown.show {
  display: block;
  animation: fadeUp 0.22s ease;
}

.profile-dropdown a,
.profile-dropdown button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.95rem;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background: rgba(255,255,255,0.08);
}

.hero {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 40px 20px;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.45));
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeUp 1.1s ease;
  max-width: 900px;
}

.top-badge {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05);
  color: #d6d6d6;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 3px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero h1,
.page-title {
  font-size: clamp(3rem, 8vw, 6.2rem);
  font-weight: 800;
  color: #ffffff;
  text-shadow:
    0 0 10px rgba(255,255,255,0.18),
    0 0 30px rgba(170, 0, 40, 0.2);
  margin-bottom: 16px;
}

.small-title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}

.changing-text,
.page-subtitle {
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: #f4dfe5;
  min-height: 32px;
  margin-bottom: 30px;
  transition: opacity 0.4s ease;
}

.scroll-btn {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 14px 28px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  transition: 0.3s ease;
}

.scroll-btn:hover {
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 20px rgba(255,255,255,0.08);
}

.section {
  padding: 70px 20px 120px;
  position: relative;
  z-index: 1;
}

.page-shell {
  padding: 40px 20px 100px;
  position: relative;
  z-index: 1;
}

.cards-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

.info-card,
.page-box,
.user-card,
.auth-box,
.stat-box,
.settings-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 15px 60px rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
}

.info-card {
  width: 340px;
  min-height: 420px;
  border-radius: 32px;
  padding: 38px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transform: translateY(80px);
  transition: all 0.9s ease;
}

.info-card.show {
  opacity: 1;
  transform: translateY(0);
}

.info-card h2 {
  font-size: 2rem;
  margin-bottom: 18px;
  color: #ffffff;
}

.info-card p,
.page-box p,
.user-card p,
.settings-section p {
  font-size: 1rem;
  line-height: 1.7;
  color: #e3d8dc;
}

.page-box {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 30px;
  padding: 36px 30px;
  animation: panelIn 0.5s ease;
}

.user-card {
  border-radius: 24px;
  padding: 22px;
  transform: translateY(25px);
  opacity: 0;
  animation: resultIn 0.55s ease forwards;
}

.button-group,
.login-actions,
.profile-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.glow-btn {
  position: relative;
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(135deg, #550014, #8a001f, #c0002d);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 0 18px rgba(170, 0, 40, 0.22);
}

.glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(255,255,255,0.12), 0 0 28px rgba(170, 0, 40, 0.32);
}

.auth-wrapper {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px 70px;
  position: relative;
  z-index: 1;
}

.auth-box {
  width: 100%;
  max-width: 520px;
  border-radius: 30px;
  padding: 36px 30px;
  animation: panelIn 0.5s ease;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  padding: 8px;
  border-radius: 20px;
  margin-bottom: 26px;
}

.auth-tab {
  border: none;
  background: transparent;
  color: #ddd;
  padding: 14px 18px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: 0.25s ease;
}

.auth-tab.active {
  background: linear-gradient(135deg, #550014, #8a001f, #c0002d);
  color: white;
  box-shadow: 0 0 18px rgba(170, 0, 40, 0.22);
}

.hidden-section {
  display: none;
}

.auth-box h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #fff;
}

.auth-box p {
  color: #d8cfd2;
  margin-bottom: 24px;
  line-height: 1.6;
}

.auth-form,
.profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-bar-wrap {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.search-bar-wrap input,
.auth-form input,
.profile-edit-form input,
.profile-edit-form textarea,
.track-select,
.compact-search {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  outline: none;
  background: rgba(255,255,255,0.06);
  color: white;
  font-size: 1rem;
  transition: 0.25s ease;
}

.search-bar-wrap input {
  flex: 1;
  min-width: 240px;
}

.search-bar-wrap input::placeholder,
.auth-form input::placeholder,
.profile-edit-form input::placeholder,
.profile-edit-form textarea::placeholder,
.compact-search::placeholder {
  color: #bfaeb4;
}

.search-bar-wrap input:focus,
.auth-form input:focus,
.profile-edit-form input:focus,
.profile-edit-form textarea:focus,
.track-select:focus,
.compact-search:focus {
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 0 20px rgba(255,255,255,0.06);
}

.track-select option {
  background: #12070a;
  color: white;
}

.profile-edit-form textarea {
  min-height: 120px;
  resize: vertical;
}

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

.profile-identity-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-main-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 0 20px rgba(255,255,255,0.06);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 24px 0 30px;
}

.stat-box {
  border-radius: 24px;
  padding: 22px;
}

.stat-box span {
  display: block;
  color: #bfaeb4;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.stat-box strong {
  font-size: 1.5rem;
  color: #fff;
}

.settings-section {
  margin-top: 24px;
  padding: 24px;
  border-radius: 24px;
}

.settings-section h2 {
  margin-bottom: 18px;
  font-size: 1.45rem;
  color: #fff;
}

.file-label,
.select-label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #ddd;
}

.file-label input[type="file"] {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  color: white;
  border: 1px solid rgba(255,255,255,0.12);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f0dfe4;
  margin-top: 4px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.profile-meta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #f3e6ea;
  font-size: 0.92rem;
}

.flag-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.95rem;
  overflow: hidden;
}

.visibility-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #42d66a;
  display: inline-block;
}

.message-text {
  margin-top: 16px;
  color: #f4dfe5;
  min-height: 24px;
}

.login-required {
  text-align: center;
  padding: 24px 0 8px;
}

.login-required h3 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.login-required p {
  max-width: 640px;
  margin: 0 auto 24px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.user-card h3 {
  margin-bottom: 12px;
  color: #fff;
}

.auth-only {
  display: none;
}

.guest-only {
  display: inline-flex;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 10px;
  color: #fff;
}

.section-subtitle {
  color: #d9cdd1;
  line-height: 1.7;
}

.leaderboard-section {
  padding-top: 20px;
}

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

.leaderboard-toolbar {
  margin-bottom: 24px;
}

.single-row-toolbar {
  display: block;
}

.leaderboard-inline-controls {
  display: grid;
  grid-template-columns: 240px minmax(280px, 1fr);
  gap: 14px;
  align-items: center;
}

.compact-control,
.compact-search {
  margin: 0;
}

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

.leaderboard-row {
  display: grid;
  grid-template-columns: 70px minmax(220px, 1.4fr) repeat(3, minmax(120px, 1fr));
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
  transition: 0.25s ease;
  cursor: pointer;
}

.leaderboard-row:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
}

.leaderboard-rank {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
}

.leaderboard-user {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.leaderboard-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.14);
  flex-shrink: 0;
}

.leaderboard-user-text {
  min-width: 0;
}

.leaderboard-user-text h3 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-user-text p {
  color: #cfc2c7;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-location {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #eee;
  font-size: 0.78rem;
}

.mini-flag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  font-size: 0.8rem;
}

.leaderboard-stat {
  text-align: center;
}

.leaderboard-stat span {
  display: block;
  color: #bfaeb4;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.leaderboard-stat strong {
  color: #fff;
  font-size: 1.05rem;
}

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

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(35px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes resultIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .leaderboard-row {
    grid-template-columns: 60px 1fr;
    gap: 12px;
  }

  .leaderboard-stat {
    text-align: left;
    padding-left: 74px;
  }

  .leaderboard-inline-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .cards-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .info-card {
    width: 100%;
    max-width: 420px;
    min-height: 360px;
  }

  .top-nav {
    width: calc(100% - 16px);
    top: 8px;
    margin-top: 8px;
    padding: 12px 14px;
  }
}

@media (max-width: 640px) {
  .nav-right {
    gap: 8px;
  }

  .nav-btn {
    padding: 9px 14px;
    font-size: 0.9rem;
  }

  .profile-identity-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .avatar-btn {
    width: 42px;
    height: 42px;
  }

  .leaderboard-row {
    padding: 16px;
  }

  .leaderboard-user {
    align-items: flex-start;
  }

  .leaderboard-stat {
    padding-left: 0;
  }
}

@media (max-width: 520px) {
  .hero h1,
  .page-title {
    font-size: 3.2rem;
  }

  .top-badge {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .changing-text,
  .page-subtitle {
    font-size: 1rem;
  }

  .info-card,
  .page-box,
  .auth-box,
  .settings-section {
    padding: 24px 20px;
  }
}
.notify-host {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 600;
  display: grid;
  gap: 12px;
  width: min(380px, calc(100vw - 28px));
}

.notify-toast {
  display: grid;
  grid-template-columns: 48px 1fr 36px;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 12px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(39, 0, 12, 0.95), rgba(10, 10, 10, 0.95));
  box-shadow: 0 18px 54px rgba(0,0,0,0.38), 0 0 0 1px rgba(255,255,255,0.03) inset;
  backdrop-filter: blur(18px);
  transform: translateY(-10px) scale(0.98);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.notify-toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.notify-toast.closing {
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
}

.notify-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}

.notify-success .notify-icon {
  background: linear-gradient(135deg, rgba(20, 110, 48, 0.9), rgba(42, 168, 88, 0.8));
}

.notify-error .notify-icon {
  background: linear-gradient(135deg, rgba(115, 12, 32, 0.92), rgba(196, 29, 66, 0.82));
}

.notify-info .notify-icon {
  background: linear-gradient(135deg, rgba(72, 12, 32, 0.92), rgba(140, 20, 54, 0.82));
}

.notify-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notify-copy strong {
  font-size: 0.96rem;
  color: #fff;
}

.notify-copy span {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #ead8de;
}

.notify-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.notify-close:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.04);
}

/* Future-proof image quality fixes for gallery/car cards */
.garage-image-tile,
.garage-image-btn,
.garage-gallery > *,
.public-car-image,
.gallery-stage {
  overflow: hidden;
}

.garage-image-tile img,
.garage-image-btn img,
.garage-gallery img,
.public-car-image img,
.gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.gallery-stage {
  display: grid;
  place-items: center;
}

.gallery-stage img {
  width: auto;
  max-width: min(1600px, 96vw);
  max-height: 82vh;
  object-fit: contain;
}

.gallery-nav,
.gallery-close {
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.gallery-nav:hover {
  background: rgba(255,255,255,0.14);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

@media (max-width: 640px) {
  .notify-host {
    top: 16px;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .notify-toast {
    grid-template-columns: 42px 1fr 32px;
    padding: 12px;
    border-radius: 18px;
  }

  .notify-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }
}


/* Custom scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(192, 0, 45, 0.95) rgba(255,255,255,0.06);
}

body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.92), rgba(38, 0, 12, 0.72));
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.05);
}

body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #5f0017 0%, #9f0028 45%, #d10034 100%);
  border-radius: 999px;
  border: 2px solid rgba(10, 10, 10, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 0 18px rgba(170, 0, 40, 0.25);
}

body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7a001d 0%, #bd0030 45%, #f2355d 100%);
}

body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  background: rgba(12, 12, 12, 0.92);
}


/* ---------------------------- CUSTOM SCROLLBAR ---------------------------- */
* {
  scrollbar-width: thin;
  scrollbar-color: #111111 #050505;
}

::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(0,0,0,0.96), rgba(10,10,10,0.96));
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.04);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #080808, #111111, #181818);
  border-radius: 999px;
  border: 2px solid #050505;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 0 16px rgba(0,0,0,0.35);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #101010, #181818, #202020);
}

/* ------------------------------- NOTIFY -------------------------------- */
.notify-host {
  position: fixed;
  top: 86px;
  right: 18px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.notify-toast {
  width: min(380px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: 48px 1fr 28px;
  align-items: start;
  gap: 12px;
  padding: 14px 14px 14px 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(8,8,8,0.95), rgba(22,8,12,0.96));
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 16px 40px rgba(0,0,0,0.42), 0 0 28px rgba(120, 0, 30, 0.18);
  backdrop-filter: blur(16px);
  transform: translateY(-18px) scale(0.96);
  opacity: 0;
  transition: opacity 0.26s ease, transform 0.3s ease;
  pointer-events: auto;
}

.notify-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.notify-toast.closing {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}

.notify-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.15rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
}

.notify-success .notify-icon { color: #7ff7a1; box-shadow: 0 0 24px rgba(66,214,106,0.15); }
.notify-error .notify-icon { color: #ff7f98; box-shadow: 0 0 24px rgba(255,77,109,0.15); }
.notify-info .notify-icon { color: #f4dfe5; }

.notify-copy strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.notify-copy span {
  color: #eadce0;
  line-height: 1.45;
  font-size: 0.92rem;
}

.notify-close {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0.8;
}

.notify-close:hover { opacity: 1; }

/* ----------------------------- GARAGE UI ------------------------------ */
.garage-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.section-helper {
  color: #c8b7bd;
  margin-top: 6px;
}

.cars-editor-list,
.garage-display-list,
.garage-more-cars {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.car-editor-card,
.garage-car-card {
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 12px 34px rgba(0,0,0,0.28);
}

.car-editor-head,
.garage-car-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.car-editor-title,
.garage-car-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #fff;
}

.car-editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.car-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.car-grid .full-span { grid-column: 1 / -1; }

.garage-input,
.garage-textarea,
.garage-file-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(12,12,12,0.82), rgba(22,10,14,0.88));
  color: #fff;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.garage-input::placeholder,
.garage-textarea::placeholder { color: #ab9aa0; }
.garage-input:focus,
.garage-textarea:focus,
.garage-file-input:focus {
  border-color: rgba(255,255,255,0.26);
  box-shadow: 0 0 0 4px rgba(160,0,45,0.14), 0 0 20px rgba(255,255,255,0.04);
}

.garage-textarea { min-height: 108px; resize: vertical; }

.garage-label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #efe3e7;
}

.garage-preview-grid,
.garage-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.garage-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}

.garage-thumb img,
.garage-public-thumb,
.gallery-lightbox-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  -webkit-optimize-contrast: auto;
  backface-visibility: hidden;
}

.garage-public-thumb {
  cursor: pointer;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.garage-public-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.34);
  border-color: rgba(255,255,255,0.18);
}

.garage-thumb-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(8,8,8,0.84);
  color: #fff;
  cursor: pointer;
}

.garage-inline-title {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 800;
  color: #f6eaf0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  margin-top: 18px;
  margin-bottom: 14px;
}

.garage-profile-section { width: 100%; }
.garage-car-copy { color: #e7dadf; line-height: 1.6; margin-bottom: 12px; }
.garage-car-meta { color: #fff; font-weight: 700; }

.garage-toggle {
  margin-top: 14px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff;
  cursor: pointer;
}

.garage-toggle-icon { transition: transform 0.24s ease; }
.garage-toggle.open .garage-toggle-icon { transform: rotate(180deg); }
.garage-more-cars { display: none; margin-top: 14px; }
.garage-more-cars.open { display: flex; animation: fadeUp 0.25s ease; }

.public-garage-drawer {
  margin-top: 28px;
  padding: 18px;
}

.public-garage-toggle {
  margin-top: 0;
  min-height: 72px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18,18,18,0.96), rgba(10,10,10,0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 16px 40px rgba(0,0,0,0.28);
}

.public-garage-toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.public-garage-badge {
  margin: 0;
}

.public-garage-toggle-copy {
  color: #e8dce0;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.public-garage-drawer-content {
  display: none;
  margin-top: 16px;
}

.public-garage-drawer .garage-toggle.open + .public-garage-drawer-content {
  display: block;
  animation: fadeUp 0.26s ease;
}

.public-garage-drawer .garage-primary {
  margin-bottom: 14px;
}

.public-garage-drawer .garage-more-cars {
  margin-top: 0;
}

/* ----------------------------- LIGHTBOX ------------------------------ */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(10px);
  padding: 24px;
}

.gallery-lightbox.open { display: flex; }

.gallery-lightbox-inner {
  position: relative;
  width: min(96vw, 1180px);
  height: min(88vh, 820px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(12,12,12,0.94), rgba(22,8,12,0.94));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

.gallery-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-close,
.gallery-nav {
  position: fixed;
  z-index: 4100;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(10,10,10,0.9);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gallery-close {
  top: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.7rem;
}

.gallery-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-nav-left { left: 24px; }
.gallery-nav-right { right: 24px; }
.gallery-close:hover,
.gallery-nav:hover {
  background: rgba(24,24,24,0.96);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 0 24px rgba(0,0,0,0.35);
}

@media (max-width: 820px) {
  .car-grid { grid-template-columns: 1fr; }
  .notify-host { right: 12px; left: 12px; }
  .notify-toast { width: 100%; }
  .gallery-nav { width: 48px; height: 48px; font-size: 1.5rem; }
  .gallery-nav-left { left: 12px; }
  .gallery-nav-right { right: 12px; }
}
