/* ============================================
   Astromantika – Astrocartography Styles v3
   Dark theme, glassmorphism, mobile-first
   ============================================ */

/* ============================================
   CSS Custom Properties (inherited from global)
   ============================================ */
:root {
  --acg-primary: #8b5cf6;
  --acg-primary-glow: rgba(139, 92, 246, 0.25);
  --acg-accent: #10b981;
  --acg-accent2: #f472b6;
  --acg-card: rgba(30, 41, 59, 0.85);
  --acg-card-solid: #1e293b;
  --acg-border: rgba(51, 65, 85, 0.6);
  --acg-text: #e2e8f0;
  --acg-text-sub: #94a3b8;
  --acg-radius: 14px;
  --acg-radius-sm: 10px;
  --acg-radius-pill: 999px;
  --acg-glass: rgba(255, 255, 255, 0.04);
  --acg-glass-border: rgba(255, 255, 255, 0.08);
  --acg-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  --acg-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.35);
}

/* ============================================
   Natal Profile Card
   ============================================ */
.acg-natal-card {
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: var(--acg-radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 0 30px rgba(255, 255, 255, 0.02);
}
.acg-natal-title {
  font-size: 1rem;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 0.75rem;
}
.acg-natal-title i { margin-right: 8px; }
.acg-natal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}
.acg-natal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--acg-glass);
  border: 1px solid var(--acg-glass-border);
  border-radius: var(--acg-radius-sm);
  padding: 0.6rem 0.4rem;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}
.acg-natal-item:hover { border-color: rgba(139,92,246,0.3); transform: translateY(-1px); }
.acg-natal-symbol { font-size: 1.3rem; margin-bottom: 2px; opacity: 0.9; }
.acg-natal-label {
  font-size: 0.65rem;
  color: var(--acg-text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.acg-natal-value { font-size: 0.8rem; font-weight: 600; color: var(--acg-text); }
.acg-natal-hint {
  font-size: 0.75rem;
  color: var(--acg-text-sub);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
  opacity: 0.75;
}

/* "I don't know my birth time" link */
.acg-no-time-link {
  font-size: 13px;
  color: #c084fc;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--acg-radius-sm);
  background: linear-gradient(135deg, rgba(192,132,252,0.08), rgba(244,114,182,0.06));
  border: 1px solid rgba(192,132,252,0.2);
  transition: all 0.3s ease;
  font-weight: 500;
}
.acg-no-time-link span {
  background: linear-gradient(135deg, #c084fc, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.acg-no-time-link:hover {
  background: linear-gradient(135deg, rgba(192,132,252,0.15), rgba(244,114,182,0.1));
  border-color: rgba(192,132,252,0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(192,132,252,0.15);
}

/* ============================================
   Explanation Box
   ============================================ */
.acg-explain-box {
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 14px;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 0 30px rgba(255, 255, 255, 0.02);
}
.acg-explain-title { font-size: 0.9rem; font-weight: 700; color: #10b981; margin-bottom: 0.5rem; }
.acg-explain-title i { margin-right: 6px; }
.acg-explain-text { font-size: 0.84rem; line-height: 1.6; color: rgba(226, 232, 240, 0.92); }
.acg-explain-text strong { color: #fff; font-weight: 700; }

/* ============================================
   Category Filter Bar
   ============================================ */
.acg-category-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 1rem;
  padding: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.acg-category-bar::-webkit-scrollbar { display: none; }
.acg-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--acg-text-sub);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 500;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.acg-cat-btn:hover {
  color: var(--acg-text);
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.15);
}
.acg-cat-btn:active {
  transform: scale(0.96);
}
.acg-cat-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 16px rgba(139, 92, 246, 0.35);
  font-weight: 600;
}
.acg-cat-btn .acg-cat-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.acg-cat-btn .acg-cat-icon svg { width: 16px; height: 16px; }
.acg-cat-btn i { margin-right: 2px; font-size: 0.75rem; }

/* ============================================
   Interactive World Map
   ============================================ */
#acg-map-wrap {
  margin-bottom: 1.5rem;
  border-radius: var(--acg-radius);
  overflow: hidden;
  border: 1px solid var(--acg-border);
  position: relative;
}
#acg-map {
  width: 100%;
  height: 380px;
  background: #0f172a;
  z-index: 1;
}
.acg-map-marker { background: none !important; border: none !important; }
.acg-map-tooltip {
  background: var(--acg-card-solid) !important;
  border: 1px solid var(--acg-border) !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  box-shadow: var(--acg-shadow) !important;
  font-family: inherit !important;
  color: var(--acg-text) !important;
  font-size: 0.82rem !important;
}
.acg-map-tooltip::before { border-top-color: var(--acg-card-solid) !important; }

/* Map Legend */
#acg-map-legend {
  padding: 0.6rem 1rem;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid var(--acg-border);
  backdrop-filter: blur(6px);
}
.acg-map-legend-inner {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--acg-text-sub);
}
.acg-map-legend-inner span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.acg-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.5);
}

