:root {
  --bg: #0a0e1a;
  --panel: #0f1629;
  --panel2: #0d1323;
  --text: #f5f7ff;
  --muted: #b8c2e0;
  --accent: #5eb3ff;
  --accent-bright: #7dd3ff;
  --success: #4ade80;
  --danger: #ff6b6b;
  --warning: #ffd93d;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --text-size-multiplier: 1.0;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #0a0e1a 0%, #141b2e 50%, #0a0e1a 100%);
  background-attachment: fixed;
  color: var(--text);
}

.kiosk {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.kiosk__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 28px 24px;
  border-bottom: 3px solid var(--accent);
  background: linear-gradient(180deg, rgba(94,179,255,0.08) 0%, transparent 100%);
  position: relative;
}

/* Subtle railroad stripe accent */
.kiosk__header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0px,
    var(--accent) 12px,
    transparent 12px,
    transparent 24px
  );
  opacity: 0.3;
}

.kiosk__brandTitle {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--accent-bright);
  text-transform: uppercase;
}

.kiosk__brandSub {
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
  font-weight: 400;
}

.kiosk__status {
  font-size: 15px;
  color: var(--muted);
  padding: 6px 16px;
  background: rgba(94,179,255,0.1);
  border-radius: 8px;
  border: 1px solid rgba(94,179,255,0.2);
  font-weight: 500;
  display: none;
}

.kiosk__screen {
  width: min(900px, 96vw);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel2) 100%);
  border: 2px solid var(--border-strong);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 24px 80px rgba(0,0,0,0.6),
    0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;
  position: relative;
}

/* Subtle corner accents for kiosk feel */
.kiosk__screen::before,
.kiosk__screen::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(94,179,255,0.15);
  pointer-events: none;
  z-index: 10;
}

.kiosk__screen::before {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
  border-top-left-radius: 20px;
}

.kiosk__screen::after {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
  border-bottom-right-radius: 20px;
}

.kiosk__title {
  margin: 0;
  padding: 28px 28px 12px;
  font-size: calc(38px * var(--text-size-multiplier));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.kiosk__prompt {
  margin: 0;
  padding: 0 28px 20px;
  font-size: calc(19px * var(--text-size-multiplier));
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
}

.kiosk__menu {
  padding-bottom: 6px;
}

.menu {
  display: grid;
  gap: 14px;
  padding: 0 28px 20px;
}

.menuItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  border: 2px solid var(--border-strong);
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  color: var(--text);
  border-radius: 16px;
  padding: 22px 24px;
  font-size: calc(24px * var(--text-size-multiplier));
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

/* Subtle left accent bar - ENHANCED */
.menuItem::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px; /* Increased from 4px */
  background: var(--accent);
  opacity: 0.15; /* Subtle resting state instead of 0 */
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.menuItem:hover {
  border-color: rgba(94,179,255,0.3);
  background: linear-gradient(135deg, rgba(94,179,255,0.08) 0%, rgba(94,179,255,0.04) 100%);
}

.menuItem__meta {
  color: var(--muted);
  font-size: calc(19px * var(--text-size-multiplier));
  font-weight: 400;
  white-space: nowrap;
}

.menuItem.isActive {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(94,179,255,0.2),
    0 4px 16px rgba(94,179,255,0.15);
  background: linear-gradient(135deg, rgba(94,179,255,0.15) 0%, rgba(94,179,255,0.08) 100%);
  outline: none;
  transform: translateY(-1px);
}

.menuItem.isActive::before {
  opacity: 1;
  box-shadow: 2px 0 8px rgba(94,179,255,0.4); /* Add glow */
}

/* Action button visual grouping */
.menuItem.isActionButton {
  background: linear-gradient(135deg, rgba(94,179,255,0.12) 0%, rgba(94,179,255,0.06) 100%);
  border-color: rgba(94,179,255,0.25);
  margin-top: 12px; /* Spacing above action buttons */
}

.menuItem.isActionButton.isConfirm {
  border-color: rgba(78,222,128,0.4); /* Success green tint */
}

/* Info text menu items (non-interactive explanatory text) */
.menuItem.isInfoText {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.08);
  opacity: 0.9;
  pointer-events: none;
  font-size: calc(18px * var(--text-size-multiplier));
  line-height: 1.5;
  padding: 16px 24px;
  cursor: default;
}

