/* 
  D-hunter Custom CSS Framework
  Theme: Sleek Dark Glassmorphism, Cyberpunk Neon Violet & Cyan accents, retro pixel elements.
*/

:root {
  --bg-color: #08090d;
  --panel-bg: rgba(17, 20, 32, 0.65);
  --panel-border: rgba(255, 255, 255, 0.08);
  --primary: #8b5cf6;
  --primary-glow: rgba(139, 92, 246, 0.35);
  --secondary: #06b6d4;
  --secondary-glow: rgba(6, 182, 212, 0.3);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --font-family: 'Outfit', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  width: 100vw;
  display: flex;
  flex-direction: column;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--panel-border);
  border-radius: 10px;
}

/* Glassmorphism Classes */
.glass {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

/* Layout Elements */
header {
  height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--panel-border);
  z-index: 10;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-emoji {
  font-size: 24px;
  animation: pulse-glow 2s infinite ease-in-out;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-quickstats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: bold;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 4px 10px;
  border-radius: 30px;
  color: #c084fc;
}

.avatar-badge {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 50%;
  border: 2px solid var(--secondary);
  background: rgba(6, 182, 212, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.avatar-badge:hover {
  transform: scale(1.1);
}

/* Main Content Views */
main {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.view-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(10px);
  overflow-y: auto;
  padding: 16px;
}

.view-panel.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Map View Styling */
#view-map {
  padding: 0 !important;
  overflow: hidden;
}

#leaflet-map {
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #090a0f;
}

/* Map Custom Popups */
.custom-popup .leaflet-popup-content-wrapper {
  background: rgba(11, 13, 23, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  border-radius: 12px;
  padding: 4px;
}

.custom-popup .leaflet-popup-tip {
  background: rgba(11, 13, 23, 0.95);
}

.popup-deal-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 200px;
}

.popup-image {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
}

.popup-title {
  font-weight: 700;
  font-size: 14px;
}

.popup-store {
  font-size: 11px;
  color: var(--secondary);
}

.popup-discount {
  display: inline-block;
  background: var(--warning);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  align-self: flex-start;
}

/* Camera Overlay */
.camera-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--panel-border);
}

#camera-stream {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: #000;
}

#captured-preview {
  width: 100% !important;
  aspect-ratio: 4/3 !important;
  object-fit: cover !important;
  height: auto !important;
  display: none;
}

.camera-controls {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 16px;
  z-index: 5;
}

.camera-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}

.camera-btn:active {
  transform: scale(0.9);
}

.camera-btn.primary {
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: #fff;
  border: 4px solid rgba(255, 255, 255, 0.3);
}

/* Slide-to-Confirm legal Compliance Slider */
.slider-container {
  width: 100%;
  max-width: 480px;
  margin: 20px auto 10px auto;
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  height: 54px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
}

.slider-bg-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.4));
  z-index: 1;
}

.slider-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  z-index: 2;
  pointer-events: none;
}

.slider-handle {
  position: absolute;
  left: 4px;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  cursor: grab;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: left 0.1s ease;
}

.slider-handle:active {
  cursor: grabbing;
}

/* Gamified Avatar Unlock Grid */
.rewards-header {
  text-align: center;
  margin-bottom: 20px;
}

.checkin-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 15px 0;
}

.checkin-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkin-day.checked {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--success);
  color: var(--success);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.avatar-item {
  aspect-ratio: 0.9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar-emoji-large {
  font-size: 32px;
  margin-bottom: 4px;
}

.avatar-name-small {
  font-size: 9px;
  text-align: center;
  color: var(--text-muted);
}

.avatar-item.locked {
  filter: grayscale(1) brightness(0.6);
  opacity: 0.7;
}

.avatar-item.locked::after {
  content: "🔒";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
}

.avatar-item.unlocked:hover {
  transform: scale(1.05);
}

.avatar-item.equipped {
  border: 2px solid var(--secondary);
  box-shadow: 0 0 10px var(--secondary-glow);
  background: rgba(6, 182, 212, 0.05);
}

/* Forms & UI Inputs */
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

input, select, textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 15px;
  transition: all 0.2s ease;
}

