/* ========================================
   CampLoJack — Austin Resource Network
   Neon Blue on Black Theme
   ======================================== */

:root {
  --bg: #000000;
  --bg2: #050505;
  --bg3: #0a0a0a;
  --surface1: #0d0d0d;
  --surface2: #111111;
  --text1: #E0E0E0;
  --neon: #00BFFF;
  --neon2: #00FFFF;
  --neon3: #0080FF;
  --text: #FFFFFF;
  --text2: #A0A0A0;
  --border: rgba(0, 191, 255, 0.25);
  --border-strong: rgba(0, 191, 255, 0.6);
  --danger: #FF4444;
  --success: #00FF88;
  --warning: #FFB800;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-neon: 0 0 12px rgba(0, 191, 255, 0.4);
  --shadow-neon-strong: 0 0 24px rgba(0, 191, 255, 0.7);
}

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

/* Ensure visible focus ring for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--neon, #00BFFF) !important;
  outline-offset: 2px;
}

@keyframes pulse-blue {
  0%   { box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.7); transform: scale(1); }
  70%  { box-shadow: 0 0 0 12px rgba(0, 255, 255, 0); transform: scale(1.2); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 255, 0); transform: scale(1); }
}

html {
  font-size: 16px; /* base for rem */
  -webkit-text-size-adjust: 100%; /* prevent iOS auto-zoom */
  text-size-adjust: 100%;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   SCROLLBAR STYLES
   ======================================== */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--neon3) transparent;
}
*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--neon3); border-radius: 2px; }

/* ========================================
   AUTH SCREEN
   ======================================== */
#auth-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #020a14 0%, #041020 50%, #020810 100%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Auth glow keyframe — animated neon border pulse */
@keyframes auth-glow {
  0%   { box-shadow: 0 0 12px rgba(0,191,255,0.4), 0 0 0 1px rgba(0,191,255,0.25); }
  50%  { box-shadow: 0 0 32px rgba(0,191,255,0.75), 0 0 0 1px rgba(0,191,255,0.55); }
  100% { box-shadow: 0 0 12px rgba(0,191,255,0.4), 0 0 0 1px rgba(0,191,255,0.25); }
}

/* CL badge pulse */
@keyframes badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: var(--shadow-neon-strong); }
  50%       { transform: scale(1.06); box-shadow: 0 0 36px rgba(0,191,255,0.9); }
}

/* Scanning dot pulse for EWS */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.auth-box {
  background: linear-gradient(160deg, #050505 0%, #080d12 100%);
  border: 1px solid rgba(0,191,255,0.3);
  border-radius: 20px;
  padding: 40px 32px;
  width: 100%;
  max-width: 420px;
  animation: auth-glow 3s ease-in-out infinite;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo .cl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #00BFFF 0%, #0080FF 100%);
  border-radius: 18px;
  font-size: 24px;
  font-weight: 900;
  color: #000;
  margin-bottom: 12px;
  box-shadow: var(--shadow-neon-strong);
  animation: badge-pulse 2.8s ease-in-out infinite;
}

.auth-logo h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--neon);
  letter-spacing: -0.5px;
}

.auth-logo p {
  color: var(--text2);
  font-size: 13px;
  margin-top: 4px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--neon);
  color: #000;
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.auth-form.active {
  display: flex;
}

/* Feature pills row on auth screen */
.auth-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-pill {
  background: rgba(0,191,255,0.08);
  border: 1px solid rgba(0,191,255,0.28);
  color: #00BFFF;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.feature-pill:hover {
  background: rgba(0,191,255,0.16);
  border-color: rgba(0,191,255,0.5);
}

/* ========================================
   WALKTHROUGH OVERLAY
   ======================================== */
#walkthrough {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.walkthrough-card {
  background: linear-gradient(160deg, #0a0f18 0%, #0d1520 100%);
  border: 2px solid rgba(0,191,255,0.7);
  border-radius: 24px;
  padding: 36px 28px 28px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 0 60px rgba(0,191,255,0.5), 0 0 20px rgba(0,191,255,0.3), 0 8px 32px rgba(0,0,0,0.8);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.walkthrough-card::-webkit-scrollbar {
  display: none;
}

.walkthrough-step-icon {
  font-size: 64px;
  margin-bottom: 4px;
  line-height: 1;
  display: none; /* hidden — icon is now inside each step's html */
}

.walkthrough-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--neon);
  margin-bottom: 12px;
}

