/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #8b5cf6;
    min-height: 100vh;
    color: #333;
    padding-top: 70px;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 70px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    width: 8rem;
    height: 3rem;
    object-fit: contain;
}

.nav-center {
    display: none;
    align-items: center;
    gap: 1.75rem;
    flex: 1;
    justify-content: center;
    margin-right: 0.75rem;
}

.nav-right {
    display: none;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    padding-left: 1rem;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 0.5rem;
    transition: color 0.3s ease;
    white-space: nowrap; /* Prevent text from wrapping */
}

.nav-link:hover,
.nav-link.active {
    color: #8b5cf6;
}

.btn-login,
.btn-signup {
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-login {
    color: #8b5cf6;
    border: 2px solid #8b5cf6;
    background: transparent;
}

.btn-login:hover {
    background: #8b5cf6;
    color: white;
}

.btn-signup {
    color: white;
    background: #8b5cf6;
    border: 2px solid #8b5cf6;
}

.btn-signup:hover {
    background: #7c3aed;
    border-color: #7c3aed;
}

/* User Greeting */
.user-greeting {
    color: #1f2937;
    font-weight: 500;
    margin-right: 1rem;
    padding-right: 0.5rem; /* Extra padding for separation */
    white-space: nowrap;
    font-size: 0.95rem;
}

/* Mobile Navigation */
.nav-buttons-mobile {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-login-mobile,
.btn-signup-mobile {
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-login-mobile {
    color: #8b5cf6;
    border: 1px solid #8b5cf6;
    background: transparent;
}

.btn-login-mobile:hover {
    background: #8b5cf6;
    color: white;
}

.btn-signup-mobile {
    color: white;
    background: #8b5cf6;
    border: 1px solid #8b5cf6;
}

.btn-signup-mobile:hover {
    background: #7c3aed;
}

/* HAMBURGER MENU - FIXED VERSION */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1002;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    margin-left: 8px;
}

.hamburger:hover {
    background: rgba(139, 92, 246, 0.1);
}

.hamburger:active {
    background: rgba(139, 92, 246, 0.2);
}

.hamburger span {
    width: 24px;
    height: 3px;
    background: #333;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    display: block;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: #8b5cf6;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: #8b5cf6;
}

/* MOBILE MENU - COMPLETELY REWRITTEN */
.nav-menu-mobile {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    
    /* Start hidden */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    
    /* Smooth transition */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu-mobile.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-link-mobile {
    display: block;
    padding: 1.2rem 2rem;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link-mobile:hover {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
    padding-left: 2.5rem;
}

.nav-link-mobile.active {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border-left: 4px solid #8b5cf6;
    font-weight: 600;
}

.nav-link-mobile:last-child {
    border-bottom: none;
}

/* Desktop Navigation - Show on larger screens */
@media (min-width: 768px) {
    .nav-center {
        display: flex;
    }
    
    .nav-right {
        display: flex;
    }
    
    .nav-buttons-mobile {
        display: none;
    }
    
    .hamburger {
        display: none;
    }
    
    .nav-menu-mobile {
        display: none;
    }
}

@media (min-width: 1024px) {
    .nav-center {
        gap: 2rem;
        margin-right: 1rem;
    }
    
    .nav-right {
        padding-left: 1.25rem;
    }
}

/* Main Content Container */
.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px 80px;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Features Container */
.features-container {
    padding: 0 20px 80px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.feature-card.full-width {
    grid-column: 1 / -1;
    max-width: 800px;
    margin: 0 auto;
}

/* Feature Icons */
.feature-icon {
    margin-bottom: 24px;
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.icon-circle.purple {
    background: linear-gradient(135deg, #8b5cf6, #667eea);
}

.icon-circle.pink {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.icon-circle.blue {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

/* Feature Content */
.feature-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.feature-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.feature-list {
    list-style: none;
    margin-bottom: 32px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #555;
}

.feature-list i {
    color: #8b5cf6;
    font-size: 14px;
}

.feature-list.horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Buttons */
.btn-feature {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 32px 32px 16px;
    border-bottom: 1px solid #eee;
}

.modal-back {
    background: none;
    border: none;
    font-size: 20px;
    color: #8b5cf6;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.modal-back:hover {
    background: #f0f4ff;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.modal-content {
    padding: 32px;
}

/* Modal Content Styles */
.match-item {
    background: #f8faff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    border-left: 4px solid #8b5cf6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-details h4 {
    font-weight: 600;
    margin-bottom: 8px;
}

.match-details p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.match-score {
    font-size: 2rem;
    font-weight: 700;
    color: #8b5cf6;
}

.property-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.property-item {
    background: #8b5cf6;
    color: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.property-item:hover {
    transform: translateY(-3px);
}

.property-item i {
    font-size: 32px;
    margin-bottom: 16px;
    display: block;
}

.property-item h4 {
    margin-bottom: 8px;
}

.analytics-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    background: #f8faff;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #8b5cf6;
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.trend-info {
    background: #f8faff;
    padding: 24px;
    border-radius: 12px;
}

.trend-info h4 {
    margin-bottom: 16px;
    color: #333;
}

.trend-info ul {
    list-style: none;
}

.trend-info li {
    margin-bottom: 8px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 12px;
}

.trend-info i {
    color: #8b5cf6;
}

/* Body scroll lock when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .feature-card {
        padding: 32px 24px;
    }

    .feature-list.horizontal {
        grid-template-columns: 1fr;
    }

    .property-grid,
    .analytics-stats {
        grid-template-columns: 1fr;
    }

    .match-item {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .modal-header,
    .modal-content {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 16px 60px;
    }

    .features-container {
        padding: 0 16px 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .feature-card {
        padding: 24px 20px;
    }

    .icon-circle {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Loading, Error, and Empty States */
.loading, .error-message, .no-matches, .no-preferences {
    text-align: center;
    padding: 40px 20px;
}

.loading i {
    font-size: 48px;
    color: #6c63ff;
    margin-bottom: 20px;
}

.match-score {
    font-size: 24px;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
}

.match-score.high {
    color: #10b981;
}

.match-score.medium {
    color: #f59e0b;
}

.match-score.low {
    color: #6b7280;
}

.match-breakdown {
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
}

/* Recommendation Cards */
.recommendation-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recommendation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.rec-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6c63ff, #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.rec-details {
    flex: 1;
}

.rec-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.rec-details p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.rec-location {
    font-size: 13px !important;
    color: #999 !important;
    margin-top: 3px !important;
}

.rec-reason {
    display: inline-block;
    font-size: 12px;
    color: #6c63ff;
    background: rgba(108, 99, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 5px;
}

.btn-view-rec {
    padding: 8px 20px;
    background: #6c63ff;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}

.btn-view-rec:hover {
    background: #5a52d5;
}

/* Analytics Styles */
.analytics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #6c63ff;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trend-info {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.trend-info h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.trend-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trend-info li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #666;
}

.trend-info li:last-child {
    border-bottom: none;
}

.trend-info li i {
    color: #6c63ff;
    margin-right: 10px;
}

.analytics-property-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.analytics-property-item:last-child {
    border-bottom: none;
}

.prop-info h5 {
    margin: 0 0 3px 0;
    font-size: 14px;
    color: #333;
}

.prop-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.prop-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.prop-stats i {
    color: #6c63ff;
    margin-right: 3px;
}