select option {
  background-color: #08090d;
  color: var(--text-main);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  background: rgba(255, 255, 255, 0.05);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Beautiful Action Buttons */
.btn {
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Auth Pages Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 400px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* Bottom Navigation Bar */
footer {
  height: 65px;
  flex-shrink: 0;
  border-top: 1px solid var(--panel-border);
  z-index: 10;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s ease;
  flex: 1;
  height: 100%;
  justify-content: center;
}

.nav-icon {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.nav-item.active .nav-icon {
  transform: scale(1.15) translateY(-2px);
  text-shadow: 0 0 10px var(--primary-glow);
}

/* Donation UI options */
.donation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.donation-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--panel-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.donation-option.active {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.05);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Admin Dashboard Table */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.admin-metric-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: 12px;
}

.admin-metric-val {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  margin-top: 15px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--panel-border);
}

th {
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-weight: 600;
}

/* Animations */
@keyframes pulse-glow {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--primary-glow)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 8px var(--primary)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 2px var(--primary-glow)); }
}

/* Splash/Alert notifications */
.proximity-banner {
  position: fixed;
  top: -250px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 90%;
  max-width: 400px;
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.proximity-banner.active {
  top: 80px; /* Safe from iPhone Notch, Dynamic Island, and Safari headers */
}

/* Premium Glassmorphic Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: .3s ease;
  border-radius: 34px;
  border: 1px solid var(--panel-border);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-main);
  transition: .3s ease;
  border-radius: 50%;
}
input:checked + .toggle-slider {
  background-color: var(--primary);
  border-color: rgba(139, 92, 246, 0.5);
}
input:checked + .toggle-slider:before {
  transform: translateX(22px);
  background-color: white;
}

/* Range Slider Styles */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  padding: 0;
  margin: 8px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  cursor: pointer;
  box-shadow: 0 0 6px var(--primary-glow);
  transition: transform 0.1s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Dashboard Premium Styling */
.dashboard-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 10px;
}

.dashboard-tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
}

.dashboard-tab-btn.active {
  background: rgba(139, 92, 246, 0.15) !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
  color: var(--primary) !important;
}

.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-item-card {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
}

.leaderboard-rank {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  width: 24px;
  color: var(--secondary);
}

.leaderboard-avatar {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  border: 1px solid var(--panel-border);
}

.leaderboard-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.leaderboard-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-mono);
}

/* Custom map tooltip for user nickname visible on bright daytime map */
.custom-map-tooltip {
  background-color: rgba(17, 20, 32, 0.9) !important;
  border: 1px solid rgba(139, 92, 246, 0.5) !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

.custom-map-tooltip div {
  color: #ffffff !important;
}

.custom-map-tooltip::before {
  border-top-color: rgba(17, 20, 32, 0.9) !important;
}

/* Prevent Leaflet divIcon hardware-accelerated wrapper clipping absolutely positioned badges */
.leaflet-marker-icon, .custom-discount-marker, .custom-user-marker, .custom-active-hunter-marker {
  overflow: visible !important;
}

/* Custom Active Hunter Marker Glow styling */
.custom-active-hunter-marker div {
  animation: hunter-glow 2s infinite ease-in-out;
}

@keyframes hunter-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(139, 92, 246, 0.6); border-color: #8b5cf6; }
  50% { box-shadow: 0 0 18px rgba(139, 92, 246, 0.9); border-color: #a78bfa; }
}

/* Photo Card Placeholder styling */
.photo-card-placeholder {
  cursor: pointer;
  transition: all 0.2s ease;
}
.photo-card-placeholder:hover #photo-empty-state {
  border-color: var(--primary) !important;
  background: rgba(139, 92, 246, 0.03);
}

/* Slide-up Bottom Sheet Camera Modal Overlay */
.camera-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(8, 9, 13, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.camera-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.camera-modal-content {
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0 !important;
  border-bottom: none !important;
  padding: 20px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 12px)) !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  background: rgba(17, 20, 32, 0.95) !important;
}

.camera-modal-overlay.active .camera-modal-content {
  transform: translateY(0);
}

.camera-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-camera-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--panel-border);
}

.modal-camera-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Green laser cyber scanning line animation */
.camera-scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
  box-shadow: 0 0 8px var(--secondary);
  animation: scan-line 2.5s infinite linear;
  pointer-events: none;
  z-index: 5;
}

