/* 
    Zillow Clone Advanced Styling
    Modern, Premium, and Interactive UI
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
    --primary: #006aff; /* Zillow Blue */
    --accent: #ff4d4d;
    --background: #f8fbff;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 50px rgba(0, 106, 255, 0.15);
    --glass: rgba(255, 255, 255, 0.8);
    --radius: 15px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor for custom cursor effect */
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Cursor */
#custom-cursor {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
}

#custom-cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.2s ease, top 0.15s ease, left 0.15s ease;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: var(--glass);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links a {
    margin-left: 30px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&q=80&w=1920');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    color: white;
    padding: 0 10%;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.search-bar {
    background: white;
    padding: 10px;
    border-radius: 50px;
    display: flex;
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-hover);
    animation: fadeInUp 1.2s ease;
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
}

.search-bar button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    cursor: none;
    transition: 0.3s;
}

.search-bar button:hover {
    background: #0056d2;
    transform: scale(1.05);
}

/* Property Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 50px 8%;
}

.card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    position: relative;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeIn 1s ease forwards;
}

.card:hover {
    transform: translateY(-15px) scale(1.03); /* Anti-gravity effect */
    box-shadow: var(--shadow-hover);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover img {
    transform: scale(1.1);
}

.card-info {
    padding: 25px;
}

.card-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.amenities {
    display: flex;
    gap: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Auth Forms */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
    background: white;
    padding: 50px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
}

.auth-container h2 {
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.form-group input:focus {
    border-color: var(--primary);
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 700;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #0056d2;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Dark Mode (Dynamic Class) */
body.dark-mode {
    --background: #121212;
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --glass: rgba(30, 30, 30, 0.8);
}

body.dark-mode .card, body.dark-mode .auth-container, body.dark-mode .search-bar {
    background: #1e1e1e;
    color: #f5f5f5;
}

body.dark-mode .search-bar input {
    background: transparent;
    color: white;
}

/* Dashboard Styles */
.dashboard-header {
    margin: 40px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-badge {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border-radius: 30px;
    font-weight: 600;
}

/* Carousel/Trending */
.carousel-container {
    overflow: hidden;
    padding: 20px 8%;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-card {
    min-width: 300px;
    margin-right: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
}
