/* ============================================
   FossilCache - Custom Styles
   Color Palette: Sandstone, Ochre, Slate, Earth
   ============================================ */

:root {
  --color-sandstone: #e8dcc8;
  --color-sandstone-light: #f5f0e8;
  --color-ochre: #c88a3e;
  --color-ochre-dark: #a06e2c;
  --color-ochre-light: #f0d8a8;
  --color-slate: #4a5568;
  --color-slate-dark: #2d3748;
  --color-slate-light: #718096;
  --color-earth: #6b4423;
  --color-earth-light: #8b6343;
  --color-moss: #5a7247;
  --color-moss-light: #7a9267;
  --color-cream: #faf8f4;
  --color-warm-white: #fffef9;
  --color-success: #48bb78;
  --color-danger: #f56565;
  --color-info: #4299e1;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 36px rgba(0,0,0,0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--color-cream);
  color: var(--color-slate-dark);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ============ Layout ============ */
.app-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding-bottom: calc(70px + var(--safe-bottom));
}

/* ============ Top Bar ============ */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 254, 249, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 138, 62, 0.15);
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-earth);
  font-weight: 700;
  font-size: 1.15rem;
}

.top-bar-logo span {
  font-size: 1.4rem;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--color-slate);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.top-bar-btn:hover {
  background: var(--color-sandstone);
}

/* ============ Bottom Navigation ============ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 254, 249, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(200, 138, 62, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 0 calc(6px + var(--safe-bottom));
  height: calc(64px + var(--safe-bottom));
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--color-slate-light);
  font-size: 0.68rem;
  font-weight: 500;
  gap: 2px;
  padding: 4px 12px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  min-width: 56px;
  position: relative;
}

.nav-item .nav-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.nav-item.active {
  color: var(--color-ochre-dark);
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

/* FAB Submit Button */
.nav-item-fab {
  position: relative;
  top: -14px;
}

.fab-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-ochre), var(--color-earth));
  border: 3px solid var(--color-warm-white);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.fab-btn:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-xl);
}

.fab-btn:active {
  transform: scale(0.95);
}

/* ============ Cards ============ */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(200, 138, 62, 0.08);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 16px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-ochre), var(--color-ochre-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(200, 138, 62, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 138, 62, 0.4);
}

.btn-secondary {
  background: var(--color-sandstone);
  color: var(--color-earth);
}

.btn-secondary:hover {
  background: var(--color-ochre-light);
}

.btn-success {
  background: var(--color-success);
  color: white;
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-ochre);
  color: var(--color-ochre-dark);
}

.btn-outline:hover {
  background: var(--color-ochre);
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============ Form Inputs ============ */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-slate);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--color-sandstone);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--color-slate-dark);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-ochre);
  box-shadow: 0 0 0 3px rgba(200, 138, 62, 0.15);
}

select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ============ Badges & Tags ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-category {
  background: var(--color-sandstone);
  color: var(--color-earth);
}

.badge-verified {
  background: #c6f6d5;
  color: #276749;
}

.badge-points {
  background: var(--color-ochre-light);
  color: var(--color-ochre-dark);
}

/* ============ Bottom Sheet ============ */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.bottom-sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2001;
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-xl);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 70vh;
  overflow-y: auto;
  padding-bottom: var(--safe-bottom);
}

.bottom-sheet.active {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--color-sandstone);
  border-radius: var(--radius-full);
  margin: 10px auto 8px;
}

.bottom-sheet-content {
  padding: 0 20px 20px;
}

/* ============ Map ============ */
.map-container {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: calc(64px + var(--safe-bottom));
  z-index: 1;
}

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

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-md) !important;
}

.leaflet-control-zoom a {
  border-radius: var(--radius-sm) !important;
  border: none !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 18px !important;
  color: var(--color-slate-dark) !important;
  background: white !important;
}

.locate-btn {
  position: absolute;
  bottom: 20px;
  right: 16px;
  z-index: 500;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: white;
  border: none;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--color-slate);
}

.locate-btn:hover {
  box-shadow: var(--shadow-lg);
  color: var(--color-info);
}

.locate-btn.locating {
  animation: pulse 1.5s infinite;
  color: var(--color-info);
}

/* User location dot */
.user-location-dot {
  width: 18px;
  height: 18px;
  background: #4299e1;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(66,153,225,0.4), 0 1px 4px rgba(0,0,0,0.3);
}

.user-location-dot.pulse-slow {
  animation: locationPulse 2s ease-in-out infinite;
}

@keyframes locationPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(66,153,225,0.4), 0 1px 4px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(66,153,225,0.15), 0 1px 4px rgba(0,0,0,0.3); }
}

/* Custom marker */
.fossil-marker {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: white;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  border: 2px solid var(--color-ochre);
  cursor: pointer;
  transition: transform 0.2s;
}

.fossil-marker:hover {
  transform: scale(1.15);
}

.fossil-marker.verified {
  border-color: var(--color-success);
}

