/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a26;
    --border: #1e1e2e;
    --text: #e4e4e7;
    --text-muted: #71717a;
    --accent: #a78bfa;
    --accent-2: #f59e0b;
    --rent-color: #22d3ee;
    --sale-color: #f472b6;
    --rent-house-color: #34d399;
    --sale-house-color: #fb923c;
    --new-badge: #ef4444;
    --heart: #ef4444;
    --radius: 16px;
    --radius-sm: 8px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 32px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 800;
    white-space: nowrap;
    color: var(--text);
}

.logo-accent {
    color: var(--accent);
}

.logo-dot {
    color: var(--accent-2);
}

.nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

.nav-btn:hover {
    color: var(--text);
    background: rgba(255,255,255,0.06);
}

.nav-btn.active {
    background: var(--accent);
    color: #fff;
}

.nav-btn-heart {
    font-size: 1.1rem;
    padding: 8px 14px;
}

.nav-btn-heart.active {
    background: var(--heart);
}

/* Hero */
.hero {
    text-align: center;
    padding: 64px 24px 48px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-accent {
    color: var(--accent);
}

.hero-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Listings Grid */
.listings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(167, 139, 250, 0.2);
    transform: translateY(-2px);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-category.rent-apt {
    background: rgba(34, 211, 238, 0.12);
    color: var(--rent-color);
}

.card-category.sale-apt {
    background: rgba(244, 114, 182, 0.12);
    color: var(--sale-color);
}

.card-category.rent-house {
    background: rgba(52, 211, 153, 0.12);
    color: var(--rent-house-color);
}

.card-category.sale-house {
    background: rgba(251, 146, 60, 0.12);
    color: var(--sale-house-color);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-new {
    display: inline-block;
    background: var(--new-badge);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.card-save {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.2s;
    line-height: 1;
    opacity: 0.5;
    padding: 4px;
}

.card-save:hover {
    opacity: 1;
    transform: scale(1.15);
}

.card-save.saved {
    opacity: 1;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.card-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-2);
}

.card-price .price-period {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
}

.card-details {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.card-detail {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-detail .icon {
    font-size: 1rem;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
}

.card-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.card-tag {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.card-tag.rent-apt {
    background: rgba(34, 211, 238, 0.12);
    color: var(--rent-color);
}

.card-tag.sale-apt {
    background: rgba(244, 114, 182, 0.12);
    color: var(--sale-color);
}

.card-tag.rent-house {
    background: rgba(52, 211, 153, 0.12);
    color: var(--rent-house-color);
}

.card-tag.sale-house {
    background: rgba(251, 146, 60, 0.12);
    color: var(--sale-house-color);
}

/* Load More */
.load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 48px 24px;
}

.load-more-btn {
    padding: 14px 48px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.load-more-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

/* Footer */
.footer {
    text-align: center;
    padding: 48px 24px 32px;
    border-top: 1px solid var(--border);
    margin-top: 24px;
}

.footer .logo {
    margin-bottom: 12px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .nav {
        width: 100%;
    }

    .listings {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .stats {
        gap: 24px;
    }

    .hero {
        padding: 40px 16px 32px;
    }
}