.walkthrough-card p {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.walkthrough-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.walkthrough-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.walkthrough-dot.active {
  background: var(--neon);
  border-color: var(--neon);
  width: 22px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0,191,255,0.6);
}

.walkthrough-actions {
  display: flex;
  gap: 12px;
}

/* ========================================
   APP SHELL
   ======================================== */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ========================================
   TOP BAR / HEADER
   ======================================== */
#top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 100;
  height: 56px;
}

.logo .cl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--neon);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  color: #000;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(0, 191, 255, 0.5);
}

#search-bar {
  flex: 1;
  position: relative;
}

#search-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px 9px 32px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  min-height: 40px;
}

#search-input:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 2px rgba(0, 191, 255, 0.15);
}

#search-input::placeholder {
  color: var(--text2);
}

.search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text2);
  pointer-events: none;
  display: flex;
}

#search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 300px;
  overflow-y: auto;
  z-index: 200;
  display: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

#search-results.visible {
  display: block;
}

.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

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

.search-result-item:hover {
  background: rgba(0, 191, 255, 0.1);
}

.search-result-item .result-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--neon);
}

.search-result-item .result-meta {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

#cart-btn {
  position: relative;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

#cart-btn:hover {
  border-color: var(--neon);
  color: var(--neon);
}

#cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--neon);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

#cart-count.visible {
  display: flex;
}

#user-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
  flex-shrink: 0;
  max-width: 80px;
  overflow: hidden;
}

#user-btn:hover {
  border-color: var(--neon);
  color: var(--neon);
}

#user-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========================================
   TAB CONTENT AREA
   ======================================== */
#tab-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.tab-panel {
  display: none;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
}

/* ========================================
   MAP TAB
   ======================================== */
#tab-map {
  flex-direction: column;
}

#alert-strip {
  background: rgba(255, 68, 68, 0.15);
  border-bottom: 1px solid rgba(255, 68, 68, 0.3);
  padding: 6px 14px;
  font-size: 12px;
  color: #FF6666;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#alert-strip .alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
  animation: pulse-red 1.5s infinite;
}

#filter-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}

#filter-bar::-webkit-scrollbar { height: 0; }

.filter-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
  min-height: 36px;
}

.filter-btn:hover {
  border-color: var(--neon);
  color: var(--neon);
}

.filter-btn.active {
  background: var(--neon);
  border-color: var(--neon);
  color: #000;
}

#map-container {
  flex: 1;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

#bus-toggle-btn {
  position: absolute;
  bottom: 20px;
  right: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

#bus-toggle-btn.active {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(0, 191, 255, 0.1);
  box-shadow: var(--shadow-neon);
}

/* ========================================
   MAP MARKERS
   ======================================== */
.map-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.8);
  cursor: pointer;
  transition: transform 0.2s;
}

.map-marker:hover { transform: scale(1.3); }
.map-marker.shelter { background: #00BFFF; box-shadow: 0 0 8px #00BFFF; }
.map-marker.food { background: #00FF88; box-shadow: 0 0 8px #00FF88; }
.map-marker.health { background: #FF6699; box-shadow: 0 0 8px #FF6699; }
.map-marker.id { background: #FFB800; box-shadow: 0 0 8px #FFB800; }
.map-marker.benefits { background: #FF8800; box-shadow: 0 0 8px #FF8800; }
.map-marker.clothing { background: #CC88FF; box-shadow: 0 0 8px #CC88FF; }
.map-marker.camp { background: #FFFF00; box-shadow: 0 0 8px #FFFF00; }
.map-marker.service { background: #00FFFF; box-shadow: 0 0 8px #00FFFF; }

.map-marker.community-pin {
  background: #FFD700;
  box-shadow: 0 0 10px #FFD700;
  width: 16px;
  height: 16px;
}

.map-marker.bus-marker {
  background: #0080FF;
  box-shadow: 0 0 10px #0080FF;
  width: 14px;
  height: 14px;
  animation: pulse-blue 2s infinite;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  border-radius: 4px;
}

/* Community pin dialog */
#pin-dialog {
  position: absolute;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  width: 240px;
  z-index: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.9);
  display: none;
}

#pin-dialog.visible {
  display: block;
}

#pin-dialog h4 {
  color: var(--neon);
  font-size: 14px;
  margin-bottom: 10px;
}

/* Leaflet popup dark theme overrides */
.leaflet-popup-content-wrapper {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-neon) !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  padding: 12px 16px !important;
  font-size: 13px !important;
  color: var(--text) !important;
}

.leaflet-popup-tip {
  background: var(--bg2) !important;
}

.leaflet-popup-close-button {
  color: var(--text2) !important;
}

.leaflet-container {
  background: #0a0a0a !important;
}

.leaflet-top, .leaflet-bottom {
  z-index: 400 !important;
}

.leaflet-control-zoom a {
  background: var(--bg2) !important;
  border-color: var(--border) !important;
  color: var(--neon) !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(0, 191, 255, 0.15) !important;
}

.leaflet-control-attribution {
  background: rgba(0,0,0,0.7) !important;
  color: var(--text2) !important;
  font-size: 10px !important;
}

.leaflet-control-attribution a {
  color: var(--neon) !important;
}

/* ========================================
   FEED TAB
   ======================================== */
#tab-feed {
  padding: 0;
  overflow-y: auto;
}

.feed-header {
  padding: 14px 14px 0;
  flex-shrink: 0;
}

.feed-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--neon);
  margin-bottom: 12px;
}