@keyframes scan-line {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.camera-modal-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

/* Disappearing Toast Notification Cards */
.custom-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 10px 24px;
  border-radius: 30px;
  z-index: 9999;
  font-weight: 700;
  font-size: 12px;
  color: var(--secondary);
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 4px 20px var(--secondary-glow);
  pointer-events: none;
  opacity: 0;
  text-transform: uppercase;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  background: rgba(17, 20, 32, 0.9) !important;
}

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

/* Map Tutorial Walkthrough Overlay Bubble styles */
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 9, 13, 0.4);
  z-index: 1500;
  pointer-events: none;
}

.tutorial-bubble {
  position: absolute;
  width: 290px;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.4) !important;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1501;
  background: rgba(17, 20, 32, 0.95) !important;
}

.tutorial-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid rgba(139, 92, 246, 0.4);
  pointer-events: none;
}

.tutorial-content p {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--text-main);
  font-weight: 500;
}

.tutorial-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.tutorial-actions button {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 6px;
  height: auto;
  width: auto;
  margin: 0;
}

/* Onboarding Tutorial Warning Tooltip */
.tutorial-warning-tooltip {
  background: rgba(139, 92, 246, 0.25) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(139, 92, 246, 0.4) !important;
  border-radius: 8px !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 6px 12px !important;
  font-family: var(--font-sans) !important;
  text-align: center !important;
  white-space: normal !important;
  max-width: 200px !important;
  z-index: 9999 !important;
}

.tutorial-warning-tooltip::before {
  border-top-color: rgba(139, 92, 246, 0.4) !important;
}

/* Premium Glassmorphic Sliding Grouped Deals List View Panel */
.grouped-deals-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 55%;
  z-index: 1000;
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 17, 28, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.grouped-deals-panel.active {
  transform: translateY(0);
}

.grouped-deals-panel .panel-header {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.grouped-deals-panel .panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--secondary);
  font-family: var(--font-sans);
}

.grouped-deals-panel .close-panel-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}

.grouped-deals-panel .close-panel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.grouped-deals-panel .panel-content {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

/* For larger desktop viewport sizes, layout as a sleek right sidebar instead of full bottom-sheet */
@media (min-width: 768px) {
  .grouped-deals-panel {
    top: 90px;
    bottom: 24px;
    left: auto;
    right: 24px;
    width: 380px;
    max-height: calc(100% - 114px);
    border-radius: 20px;
    transform: translateX(120%);
    box-shadow: -10px 0 45px rgba(0, 0, 0, 0.55);
  }
  .grouped-deals-panel.active {
    transform: translateX(0);
  }
}

.grouped-deals-panel.expanded {
  max-height: calc(100% - 70px) !important;
  height: calc(100% - 70px) !important;
}


/* ==========================================
   SEARCH TAB STYLES
   ========================================== */

#view-search {
  overflow-y: auto;
  padding-bottom: 20px;
}

#view-search .glass {
  min-height: 100%;
}

#search-results-list .glass-card:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

#search-results-list .glass-card {
  transition: all 0.2s ease;
  border-radius: 10px;
}

#search-query {
  width: calc(100% - 24px);
  box-sizing: border-box;
}

/* OCR scanning indicator pulse animation */
@keyframes ocrPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

#ocr-status-banner {
  animation: ocrPulse 1.5s ease-in-out infinite;
}

#ocr-status-banner.done {
  animation: none;
}

/* Discount auto-badge */
#discount-auto-badge {
  transition: all 0.3s ease;
}

/* Range input styling for search */
#search-range-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--primary) 0%, var(--secondary) 100%);
  outline: none;
  cursor: pointer;
}

#search-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--secondary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.5);
}

/* Radio buttons reset to prevent stretching inside Search View */
#view-search input[type="radio"] {
  width: auto !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

#view-search label {
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* Pulsating flashing effect for active deal card */
.deal-card-flash {
  animation: deal-flash 1s infinite alternate;
  border-radius: 8px !important;
}

@keyframes deal-flash {
  0% {
    background: rgba(6, 182, 212, 0.05) !important;
    border-color: rgba(6, 182, 212, 0.3) !important;
    box-shadow: 0 0 4px rgba(6, 182, 212, 0.2) !important;
  }
  100% {
    background: rgba(6, 182, 212, 0.25) !important;
    border-color: var(--secondary) !important;
    box-shadow: 0 0 16px var(--secondary-glow) !important;
  }
}