/* ============================================
   Section Titles
   ============================================ */
.acg-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem;
  color: var(--acg-text);
}
.acg-section-title i { color: var(--acg-primary); margin-right: 0.5rem; }

/* ============================================
   Top Cities Grid
   ============================================ */
.acg-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   City Card
   ============================================ */
.acg-city-card {
  background: rgba(15, 20, 35, 0.75);
  border: 1px solid var(--acg-border);
  border-radius: var(--acg-radius);
  padding: 1.1rem;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}
.acg-city-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,0.06), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.acg-city-card:hover {
  border-color: rgba(139,92,246,0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.12);
}
.acg-city-card:active {
  transform: scale(0.98);
}
.acg-city-card:hover::before { opacity: 1; }
.acg-city-card:hover .acg-card-tap-bar { background: rgba(139,92,246,0.15); border-color: rgba(139,92,246,0.3); color: #a78bfa; }
.acg-card-rank { position: absolute; top: 0.65rem; right: 0.65rem; z-index: 1; line-height: 0; }
.acg-rank-num { font-size: 0.75rem; font-weight: 700; color: var(--acg-text-sub); background: rgba(255,255,255,0.06); padding: 4px 8px; border-radius: 8px; }
.acg-card-body { position: relative; z-index: 1; flex: 1; }
.acg-card-body h3 { margin: 0 0 0.15rem; font-size: 1.05rem; color: var(--acg-text); font-weight: 600; }
.acg-country { font-size: 0.7rem; color: var(--acg-text-sub); text-transform: uppercase; letter-spacing: 0.06em; }
.acg-card-score {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0.4rem 0;
  line-height: 1;
}
.acg-card-score small { font-size: 0.85rem; color: var(--acg-text-sub); opacity: 0.6; }

/* Tap-for-details bar at bottom of card */
.acg-card-tap-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 8px;
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.25s;
  position: relative;
  z-index: 1;
}
.acg-card-tap-bar svg {
  flex-shrink: 0;
  animation: acg-nudge 2s ease-in-out infinite;
}
@keyframes acg-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

/* Mini bars in card */
.acg-card-bars { margin-top: 0.65rem; }
.acg-mini-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
  font-size: 0.68rem;
}
.acg-mini-label {
  width: 50px;
  color: var(--acg-text-sub);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.acg-mini-track {
  flex: 1;
  height: 3px;
  background: rgba(51, 65, 85, 0.5);
  border-radius: 2px;
  overflow: hidden;
}
.acg-mini-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.acg-mini-val { width: 22px; text-align: right; color: var(--acg-text-sub); font-weight: 600; font-size: 0.68rem; }

.acg-card-highlight {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(51, 65, 85, 0.4);
  font-size: 0.72rem;
  color: var(--acg-text-sub);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}
.acg-card-highlight svg { flex-shrink: 0; margin-top: 1px; }

/* ============================================
   Full City Table
   ============================================ */
.acg-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--acg-radius);
  border: 1px solid var(--acg-border);
  background: rgba(15, 20, 35, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 2rem;
}
.acg-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.acg-table th {
  text-align: left;
  padding: 0.55rem 0.7rem;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--acg-text-sub);
  border-bottom: 1px solid var(--acg-border);
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.5);
  position: sticky;
  top: 0;
}
.acg-table td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.25);
  color: var(--acg-text);
}
.acg-row { cursor: pointer; transition: background 0.2s; }
.acg-row:hover { background: rgba(139, 92, 246, 0.06); }
.acg-rank { font-weight: 700; color: var(--acg-text-sub); width: 36px; }
.acg-sign { font-size: 0.72rem; color: var(--acg-text-sub); white-space: nowrap; }

/* Score bar inline */
.acg-score-bar { display: flex; align-items: center; gap: 0.4rem; min-width: 90px; }
.acg-score-bar > div {
  flex: 1;
  height: 5px;
  background: rgba(51, 65, 85, 0.5);
  border-radius: 3px;
  overflow: hidden;
}
.acg-score-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.acg-score-bar > span { font-size: 0.78rem; font-weight: 600; min-width: 22px; }