.post-form {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.post-form textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--text);
  font-size: 14px;
  resize: none;
  outline: none;
  min-height: 80px;
  transition: border-color 0.2s;
}

.post-form textarea:focus {
  border-color: var(--neon);
}

.post-form textarea::placeholder {
  color: var(--text2);
}

.guest-notice {
  background: rgba(0, 191, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text2);
  text-align: center;
}

.guest-notice a {
  color: var(--neon);
  text-decoration: underline;
  cursor: pointer;
}

#feed-list {
  padding: 0 14px 14px;
}

.feed-post {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.feed-post:hover {
  border-color: rgba(0, 191, 255, 0.4);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.post-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--neon3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #000;
  flex-shrink: 0;
}

.post-user {
  font-size: 13px;
  font-weight: 700;
  color: var(--neon);
}

.post-time {
  font-size: 11px;
  color: var(--text2);
  margin-left: auto;
}

.post-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 10px;
}

.post-actions {
  display: flex;
  gap: 12px;
}

.like-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  color: var(--text2);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.like-btn:hover, .like-btn.liked {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(0, 191, 255, 0.1);
}

/* ========================================
   STORE TAB
   ======================================== */
#tab-store {
  overflow-y: auto;
}

.store-header {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.store-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--neon);
  margin-bottom: 4px;
}

.store-header p {
  font-size: 12px;
  color: var(--text2);
}

.category-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.category-tabs::-webkit-scrollbar { height: 0; }

.cat-tab {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.cat-tab:hover {
  border-color: var(--neon);
  color: var(--neon);
}

.cat-tab.active {
  background: var(--neon);
  border-color: var(--neon);
  color: #000;
}

#products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px;
}

.product-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-img-wrap {
  width: 100%;
  height: 160px;
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #111 50%, #0d1a2a 100%);
  font-size: 52px;
  gap: 6px;
}

.product-img-placeholder span {
  font-size: 10px;
  color: var(--neon);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}

.product-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card:hover {
  border-color: var(--neon);
  box-shadow: var(--shadow-neon);
}

.product-emoji {
  font-size: 52px;
}

.product-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-price {
  font-size: 18px;
  font-weight: 900;
  color: var(--neon);
  margin-bottom: 4px;
}

.product-slogan {
  font-size: 11px;
  color: var(--text2);
  font-style: italic;
  margin-bottom: 10px;
  flex: 1;
}

.btn-add-to-cart {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--neon);
  border-radius: var(--radius-sm);
  color: var(--neon);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-to-cart:hover {
  background: var(--neon);
  color: #000;
}

/* Cart slide-up panel */
#cart-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  z-index: 800;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 75vh;
  overflow-y: auto;
  box-shadow: 0 -4px 30px rgba(0, 191, 255, 0.2);
}

#cart-panel.open {
  transform: translateY(0);
}

#cart-panel h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--neon);
  margin-bottom: 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-name {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

.cart-item-qty {
  font-size: 13px;
  color: var(--text2);
}

.cart-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--neon);
}

.cart-remove {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  display: flex;
}

.cart-total {
  padding: 14px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-total-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.cart-total-amount {
  font-size: 22px;
  font-weight: 900;
  color: var(--neon);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 799;
  display: none;
}

.cart-overlay.visible {
  display: block;
}

.discount-row {
  display: flex;
  gap: 8px;
  padding: 10px 0;
}

#discount-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  outline: none;
}

/* ========================================
   DONATE TAB
   ======================================== */
#tab-donate {
  overflow-y: auto;
  padding: 14px;
}

