:root {
  --bg: #04060d;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #cbd5e1;
  --accent-cyan: #00f2ff;
  --accent-purple: #a855f7;
  --accent-green: #4ade80;
  --danger: #ff5f6d;
  --glow-soft: 0 0 20px rgba(0, 242, 255, 0.3);
  --glow-strong: 0 0 40px rgba(168, 85, 247, 0.5);
  --radius: 24px;
  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Background Video Styles */
.video-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}

.video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-bg__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(4, 6, 13, 0.2) 0%,
    rgba(4, 6, 13, 0.7) 100%
  );
  backdrop-filter: blur(1px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  background: radial-gradient(
    circle at 50% -20%,
    rgba(0, 242, 255, 0.15),
    transparent 60%
  ), var(--bg);
}

.kiosk {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 36px;
  gap: 24px;
}

.kiosk__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand--logo-only {
  gap: 0;
}

.brand__logo {
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(0, 242, 255, 0.8)) 
          drop-shadow(0 0 24px rgba(168, 85, 247, 0.4));
  transition: var(--transition);
}

.brand__logo:hover {
  filter: drop-shadow(0 0 12px rgba(0, 242, 255, 0.8)) 
          drop-shadow(0 0 24px rgba(57, 255, 20, 0.6));
  transform: scale(1.05);
}

.brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: var(--glow-strong);
}

.hud-button {
  background: transparent;
  border: 1px solid rgba(0, 242, 255, 0.6);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--glow-soft);
}

.hud-button:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-strong);
  color: var(--accent-cyan);
}

.kiosk__feed {
  position: relative;
  flex: 1;
  background: var(--panel-strong);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 242, 255, 0.15);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.model-status-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto;
  gap: 16px;
  align-items: center;
}

.model-status-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 14px 18px;
  border: 1px solid rgba(0, 242, 255, 0.2);
  box-shadow: var(--glow-soft);
}

.model-status-card__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.model-status-card__value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.mock-feed {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  background: radial-gradient(
    circle,
    rgba(0, 242, 255, 0.08),
    rgba(13, 17, 23, 0.9)
  );
  color: var(--muted);
  text-align: center;
  opacity: 0;
  transition: var(--transition);
}

.mock-feed img {
  width: min(60%, 520px);
  border-radius: 18px;
  border: 1px solid rgba(0, 242, 255, 0.3);
  box-shadow: var(--glow-soft);
  opacity: 0.9;
}

.mock-feed.active {
  opacity: 1;
}

.mock-feed__title {
  font-size: 18px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.mock-feed__subtitle {
  font-size: 14px;
  letter-spacing: 0.08em;
}

#webcam {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.hud-status {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.hud-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hud-scan__ring {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 2px solid rgba(0, 242, 255, 0.25);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 8s linear infinite;
}

.hud-scan__ring--inner {
  width: 220px;
  height: 220px;
  border-color: rgba(57, 255, 20, 0.2);
  animation-direction: reverse;
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 40;
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

.overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, 0.85);
  backdrop-filter: blur(8px);
}

.modal {
  position: relative;
  width: min(900px, 95vw);
  background: #0f172a; /* Solid dark background */
  background-image: linear-gradient(
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0)
  );
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8),
              0 0 40px rgba(0, 229, 255, 0.1);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal__header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-direction: row !important;
}

.modal__header > div:first-child {
  flex: 1;
  min-width: 0;
}

.modal__header .btn--icon {
  margin-left: auto !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 22px !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  order: 2 !important;
}

.modal__header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.04em;
}

.modal__header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.modal__body {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.snapshot {
  position: relative;
  background: #05070d;
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid rgba(0, 242, 255, 0.45);
  box-shadow: var(--glow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.snapshot canvas {
  width: 100%;
  border-radius: calc(var(--radius) - 10px);
  background: #0b0f18;
}

.snapshot__glow {
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius) - 10px);
  border: 1px solid rgba(0, 242, 255, 0.3);
  box-shadow: var(--glow-strong);
  pointer-events: none;
}

.snapshot__label {
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.form input,
.form select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 15px;
  transition: var(--transition);
  outline: none;
  font-family: var(--font);
  box-sizing: border-box;
}

.form input:focus,
.form select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 242, 255, 0.1), 0 0 12px rgba(0, 242, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.form input:hover,
.form select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

/* Select dropdown dark theme styling */
.form select,
select {
  color-scheme: dark !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  padding-right: 40px !important;
}

.form select option,
select option {
  background-color: rgba(10, 14, 22, 0.95) !important;
  color: #ffffff !important;
  padding: 8px 12px !important;
}

.form__error {
  color: var(--danger);
  margin: 0;
  font-size: 13px;
  display: none;
}

.form__error.visible {
  display: block;
}

.form__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.btn--primary {
  background: linear-gradient(120deg, rgba(0, 242, 255, 0.25), transparent);
  color: var(--text);
  border: 1px solid rgba(0, 242, 255, 0.7);
  box-shadow: var(--glow-soft);
}

.btn--primary:hover {
  box-shadow: var(--glow-strong);
  color: var(--accent-cyan);
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--muted);
}