/* Score badge */
.acg-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: var(--acg-radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
}

/* ============================================
   Modal Overlay & Container
   ============================================ */
.acg-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: acgFadeIn 0.25s ease;
}
@keyframes acgFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes acgSlideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.acg-modal {
  background: var(--acg-card-solid);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  margin-top: auto; /* push to bottom */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.25) transparent;
  animation: acgSlideUp 0.3s ease;
  border: 1px solid var(--acg-border);
  border-bottom: none;
  box-shadow: var(--acg-shadow-lg);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.acg-modal::-webkit-scrollbar { width: 4px; }
.acg-modal::-webkit-scrollbar-track { background: transparent; }
.acg-modal::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.2); border-radius: 4px; }

/* Pull-down indicator (iOS bottom sheet pattern) */
.acg-pull-indicator {
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
  margin: 8px auto 0;
  flex-shrink: 0;
}

.acg-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  padding-top: max(1.1rem, calc(env(safe-area-inset-top, 0px) + 0.5rem));
  border-bottom: 1px solid var(--acg-border);
  position: sticky;
  top: 0;
  background: var(--acg-card-solid);
  z-index: 2;
  border-radius: 20px 20px 0 0;
}
.acg-modal-header-left { flex: 1; min-width: 0; }
.acg-modal-header h2 { margin: 0; font-size: 1.1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acg-modal-header h2 i { color: var(--acg-primary); margin-right: 0.4rem; }
.acg-modal-subtitle { font-size: 0.75rem; color: var(--acg-text-sub); margin-top: 2px; }
.acg-close {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #f87171;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 0.75rem;
}
.acg-close:hover { background: rgba(239,68,68,0.15); color: #ef4444; border-color: rgba(239,68,68,0.3); }
.acg-modal-body { padding: 1.25rem; padding-bottom: 2rem; }

/* ============================================
   Score Hero (in modal)
   ============================================ */
.acg-score-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1.25rem 0;
}
.acg-score-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--score-color, #8b5cf6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 24px var(--score-color, rgba(139,92,246,0.2)),
              inset 0 0 16px rgba(139,92,246,0.05);
  margin-bottom: 0.75rem;
  position: relative;
}
.acg-score-ring::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(139,92,246,0.15);
}
.acg-score-num {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #8b5cf6, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.acg-score-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--acg-text-sub);
  margin-top: 2px;
}
.acg-score-verdict {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--acg-text);
  text-align: center;
  max-width: 320px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.acg-score-verdict svg {
  flex-shrink: 0;
}

/* ============================================
   Detail Category Grid (in modal)
   ============================================ */