.donate-header {
  margin-bottom: 20px;
}

.donate-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--neon);
  margin-bottom: 6px;
}

.donate-header p {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.5;
}

.amount-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.amount-btn {
  padding: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.amount-btn:hover, .amount-btn.active {
  border-color: var(--neon);
  background: rgba(0, 191, 255, 0.1);
  color: var(--neon);
}

.heroes-section {
  margin-top: 24px;
}

.heroes-section h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--neon);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#heroes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.hero-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-item .hero-amount {
  color: var(--neon);
  font-weight: 700;
}

/* ========================================
   RATE & SHARE SECTION
   ======================================== */
.rate-section {
  margin-top: 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.rate-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.star-rating {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.star {
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.15s;
  filter: grayscale(1) brightness(0.5);
  user-select: none;
}

.star:hover, .star.active {
  filter: none;
  transform: scale(1.15);
}

.reward-banner {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--success);
  font-size: 14px;
  font-weight: 600;
  display: none;
}

.reward-banner.visible {
  display: block;
}

/* ========================================
   VAULT TAB
   ======================================== */
#tab-vault {
  overflow-y: auto;
  padding: 14px;
}

.vault-header {
  margin-bottom: 20px;
}

.vault-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--neon);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vault-header p {
  color: var(--text2);
  font-size: 13px;
}

.privacy-note {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--success);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chip {
  padding: 5px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(0, 191, 255, 0.08);
}

.vault-form {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
}

.vault-form h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--neon);
  margin-bottom: 12px;
}

#vault-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vault-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: border-color 0.2s;
}

.vault-item:hover {
  border-color: rgba(0, 191, 255, 0.4);
}

.vault-item-body {
  flex: 1;
}

.vault-item-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--neon);
  margin-bottom: 4px;
}

.vault-item-preview {
  font-size: 12px;
  color: var(--text2);
  font-family: monospace;
}

.vault-item-date {
  font-size: 11px;
  color: var(--text2);
  margin-top: 4px;
}

.vault-delete {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 4px;
  display: flex;
  flex-shrink: 0;
}

/* ========================================
   GUIDE TAB
   ======================================== */
#tab-guide {
  overflow-y: auto;
  padding: 14px;
}

.guide-header {
  margin-bottom: 20px;
}

.guide-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--neon);
  margin-bottom: 6px;
}

.guide-header p {
  color: var(--text2);
  font-size: 14px;
}

.guide-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.guide-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--neon);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-section p, .guide-section li {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}

.guide-section ul {
  padding-left: 16px;
  margin-top: 6px;
}

.guide-section li {
  margin-bottom: 4px;
}

/* ========================================
   BOTTOM NAV
   ======================================== */
#bottom-nav {
  display: flex;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  height: 68px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* hide scrollbar but keep scrollability */
  -ms-overflow-style: none;
}
#bottom-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  flex: 0 0 64px; /* fixed width — allows horizontal scroll with 9 items */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text2);
  cursor: pointer;
  padding: 6px 4px;
  transition: all 0.2s;
  font-size: 10px;
  font-weight: 600;
  min-height: 44px; /* WCAG touch target */
  white-space: nowrap;
}

.nav-btn:hover {
  color: var(--neon);
}

.nav-btn.active {
  color: var(--neon);
}

.nav-btn svg {
  width: 22px;
  height: 22px;
}

.nav-btn.active svg {
  filter: drop-shadow(0 0 4px var(--neon));
}

.nav-btn.active {
  text-shadow: 0 0 8px rgba(0, 191, 255, 0.4);
}

/* ========================================
   MODAL OVERLAY
   ======================================== */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 700;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}

#modal-overlay.visible {
  display: flex;
}

#modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -4px 40px rgba(0, 191, 255, 0.3);
  padding-bottom: 20px;
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 12px auto;
}

