:root {
    --primary: #2563eb; /* Modern Blue */
    --primary-dark: #1e40af;
    --bg: #f3f4f6;
    --surface: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --danger: #dc2626;
    --success: #16a34a;
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.5;
}

.container-narrow {
    max-width: 480px;
    margin: 40px auto;
    padding: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Forms */
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 0.9em; }
input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.2s;
    box-sizing: border-box;
}
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}
.tab-btn.active { color: var(--primary); border-bottom: 2px solid var(--primary); margin-bottom: -2px; }

/* Feedback Messages (No more alerts) */
.form-feedback {
    display: none;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9em;
    text-align: center;
}
.form-feedback.error { background: #fee2e2; color: var(--danger); }
.form-feedback.success { background: #dcfce7; color: var(--success); }

/* App View */
.top-nav {
    background: var(--surface);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.nav-brand { font-weight: 800; font-size: 1.2em; color: var(--primary); }

.filter-bar { padding: 10px; display: flex; gap: 10px; overflow-x: auto; background: var(--surface); }

.category-scroll {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.cat-chip {
    white-space: nowrap;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
}
.cat-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

.feed-grid { padding: 15px; display: grid; gap: 15px; }
.listing-card {
    background: var(--surface);
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.contrib-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    margin-top: 5px;
}
.contrib-tag.requires { background: #fee2e2; color: var(--danger); }
.contrib-tag.offers { background: #dcfce7; color: var(--success); }