:root {
    --primary: #3b82f6;
    /* Bright Blue */
    --primary-dark: #2563eb;
    --bg-light: #f9fafb;
    --text-dark: #111827;
    --text-gray: #6b7280;
    --border: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #fff;
    color: var(--text-dark);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    border-bottom: 1px solid var(--border);
    background: white;
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    background: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    margin-right: 20px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: white;
    border: 1px solid var(--text-dark);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(to bottom, #eff6ff, #fff);
}

.badge {
    background: #dbeafe;
    color: var(--primary-dark);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight-blue {
    color: var(--primary);
}

.highlight-gold {
    color: #d97706;
}

.hero p {
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 10%;
}

.feature-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: left;
}

.icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Categories */
.categories {
    text-align: center;
    padding: 3rem 10%;
}

.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.cat-card {
    border: 1px solid var(--border);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.cat-card:hover {
    border-color: var(--primary);
}

/* Marketplace */
.marketplace {
    padding: 3rem 10%;
    background: var(--bg-light);
}

.marketplace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-filter-container {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 2rem;
}

.search-bar {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f9fafb;
}

.filter-chip {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 20px;
    cursor: pointer;
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.listings-container {
    min-height: 200px;
    background: white;
    border: 1px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.empty-state {
    text-align: center;
    color: var(--text-gray);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Listing Item (Generated via JS) */
.listing-card {
    width: 100%;
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.close-btn {
    cursor: pointer;
    font-size: 1.5rem;
}

.modal-subtitle {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-weight: 500;
    font-size: 0.9rem;
}

input,
select,
textarea {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 100%;
}

.row {
    display: flex;
    gap: 1rem;
}

.col {
    flex: 1;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

/* ... [Keep all previous CSS from the top] ... */

/* --- ADD THIS TO THE BOTTOM OF YOUR CSS --- */

/* Footer */
footer {
    background: #1f2937;
    /* Dark Gray */
    color: #e5e7eb;
    padding: 3rem 10% 1rem;
    margin-top: auto;
    /* Pushes footer to bottom */
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    text-align: center;
    padding-top: 1rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Legal Page Layout */
.legal-container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    line-height: 1.6;
}

.legal-container h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.legal-container .last-updated {
    color: var(--text-gray);
    margin-bottom: 2rem;
    display: block;
}

.legal-container h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.legal-container h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.legal-container p,
.legal-container ul {
    margin-bottom: 1rem;
    color: #374151;
}

.legal-container ul {
    padding-left: 1.5rem;
}

.legal-container li {
    margin-bottom: 0.5rem;
}

/* Sticky Footer Fix for short pages */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- LOGIN / REGISTER PAGE STYLES --- */

/* Background wrapper to center the card */
.auth-wrapper {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-light);
    padding: 2rem;
}

.auth-card {
    background: white;
    width: 450px;
    max-width: 100%;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
}

/* Tabs to switch between Login/Register */
.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    margin-bottom: -2px;
    /* Overlap the border line */
}

/* Form Styles */
.auth-form {
    display: none;
    /* Hidden by default */
}

.auth-form.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form h2 {
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.full-width {
    width: 100%;
    margin-top: 1rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.forgot-pass {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}