.modal-header {
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.modal-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-type-badge.shelter { background: rgba(0,191,255,0.15); color: #00BFFF; border: 1px solid rgba(0,191,255,0.3); }
.modal-type-badge.food { background: rgba(0,255,136,0.15); color: #00FF88; border: 1px solid rgba(0,255,136,0.3); }
.modal-type-badge.health { background: rgba(255,102,153,0.15); color: #FF6699; border: 1px solid rgba(255,102,153,0.3); }
.modal-type-badge.id { background: rgba(255,184,0,0.15); color: #FFB800; border: 1px solid rgba(255,184,0,0.3); }
.modal-type-badge.benefits { background: rgba(255,136,0,0.15); color: #FF8800; border: 1px solid rgba(255,136,0,0.3); }
.modal-type-badge.clothing { background: rgba(204,136,255,0.15); color: #CC88FF; border: 1px solid rgba(204,136,255,0.3); }
.modal-type-badge.camp { background: rgba(255,255,0,0.15); color: #FFFF00; border: 1px solid rgba(255,255,0,0.3); }
.modal-type-badge.service { background: rgba(0,255,255,0.15); color: #00FFFF; border: 1px solid rgba(0,255,255,0.3); }

.modal-body {
  padding: 14px 16px;
}

.modal-info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text2);
}

.modal-info-row svg {
  color: var(--neon);
  flex-shrink: 0;
  margin-top: 1px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(0,255,136,0.1);
  border: 1px solid rgba(0,255,136,0.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 10px;
}

.vote-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
}

.vote-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.vote-btn.up:hover { border-color: var(--success); color: var(--success); }
.vote-btn.down:hover { border-color: var(--danger); color: var(--danger); }

.modal-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--neon);
  margin: 16px 0 10px;
}

.comment-item {
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
}

.comment-user {
  font-size: 12px;
  font-weight: 700;
  color: var(--neon);
  margin-bottom: 4px;
}

.comment-text {
  font-size: 13px;
  color: var(--text);
}

.comment-time {
  font-size: 11px;
  color: var(--text2);
  margin-top: 4px;
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.comment-form input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.comment-form input:focus {
  border-color: var(--neon);
}

.modal-actions {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ========================================
   CHECKOUT MODAL
   ======================================== */
#checkout-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#checkout-modal.visible {
  display: flex;
}

.checkout-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-neon-strong);
}

.checkout-box h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--neon);
  margin-bottom: 4px;
}

.checkout-steps {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  margin-top: 12px;
}

.checkout-step-dot {
  flex: 1;
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  transition: background 0.3s;
}

.checkout-step-dot.done {
  background: var(--neon);
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
#toast-container {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 28px);
  max-width: 400px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  animation: toast-in 0.3s ease;
  pointer-events: auto;
}

.toast.success {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: var(--success);
}

.toast.error {
  background: rgba(255, 68, 68, 0.15);
  border: 1px solid rgba(255, 68, 68, 0.4);
  color: var(--danger);
}

.toast.info {
  background: rgba(0, 191, 255, 0.15);
  border: 1px solid rgba(0, 191, 255, 0.4);
  color: var(--neon);
}

.toast.out {
  animation: toast-out 0.3s ease forwards;
}

/* ========================================
   USER DROPDOWN
   ======================================== */
#user-dropdown {
  position: absolute;
  top: 56px;
  right: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 160px;
  z-index: 200;
  display: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

#user-dropdown.visible {
  display: block;
}

.dropdown-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  color: var(--text);
}

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

.dropdown-item:hover {
  background: rgba(0, 191, 255, 0.1);
}

.dropdown-item.danger {
  color: var(--danger);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--neon);
  color: #000;
}

.btn-primary:hover {
  background: var(--neon2);
  box-shadow: var(--shadow-neon);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
}

.btn-secondary:hover {
  border-color: var(--neon);
  color: var(--neon);
}

.btn-neon {
  background: transparent;
  border: 1px solid var(--neon);
  color: var(--neon);
}

.btn-neon:hover {
  background: var(--neon);
  color: #000;
  box-shadow: var(--shadow-neon);
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  min-height: 44px;
  min-width: 44px;
}

/* ========================================
   FORM INPUTS (shared)
   ======================================== */
.input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.input:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 2px rgba(0, 191, 255, 0.15);
}

.input::placeholder {
  color: var(--text2);
}

.input-group {
  margin-bottom: 12px;
}

.input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================
   HERO / GLASS CARDS
   ======================================== */
.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes pulse-red {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(255, 68, 68, 0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

@keyframes sweep-pulse {
  0%, 100% { background: rgba(255, 68, 68, 0.1); }
  50% { background: rgba(255, 68, 68, 0.25); }
}

@keyframes slide-up {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-slide-up {
  animation: slide-up 0.3s ease forwards;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 600px) {
  #products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  #modal-box {
    border-radius: 20px;
    margin: auto;
    max-height: 80vh;
  }

  #modal-overlay {
    align-items: center;
  }
}

/* Ensure hidden elements are truly hidden */
[hidden], .hidden {
  display: none !important;
}

/* ========================================
   MAP MARKER LABELS
   ======================================== */
.marker-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.marker-label {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(5, 5, 5, 0.88);
  border: 1px solid #00BFFF;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.4;
  z-index: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   NOTIFICATION PERMISSION PROMPT
   ======================================== */
#notif-prompt {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  width: calc(100% - 32px);
  max-width: 420px;
  animation: slide-up 0.3s ease forwards;
}

.notif-prompt-inner {
  background: var(--surface2);
  border: 1px solid var(--neon);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text1);
  flex-wrap: wrap;
}