.acg-detail-cats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.acg-detail-cat-item {
  background: var(--acg-glass);
  border: 1px solid var(--acg-glass-border);
  border-radius: var(--acg-radius-sm);
  padding: 0.65rem 0.75rem;
  transition: border-color 0.2s;
}
.acg-detail-cat-item:hover { border-color: rgba(139,92,246,0.25); }
.acg-dci-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
}
.acg-dci-header i { font-size: 0.7rem; color: var(--acg-text-sub); }
.acg-dci-header span { flex: 1; color: var(--acg-text-sub); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acg-dci-header strong { font-size: 0.85rem; }
.acg-dci-bar {
  height: 4px;
  background: rgba(51, 65, 85, 0.4);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.acg-dci-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.acg-dci-planets { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.acg-planet-tag {
  font-size: 0.62rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--acg-radius-pill);
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  font-weight: 500;
}

/* ============================================
   Section Card (Angular Planets, Highlights)
   ============================================ */
.acg-section-card {
  background: var(--acg-glass);
  border: 1px solid var(--acg-glass-border);
  border-radius: var(--acg-radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.acg-section-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--acg-text);
}
.acg-section-card h3 i { margin-right: 0.4rem; }

/* Angular Planets List */
.acg-angular-list { display: flex; flex-direction: column; gap: 0.4rem; }
.acg-angular-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
  transition: background 0.2s;
}
.acg-angular-item:hover { background: rgba(15, 23, 42, 0.6); }
.acg-planet-sym { font-size: 1.15rem; width: 28px; text-align: center; flex-shrink: 0; }
.acg-angular-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.acg-angular-name { font-size: 0.82rem; font-weight: 500; color: var(--acg-text); }
.acg-angular-meta { font-size: 0.7rem; color: var(--acg-text-sub); }
.acg-influence-pill {
  padding: 0.15rem 0.55rem;
  border-radius: var(--acg-radius-pill);
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Highlight List */
.acg-highlight-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.acg-highlight-list li {
  padding: 0.4rem 0 0.4rem 1.4rem;
  position: relative;
  font-size: 0.82rem;
  color: var(--acg-text);
  line-height: 1.5;
}
.acg-highlight-list li:not(:last-child) { border-bottom: 1px solid rgba(51, 65, 85, 0.2); }
.acg-highlight-list li::before {
  content: '★';
  position: absolute;
  left: 0;
  color: #f59e0b;
  font-size: 0.75rem;
}

/* ============================================
   Deep Analysis Section
   ============================================ */
.acg-deep-section {
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(244,114,182,0.04));
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: var(--acg-radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.acg-deep-header {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.acg-deep-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}
.acg-deep-header h3 { margin: 0 0 0.15rem; font-size: 0.95rem; color: var(--acg-text); }
.acg-deep-header p { margin: 0; font-size: 0.78rem; color: var(--acg-text-sub); line-height: 1.45; }

.acg-deep-btn-premium {
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  border-radius: var(--acg-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}
.acg-deep-btn-premium:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.35);
}
.acg-deep-btn-premium:disabled { opacity: 0.7; cursor: not-allowed; }
.acg-deep-btn-premium.acg-done {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.acg-credit-badge {
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--acg-radius-pill);
  font-weight: 500;
}

/* Login Prompt */
.acg-login-prompt {
  text-align: center;
  padding: 0.75rem;
}
.acg-login-prompt p { font-size: 0.82rem; color: var(--acg-text-sub); margin: 0 0 0.75rem; }
.acg-login-btns { display: flex; gap: 0.5rem; justify-content: center; }
.acg-login-prompt-sm {
  text-align: center;
  padding: 0.5rem;
}
.acg-login-prompt-sm a {
  color: #a78bfa;
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.acg-login-prompt-sm a:hover { color: #c4b5fd; }

/* ============================================
   Loading Animation
   ============================================ */
.acg-loading-animation {
  text-align: center;
  padding: 1.5rem 0;
}
.acg-loading-bar {
  width: 100%;
  height: 3px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  position: relative;
}
.acg-loading-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #8b5cf6, #f472b6, transparent);
  animation: acgLoadingSlide 1.5s ease infinite;
  border-radius: 2px;
}
@keyframes acgLoadingSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Credit Error */
.acg-credit-error {
  text-align: center;
  padding: 1.25rem;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--acg-radius-sm);
}
.acg-credit-error i { font-size: 1.5rem; color: #f59e0b; margin-bottom: 0.5rem; display: block; }
.acg-credit-error p { color: var(--acg-text-sub); font-size: 0.85rem; margin: 0 0 0.75rem; }

/* Error */
.acg-error {
  padding: 1rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--acg-radius-sm);
  text-align: center;
  color: #ef4444;
  margin-top: 0.75rem;
}
.acg-error p { margin: 0 0 0.5rem; font-size: 0.85rem; }

#acg-error {
  display: none;
  padding: 0.65rem 1rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  color: #ef4444;
  margin-bottom: 1rem;
  font-size: 0.82rem;
}

/* ============================================
   Premium Analysis Rendering (WOW Design)
   ============================================ */
.acg-analysis-premium {
  margin-top: 1rem;
}
.acg-analysis-done {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--acg-radius-sm);
  color: #10b981;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.acg-analysis-done i { font-size: 1rem; }

.acg-analysis-intro {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--acg-text);
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(139,92,246,0.06), rgba(16,185,129,0.04));
  border-radius: var(--acg-radius-sm);
  border-left: 3px solid var(--acg-primary);
}

.acg-analysis-section {
  margin-bottom: 0.75rem;
  border-radius: var(--acg-radius);
  overflow: hidden;
  border: 1px solid var(--acg-glass-border);
  background: var(--acg-card);
  backdrop-filter: blur(6px);
  animation: acgFadeUp 0.4s ease forwards;
  opacity: 0;
}
@keyframes acgFadeUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.acg-as-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  cursor: default;
}
.acg-as-icon {
  font-size: 1.25rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.acg-as-icon svg {
  width: 20px;
  height: 20px;
}
.acg-as-header h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--acg-text);
  flex: 1;
}

