/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #38130f;
  color: #1a1a1a;
  overflow: hidden;
  height: 100vh;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(180deg, #180806 0%, #38130f 100%);
  color: white;
  height: 80px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.event-info-dropdown {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.event-info-dropdown:hover {
  background: rgba(255, 255, 255, 0.2);
}

.event-thumbnail {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-title {
  font-size: 14px;
  font-weight: 600;
}

.event-subtitle {
  font-size: 12px;
  opacity: 0.8;
}

.dropdown-arrow {
  font-size: 10px;
  opacity: 0.7;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  background: transparent;
  border: none;
  color: white;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 4px;
  transition: background 0.2s;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.icon-btn {
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(60, 60, 60, 0.8);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Main Content Layout */
.main-content {
  position: relative;
  height: calc(100vh - 80px);
  border-radius: 32px 32px 0 0;
  overflow: hidden;
  background: #f5f5f5;
}

/* Listings Panel */
.listings-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 520px;
  height: 100%;
  background: white;
  display: flex;
  flex-direction: column;
  border-radius: 0 32px 32px 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.listings-panel > * {
  background: white;
}

.listings-panel > .filter-bar {
  border-radius: 0 32px 0 0;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 8px;
  border-bottom: 1px solid #e5e5e5;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  position: relative;
}

.filter-bar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  background: white;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #1a1a1a;
}

.filter-btn.active {
  background: #1a1a1a;
  color: white;
  border-color: #1a1a1a;
}

.filter-btn.icon-filter {
  padding: 8px;
}

.filter-tag {
  background: #e5e5e5;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.filter-btn.active .filter-tag {
  background: rgba(255, 255, 255, 0.2);
}

.filter-nav {
  display: none;
}

/* Price Banner */
.price-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8f8f8;
  font-size: 14px;
  border-bottom: 1px solid #e5e5e5;
}

.price-icon {
  width: 20px;
  height: 20px;
  background: #1a8f41;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* Listings Header */
.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #e5e5e5;
}

#listings-count {
  font-size: 16px;
  font-weight: 600;
}

.sort-dropdown {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
}

/* Listings Container */
.listings-container {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

/* Auto-hiding scrollbar for listings */
.listings-container::-webkit-scrollbar {
  width: 8px;
}

.listings-container::-webkit-scrollbar-track {
  background: transparent;
}

.listings-container::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.listings-container.scrolling::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
}

.listings-container.scrolling::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Listing Card */
.listing-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.listing-card:hover {
  background: #f5f5f5;
}

.listing-card.selected {
  background: #e8f4fd;
  border: 2px solid #1a8f41;
}

.listing-image {
  width: 100px;
  height: 75px;
  background: #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-image .section-indicator {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 10px;
  height: 10px;
  background: #1a8f41;
  border-radius: 50%;
  border: 2px solid white;
}

.listing-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.listing-section {
  font-size: 16px;
  font-weight: 600;
}

.listing-row {
  font-size: 14px;
  color: #666;
}

.listing-tags {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #666;
}

.tag.amazing {
  background: #e8f5e9;
  color: #1a8f41;
  border: 1px solid #c8e6c9;
}

.tag.deal {
  background: #fff3e0;
  color: #e65100;
}

.tag.lowest {
  background: #e8f5e9;
  color: #1a8f41;
}

.listing-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.price-amount {
  font-size: 18px;
  font-weight: 600;
}

.price-fees {
  font-size: 12px;
  color: #666;
}

/* Map Panel */
.map-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f5f5f5;
  overflow: hidden;
}

.map-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.map-container:active {
  cursor: grabbing;
}

.map-container svg {
  width: 100%;
  height: 100%;
  pointer-events: all;
}

.map-container svg g {
  transition: transform 0.1s ease-out;
}

/* SVG element overrides */
.map-container svg #POCHE {
  fill: #ffffff !important;
}

.map-container svg #section-map-outline-container {
  display: none;
  pointer-events: none !important;
}

/* Disable pointer events on ALL text elements in SVG to prevent hover blocking */
.map-container svg text,
.map-container svg tspan,
.map-container svg #section-map-outline-container * {
  pointer-events: none !important;
}

/* Section paths */
.map-container path.section-path {
  transition: fill 0.15s, stroke 0.15s, stroke-width 0.15s;
  stroke: #ffffff !important;
  stroke-width: 8 !important;
}