.notif-prompt-inner span {
  flex: 1;
  min-width: 160px;
}

/* ========================================
   FORGOT PASSWORD MODAL
   ======================================== */
#forgot-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8000;
  padding: 20px;
}

.forgot-box {
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 360px;
}

.forgot-box h3 {
  font-size: 18px;
  color: var(--neon);
}

.forgot-method-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 4px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--neon);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  display: block;
  width: 100%;
  text-align: center;
}

/* ========================================
   SPIN MODAL
   ======================================== */
#spin-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8500;
  padding: 16px;
}

.spin-modal-box {
  background: var(--surface1);
  border: 1px solid var(--neon);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 340px;
  position: relative;
  text-align: center;
  box-shadow: 0 0 40px rgba(0, 191, 255, 0.2);
}

.spin-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.spin-modal-header h3 {
  font-size: 18px;
  color: var(--neon);
  margin: 6px 0 4px;
}

.spin-modal-header p {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 16px;
}

.wheel-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 16px;
}

.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  color: #fff;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.wheel {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  position: relative;
  border: 4px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 30px rgba(0, 191, 255, 0.3), inset 0 0 20px rgba(0,0,0,0.3);
  overflow: hidden;
}

.wheel-seg-label {
  position: absolute;
  font-size: 9px;
  font-weight: 700;
  color: rgba(0,0,0,0.85);
  text-shadow: 0 1px 2px rgba(255,255,255,0.4);
  white-space: nowrap;
  pointer-events: none;
}

.spin-modal-prize {
  min-height: 24px;
  font-size: 14px;
  color: var(--text1);
  margin-bottom: 12px;
}

.spin-modal-tickets {
  font-size: 12px;
  color: var(--text2);
  margin-top: 10px;
}

/* Spins nav badge */
.spin-nav-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--neon);
  color: #000;
  font-size: 9px;
  font-weight: 700;
  border-radius: 8px;
  padding: 1px 5px;
  line-height: 1.4;
}

/* ========================================
   SPINS TAB CONTENT
   ======================================== */
.spins-header {
  padding: 16px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.spins-header h2 {
  font-size: 20px;
  color: var(--neon);
  margin-bottom: 4px;
}

.spins-header p {
  font-size: 13px;
  color: var(--text2);
}

.spins-guest-note {
  padding: 32px 16px;
  text-align: center;
  color: var(--text2);
  font-size: 14px;
}

.spins-stats {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}

.spin-stat {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.spin-stat-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--neon);
  line-height: 1;
}

.spin-stat-lbl {
  font-size: 10px;
  color: var(--text2);
  margin-top: 4px;
}

.raffle-card {
  margin: 0 16px 12px;
  background: linear-gradient(135deg, rgba(0,191,255,0.08), rgba(0,255,136,0.05));
  border: 1px solid rgba(0,191,255,0.3);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.raffle-prize {
  font-size: 28px;
  font-weight: 900;
  color: var(--neon);
  text-shadow: 0 0 20px rgba(0,191,255,0.5);
}

.raffle-draw {
  font-size: 13px;
  color: var(--text1);
  margin: 6px 0 4px;
}

.raffle-entries {
  font-size: 14px;
  color: var(--success);
}

.earn-card {
  margin: 0 16px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.earn-card h4 {
  font-size: 14px;
  color: var(--text1);
  margin-bottom: 10px;
}

.earn-card p {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 8px;
}

.earn-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  font-size: 13px;
  color: var(--text1);
}

.earn-action:last-child {
  border-bottom: none;
}

.earn-action:hover {
  color: var(--neon);
}

.earn-badge {
  background: rgba(0,191,255,0.15);
  color: var(--neon);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.earn-badge-gold {
  background: rgba(255,184,0,0.15);
  color: var(--warning);
}

.invite-link-box {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 11px;
  color: var(--text2);
  word-break: break-all;
  margin-bottom: 8px;
  font-family: monospace;
}

.spin-history {
  max-height: 180px;
  overflow-y: auto;
}

.spin-history-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
  color: var(--text1);
}

#tab-spins {
  overflow-y: auto;
  padding-bottom: 20px;
}