.acg-as-body {
  padding: 0 1rem 1rem;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--acg-text);
}
.acg-as-body p { margin: 0 0 0.6rem; }
.acg-as-body strong { color: var(--acg-accent2); }
.acg-as-body em { color: #a78bfa; font-style: italic; }
.acg-as-body ul { padding-left: 1.1rem; margin: 0.4rem 0 0.6rem; }
.acg-as-body li { margin-bottom: 0.25rem; }
.acg-as-body li::marker { color: var(--acg-primary); }

/* ============================================
   Share Section (free analysis)
   ============================================ */
.acg-share-section {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 1rem 0 0.5rem;
}
.acg-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(99, 102, 241, 0.14));
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #ddd6fe;
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.acg-share-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(244, 114, 182, 0.15));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.acg-share-btn:hover {
  border-color: rgba(139, 92, 246, 0.55);
  color: #ede9fe;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
}
.acg-share-btn:hover::before { opacity: 1; }
.acg-share-btn:active {
  transform: scale(0.97);
  box-shadow: none;
}
.acg-share-btn svg {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.acg-share-btn span,
.acg-share-btn {
  position: relative;
  z-index: 1;
}
.acg-share-popup {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  margin-top: 6px;
  animation: acgFadeIn 0.15s ease;
}
.acg-share-popup-inner {
  background: #1e293b;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  min-width: 200px;
}
.acg-share-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}
.acg-share-popup-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px;
  line-height: 0;
}
.acg-share-popup-close:hover { color: #e2e8f0; }
.acg-share-icons {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.acg-share-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: #e2e8f0;
}
.acg-share-icon-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

/* ============================================
   Kybele Chat Section (in modal)
   ============================================ */
.acg-oria-section {
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.06), rgba(244, 114, 182, 0.04));
  border: 1px solid rgba(196, 181, 253, 0.15);
  border-radius: var(--acg-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.acg-oria-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--acg-text);
}
.acg-oria-header img { border-radius: 50%; }

.acg-oria-input-wrap {
  display: flex;
  gap: 0.5rem;
}
.acg-oria-input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border-radius: var(--acg-radius-sm);
  border: 1px solid var(--acg-border);
  background: rgba(15, 23, 42, 0.5);
  color: var(--acg-text);
  font-size: 16px; /* >= 16px prevents iOS auto-zoom on focus */
  outline: none;
  transition: border-color 0.2s;
}
.acg-oria-input:focus { border-color: rgba(196, 181, 253, 0.4); }
.acg-oria-input::placeholder { color: rgba(148, 163, 184, 0.5); }

.acg-oria-send {
  width: 40px;
  height: 40px;
  border-radius: var(--acg-radius-sm);
  border: none;
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
  color: #1e1b4b;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.acg-oria-send:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(196, 181, 253, 0.3); }

/* ============================================
   Kybele CTA Section (below results)
   ============================================ */
.acg-oria-cta-section {
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(196, 181, 253, 0.15);
  border-radius: var(--acg-radius);
  padding: 1.25rem;
  margin-top: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 0 30px rgba(255, 255, 255, 0.02);
}
.acg-oria-cta-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 0.85rem;
}
.acg-oria-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  font-size: 1.2rem;
}
.acg-oria-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acg-oria-cta-text { text-align: left; }
.acg-oria-cta-text h3 { margin: 0 0 0.15rem; font-size: 0.95rem; color: var(--acg-text); }
.acg-oria-cta-text p { margin: 0; font-size: 0.78rem; color: var(--acg-text-sub); }

.acg-oria-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
  color: #1e1b4b;
  border-radius: var(--acg-radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(196, 181, 253, 0.2);
}
.acg-oria-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(196, 181, 253, 0.3);
}

/* ============================================
   Form Card
   ============================================ */