.fossil-marker.doubted {
  border-color: var(--color-danger);
  opacity: 0.65;
}

/* ============ Photo Upload ============ */
.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.photo-upload-slot {
  position: relative;
  aspect-ratio: 1;
  border: 2px dashed var(--color-sandstone);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  background: var(--color-sandstone-light);
}

.photo-upload-slot:hover {
  border-color: var(--color-ochre);
  background: var(--color-ochre-light);
}

.photo-upload-slot input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-upload-slot .upload-icon {
  font-size: 1.5rem;
  color: var(--color-slate-light);
}

.photo-upload-slot .upload-text {
  font-size: 0.75rem;
  color: var(--color-slate-light);
  margin-top: 4px;
}

.photo-upload-slot .preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload-slot .remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

/* ============ Photo Gallery ============ */
.photo-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.photo-gallery::-webkit-scrollbar {
  display: none;
}

.photo-gallery-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 4/3;
  position: relative;
}

.photo-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.photo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
}

.photo-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-sandstone);
  transition: background 0.3s, transform 0.3s;
}

.photo-dot.active {
  background: var(--color-ochre);
  transform: scale(1.3);
}

/* ============ Detail Page ============ */
.detail-header {
  position: relative;
}

.detail-body {
  padding: 20px 16px;
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-slate-dark);
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-info-item {
  background: var(--color-sandstone-light);
  padding: 12px;
  border-radius: var(--radius-md);
}

.detail-info-item .info-label {
  font-size: 0.75rem;
  color: var(--color-slate-light);
  margin-bottom: 4px;
}

.detail-info-item .info-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-slate-dark);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-description {
  font-size: 0.95rem;
  color: var(--color-slate);
  line-height: 1.6;
  margin-bottom: 20px;
}

.detail-mini-map {
  height: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

/* ============ Profile ============ */
.profile-header {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, var(--color-sandstone-light), var(--color-ochre-light));
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 12px;
  box-shadow: var(--shadow-md);
  border: 3px solid white;
}

.profile-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-slate-dark);
}

.profile-level {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--color-ochre-dark);
  font-weight: 600;
}

/* Level Progress */
.level-progress {
  margin: 16px auto;
  max-width: 280px;
}

.progress-bar-bg {
  height: 10px;
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-ochre), var(--color-earth));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-slate-light);
  margin-top: 4px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px 16px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-ochre-dark);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--color-slate-light);
  margin-top: 2px;
}

/* Badge Grid */
.badges-section {
  padding: 0 16px 20px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-slate-dark);
  margin-bottom: 12px;
  padding: 0 4px;
}

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

@media (min-width: 480px) {
  .badge-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 768px) {
  .badge-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform 0.2s;
  position: relative;
}

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

.badge-item.earned {
  background: var(--color-ochre-light);
}

.badge-item.locked {
  opacity: 0.35;
  filter: grayscale(0.8);
}

.badge-emoji {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.badge-label {
  font-size: 0.65rem;
  color: var(--color-slate);
  line-height: 1.2;
}

/* ============ Leaderboard ============ */
.leaderboard-list {
  padding: 0 16px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.leaderboard-item:hover {
  transform: translateX(4px);
}

.leaderboard-item.top-3 {
  border-left: 3px solid var(--color-ochre);
}

.leaderboard-rank {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-slate-light);
  min-width: 30px;
  text-align: center;
}

.leaderboard-rank.gold { color: #d4a017; }
.leaderboard-rank.silver { color: #a0a0a0; }
.leaderboard-rank.bronze { color: #cd7f32; }

.leaderboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-sandstone-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.leaderboard-info {
  flex: 1;
}

.leaderboard-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.leaderboard-level {
  font-size: 0.75rem;
  color: var(--color-slate-light);
}

.leaderboard-points {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-ochre-dark);
}

/* ============ Page Header ============ */
.page-header {
  padding: 72px 16px 16px;
  background: linear-gradient(135deg, var(--color-sandstone-light), var(--color-ochre-light));
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-slate-dark);
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--color-slate-light);
  margin-top: 4px;
}

/* ============ Toast/Messages ============ */
.toast-container {
  position: fixed;
  top: 64px;
  left: 16px;
  right: 16px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-container-bottom {
  top: auto;
  bottom: calc(72px + var(--safe-bottom));
}

.toast-container-bottom .toast {
  animation: slideUp 0.35s ease, fadeOut 0.3s ease 3.7s forwards;
}

.toast {
  background: white;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.35s ease, fadeOut 0.3s ease 3.7s forwards;
  border-left: 4px solid var(--color-success);
}

.toast.error {
  border-left-color: var(--color-danger);
}

.toast.info {
  border-left-color: var(--color-info);
}

/* ============ Animations ============ */
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; pointer-events: none; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

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

.animate-bounce-in {
  animation: bounceIn 0.5s ease;
}

.animate-slide-up {
  animation: slideUp 0.4s ease;
}

/* ============ Empty State ============ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state .empty-text {
  font-size: 1rem;
  color: var(--color-slate-light);
}

/* ============ Auth Forms ============ */
.auth-container {
  max-width: 420px;
  margin: 0 auto;
  padding: 80px 16px 40px;
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--color-slate-dark);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--color-slate-light);
}