.menuItem.isInfoText::before {
  display: none; /* No accent bar for info text */
}

/* Keyboard shortcut list items (non-actionable, navigable) */
.menuItem.isKeyboardShortcut {
  background: rgba(255,255,255,0.015);
  border-color: rgba(255,255,255,0.1);
  cursor: default;
  font-size: calc(16px * var(--text-size-multiplier));
  padding-left: 32px; /* Indent for list appearance */
}

.menuItem.isKeyboardShortcut::before {
  width: 3px; /* Thinner accent for list items */
  opacity: 0.3;
}

.menuItem.isKeyboardShortcut.isActive::before {
  opacity: 0.6; /* Less prominent when focused */
}

.menuItem.isKeyboardShortcut.isActive {
  background: rgba(255,255,255,0.03);
  border-color: rgba(94,179,255,0.3);
}

.kiosk__footer {
  border-top: 2px solid var(--border);
  padding: 18px 28px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.15) 100%);
}

.kiosk__hint {
  font-size: calc(16px * var(--text-size-multiplier));
  color: var(--muted);
  font-weight: 400;
  opacity: 0.9;
}

.kiosk__live {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Error Alert - positioned below menu, above footer */
.kiosk__errorAlert {
  display: none;
  background: rgba(15,22,41,0.98);
  border: 3px solid var(--danger);
  border-radius: 12px;
  padding: 16px 28px 16px 68px;
  margin: 0 28px 16px 28px;
  box-shadow: 0 4px 16px rgba(255,107,107,0.4);
  position: relative;
}

.kiosk__errorAlert.isVisible {
  display: block;
}

.kiosk__errorAlert::before {
  content: '⚠';
  font-size: 28px;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.kiosk__errorAlert__text {
  font-size: 17px;
  font-weight: 500;
  color: var(--danger);
  line-height: 1.4;
}

/* Route Map */
.routeMap {
  display: none;
  padding: 0 28px 20px;
}

.routeMap.isVisible {
  display: block;
}

.routeMap__container {
  background: linear-gradient(135deg, rgba(94,179,255,0.08) 0%, rgba(94,179,255,0.03) 100%);
  border: 2px solid rgba(94,179,255,0.2);
  border-radius: 16px;
  padding: 24px;
  position: relative;
}

.routeMap__title {
  font-size: 13px;
  color: var(--accent-bright);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.routeMap__track {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  margin-bottom: 24px;
}

.routeMap__station {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  position: relative;
}

.routeMap__dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--panel);
  box-shadow:
    0 0 0 2px var(--accent),
    0 4px 12px rgba(94,179,255,0.4);
  position: relative;
}

.routeMap__station--end .routeMap__dot {
  background: var(--success);
  box-shadow:
    0 0 0 2px var(--success),
    0 4px 12px rgba(74,222,128,0.4);
}

.routeMap__label {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.routeMap__name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}

.routeMap__line {
  flex: 1;
  height: 6px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%);
  position: relative;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(94,179,255,0.3);
}

/* Railroad ties effect */
.routeMap__line::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(0,0,0,0.2) 0px,
    rgba(0,0,0,0.2) 2px,
    transparent 2px,
    transparent 16px
  );
}