.acg-form-card {
  background: var(--acg-card);
  border: 1px solid var(--acg-glass-border);
  border-top: 3px solid var(--acg-accent);
  border-radius: var(--acg-radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}
.acg-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

/* ============================================
   Location Autocomplete
   ============================================ */
.acg-location-results {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.acg-location-results::-webkit-scrollbar { width: 5px; }
.acg-location-results::-webkit-scrollbar-track { background: transparent; }
.acg-location-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
.acg-loc-item:hover, .acg-loc-item.active { background: rgba(16,185,129,0.08) !important; }
.acg-loc-item:last-child { border-bottom: none !important; }

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 640px) {
  .acg-top-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .acg-city-card { padding: 0.85rem; }
  .acg-card-body h3 { font-size: 0.92rem; }
  .acg-card-score { font-size: 1.6rem; }
  .acg-card-bars { margin-top: 0.4rem; }
  .acg-mini-bar { gap: 0.25rem; margin-bottom: 0.2rem; font-size: 0.62rem; }
  .acg-mini-label { width: 38px; font-size: 0.58rem; }
  .acg-mini-track { height: 3px; }
  .acg-mini-val { font-size: 0.58rem; }
  .acg-card-highlight { display: none; }
  .acg-card-tap-bar { margin-top: 0.5rem; padding: 0.45rem 0.5rem; font-size: 0.68rem; background: rgba(139,92,246,0.12); }

  .acg-form-grid { grid-template-columns: 1fr; }
  .acg-category-bar { gap: 0.35rem; padding: 4px; border-radius: 14px; margin-bottom: 0.75rem; }
  .acg-cat-btn { padding: 8px 12px; font-size: 0.76rem; border-radius: 10px; gap: 5px; }
  .acg-cat-btn .acg-cat-icon { width: 16px; height: 16px; }
  .acg-cat-btn .acg-cat-icon svg { width: 14px; height: 14px; }

  .acg-overlay { align-items: flex-end; padding: 0; padding-top: 50px; }
  .acg-modal { max-height: calc(100vh - 50px); max-height: calc(100dvh - 50px); border-radius: 16px 16px 0 0; margin-top: auto; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); }
  .acg-modal-header { padding: 0.85rem 1rem; }
  .acg-modal-header h2 { font-size: 0.95rem; }
  .acg-modal-body { padding: 1rem; padding-bottom: 2.5rem; }

  .acg-detail-cats-grid { grid-template-columns: 1fr; gap: 0.4rem; }
  .acg-score-hero { padding: 0.85rem 0; }
  .acg-score-ring { width: 80px; height: 80px; }
  .acg-score-num { font-size: 1.6rem; }
  .acg-score-verdict { font-size: 0.8rem; }

  .acg-deep-header { gap: 0.6rem; }
  .acg-deep-icon { width: 36px; height: 36px; font-size: 0.95rem; }

  #acg-map { height: 260px; }
  .acg-map-legend-inner { gap: 0.75rem; font-size: 0.68rem; }

  .acg-natal-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.35rem; }
  .acg-natal-symbol { font-size: 1.1rem; }
  .acg-natal-value { font-size: 0.75rem; }

  .acg-oria-cta-inner { flex-direction: column; text-align: center; }
  .acg-oria-cta-text { text-align: center; }

  .acg-analysis-section { margin-bottom: 0.5rem; }
  .acg-as-header { padding: 0.6rem 0.85rem; }
  .acg-as-body { padding: 0 0.85rem 0.85rem; font-size: 0.8rem; }
  .acg-as-icon { width: 30px; height: 30px; font-size: 1rem; }

  .acg-table { font-size: 0.75rem; }
  .acg-table th { padding: 0.4rem 0.5rem; font-size: 0.62rem; }
  .acg-table td { padding: 0.4rem 0.5rem; }
}

@media (max-width: 400px) {
  .acg-top-grid { grid-template-columns: 1fr; }
  .acg-city-card { padding: 0.75rem; display: flex; flex-direction: row; align-items: center; gap: 0.75rem; }
  .acg-card-rank { position: static; }
  .acg-card-body { flex: 1; }
  .acg-card-body h3 { font-size: 0.95rem; }
  .acg-card-score { font-size: 1.5rem; margin: 0.2rem 0; }
  .acg-card-bars { display: none; }
  .acg-card-tap-bar { margin-top: 0.4rem; padding: 0.35rem 0.5rem; font-size: 0.65rem; }
  .acg-detail-cats-grid { grid-template-columns: 1fr; }
  #acg-map { height: 220px; }
}

/* ============================================
   Desktop Enhancements
   ============================================ */
@media (min-width: 641px) {
  .acg-overlay { align-items: center; padding: 1rem; }
  .acg-modal { border-radius: var(--acg-radius); border-bottom: 1px solid var(--acg-border); }
  .acg-modal-header { border-radius: var(--acg-radius) var(--acg-radius) 0 0; }
  .acg-detail-cats-grid { grid-template-columns: 1fr 1fr 1fr; }
  #acg-map { height: 420px; }
}

/* ============================================
   Leaflet Override (Dark Theme)
   ============================================ */
