/* IntroDB - Dense, Utilitarian Design */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg: #0a0a0a;
    --bg-raised: #111111;
    --bg-hover: #1a1a1a;
    --border: #222222;
    --border-light: #333333;
    --text: #e0e0e0;
    --text-muted: #888888;
    --text-dim: #555555;
    --green: #00ff88;
    --green-dim: #00aa55;
    --blue: #00aaff;
    --yellow: #ffcc00;
    --orange: #ff8800;
    --red: #ff4444;
    --purple: #aa88ff;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-sans: 'IBM Plex Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.4;
    min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header - Compact */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header__inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.logo span { color: var(--green); }
.header__nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
}
.header__nav a { color: var(--text-muted); }
.header__nav a:hover { color: var(--text); text-decoration: none; }
.header__nav a.active { color: var(--green); }

/* Header User Avatar */
.header__user {
    display: block;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--green);
    margin-left: 16px;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}
.header__user:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(0,255,136,0.2);
    text-decoration: none;
}
.header__user img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: cover;
}
.header__user-initial {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: var(--green);
    color: var(--bg);
    font-weight: 600;
    font-size: 14px;
}

/* Stats Bar */
.stats-bar {
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 6px 0;
    font-family: var(--font-mono);
    font-size: 12px;
}
.stats-bar__inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    gap: 24px;
    color: var(--text-muted);
}
.stats-bar__item span { color: var(--green); margin-left: 4px; }

/* Filter Bar */
.filter-bar {
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    position: sticky;
    top: 37px;
    z-index: 99;
}
.filter-bar__inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-bar select,
.filter-bar input[type="text"] {
    background: var(--bg);
    border: 1px solid var(--border-light);
    color: var(--text);
    padding: 6px 10px;
    font-size: 12px;
    font-family: var(--font-sans);
    border-radius: 3px;
    min-width: 120px;
}
.filter-bar select:focus,
.filter-bar input:focus {
    outline: none;
    border-color: var(--green);
}
.filter-bar input[type="text"] { width: 200px; }

/* Main Container */
.main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Table Listing */
.listing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.listing-table th {
    text-align: left;
    padding: 10px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 85px;
    background: var(--bg);
    z-index: 10;
}
.listing-table th.sortable { cursor: pointer; }
.listing-table th.sortable:hover { color: var(--text-muted); }
.listing-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.listing-table tr:hover { background: var(--bg-hover); }

/* Startup Name Cell */
.startup-name {
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 2px;
}
.startup-name:hover { color: var(--green); text-decoration: none; }
.startup-tagline {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.startup-url {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* Stage Badges */
.stage {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 2px;
    font-family: var(--font-mono);
}
.stage--idea { background: #333; color: #888; }
.stage--mvp { background: #3d2800; color: var(--yellow); }
.stage--revenue { background: #002a1a; color: var(--green); }
.stage--scaling { background: #002244; color: var(--blue); }

/* MRR Display */
.mrr {
    font-family: var(--font-mono);
    font-weight: 600;
}
.mrr--zero { color: var(--text-dim); }
.mrr--low { color: var(--text-muted); }
.mrr--mid { color: var(--yellow); }
.mrr--high { color: var(--green); }
.mrr .verified {
    color: var(--green);
    font-size: 10px;
    margin-left: 2px;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.tag {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 2px;
    color: var(--text-muted);
    white-space: nowrap;
}
.tag--need { border-color: var(--orange); color: var(--orange); }
.tag--offer { border-color: var(--purple); color: var(--purple); }

/* Intro Button */
.btn-intro {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    background: transparent;
    border: 1px solid var(--green);
    color: var(--green);
    border-radius: 3px;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-intro:hover {
    background: var(--green);
    color: var(--bg);
}

/* Time Ago */
.time-ago {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* Section Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}
.tab {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active {
    color: var(--green);
    border-bottom-color: var(--green);
}

/* Forms */
.form-page {
    padding: 40px 0;
}
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 4px;
}
.form-container h1 {
    font-size: 20px;
    margin-bottom: 8px;
}
.form-container .subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 14px;
}
.form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.form-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.form-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}
.form-group label .req { color: var(--red); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border-light);
    color: var(--text);
    padding: 10px 12px;
    font-size: 14px;
    font-family: var(--font-sans);
    border-radius: 3px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group .hint {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.btn-submit {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    background: var(--green);
    border: none;
    color: var(--bg);
    border-radius: 3px;
    cursor: pointer;
    font-family: var(--font-sans);
    margin-top: 8px;
}
.btn-submit:hover { background: var(--green-dim); }

/* Flash Messages */
.flash {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 3px;
    font-size: 13px;
}
.flash--success { background: #002a1a; border: 1px solid var(--green); color: var(--green); }
.flash--error { background: #2a0000; border: 1px solid var(--red); color: var(--red); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 24px;
    width: 90%;
    max-width: 450px;
}
.modal h3 { margin-bottom: 16px; font-size: 16px; }
.modal-close {
    float: right;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
}

/* Detail Page */
.detail-page { padding: 24px 0; }
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.detail-title { font-size: 24px; margin-bottom: 4px; }
.detail-tagline { color: var(--text-muted); font-size: 16px; margin-bottom: 12px; }
.detail-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.detail-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 32px;
}
.detail-section { margin-bottom: 24px; }
.detail-section h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.detail-section p { color: var(--text-muted); }
.detail-sidebar {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 4px;
    position: sticky;
    top: 100px;
}
.detail-sidebar h3 {
    font-size: 14px;
    margin-bottom: 16px;
}
.detail-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.detail-stat:last-of-type { border-bottom: none; }
.detail-stat-label { color: var(--text-muted); }
.detail-stat-value { font-weight: 600; font-family: var(--font-mono); }

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 16px 0;
    margin-top: 40px;
    font-size: 12px;
    color: var(--text-dim);
}
.footer__inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
}
.footer a { color: var(--text-muted); }

/* Responsive */
@media (max-width: 1024px) {
    .detail-content { grid-template-columns: 1fr; }
    .detail-sidebar { position: static; }
}
@media (max-width: 768px) {
    .listing-table th:nth-child(4),
    .listing-table td:nth-child(4),
    .listing-table th:nth-child(5),
    .listing-table td:nth-child(5) { display: none; }
    .header__nav { display: none; }
    .stats-bar { display: none; }
    .form-row { grid-template-columns: 1fr; }
}
