/* Enhanced Real Estate App Styles */
:root {
    --bs-dark: #1a1a1a;
    --bs-dark-rgb: 26, 26, 26;
    --bs-body-bg: #0a0e13;
    --bs-body-color: #e6edf3;
    --bs-primary: #2563eb;
    --bs-secondary: #64748b;
    --bs-success: #10b981;
    --bs-info: #06b6d4;
    --bs-warning: #f59e0b;
    --bs-danger: #ef4444;
    --bs-light: #f8fafc;
    --bs-card-bg: #0f172a;
    --bs-border-color: #1e293b;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --warm-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

body {
    background: linear-gradient(135deg, #0a0e13 0%, #1e293b 50%, #0f172a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Enhanced Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--bs-border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.navbar-brand {
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
}

/* Enhanced Cards */
.card {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid var(--bs-border-color) !important;
    backdrop-filter: blur(20px);
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.04);
    border-color: rgba(102, 126, 234, 0.3) !important;
}

/* Property Cards */
.property-card {
    border-radius: 20px !important;
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
}

.property-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.property-card:hover::before {
    opacity: 1;
}

.property-image,
.property-image-placeholder {
    height: 220px !important;
    background: linear-gradient(135deg, #1e293b, #334155, #475569) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0 !important;
}

.property-image::before,
.property-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(102, 126, 234, 0.1), transparent 70%);
}

/* Enhanced Deal Scores */
.deal-score {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    padding: 8px 16px !important;
    border-radius: 25px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
    color: white !important;
}

.deal-score.high-score,
.badge.bg-success {
    background: var(--success-gradient) !important;
    color: white !important;
}

.deal-score.medium-score,
.badge.bg-warning {
    background: var(--warm-gradient) !important;
    color: white !important;
}

.deal-score.low-score,
.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
}

/* Enhanced Buttons */
.btn-primary {
    background: var(--accent-gradient) !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2, #667eea) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-outline-info {
    border: 2px solid #06b6d4 !important;
    color: #06b6d4 !important;
    border-radius: 12px !important;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-info:hover {
    background: #06b6d4 !important;
    border-color: #06b6d4 !important;
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
}

.btn-outline-secondary {
    border: 2px solid #64748b !important;
    color: #64748b !important;
    border-radius: 12px !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #64748b !important;
    border-color: #64748b !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Enhanced Form Controls */
.form-control, .form-select {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 2px solid var(--bs-border-color) !important;
    border-radius: 12px !important;
    color: var(--bs-body-color) !important;
    padding: 12px 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus, .form-select:focus {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: #667eea !important;
    color: var(--bs-body-color) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 24px;
    padding: 4rem 3rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1), transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1), transparent 50%);
    pointer-events: none;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

/* Stats Cards */
.stats-card {
    background: rgba(102, 126, 234, 0.08) !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    border-radius: 16px !important;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.stats-card:hover {
    background: rgba(102, 126, 234, 0.12) !important;
    transform: translateY(-4px);
    box-shadow: 0 20px 25px rgba(102, 126, 234, 0.1);
}

.stats-card h4,
.stats-number {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

.display-4 {
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Map Container */
#map, #resultsMap {
    border-radius: 20px !important;
    border: 1px solid var(--bs-border-color) !important;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Property Grid Enhancement */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

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

/* Property Item Enhancements */
.property-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px !important;
    overflow: hidden;
}

.property-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.04);
}

/* Alert Enhancements */
.alert {
    border-radius: 12px !important;
    border: none !important;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.alert-info {
    background: rgba(6, 182, 212, 0.15) !important;
    color: #06b6d4 !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .property-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero-section {
        padding: 2.5rem 2rem;
        margin-bottom: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-body-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Enhanced Search Form */
.search-form {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--bs-border-color);
}

/* Badge Animations */
.badge.bg-success {
    animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Text enhancements */
.text-muted {
    color: #94a3b8 !important;
}

.text-success {
    color: #10b981 !important;
}

.text-warning {
    color: #f59e0b !important;
}

.text-danger {
    color: #ef4444 !important;
}

.text-info {
    color: #06b6d4 !important;
}