.leaflet-container { background: #0f172a !important; font-family: inherit !important; }
.leaflet-control-zoom a {
  background: var(--acg-card-solid) !important;
  color: var(--acg-text) !important;
  border-color: var(--acg-border) !important;
}
.leaflet-control-zoom a:hover { background: rgba(51, 65, 85, 0.8) !important; }
.leaflet-popup-content-wrapper { background: var(--acg-card-solid) !important; color: var(--acg-text) !important; border-radius: 10px !important; box-shadow: var(--acg-shadow) !important; }
.leaflet-popup-tip { background: var(--acg-card-solid) !important; }
.leaflet-tooltip {
  background: var(--acg-card-solid) !important;
  border: 1px solid var(--acg-border) !important;
  border-radius: 8px !important;
  color: var(--acg-text) !important;
  box-shadow: var(--acg-shadow) !important;
  padding: 6px 10px !important;
}
.leaflet-tooltip-top::before { border-top-color: var(--acg-card-solid) !important; }
.leaflet-tooltip-bottom::before { border-bottom-color: var(--acg-card-solid) !important; }

/* ============================================
   Prevent iOS auto-zoom on input focus (font-size >= 16px)
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  #acg-date, #acg-time, #acg-timezone, #acg-location, #acg-chart-select,
  .acg-oria-input {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100%;
  }
}

/* ============================================
   Heatmap – Sweet Spot Finder
   ============================================ */
.acg-heatmap-section {
  margin: 1.5rem 0;
}

.acg-heatmap-cta {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--acg-radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 0 30px rgba(255, 255, 255, 0.02);
}

.acg-heatmap-cta-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(245,158,11,0.12);
}

.acg-heatmap-cta-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f59e0b;
  margin: 0 0 4px;
}

.acg-heatmap-cta-text p {
  font-size: 0.85rem;
  color: var(--acg-text-sub);
  margin: 0;
  line-height: 1.4;
}

.acg-heatmap-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.acg-heatmap-cat-select {
  flex: 1;
  min-width: 140px;
  background: var(--acg-card);
  border: 1px solid var(--acg-border);
  color: var(--acg-text);
  border-radius: var(--acg-radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.acg-heatmap-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1e293b;
  border: none;
  border-radius: var(--acg-radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.acg-heatmap-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}

.acg-heatmap-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Sweet Spot Card */
.acg-heatmap-sweetspot {
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--acg-radius);
  padding: 1.25rem;
  margin-top: 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 0 30px rgba(255, 255, 255, 0.02);
  animation: acgFadeIn 0.4s ease;
}

.acg-heatmap-ss-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.acg-heatmap-ss-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f59e0b;
  margin: 0;
}

.acg-ss-score {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.acg-ss-score small {
  font-size: 0.5em;
  opacity: 0.6;
}

.acg-ss-cat {
  font-size: 0.35em;
  font-weight: 500;
  color: var(--acg-text-sub);
  padding: 2px 8px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--acg-radius-pill);
  vertical-align: middle;
}

.acg-ss-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acg-ss-coords, .acg-ss-city {
  font-size: 0.85rem;
  color: var(--acg-text-sub);
}

.acg-ss-coords i, .acg-ss-city i {
  width: 18px;
  text-align: center;
  margin-right: 4px;
  color: rgba(245,158,11,0.6);
}

.acg-ss-city strong {
  color: var(--acg-text);
}

/* Top 5 Zones */
.acg-heatmap-top5 {
  background: rgba(15, 20, 35, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--acg-border);
  border-radius: var(--acg-radius);
  padding: 1rem;
  margin-top: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: acgFadeIn 0.5s ease;
}

.acg-heatmap-top5 h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--acg-text);
  margin: 0 0 0.75rem;
}

.acg-heatmap-top5 h4 i {
  color: #f59e0b;
  margin-right: 6px;
}

.acg-heatmap-top5-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acg-heatmap-spot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--acg-radius-sm);
  transition: background 0.15s;
}

.acg-heatmap-spot-item:hover {
  background: rgba(255,255,255,0.05);
}

.acg-heatmap-spot-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acg-heatmap-spot-info {
  flex: 1;
  min-width: 0;
}

.acg-heatmap-spot-city {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--acg-text);
}

.acg-heatmap-spot-country {
  font-size: 0.75rem;
  color: var(--acg-text-sub);
}

.acg-heatmap-spot-score {
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Stats */
.acg-heatmap-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--acg-radius-sm);
  font-size: 0.75rem;
  color: var(--acg-text-sub);
}

/* Sweet Spot Map Marker (pulsing) */
.acg-sweetspot-marker {
  position: relative;
}