/* Available sections - have tickets */
.map-container path.section-path.section-available {
  cursor: pointer;
  pointer-events: all !important;
}

.map-container path.section-path:hover {
  filter: brightness(1.1);
  stroke: #666 !important;
  stroke-width: 10 !important;
}

.section-path.section-selected {
  fill: #ffd700 !important;
  stroke: #333 !important;
  stroke-width: 10 !important;
}

.section-path.section-hover {
  fill: #ffeb3b !important;
}

/* Unavailable sections - no tickets */
.section-path.section-unavailable {
  cursor: default !important;
  pointer-events: none !important;
  fill: #e0e0e0 !important;
  opacity: 0.7;
}

.section-path.section-unavailable:hover {
  filter: none !important;
  stroke: #ffffff !important;
}

/* SVG price labels */
.price-labels-group,
.price-labels-group *,
.svg-price-label,
.svg-price-label * {
  pointer-events: none !important;
}

/* Map Controls */
.map-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zoom-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: white;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background 0.2s;
}

.zoom-btn:hover {
  background: #f5f5f5;
}

/* Zoom Hint */
.zoom-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 50;
}

.zoom-hint.hidden {
  opacity: 0;
}

/* Zoom Level Indicator */
.zoom-level {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 50;
}

/* Map Tooltip */
.map-tooltip {
  position: fixed;
  background: white;
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  min-width: 160px;
  transform: translateY(5px);
}

.map-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-section {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.tooltip-price {
  font-size: 18px;
  font-weight: 700;
  color: #1a8f41;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tooltip-price::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #1a8f41;
  border-radius: 50%;
}

.tooltip-perks {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
}

.quantity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quantity-option {
  padding: 20px;
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  background: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.quantity-option:hover {
  border-color: #1a1a1a;
}

.quantity-option.selected {
  border-color: #1a1a1a;
  background: #1a1a1a;
  color: white;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  color: #666;
  font-size: 14px;
}

/* Filter Modals */
.filter-modal {
  position: absolute;
  top: 130px;
  left: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  min-width: 320px;
}

.filter-modal.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-modal-content {
  padding: 20px;
}

/* Price Histogram */
.price-histogram {
  display: flex;
  align-items: flex-end;
  height: 80px;
  gap: 2px;
  margin-bottom: 16px;
}

.histogram-bar {
  flex: 1;
  background: #1a1a1a;
  border-radius: 2px 2px 0 0;
  min-width: 4px;
}

/* Price Range Slider */
.price-range-slider {
  position: relative;
  height: 4px;
  background: #e5e5e5;
  border-radius: 2px;
  margin: 24px 0;
}

.price-range-slider input[type="range"] {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  -webkit-appearance: none;
  pointer-events: none;
  top: 0;
}

.price-range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: white;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}

.price-range-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.price-range-slider input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: white;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.price-inputs {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.price-input-group {
  flex: 1;
  padding: 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
}

.price-input-group label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.price-input-group span {
  font-size: 16px;
  font-weight: 600;
}

/* Toggle Switch */
.price-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #e5e5e5;
  margin-bottom: 16px;
}

.price-toggle span {
  font-size: 14px;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #e5e5e5;
  border-radius: 14px;
  transition: 0.3s;
}

.toggle-slider::before {
  position: absolute;
  content: '';
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: #1a1a1a;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Perk Options */
.perk-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e5e5e5;
  cursor: pointer;
}

.perk-option:last-of-type {
  border-bottom: none;
}

.perk-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.perk-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #e5e5e5;
  border-radius: 6px;
  cursor: pointer;
}

/* Filter Actions */
.filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #e5e5e5;
}

.filter-action-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-action-btn.clear {
  background: transparent;
  border: none;
  color: #1a1a1a;
}

.filter-action-btn.clear:hover {
  text-decoration: underline;
}

.filter-action-btn.apply {
  background: #1a1a1a;
  color: white;
  border: none;
}

.filter-action-btn.apply:hover {
  background: #333;
}

/* Listing Detail Panel */
.listing-detail-panel {
  position: fixed;
  top: 80px;
  left: 0;
  width: 620px;
  height: calc(100vh - 80px);
  background: white;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

/* Auto-hiding scrollbar for detail panel */
.listing-detail-panel::-webkit-scrollbar {
  width: 8px;
}

.listing-detail-panel::-webkit-scrollbar-track {
  background: transparent;
}

.listing-detail-panel::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.listing-detail-panel.scrolling::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
}

