/* The Wall — dumbshit.app */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg: #09090b;
    --bg-2: #18181b;
    --bg-3: #27272a;
    --border: #3f3f46;
    --text: #fafafa;
    --text-dim: #a1a1aa;
    --text-mute: #71717a;
    --accent: #10b981;
    --accent-hov: #34d399;
    --danger: #ef4444;
    --warn: #fbbf24;
    --li-blue: #0a66c2;
}

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

.topbar {
    padding: 24px 24px 8px;
    max-width: 760px;
    margin: 0 auto;
}
.back { color: var(--text-mute); text-decoration: none; font-family: ui-monospace, monospace; font-size: 12px; }
.back:hover { color: var(--text); }
.topbar h1 {
    margin: 12px 0 4px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
}
.topbar .sub {
    margin: 0;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.5;
    max-width: 620px;
}

.app {
    max-width: 760px;
    margin: 0 auto;
    padding: 16px 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ===== cards ===== */
.card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}
.card-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dim);
    font-family: ui-monospace, monospace;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.lbl {
    display: block;
    font-family: ui-monospace, monospace;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
    color: var(--text-mute);
    margin-bottom: 6px;
}
.field { margin-bottom: 10px; display: block; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }

input[type=text], input[type=url], textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    padding: 11px 14px;
    width: 100%;
    transition: border-color 0.15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 64px; font-size: 14px; line-height: 1.5; }

.btn {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--bg-3);
    color: var(--text);
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.12s;
}
.btn:hover:not(:disabled) { background: var(--border); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hov); border-color: var(--accent-hov); }
.btn-ghost {
    appearance: none;
    background: transparent;
    color: var(--text-mute);
    border: 0;
    cursor: pointer;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: color 0.12s;
}
.btn-ghost:hover { color: var(--text); }
.btn-ghost.danger:hover { color: #fecaca; }
.actions-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.hint { color: var(--text-mute); font-size: 12px; }
.error { margin: 8px 0 0; padding: 8px 12px; background: rgba(239,68,68,0.08); border: 1px solid var(--danger); border-radius: 8px; color: #fecaca; font-size: 13px; }

.socials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
@media (max-width: 540px) { .socials-grid { grid-template-columns: 1fr; } }

/* ===== identity strip ===== */
.identity-row { display: flex; align-items: center; gap: 12px; }
.identity-meta { flex: 1; min-width: 0; }
.identity-name { font-weight: 700; }
.identity-id   { color: var(--text-mute); font-family: ui-monospace, monospace; font-size: 11px; }

.avatar {
    width: 44px; height: 44px;
    border-radius: 999px;
    flex-shrink: 0;
    display: grid; place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    text-transform: uppercase;
    font-family: ui-sans-serif, system-ui, sans-serif;
}

/* ===== compose ===== */
.compose textarea { background: var(--bg); border-radius: 10px; }

/* ===== feed ===== */
.feed-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.feed { display: flex; flex-direction: column; gap: 12px; }
.feed-foot { display: flex; justify-content: center; padding: 12px 0; }

.post {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}
.post-new, .reply.post-new {
    animation: postSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes postSlideIn {
    0%   { opacity: 0; transform: translateY(-6px); border-color: var(--accent); }
    100% { opacity: 1; transform: translateY(0);    border-color: var(--border); }
}
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-head .avatar { width: 36px; height: 36px; font-size: 14px; }
.post-meta { flex: 1; min-width: 0; }
.post-author { font-weight: 700; font-size: 14px; }
.post-author a { color: inherit; text-decoration: none; }
.post-author a:hover { color: var(--accent); }

/* inline social-link chips next to the author name */
.post-socials { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.post-socials .social-link {
    display: inline-grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 6px;
    background: var(--bg-3);
    color: var(--text-dim);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}
.post-socials .social-link:hover { background: var(--accent); color: var(--bg); }

.post-time { color: var(--text-mute); font-family: ui-monospace, monospace; font-size: 11px; }
.post-source-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--bg-3);
    color: var(--text-dim);
    font-size: 10px;
    font-family: ui-monospace, monospace;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.post-source-badge.event { background: rgba(16,185,129,0.15); color: var(--accent); }

.post-body {
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.55;
}
.post-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--bg-3);
}
.post-actions .btn-ghost { padding: 4px 8px; font-size: 11px; }

.reply-form { margin-top: 10px; }
.reply-form textarea { background: var(--bg); }
.replies { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--bg-3); display: flex; flex-direction: column; gap: 8px; }
.reply {
    background: var(--bg-3);
    border-radius: 10px;
    padding: 10px 12px;
    position: relative;
}
.reply .post-head .avatar { width: 28px; height: 28px; font-size: 12px; }
.reply .post-author { font-size: 13px; }
.reply .post-body { font-size: 13.5px; }

/* event-specific layouts */
.evt-profile { display: flex; gap: 12px; align-items: flex-start; }
.evt-profile .preview { flex-shrink: 0; }
.evt-profile-cover {
    position: relative;
    width: 220px;
    background: var(--bg);
    border-radius: 6px;
    overflow: hidden;
}
.evt-profile-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.evt-profile-avatar {
    position: absolute;
    border-radius: 999px;
    border: 2px solid var(--bg-2);
    background: var(--bg);
    transform: translate(-50%, -50%);
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.evt-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.evt-profile-meta { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-dim); }
.evt-profile-bio { color: var(--text); white-space: pre-wrap; word-break: break-word; }
.evt-profile-link { display: inline-block; margin-top: 6px; color: var(--accent); text-decoration: none; font-size: 13px; word-break: break-all; }
.evt-profile-link:hover { text-decoration: underline; }
.evt-profile-missing {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--text-mute);
    font-family: ui-monospace, monospace;
    font-size: 12px;
    font-style: italic;
    text-align: center;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 6px;
}

.evt-pong {
    background: linear-gradient(135deg, rgba(16,185,129,0.10), rgba(16,185,129,0.02));
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 10px;
    padding: 10px 12px;
    font-family: ui-monospace, monospace;
    color: var(--accent);
}

.empty {
    text-align: center;
    color: var(--text-mute);
    font-style: italic;
    padding: 24px;
}

/* ===== foot ===== */
.foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 24px;
    max-width: 760px;
    margin: 0 auto;
    color: var(--text-mute);
    font-family: ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
}
.bmc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-mute);
    text-decoration: none;
    transition: color 0.15s;
}
.bmc-link:hover { color: #FFDD00; }