.acg-sweetspot-pulse {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(245,158,11,0.3);
  animation: sweetspotPulse 2s ease-out infinite;
}

.acg-sweetspot-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(245,158,11,0.6);
}

@keyframes sweetspotPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* Heatmap Legend */
.acg-heatmap-legend {
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.acg-heatmap-gradient-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.acg-heatmap-gradient-strip {
  width: 80px;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #1e1b4b, #7c3aed, #f97316, #f59e0b, #fbbf24, #fef3c7);
  border: 1px solid rgba(255,255,255,0.1);
}

.acg-heatmap-gradient-label {
  font-size: 0.65rem;
  color: var(--acg-text-sub);
  white-space: nowrap;
}

.acg-sweetspot-legend .acg-legend-dot {
  animation: sweetspotPulse 2s ease-out infinite;
}

/* Ensure city markers are always above heatmap canvas */
.acg-map-marker {
  z-index: 500 !important;
}
.acg-sweetspot-marker {
  z-index: 600 !important;
}
.acg-heatmap-topmarker {
  z-index: 550 !important;
}

/* Leaflet.heat canvas should be behind markers */
.leaflet-overlay-pane canvas {
  z-index: 200 !important;
}

/* Fade-in animation */
@keyframes acgFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Heatmap Mobile Responsiveness
   ============================================ */
@media (max-width: 640px) {
  .acg-heatmap-cta {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
  }

  .acg-heatmap-controls {
    flex-direction: column;
  }

  .acg-heatmap-cat-select,
  .acg-heatmap-btn {
    width: 100%;
  }

  .acg-heatmap-btn {
    justify-content: center;
    padding: 12px 20px;
  }

  .acg-ss-score {
    font-size: 1.5rem;
  }

  .acg-heatmap-stats {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .acg-heatmap-cta-text h3 {
    font-size: 0.95rem;
  }

  .acg-heatmap-cta-text p {
    font-size: 0.8rem;
  }

  .acg-heatmap-spot-item {
    padding: 6px 8px;
  }
}

/* ============================================
   Sweet Spot Gate – Login / Credits Wall
   ============================================ */

.acg-sweetspot-gate {
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--acg-radius);
  padding: 32px 24px;
  text-align: center;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 60px rgba(245, 158, 11, 0.03);
}

.acg-sweetspot-gate::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.acg-gate-icon {
  margin-bottom: 16px;
  opacity: 0.9;
}

.acg-gate-icon svg {
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.4));
}

.acg-gate-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f59e0b;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.acg-gate-desc {
  color: var(--acg-text-sub);
  font-size: 0.9rem;
  margin: 0 0 16px;
  line-height: 1.5;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.acg-gate-bonus {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--acg-radius-pill);
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 16px;
  animation: acg-gate-pulse 2s ease-in-out infinite;
}

@keyframes acg-gate-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

.acg-gate-cta-text {
  color: var(--acg-text);
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0 0 20px;
}

.acg-gate-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.acg-gate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--acg-radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.acg-gate-btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.acg-gate-btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.45);
  transform: translateY(-1px);
  color: #000;
  text-decoration: none;
}

.acg-gate-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--acg-text);
}

.acg-gate-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--acg-text);
  text-decoration: none;
}

.acg-gate-hint {
  color: var(--acg-text-sub);
  font-size: 0.78rem;
  opacity: 0.7;
}

.acg-gate-hint i {
  color: #f59e0b;
  margin-right: 4px;
}

/* Credits gate variant */
.acg-sweetspot-gate-credits {
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 60px rgba(139, 92, 246, 0.03);
}

.acg-sweetspot-gate-credits::before {
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
}

.acg-sweetspot-gate-credits .acg-gate-title {
  color: var(--acg-primary);
}

.acg-gate-credit-info {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 16px 0;
  font-size: 0.85rem;
}

.acg-gate-credit-need {
  color: #f59e0b;
  font-weight: 600;
}

.acg-gate-credit-have {
  color: var(--acg-text-sub);
}

/* Credits remaining after successful analysis */
.acg-heatmap-credit-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: var(--acg-radius-sm);
  color: #86efac;
  font-size: 0.82rem;
  font-weight: 500;
  margin: 12px 0;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .acg-sweetspot-gate {
    padding: 24px 16px;
  }

  .acg-gate-title {
    font-size: 1.1rem;
  }

  .acg-gate-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .acg-gate-btn {
    justify-content: center;
    padding: 12px 20px;
  }

  .acg-gate-credit-info {
    flex-direction: column;
    gap: 4px;
  }
}