.routeMap__line::before {
  content: '▶';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--success);
  font-size: 16px;
  z-index: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.routeMap__info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.routeMap__infoItem {
  text-align: center;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.routeMap__infoLabel {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}

.routeMap__infoValue {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
}

/* Video Call UI */
.videoCall {
  padding: 0;
}

.videoCall__screen {
  background: linear-gradient(180deg, rgba(94,179,255,0.1) 0%, rgba(13,20,40,0.5) 100%);
  border: 2px solid rgba(94,179,255,0.4);
  border-radius: 16px;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

/* Subtle animated gradient overlay (very subtle for accessibility) */
.videoCall__screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(94,179,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.videoCall__avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(94,179,255,0.2) 0%, rgba(94,179,255,0.05) 100%);
  border: 4px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 40px rgba(94,179,255,0.3),
    0 8px 24px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

.videoCall__avatarIcon {
  font-size: 56px;
  filter: grayscale(100%) brightness(1.8);
}

.videoCall__status {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  position: relative;
  z-index: 1;
}

.videoCall__indicator {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.videoCall__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(94,179,255,0.5);
}

/* Minimal animation for video call status - accessibility friendly */
.videoCall__dot--animate {
  animation: videoPulse 1.8s ease-in-out infinite;
}

.videoCall__dot--animate:nth-child(2) {
  animation-delay: 0.3s;
}

.videoCall__dot--animate:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes videoPulse {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* Loading State - minimal animation - ENHANCED */
.kiosk__loading {
  display: none;
  text-align: center;
  padding: 20px 0;
  background: linear-gradient(135deg, rgba(94,179,255,0.08) 0%, rgba(94,179,255,0.04) 100%);
  border-radius: 12px;
  margin: 16px 28px;
  color: var(--accent);
  font-size: 17px;
  font-weight: 500;
}

.kiosk__loading.isVisible {
  display: block;
}

.kiosk__loadingDots {
  display: inline-flex;
  gap: 12px; /* Increased from 8px */
  margin-left: 10px;
}

.kiosk__loadingDot {
  width: 12px; /* Increased from 8px */
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(94,179,255,0.6); /* Add glow */
  animation: loadingPulse 1.6s ease-in-out infinite;
}

.kiosk__loadingDot:nth-child(2) {
  animation-delay: 0.3s;
}

.kiosk__loadingDot:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes loadingPulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* Payment success state */
.kiosk__paymentSuccess {
  background: linear-gradient(135deg, rgba(78,222,128,0.15) 0%, rgba(78,222,128,0.08) 100%);
  border: 2px solid rgba(78,222,128,0.4);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 28px;
  text-align: center;
  color: var(--success);
  font-size: 20px;
  font-weight: 600;
}

/* Date display items - visual only, not keyboard-focusable - ENHANCED */
.menuItem.isDateDisplay {
  background: rgba(255,255,255,0.01); /* Even lighter */
  border-color: rgba(255,255,255,0.05); /* Very subtle border */
  cursor: default;
  opacity: 0.6; /* Lower base opacity */
  font-size: 20px; /* Slightly smaller than times */
  pointer-events: none;
}

.menuItem.isDateDisplay.isDateSelected {
  opacity: 1;
  border-color: rgba(94,179,255,0.5); /* Stronger blue */
  background: linear-gradient(135deg, rgba(94,179,255,0.15) 0%, rgba(94,179,255,0.08) 100%);
  font-size: 22px; /* Slightly larger when selected */
}

/* Disabled dates (for return time screen) */
.menuItem.isDateDisplay.isDateDisabled {
  opacity: 0.3;
  border-color: transparent;
  background: transparent;
}

.menuItem.isDateDisplay.isDateDisabled .menuItem__meta {
  opacity: 0.5;
}

.menuItem.isDateDisplay::before {
  content: '📅';
  margin-right: 8px;
  position: static;
  width: auto;
  height: auto;
  background: none;
  opacity: 1;
}

/* Separator between dates and times - ENHANCED */
.menuItem.isSeparator {
  pointer-events: none;
  padding: 0;
  height: 2px;
  min-height: 2px;
  border: none;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(94,179,255,0.3) 50%,
    transparent 100%
  );
  margin: 8px 0;
  opacity: 1;
  border-radius: 1px;
}

.menuItem.isSeparator span {
  display: none;
}

/* Accessibility: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .videoCall__dot--animate,
  .kiosk__loadingDot {
    animation: none;
    opacity: 1;
  }

  .menuItem,
  .menuItem.isActive {
    transition: none;
    transform: none;
  }
}

/* Emoji styling for consistency */
.menuItem__emoji {
  display: inline-block;
  width: 28px;
  font-size: 22px;
  margin-right: 8px;
  filter: grayscale(0.2) brightness(1.1);
}

/* Screen category headers */
.kiosk__category {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin: 0;
  padding: 20px 28px 4px;
  font-weight: 600;
  opacity: 0.8;
}

.kiosk__category--destination { color: var(--accent); }
.kiosk__category--time { color: var(--warning); }
.kiosk__category--payment { color: var(--success); }
.kiosk__category--review { color: var(--accent-bright); }

/* Platform number badges */
.menuItem__platform {
  display: inline-block;
  background: linear-gradient(135deg, rgba(94,179,255,0.2) 0%, rgba(94,179,255,0.1) 100%);
  border: 1px solid rgba(94,179,255,0.4);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-bright);
  margin-left: 8px;
}

.menuItem.isActive .menuItem__platform {
  background: linear-gradient(135deg, rgba(94,179,255,0.3) 0%, rgba(94,179,255,0.15) 100%);
  border-color: rgba(94,179,255,0.6);
  box-shadow: 0 0 8px rgba(94,179,255,0.3);
}

/* Quantity adjustment indicators */
.menuItem.hasQuantity .menuItem__meta::before,
.menuItem.hasAdjustable .menuItem__meta::before {
  content: '◀ ';
  opacity: 0.5;
  font-size: 14px;
}

.menuItem.hasQuantity .menuItem__meta::after,
.menuItem.hasAdjustable .menuItem__meta::after {
  content: ' ▶';
  opacity: 0.5;
  font-size: 14px;
}

.menuItem.hasQuantity.isActive .menuItem__meta::before,
.menuItem.hasQuantity.isActive .menuItem__meta::after,
.menuItem.hasAdjustable.isActive .menuItem__meta::before,
.menuItem.hasAdjustable.isActive .menuItem__meta::after {
  opacity: 1;
  color: var(--accent);
}

.menuItem__quantity {
  display: inline-block;
  background: rgba(94,179,255,0.15);
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 600;
  margin: 0 6px;
}

/* Return journey visual distinction */
.kiosk__screen.isReturnJourney .kiosk__header {
  background: linear-gradient(180deg, rgba(78,222,128,0.06) 0%, transparent 100%);
  border-bottom-color: rgba(78,222,128,0.6);
}

.kiosk__screen.isReturnJourney .kiosk__header::before {
  background: repeating-linear-gradient(
    90deg,
    var(--success) 0px,
    var(--success) 12px,
    transparent 12px,
    transparent 24px
  );
}

.kiosk__title.hasReturnIcon::before {
  content: '↩';
  display: inline-block;
  margin-right: 12px;
  color: var(--success);
  font-size: 36px;
}

/* High contrast mode toggle */
:root.highContrast {
  --bg: #000000;
  --panel: #0a0a0a;
  --panel2: #050505;
  --text: #ffffff;
  --muted: #e0e0e0;
  --border-strong: rgba(255,255,255,0.5);
}

:root.highContrast .menuItem {
  border-width: 3px;
}

:root.highContrast .menuItem.isActive {
  border-width: 4px;
  box-shadow: 0 0 0 4px rgba(94,179,255,0.4);
}

/* Animated route preview - train on route line */
.routeMap__train {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  font-size: 20px;
  animation: trainMove 3s ease-in-out infinite;
}

@keyframes trainMove {
  0%, 100% { left: 0%; }
  50% { left: calc(100% - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  .routeMap__train {
    animation: none;
    display: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-strong: rgba(255,255,255,0.3);
  }

  .menuItem {
    border-width: 3px;
  }

  .menuItem.isActive {
    border-width: 3px;
  }
}