/* ========================================
   ENFORCEMENT / SWEEP CAMPS
   ======================================== */
.filter-btn-enforce {
  background: rgba(255, 68, 68, 0.1) !important;
  color: #FF4444 !important;
  border-color: rgba(255, 68, 68, 0.4) !important;
}

.filter-btn-enforce.active {
  background: rgba(255, 68, 68, 0.25) !important;
  border-color: #FF4444 !important;
}

.map-marker.sweep-camp {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 2px solid rgba(255,255,255,0.3);
}

.marker-label-enforce {
  font-weight: 600;
  font-size: 9px;
}

.heat-pill {
  display: inline-block;
  border: 1px solid;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.verify-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
}

/* Scanner alert button */
#scanner-alert-btn {
  position: absolute;
  bottom: 52px;
  left: 12px;
  z-index: 400;
  background: rgba(255, 68, 68, 0.85);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255,68,68,0.4);
  backdrop-filter: blur(4px);
  letter-spacing: 0.3px;
}

#scanner-alert-btn:hover {
  background: rgba(255, 68, 68, 1);
}

@keyframes pulse-scanner {
  0%, 100% { box-shadow: 0 2px 8px rgba(255,68,68,0.4); }
  50% { box-shadow: 0 2px 20px rgba(255,68,68,0.8); }
}

/* Critical camp pulse override */
.map-marker.sweep-camp[style*="animation"] {
  animation: pulse-red 1s infinite !important;
}

/* ========================================
   EWS CONNECTION STATUS PILLS
   ======================================== */
.ews-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border: 1px solid;
}

.ews-pill-live {
  color: #00FF88;
  background: rgba(0, 255, 136, 0.12);
  border-color: rgba(0, 255, 136, 0.4);
}

.ews-pill-polling {
  color: #FFB800;
  background: rgba(255, 184, 0, 0.1);
  border-color: rgba(255, 184, 0, 0.35);
}

.ews-pill-demo {
  color: #FF4444;
  background: rgba(255, 68, 68, 0.1);
  border-color: rgba(255, 68, 68, 0.35);
}

/* ========================================
   WS ALERT FLASH ANIMATION
   ======================================== */
@keyframes ws-alert-flash {
  0%   { box-shadow: 0 0 0 0 rgba(0, 191, 255, 0.8); background: rgba(0, 191, 255, 0.15); }
  50%  { box-shadow: 0 0 0 6px rgba(0, 191, 255, 0); background: rgba(0, 191, 255, 0.05); }
  100% { box-shadow: 0 0 0 0 rgba(0, 191, 255, 0); }
}

.ws-alert-flash {
  animation: ws-alert-flash 1s ease-out;
}

/* ========================================
   DESKTOP LAYOUT (768px+)
   ======================================== */
@media (min-width: 1024px) {
  /* Center the whole app in a card on wide screens */
  body {
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #030303;
    min-height: 100vh;
  }

  /* Auth screen centered on desktop */
  #auth-screen {
    max-width: 480px;
    margin: auto;
    border-radius: 20px;
    border: 1px solid rgba(0,191,255,0.2);
    box-shadow: 0 0 80px rgba(0,191,255,0.08);
    height: auto;
    min-height: 100vh;
  }

  /* App shell: sidebar nav on left, content on right */
  #app {
    flex-direction: row;
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    border-left: 1px solid rgba(0,191,255,0.12);
    border-right: 1px solid rgba(0,191,255,0.12);
    box-shadow: 0 0 80px rgba(0,191,255,0.06);
  }

  /* Sidebar nav */
  #bottom-nav {
    flex-direction: column;
    width: 80px;
    height: 100vh;
    border-top: none;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    justify-content: flex-start;
    padding-top: 16px;
    gap: 4px;
    order: -1;
  }

  .nav-btn {
    width: 100%;
    height: 64px;
    border-radius: 10px;
    margin: 0 6px;
    width: calc(100% - 12px);
    font-size: 9px;
  }

  /* Main column: top-bar + tab content */
  #app > #top-bar,
  #app > #tab-content {
    flex: 1;
    min-width: 0;
  }

  /* Wrap top-bar + tab-content in a column */
  #app {
    flex-wrap: nowrap;
  }

  /* Stack top-bar and tab-content vertically */
  #top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  /* Tab content fills remaining height */
  #tab-content {
    height: calc(100vh - 56px);
  }

  /* Feed + Store + Donate + Vault: centered readable width */
  #tab-feed .feed-content,
  #tab-donate > *,
  #tab-vault > *,
  #tab-guide > *,
  #tab-alerts > * {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Store grid: more columns on desktop */
  #products-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Map: no max-width, fills space */
  #tab-map {
    flex: 1;
  }

  /* Walkthrough card: larger on desktop */
  .walkthrough-card {
    max-width: 520px;
    padding: 48px 44px;
  }

  /* Tour pricing cards: no horizontal scroll needed on desktop */
  #tour-paywall > div > div:nth-child(2) {
    flex-wrap: nowrap;
    overflow-x: visible;
  }

  /* Auth screen: full centered card */
  #auth-screen .auth-box {
    max-width: 440px;
    border-radius: 20px;
  }

  /* Modals: centered with more breathing room */
  #modal-box {
    max-width: 540px;
    border-radius: 20px;
  }

  /* Make top bar search fill nicely */
  #search-input {
    font-size: 14px;
  }

  /* Wider donate content */
  #tab-donate {
    padding: 0 24px;
  }

  /* Community feed items: wider */
  .feed-post {
    border-radius: 14px;
  }
}