.auth-footer a {
  color: var(--color-ochre-dark);
  text-decoration: none;
  font-weight: 600;
}

/* ============ About Page ============ */
.about-content {
  padding: 20px 16px;
  max-width: 640px;
  margin: 0 auto;
}

.about-section {
  margin-bottom: 24px;
}

.about-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-earth);
  margin-bottom: 8px;
}

.about-section p {
  font-size: 0.95rem;
  color: var(--color-slate);
  line-height: 1.6;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-sandstone-light);
}

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

.feature-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============ Responsive ============ */
@media (min-width: 768px) {
  .bottom-nav {
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border: 1px solid rgba(200, 138, 62, 0.15);
    border-bottom: none;
  }

  .top-bar {
    max-width: 100%;
  }

  .detail-body,
  .about-content {
    max-width: 640px;
    margin: 0 auto;
  }

  .stats-grid {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 0;
  }

  .page-header {
    text-align: center;
  }
}

@media (min-width: 1024px) {
  .map-container {
    top: 56px;
  }

  .photo-gallery-item {
    aspect-ratio: 16/9;
    max-height: 480px;
  }
}

/* ============ Skeleton Loading ============ */
.skeleton {
  background: linear-gradient(90deg, var(--color-sandstone-light) 25%, var(--color-sandstone) 50%, var(--color-sandstone-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============ Utility ============ */
.text-center { text-align: center; }
.text-muted { color: var(--color-slate-light); }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.px-1 { padding-left: 8px; padding-right: 8px; }
.px-2 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.hidden { display: none !important; }

/* ============ Streak Display ============ */
.streak-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ff6b35, #f7c948);
  border-radius: var(--radius-full);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 12px auto;
  width: fit-content;
}

/* ============ Map Filter Chips ============ */
.filter-chips {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 500;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: white;
  border: 1px solid var(--color-sandstone);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-slate);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.filter-chip:hover, .filter-chip.active {
  background: var(--color-ochre);
  color: white;
  border-color: var(--color-ochre);
}

/* ============ Notification Badge ============ */
.notification-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--color-danger);
  border-radius: var(--radius-full);
  border: 2px solid white;
}

/* ============ Fossil list cards (for profile) ============ */
.fossil-list-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.fossil-list-item:hover {
  transform: translateX(4px);
}

.fossil-list-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-sandstone-light);
}

.fossil-list-info {
  flex: 1;
  min-width: 0;
}

.fossil-list-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fossil-list-meta {
  font-size: 0.8rem;
  color: var(--color-slate-light);
}

/* ============ Avatar Picker ============ */
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.avatar-option {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-sandstone);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.avatar-option:hover {
  border-color: var(--color-ochre);
  transform: scale(1.05);
}

.avatar-option.selected {
  border-color: var(--color-ochre);
  background: var(--color-ochre-light);
  box-shadow: 0 0 0 2px var(--color-ochre);
}

.avatar-option input {
  display: none;
}

/* ============ Button Loading Spinner ============ */
.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-loading .btn-text {
  display: none;
}

.btn-loading .btn-spinner {
  display: inline-block;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.75;
  min-width: 80px;
}

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

/* ============ Navigation Loading Spinner ============ */
.nav-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-ochre);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.nav-item-loading {
  pointer-events: none;
}

.fab-btn .nav-spinner {
  border-color: white;
  border-top-color: transparent;
}

/* Fossil list/card loading */
.fossil-link-loading {
  pointer-events: none;
  opacity: 0.6;
  position: relative;
}

/* ============ Doubt / Verification Styles ============ */
.badge-doubted {
  background: #fed7d7;
  color: #9b2c2c;
}

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

.btn-outline-danger:hover {
  background: var(--color-danger);
  color: white;
}

.verification-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.verify-positive {
  color: var(--color-success);
  font-weight: 700;
}

.verify-negative {
  color: var(--color-danger);
  font-weight: 700;
}

.verify-separator {
  color: var(--color-slate-light);
  font-size: 0.8em;
}

.verify-badge-ok {
  display: inline-block;
  background: #c6f6d5;
  color: #276749;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  margin-left: 4px;
}

/* ============ Owner Actions ============ */
.detail-owner-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--color-sandstone);
}

/* ============ Delete Modal ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: bounceIn 0.3s ease;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-slate-dark);
  margin-bottom: 8px;
}

.modal-text {
  font-size: 0.9rem;
  color: var(--color-slate);
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ============ Existing Photos Grid (Edit Page) ============ */
.existing-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.existing-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.existing-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.existing-photo-item .remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: rgba(220, 50, 50, 0.85);
  color: white;
  border: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.existing-photo-item .remove-photo.btn-loading {
  pointer-events: none;
}

.existing-photo-item .remove-photo.btn-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
