/* ============================================================
   ULTIMATE PROPSWIPE — GLOBAL CSS
   Liquid Glass UI System
   ============================================================ */

:root {
  --primary-400: #ff7340;
  --primary-500: #ff4f1a;
  --primary-600: #e63a00;
  --gold-400: #f5c842;
  --glass-bg: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.08);
  --glass-blur: 20px;
  --card-bg: #14141e;
  --body-bg: #0a0a0f;
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.6);
  --text-muted: rgba(255,255,255,0.35);
}

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@400;500;600;700&family=Cabinet+Grotesk:wght@300;400;500;700;900&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* Material Symbols */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--body-bg);
  color: var(--text-primary);
  font-family: 'Cabinet Grotesk', 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================================
   GLASS CARD SYSTEM
   ============================================================ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

.glass-card-dark {
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.06);
}

.glass-nav {
  background: rgba(10,10,15,0.7);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}

/* ============================================================
   PROPERTY CARD
   ============================================================ */
.property-card {
  background: var(--card-bg);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}
.property-card:hover { transform: translateY(-6px); }

/* ============================================================
   SWIPE CARD SYSTEM (Tinder-style)
   ============================================================ */
.swipe-stack {
  position: relative;
  width: 320px;
  height: 480px;
  margin: 0 auto;
}
.swipe-card {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: transform 0.05s;
  will-change: transform;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.swipe-card:active { cursor: grabbing; }
.swipe-card.going-left { animation: swipeLeft 0.4s ease-in forwards; }
.swipe-card.going-right { animation: swipeRight 0.4s ease-in forwards; }
.swipe-card.going-up { animation: swipeUp 0.4s ease-in forwards; }

@keyframes swipeLeft {
  to { transform: translateX(-150%) rotate(-20deg); opacity: 0; }
}
@keyframes swipeRight {
  to { transform: translateX(150%) rotate(20deg); opacity: 0; }
}
@keyframes swipeUp {
  to { transform: translateY(-150%) scale(0.8); opacity: 0; }
}

.like-stamp, .nope-stamp, .save-stamp {
  position: absolute;
  top: 24px;
  font-size: 28px;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: 10px;
  border-width: 4px;
  border-style: solid;
  opacity: 0;
  transition: opacity 0.1s;
  pointer-events: none;
  z-index: 10;
}
.like-stamp  { left: 20px; color: #4ade80; border-color: #4ade80; transform: rotate(-15deg); }
.nope-stamp  { right: 20px; color: #f87171; border-color: #f87171; transform: rotate(15deg); }
.save-stamp  { left: 50%; transform: translateX(-50%); color: #818cf8; border-color: #818cf8; }

/* ============================================================
   REELS PLAYER
   ============================================================ */
.reel-container {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.reel-container::-webkit-scrollbar { display: none; }
.reel-item {
  height: 100dvh;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

/* ============================================================
   MAP
   ============================================================ */
#mapContainer {
  width: 100%;
  height: 100%;
  min-height: 400px;
}
.map-price-marker {
  background: var(--primary-500);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  white-space: nowrap;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.map-price-marker:hover {
  background: var(--primary-400);
  transform: scale(1.1);
}

/* ============================================================
   SEARCH TABS
   ============================================================ */
.search-tab.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.search-tab:not(.active) { color: rgba(255,255,255,0.45); }

/* ============================================================
   RANGE SLIDERS
   ============================================================ */
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #ff4f1a;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.15s;
}
input[type='range']::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type='range']::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #ff4f1a;
  border: 3px solid #fff;
  cursor: pointer;
}

/* ============================================================
   SCROLLBAR HIDE
   ============================================================ */
.scrollbar-hide { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,79,26,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(255,79,26,0); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.float { animation: float 3s ease-in-out infinite; }
.pulse-glow { animation: pulse-glow 2s ease infinite; }

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ============================================================
   LINE CLAMP
   ============================================================ */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================================
   RESPONSIVE GRID
   ============================================================ */
@media (max-width: 640px) {
  .hero-headline { font-size: 2.2rem !important; }
  .swipe-stack { width: 280px; height: 420px; }
}

/* ============================================================
   FORMS
   ============================================================ */
input, select, textarea {
  color-scheme: dark;
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.28); }
select option { background: #14141e; color: #fff; }

/* ============================================================
   TOOLTIP
   ============================================================ */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,20,30,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ============================================================
   BOTTOM MOBILE NAV
   ============================================================ */
.mobile-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.06);
  z-index: 50;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
}

/* ============================================================
   PRICE TAG CHIP
   ============================================================ */
.price-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.price-chip-up   { background: rgba(74,222,128,0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.2); }
.price-chip-down { background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.2); }

/* ============================================================
   DASHBOARD SIDEBAR
   ============================================================ */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.sidebar-link.active {
  background: rgba(255,79,26,0.12);
  color: #ff7340;
  border: 1px solid rgba(255,79,26,0.15);
}

/* ============================================================
   BADGE SYSTEM
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-hot     { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.badge-new     { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }
.badge-verified{ background: rgba(74,222,128,0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.2); }
.badge-featured{ background: rgba(245,200,66,0.12); color: #f5c842; border: 1px solid rgba(245,200,66,0.2); }

/* ============================================================
   CHART CONTAINERS
   ============================================================ */
.chart-container { position: relative; width: 100%; }

/* ============================================================
   LOADING STATES
   ============================================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,15,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.loader {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #ff4f1a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Interactive Glass Effect */
.glass-card { position: relative; overflow: hidden; }
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(255, 79, 26, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.glass-card:hover::before { opacity: 1; }