/* ========================================
   POINTS / REFERRAL / SPIN ENHANCEMENTS
   ======================================== */

/* Wheel hub center dot */
.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  border: 4px solid #111;
  box-shadow: 0 0 12px rgba(255,255,255,0.6);
  z-index: 20;
}

/* Wheel pointer arrow — replaced old text with CSS triangle */
.wheel-pointer-arrow {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #fff;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.8));
  z-index: 10;
}

/* Wheel win glow animation */
.wheel-win-glow {
  box-shadow: 0 0 40px rgba(255,215,0,0.8), inset 0 0 20px rgba(255,215,0,0.2) !important;
  transition: box-shadow 0.3s ease !important;
}

/* Jackpot animation */
.jackpot-animation {
  text-align: center;
  animation: jackpot-pop 0.5s ease;
}

@keyframes jackpot-pop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes jackpot-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

@keyframes store-credit-flash {
  0% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 0; }
}

/* Jackpot prize display */
.jackpot-prize {
  background: linear-gradient(135deg, #FF0080, #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 18px;
  font-weight: 900;
  animation: jackpot-pop 0.5s ease;
}

/* Daily spin banner animation (uses existing slide-up) */
#daily-spin-banner {
  animation: slide-up 0.4s cubic-bezier(0.17, 0.67, 0.12, 0.99) forwards;
}

/* ========================================
   EXTRA WIDE (1100px+) — two-panel map view
   ======================================== */
@media (min-width: 1280px) {
  #bottom-nav {
    width: 100px;
  }

  .nav-btn {
    font-size: 10px;
    height: 70px;
  }

  .nav-btn svg {
    width: 22px;
    height: 22px;
  }

  #products-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ========================================
   VISUAL POLISH — Empty States, Skeletons, Animations
   ======================================== */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text2);
}
.empty-state-icon {
  font-size: 52px;
  margin-bottom: 14px;
  display: block;
}
.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text2);
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.8; }
}
.skeleton {
  background: var(--bg3);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 6px;
}
.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
  border-radius: 6px;
}
.skeleton-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

@keyframes modal-slide-in {
  from { transform: translateY(32px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
#modal-box {
  animation: modal-slide-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:active,
.btn-neon:active,
.btn-primary:active {
  transform: scale(0.96);
  transition: transform 0.08s;
}

.btn-add-to-cart:active {
  background: var(--neon) !important;
  color: #000 !important;
}

.product-card {
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.product-card:hover {
  border-color: var(--neon);
  box-shadow: 0 8px 24px rgba(0, 191, 255, 0.12);
  transform: translateY(-2px);
}

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.18) !important;
  outline: none;
  border-color: var(--neon) !important;
}

.size-btn:hover,
.size-btn.selected {
  border-color: var(--neon);
  background: rgba(0, 191, 255, 0.1);
  color: var(--neon);
}

.filter-btn.active,
.filter-btn-enforce.active {
  box-shadow: 0 0 8px rgba(0, 191, 255, 0.3);
}

.feed-post {
  transition: border-color 0.15s;
}
.feed-post:hover {
  border-color: rgba(0, 191, 255, 0.3);
}

/* Shared entrance animations — used by alert overlays, pipeline forms, and new alert cards */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