.listing-detail-panel.scrolling::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

.listing-detail-panel.visible {
  transform: translateX(0);
}

/* Section Detail Panel (multi-row selection) */
.section-detail-panel {
  position: fixed;
  top: 80px;
  left: 0;
  width: 620px;
  height: calc(100vh - 80px);
  background: white;
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.section-detail-panel.visible {
  transform: translateX(0);
}

.section-detail-panel::-webkit-scrollbar {
  width: 8px;
}

.section-detail-panel::-webkit-scrollbar-track {
  background: transparent;
}

.section-detail-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.section-detail-header {
  padding: 24px 24px 0;
}

.section-detail-content {
  padding: 16px 24px 24px;
}

.section-detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.section-detail-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #1a1a1a;
}

.section-detail-count {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.section-rows-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-row-card {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #f8f8f8;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
}

.section-row-card:hover {
  background: #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-row-thumbnail {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  background: #e0e0e0;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: 16px;
}

.section-row-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-row-info {
  flex: 1;
  min-width: 0;
}

.section-row-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px;
}

.section-row-tickets {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.section-row-price {
  text-align: right;
  flex-shrink: 0;
}

.section-row-price-amount {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.section-row-price-label {
  font-size: 12px;
  color: #666;
  display: block;
}

@media (max-width: 1024px) {
  .section-detail-panel {
    width: 400px;
  }
}

@media (max-width: 768px) {
  .section-detail-panel {
    width: 100%;
  }
}

.listing-detail-header {
  position: absolute;
  top: 28px;
  left: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.back-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.back-btn:hover {
  background: #f5f5f5;
}

.listing-view-image {
  margin: 16px;
  height: 340px;
  background: #f0f0f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.listing-view-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.listing-detail-content {
  padding: 24px 20px;
}

/* Rating Badge */
.listing-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.listing-rating-badge .rating-number {
  background: #2d5a27;
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.listing-rating-badge .rating-text {
  color: #2d5a27;
  font-size: 15px;
  font-weight: 500;
}

/* Listing Title */
.listing-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1a1a1a;
  letter-spacing: -0.3px;
}

/* Price Info */
.listing-price-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}

.listing-detail-price {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.listing-price-label {
  font-size: 15px;
  color: #666;
  font-weight: 400;
}

/* Affirm line */
.affirm-line {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.5;
}

.affirm-line strong {
  font-weight: 700;
  letter-spacing: -0.5px;
}

.affirm-line a {
  color: #1a1a1a;
  text-decoration: underline;
  font-weight: 500;
  text-underline-offset: 2px;
}

/* Actions */
.listing-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.ticket-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  transition: border-color 0.2s;
}

.ticket-selector:hover {
  border-color: #999;
}

.ticket-selector svg {
  color: #666;
}

.continue-btn {
  padding: 14px 32px;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.continue-btn:hover {
  background: #333;
}

/* Deal Banner */
.deal-banner {
  background: linear-gradient(to bottom, #f7faf8 0%, #ffffff 100%);
  border-radius: 0;
  padding: 20px;
  margin: 0 -20px 24px -20px;
  display: none;
  position: relative;
}

.deal-banner.visible {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.deal-text {
  flex: 1;
  padding-right: 20px;
}

.deal-text .deal-title {
  color: #1a8f41;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.deal-text .deal-description {
  color: #444;
  font-size: 15px;
  line-height: 1.5;
}

.deal-illustration {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

/* Features */
.listing-features {
  margin-bottom: 24px;
}

.feature-item {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #eee;
  align-items: flex-start;
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  flex-shrink: 0;
  margin-top: 2px;
}

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

.feature-content {
  flex: 1;
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.feature-description {
  font-size: 15px;
  color: #666;
  line-height: 1.45;
}

.feature-description a {
  color: #1a1a1a;
  text-decoration: underline;
  font-weight: 500;
}

/* Similar Listings */
.similar-listings {
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.similar-listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.similar-listings h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.similar-nav {
  display: flex;
  gap: 8px;
}

.similar-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s;
}

.similar-nav-btn:hover {
  border-color: #999;
  color: #1a1a1a;
}

.similar-listings-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
}

.similar-listings-grid::-webkit-scrollbar {
  display: none;
}

.similar-listing-card {
  flex: 0 0 160px;
  cursor: pointer;
  transition: transform 0.2s;
}

.similar-listing-card:hover {
  transform: translateY(-2px);
}

.similar-listing-image {
  width: 160px;
  height: 110px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #f0f0f0;
}

.similar-listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.similar-listing-section {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.similar-listing-row {
  font-size: 14px;
  color: #666;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid #e5e5e5;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Mobile View Toggle */
.mobile-view-toggle {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: white;
  border-top: 1px solid #e5e5e5;
  z-index: 100;
  padding: 8px 16px;
  gap: 8px;
}

.view-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f5f5f5;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle-btn.active {
  background: #1a1a1a;
  color: white;
}

.view-toggle-btn svg {
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .listings-panel,
  .listing-detail-panel {
    width: 400px;
  }
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    position: relative;
    height: calc(100vh - 60px);
    border-radius: 16px 16px 0 0;
  }

  .listings-panel {
    position: absolute;
    width: 100%;
    height: calc(100% - 60px);
    border-radius: 16px 16px 0 0;
    box-shadow: none;
    z-index: 10;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .listings-panel.hidden {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
  }

  .map-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;
    height: auto;
    z-index: 5;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .map-panel.visible {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
  }

  .listing-detail-panel {
    width: 100%;
  }

  .mobile-view-toggle {
    display: flex;
  }

  .map-controls {
    bottom: 20px;
  }

  .zoom-hint {
    bottom: 80px;
  }

  .zoom-level {
    bottom: 20px;
  }
}

/* Simulator Info Banner */
.simulator-banner {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
  padding: 12px 24px;
  position: relative;
  z-index: 100;
}

.simulator-banner.hidden {
  display: none;
}

.banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  gap: 20px;
}

.banner-text h1 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.banner-text p {
  font-size: 13px;
  opacity: 0.9;
  max-width: 600px;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s, transform 0.1s;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.share-btn:active {
  transform: translateY(0);
}

.share-btn svg {
  flex-shrink: 0;
}

.banner-close {
  background: transparent;
  border: none;
  color: white;
  padding: 6px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Toast notification for copy link */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1a1a1a;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .header {
    padding: 8px 12px;
    height: 60px;
  }

  .event-thumbnail {
    width: 36px;
    height: 36px;
  }

  .event-title {
    font-size: 12px;
  }

  .event-subtitle {
    font-size: 10px;
  }

  .header-btn {
    padding: 8px;
    font-size: 12px;
  }

  .simulator-banner {
    padding: 12px 16px;
  }

  .banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .banner-text h1 {
    font-size: 15px;
  }

  .banner-text p {
    font-size: 12px;
  }

  .share-btn span {
    display: none;
  }

  .share-btn {
    padding: 8px;
  }
}

/* ==========================================
   GAMIFICATION STYLES
   ========================================== */

/* Game Controls Bar */
.game-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: #fafafa;
  border-bottom: 1px solid #e5e5e5;
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  outline: none;
}

.refresh-btn:hover {
  background: #333;
}

.refresh-btn:active {
  background: #222;
}

.refresh-btn:focus {
  outline: none;
}

/* Elapsed Timer Display */
.elapsed-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
}

.elapsed-timer.active {
  color: #1a1a1a;
  border-color: #1a8f41;
  background: #f0fdf4;
}

.elapsed-timer .time-value {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 15px;
  font-weight: 600;
  min-width: 70px;
}

/* Difficulty Badge */
.difficulty-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.difficulty-badge.easy {
  background: #e8f5e9;
  color: #2e7d32;
}

.difficulty-badge.medium {
  background: #fff3e0;
  color: #e65100;
}

.difficulty-badge.hard {
  background: #ffebee;
  color: #c62828;
}

.difficulty-badge.nightmare {
  background: #4a148c;
  color: white;
}

/* Settings Button */
.settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}

.settings-btn:hover {
  border-color: #1a1a1a;
  background: #f5f5f5;
}

.settings-btn svg {
  transition: transform 0.3s;
}

.settings-btn:hover svg {
  transform: rotate(90deg);
}

/* Settings Modal */
.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.settings-modal.visible {
  display: flex;
}

.settings-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

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

.settings-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}

.settings-close {
  width: 36px;
  height: 36px;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.settings-close:hover {
  background: #e5e5e5;
}

.settings-section {
  margin-bottom: 28px;
}

.settings-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Difficulty Options */
.difficulty-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.difficulty-option {
  display: flex;
  align-items: center;
  padding: 16px;
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.difficulty-option:hover {
  border-color: #999;
}

.difficulty-option.selected {
  border-color: #1a1a1a;
  background: #fafafa;
}

.difficulty-option input {
  display: none;
}

.difficulty-radio {
  width: 22px;
  height: 22px;
  border: 2px solid #ccc;
  border-radius: 50%;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.difficulty-option.selected .difficulty-radio {
  border-color: #1a1a1a;
}

.difficulty-option.selected .difficulty-radio::after {
  content: '';
  width: 12px;
  height: 12px;
  background: #1a1a1a;
  border-radius: 50%;
}

.difficulty-info {
  flex: 1;
}

.difficulty-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.difficulty-desc {
  font-size: 13px;
  color: #666;
}

/* Countdown Mode Toggle */
.countdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f8f8f8;
  border-radius: 12px;
}

.countdown-toggle-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.countdown-toggle-info p {
  font-size: 13px;
  color: #666;
}

/* Stats Display in Settings */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card {
  padding: 16px;
  background: #f8f8f8;
  border-radius: 10px;
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.stat-value.time {
  font-family: 'SF Mono', Monaco, monospace;
}

.stat-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reset-stats-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.2s;
}

.reset-stats-btn:hover {
  border-color: #c62828;
  color: #c62828;
}

/* Waiting Room Overlay */
.waiting-room {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

.waiting-room.visible {
  display: flex;
}

.waiting-room-content {
  text-align: center;
  color: white;
}

.waiting-room h2 {
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 8px;
  opacity: 0.9;
}

.waiting-room .event-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 48px;
  color: #a855f7;
}

.countdown-display {
  font-size: 120px;
  font-weight: 700;
  font-family: 'SF Mono', Monaco, monospace;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.countdown-label {
  font-size: 16px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.skip-countdown-btn {
  margin-top: 48px;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.skip-countdown-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Ready Modal */
.ready-modal-content {
  background: white;
  padding: 32px 48px;
  border-radius: 16px;
  text-align: center;
  animation: popIn 0.2s ease-out;
}

.ready-modal-content .ready-text {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hold Timer Bar */
.hold-timer-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #e5e5e5;
  overflow: hidden;
  display: none;
}

.hold-timer-bar.active {
  display: block;
}

.hold-timer-progress {
  height: 100%;
  background: #1a8f41;
  transition: width 0.1s linear, background 0.3s;
}

.hold-timer-bar.warning .hold-timer-progress {
  background: #ff9800;
}

.hold-timer-bar.critical .hold-timer-progress {
  background: #f44336;
  animation: pulse-critical 0.5s ease-in-out infinite;
}

@keyframes pulse-critical {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Listing Sold Overlay */
.listing-sold-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: 8px;
}

.listing-sold-overlay.visible {
  display: flex;
}

.listing-sold-overlay span {
  color: white;
  font-size: 14px;
  font-weight: 600;
}

/* Listing Card Sold State */
.listing-card.sold {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}

.listing-card.sold::after {
  content: 'SOLD';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

/* Success Modal */
.success-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 6000;
}

.success-modal.visible {
  display: flex;
}

.success-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 420px;
  width: 90%;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: #e8f5e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.success-icon svg {
  color: #1a8f41;
}

.success-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.success-content .success-time {
  font-size: 36px;
  font-weight: 700;
  font-family: 'SF Mono', Monaco, monospace;
  color: #1a8f41;
  margin-bottom: 16px;
}

.success-details {
  font-size: 15px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.6;
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.success-btn {
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.success-btn.primary {
  background: #1a1a1a;
  color: white;
  border: none;
}

.success-btn.primary:hover {
  background: #333;
}

.success-btn.secondary {
  background: white;
  color: #1a1a1a;
  border: 1px solid #e5e5e5;
}

.success-btn.secondary:hover {
  border-color: #1a1a1a;
}

/* Score Display (Mini) */
.score-mini {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 13px;
}

.score-mini-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-mini-item .label {
  color: #999;
}

.score-mini-item .value {
  font-weight: 600;
  color: #1a1a1a;
}

/* Stolen Notification */
.stolen-notification {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: #f44336;
  color: white;
  padding: 16px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  z-index: 7000;
  display: none;
  box-shadow: 0 4px 20px rgba(244, 67, 54, 0.4);
}

.stolen-notification.visible {
  display: block;
}
