:root {
  --primary: #0EA5E9;
  --primary-hover: #0284C7;
  --secondary: #10B981;
  --background: #F8FAFC;
  --surface: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] {
  --primary: #38BDF8;
  --primary-hover: #7DD3FC;
  --secondary: #34D399;
  --background: #0F172A;
  --surface: #1E293B;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --border: #334155;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); background-color: var(--background); color: var(--text-main); line-height: 1.6; transition: background-color var(--transition), color var(--transition); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }

#app { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border-radius: var(--radius-full); font-weight: 600; transition: var(--transition); }
.btn-primary { background-color: var(--primary); color: #FFFFFF; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { border: 2px solid var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.glass { background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); }
[data-theme='dark'] .glass { background: rgba(30, 41, 59, 0.7); border: 1px solid rgba(255, 255, 255, 0.1); }

.navbar { position: sticky; top: 0; z-index: 50; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.nav-brand { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-link { font-weight: 500; color: var(--text-muted); transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--primary); }

.auth-container { max-width: 400px; margin: 4rem auto; padding: 2rem; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.form-input { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--background); color: var(--text-main); font-family: var(--font-body); transition: var(--transition); }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2); }

/* Mobile Responsiveness */
#mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-main); cursor: pointer; }

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  
  /* Typography Scaling */
  h1 { font-size: 2.5rem !important; }
  h2 { font-size: 2rem !important; }
  
  /* Navbar */
  .navbar .container { flex-wrap: wrap; }
  .nav-links { 
    display: none !important; 
    flex-direction: column !important; 
    width: 100%; 
    padding-top: 1rem;
    gap: 1rem;
    align-items: flex-start !important;
    order: 3;
  }
  .nav-links.mobile-active { display: flex !important; }
  #mobile-menu-btn { display: block; }
  
  /* Utility layout classes to apply to inline styles */
  .hero-section { height: auto !important; min-height: 60vh !important; padding: 4rem 0; }
  .mobile-col { flex-direction: column !important; }
  .mobile-w-full { width: 100% !important; max-width: 100% !important; }
  .mobile-text-center { text-align: center !important; }
  .mobile-items-stretch { align-items: stretch !important; }
}

/* Toast Notifications */
#toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 9999; display: flex; flex-direction: column; gap: 1rem; pointer-events: none; }
.toast { background: var(--surface); color: var(--text-main); padding: 1rem 1.5rem; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 1rem; font-family: var(--font-body); font-size: 1rem; min-width: 300px; transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); pointer-events: auto; border-left: 4px solid var(--border); }
.toast.show { transform: translateX(0); }
.toast-success { border-left-color: var(--secondary); }
.toast-error { border-left-color: #ef4444; }

@media (max-width: 768px) {
  #toast-container { bottom: 1rem; right: 1rem; left: 1rem; }
  .toast { min-width: 0; width: 100%; transform: translateY(150%); }
  .toast.show { transform: translateY(0); }
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
.skeleton { background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.2) 50%, var(--border) 75%); background-size: 1000px 100%; animation: shimmer 2s infinite linear; border-radius: var(--radius-md); }
[data-theme='dark'] .skeleton { background: linear-gradient(90deg, #334155 25%, rgba(255,255,255,0.05) 50%, #334155 75%); }
.skeleton-card { height: 350px; width: 100%; border-radius: var(--radius-lg); }

/* Quill.js Overrides */
.ql-toolbar { background: var(--surface); border-color: var(--border) !important; border-radius: var(--radius-md) var(--radius-md) 0 0; }
.ql-container { border-color: var(--border) !important; font-family: var(--font-body) !important; font-size: 1rem !important; }
.ql-editor { color: var(--text-main); }
.ql-picker-options { background-color: var(--surface) !important; border-color: var(--border) !important; }
[data-theme='dark'] .ql-toolbar .ql-stroke { stroke: var(--text-main); }
[data-theme='dark'] .ql-toolbar .ql-fill { fill: var(--text-main); }
[data-theme='dark'] .ql-toolbar .ql-picker { color: var(--text-main); }
[data-theme='dark'] .ql-picker-options { background-color: var(--surface) !important; }
[data-theme='dark'] .ql-picker-item { color: var(--text-main) !important; }
[data-theme='dark'] .ql-picker-item:hover, [data-theme='dark'] .ql-picker-item.ql-selected { color: var(--primary) !important; }

/* Map Revamp */
.map-layout { display: flex; height: 75vh; min-height: 500px; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); border: 1px solid var(--border); margin-bottom: 2rem; }
.map-sidebar { width: 350px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; }
.map-sidebar-card { transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; border: 1px solid var(--border); }
.map-sidebar-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.map-container { flex: 1; position: relative; }
.photo-pin-marker { background: none; border: none; }
.photo-pin-container { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 3px solid white; box-shadow: 0 4px 10px rgba(0,0,0,0.4); background: var(--surface); display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.photo-pin-container:hover { transform: scale(1.15) translateY(-5px); border-color: var(--primary); }
.photo-pin-container img, .photo-pin-container video { width: 100%; height: 100%; object-fit: cover; }

/* User Location Pulsing Dot */
.user-location-dot {
  width: 16px;
  height: 16px;
  background-color: #3b82f6;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
  position: relative;
}
.user-location-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background-color: rgba(59, 130, 246, 0.4);
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

/* Custom Cluster Marker overrides */
.marker-cluster { background-color: rgba(255, 255, 255, 0.6); }
.marker-cluster div { background-color: var(--primary); color: white; font-weight: bold; border: 2px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.5); }

@media (max-width: 768px) {
  .map-layout { flex-direction: column; }
  .map-sidebar { width: 100%; height: 40vh; border-right: none; border-top: 1px solid var(--border); order: 2; padding: 1rem; }
  .map-container { height: 60vh; order: 1; }
}

