:root {
    color-scheme: dark;
    --bg: #0f1115;
    --card: #171a21;
    --muted: #8b94a7;
    --text: #f5f7fb;
    --accent: #6c8cff;
    --border: #262b36;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: var(--text); text-decoration: none; }
img, video { max-width: 100%; border-radius: 12px; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: #10131a;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar nav a { margin-left: 16px; color: var(--muted); }
.topbar nav a:hover { color: var(--text); }
.logo { font-weight: 700; letter-spacing: 0.5px; }

.container { max-width: 1100px; margin: 32px auto; padding: 0 16px; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.narrow { max-width: 420px; margin: 32px auto; }

label { display: block; margin: 16px 0 8px; color: var(--muted); }
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #12151c;
    color: var(--text);
}

.inline { display: flex; align-items: center; gap: 8px; }
.inline input { width: auto; }

.button {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

.muted { color: var(--muted); }

.flash {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    background: rgba(108, 140, 255, 0.2);
}
.flash.error { background: rgba(255, 107, 107, 0.2); }

.feed .content-card { display: grid; gap: 16px; }

.content-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.content-header .link { margin-left: auto; color: var(--accent); }

.avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #242a35;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar.large { width: 88px; height: 88px; font-size: 32px; }

.media-wrapper {
    background: #0d0f14;
    border-radius: 16px;
    padding: 12px;
}

.locked {
    display: grid;
    gap: 8px;
    align-items: center;
    text-align: center;
    padding: 24px;
}

.profile-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.tier {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #12151c;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }

.pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: #1f2430;
    font-size: 12px;
}

.messages { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.message-list { max-height: 420px; overflow-y: auto; margin-bottom: 16px; }
.message {
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #1a1f2a;
}
.message.sent { background: rgba(108, 140, 255, 0.2); }
.message-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

@media (max-width: 900px) {
    .profile-header { grid-template-columns: 1fr; }
    .messages { grid-template-columns: 1fr; }
}
