* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme (default) */
    --background: #f8f9fa;
    --surface: #ffffff;
    --primary: #3498db;
    --secondary: #27ae60;
    --accent: #e74c3c;
    --text: #333333;
    --textSecondary: #666666;
    --border: #dee2e6;
    --shadow: rgba(0,0,0,0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Dark theme */
body.theme-dark {
    --background: #0a0a0f;
    --surface: #16161d;
    --primary: #EEFF00;
    --secondary: #4CAF50;
    --accent: #FF6B6B;
    --text: #ffffff;
    --textSecondary: #cccccc;
    --border: #333333;
    --shadow: rgba(238,255,0,0.2);
    --gradient: linear-gradient(135deg, #16161d 0%, #0a0a0f 100%);
}

/* Blue theme */
body.theme-blue {
    --background: #f0f8ff;
    --surface: #ffffff;
    --primary: #1e3a8a;
    --secondary: #0ea5e9;
    --accent: #06b6d4;
    --text: #1e293b;
    --textSecondary: #64748b;
    --border: #cbd5e1;
    --shadow: rgba(30,58,138,0.1);
    --gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

/* Green theme */
body.theme-green {
    --background: #f0fdf4;
    --surface: #ffffff;
    --primary: #166534;
    --secondary: #16a34a;
    --accent: #22c55e;
    --text: #14532d;
    --textSecondary: #4ade80;
    --border: #bbf7d0;
    --shadow: rgba(22,101,52,0.1);
    --gradient: linear-gradient(135deg, #166534 0%, #16a34a 100%);
}

/* Purple theme */
body.theme-purple {
    --background: #faf5ff;
    --surface: #ffffff;
    --primary: #7c3aed;
    --secondary: #a855f7;
    --accent: #c084fc;
    --text: #581c87;
    --textSecondary: #7c2d12;
    --border: #e9d5ff;
    --shadow: rgba(124,58,237,0.1);
    --gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

/* Sunset theme */
body.theme-sunset {
    --background: #fff7ed;
    --surface: #ffffff;
    --primary: #ea580c;
    --secondary: #f97316;
    --accent: #fb923c;
    --text: #9a3412;
    --textSecondary: #c2410c;
    --border: #fed7aa;
    --shadow: rgba(234,88,12,0.1);
    --gradient: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.top {
    background: var(--gradient);
    color: white;
    text-align: center;
    padding: 3rem 0;
    box-shadow: 0 4px 20px var(--shadow);
}

.top h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.top p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.header {
    background: var(--surface);
    box-shadow: 0 2px 15px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--textSecondary);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover, nav a.active {
    color: var(--primary);
}

/* Buttons */
.actions {
    text-align: center;
    padding: 4rem 0;
    background: var(--surface);
    transition: background-color 0.3s;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    margin: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 15px var(--shadow);
}

.btn:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
}

.btn.alt {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn.alt:hover {
    background: var(--primary);
    color: white;
}

.btn-primary {
    background: var(--secondary) !important;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 10px var(--shadow);
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow);
}

.btn-secondary {
    background: var(--textSecondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

/* Info Section */
.info {
    background: var(--surface);
    color: var(--text);
    padding: 3rem 0;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}

.info h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.info ul {
    list-style: none;
    max-width: 600px;
    margin: 0 auto;
}

.info li {
    padding: 0.75rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border);
}

.info li:last-child {
    border-bottom: none;
}

/* Page Headers */
.page-header, .agent-hero {
    background: var(--gradient);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h2, .agent-hero h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Forms */
.post-ad-form, .agent-signup {
    padding: 3rem 0;
    background: var(--background);
    color: var(--text);
    transition: background-color 0.3s, color 0.3s;
}

.form-container, .agent-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px var(--shadow);
    transition: background-color 0.3s;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-grid input, .form-grid select, textarea {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
    transition: all 0.3s;
}

.form-grid input:focus, .form-grid select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea {
    width: 100%;
    resize: vertical;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

/* Pricing Plans */
.pricing-plans, .agent-plans {
    margin: 2rem 0;
}

.pricing-plans h3, .agent-plans h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.plan-card {
    background: var(--surface);
    padding: 1.5rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px var(--shadow);
}

.plan-card:hover, .plan-card.selected {
    border-color: var(--primary);
    background: var(--background);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--shadow);
}

.plan-card h4, .plan-card h5 {
    margin-bottom: 1rem;
    color: var(--text);
}

.plan-card .price {
    font-size: 2rem;
    color: var(--secondary);
    font-weight: bold;
    margin: 1rem 0;
}

.plan-card ul {
    list-style: none;
    margin-top: 1rem;
}

.plan-card li {
    padding: 0.25rem 0;
    color: var(--textSecondary);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px var(--shadow);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
}

/* Filters */
.filters {
    padding: 2rem 0;
    background: var(--background);
    transition: background-color 0.3s;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px var(--shadow);
    transition: background-color 0.3s;
}

.filter-grid input, .filter-grid select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.75rem;
    border-radius: 5px;
    transition: all 0.3s;
}

/* Communities and Listings */
.communities-list, .featured-ads, .communities, .agent-benefits {
    padding: 3rem 0;
    background: var(--surface);
    color: var(--text);
    transition: background-color 0.3s, color 0.3s;
}

.communities-list h3, .featured-ads h3, .communities h3, .agent-benefits h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary);
}

.communities-grid, .ads-grid, .benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.community-card, .ad-card, .benefit-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border);
}

.community-card:hover, .ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
    border-color: var(--primary);
}

.community-card h4, .ad-card h3, .benefit-card h4 {
    margin-bottom: 1rem;
    color: var(--text);
}

.community-stats {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--textSecondary);
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary);
    margin: 1rem 0;
}

/* Dashboard */
.dashboard {
    padding: 2rem 0;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

.dashboard h2 {
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px var(--shadow);
    text-align: center;
    border: 1px solid var(--border);
    transition: background-color 0.3s;
}

.stat-card h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin-top: 0.5rem;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.dashboard-section {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px var(--shadow);
    border: 1px solid var(--border);
    transition: background-color 0.3s;
}

.dashboard-section h3 {
    color: var(--text);
    margin-bottom: 1rem;
}

.listings-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.listing-item {
    background: var(--background);
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid var(--border);
    transition: background-color 0.3s;
}

.listing-item h4 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.listing-stats {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--textSecondary);
}

.listing-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.listing-actions button {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.listing-actions button:hover {
    background: var(--secondary);
    transform: translateY(-1px);
}

.inquiries-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inquiry-item {
    padding: 1rem;
    background: var(--background);
    border-radius: 5px;
    border-left: 4px solid var(--primary);
    transition: background-color 0.3s;
}

.inquiry-item h5 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.inquiry-item button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.3s;
}

.inquiry-item button:hover {
    background: var(--primary);
    transform: translateY(-1px);
}

/* Footer */
.footer {
    background: var(--text);
    color: var(--surface);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav {
        gap: 1rem;
    }
    
    .top h1 {
        font-size: 2rem;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .actions {
        padding: 2rem 1rem;
    }
    
    .btn {
        display: block;
        margin: 0.5rem auto;
        max-width: 300px;
    }
}