.btn--ghost:hover {
  border-color: var(--accent-cyan);
  color: var(--text);
}

.uploading,
.success {
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.uploading.active,
.success.active {
  display: flex;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(0, 242, 255, 0.2);
  border-top-color: var(--accent-cyan);
  animation: spin 1s linear infinite;
}

.success__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(57, 255, 20, 0.15);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.4);
}

.confirmation {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(
      circle at top,
      rgba(57, 255, 20, 0.08),
      transparent 55%
    ),
    var(--bg);
  padding: 32px;
  z-index: 50;
}

.confirmation__card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  border: 1px solid rgba(57, 255, 20, 0.4);
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.25),
    0 30px 60px rgba(0, 0, 0, 0.6);
  max-width: 520px;
}

.confirmation__card h1 {
  margin: 16px 0 8px;
  font-size: 28px;
}

.confirmation__card p {
  margin: 0 0 24px;
  color: var(--muted);
}

.confirmation__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid var(--accent-green);
  display: grid;
  place-items: center;
  color: var(--accent-green);
  font-size: 28px;
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.45);
}

.hidden {
  display: none !important;
}

.confirmation.hidden {
  display: none !important;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(
    circle at center,
    rgba(0, 242, 255, 0.15),
    rgba(13, 17, 23, 0.95)
  ),
  var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
  visibility: visible;
  margin: 0;
  padding: 0;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.loading-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.8);
  animation: loadingBounce 1.4s ease-in-out infinite;
  margin: 0;
  padding: 0;
}

.loading-spinner:nth-child(1) {
  animation-delay: 0s;
}

.loading-spinner:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-spinner:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loadingBounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 20px rgba(0, 242, 255, 1), 0 0 30px rgba(57, 255, 20, 0.6);
    background: var(--accent-green);
  }
}

.loading-text {
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 242, 255, 0.6);
  animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
  0%, 100% {
    opacity: 0.7;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.6);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.9);
  }
}

.marketplace {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 48px 36px;
  gap: 48px;
  background: transparent;
}

.marketplace__header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.marketplace__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.marketplace__title {
  font-size: 56px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 25%, var(--accent-purple) 50%, var(--accent-green) 75%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(0, 242, 255, 0.3);
  animation: shine 4s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

.marketplace__subtitle {
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.8;
  margin: 0;
  font-weight: 500;
}

.marketplace__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  width: 100%;
  max-width: 1300px;
  margin-top: 40px;
}

.marketplace__card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border-radius: var(--radius);
  padding: 48px 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  overflow: hidden;
}

.marketplace__card:hover {
  border-color: rgba(0, 242, 255, 0.5);
  box-shadow: 0 0 30px rgba(0, 242, 255, 0.2), 0 0 60px rgba(168, 85, 247, 0.1);
  transform: translateY(-12px) scale(1.02);
  background: rgba(255, 255, 255, 0.07);
}

.marketplace__card--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
}

.marketplace__card--disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.marketplace__card-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 28px;
  filter: drop-shadow(0 0 20px rgba(0, 242, 255, 0.4));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.marketplace__card:hover .marketplace__card-icon {
  transform: scale(1.2) translateY(-5px);
}

.marketplace__card h3 {
  margin: 0 0 16px;
  font-size: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  font-weight: 700;
}

.marketplace__card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 400;
}

.marketplace__card-glow {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(
    circle at var(--mouse-x, center) var(--mouse-y, center),
    rgba(0, 242, 255, 0.15),
    transparent 80%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.marketplace__card:hover .marketplace__card-glow {
  opacity: 1;
}

.marketplace.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .modal__body {
    grid-template-columns: 1fr;
  }

  .kiosk {
    padding: 20px;
  }
}

