/* activity.php — AnonSexo live feed v23 */

body.page-activity .site-content {
    padding-left: 0;
    padding-right: 0;
}

body.page-activity .site-content > main {
    min-height: 0;
}

.activity-page {
    --mb-bg: rgba(20, 12, 32, 0.88);
    --mb-bg-hover: rgba(28, 18, 44, 0.95);
    --mb-border: rgba(255, 255, 255, 0.09);
    --mb-text: #f5f1f8;
    --mb-muted: rgba(196, 181, 214, 0.88);
    --mb-faint: rgba(140, 124, 158, 0.78);
    --mb-accent: #bc13fe;
    --mb-accent-2: #ff2d78;
    --mb-gap: 16px;

    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 4px 0 12px;
    color: var(--mb-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Hero header ── */

.act-hero {
    position: sticky;
    top: 0;
    z-index: 40;
    margin-bottom: 18px;
    padding: 18px 18px 16px;
    border-radius: 22px;
    border: 1px solid rgba(188, 19, 254, 0.28);
    background:
        radial-gradient(ellipse 100% 80% at 90% -20%, rgba(255, 45, 120, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 70% 60% at 0% 100%, rgba(188, 19, 254, 0.2) 0%, transparent 50%),
        linear-gradient(145deg, rgba(36, 18, 58, 0.98) 0%, rgba(16, 10, 28, 0.99) 100%);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.act-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.03) 50%, transparent 60%);
    opacity: 0.8;
}

.act-hero__top {
    position: relative;
    margin-bottom: 12px;
}

.act-hero__brand {
    flex: 1;
    min-width: 0;
}

.act-hero__live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding: 5px 11px 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffc0cb;
    background: rgba(255, 61, 90, 0.16);
    border: 1px solid rgba(255, 61, 90, 0.35);
    box-shadow: 0 0 20px rgba(255, 61, 90, 0.15);
}

.act-hero__pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff3d5a;
    box-shadow: 0 0 10px rgba(255, 61, 90, 0.9);
    animation: act-pulse 2s ease-in-out infinite;
}

@keyframes act-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.act-hero__title {
    margin: 0;
    font-size: clamp(22px, 4.5vw, 26px);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 2px 16px rgba(188, 19, 254, 0.25);
}

.act-hero__tags {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.act-hero__tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(233, 213, 255, 0.92);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.act-head__write {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(188, 19, 254, 0.35);
    border-radius: 999px;
    background: rgba(188, 19, 254, 0.12);
    color: #e9d5ff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.act-fab {
    display: none;
}

.act-toast {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.act-toast--ok { color: #86efac; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.22); }
.act-toast--err { color: #fca5a5; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.22); }

/* ── Feed ── */

.act-stream__list {
    display: flex;
    flex-direction: column;
    gap: var(--mb-gap);
}

.act-empty {
    padding: 48px 24px;
    text-align: center;
    border-radius: 18px;
    border: 1px dashed rgba(188, 19, 254, 0.2);
}

.act-empty__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 22px;
    background: rgba(188, 19, 254, 0.12);
}

.act-empty__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.act-empty__text {
    margin: 0 auto;
    max-width: 280px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--mb-muted);
}

/* ── Microblog post ── */

.mb-post {
    position: relative;
    border-radius: 20px;
    border: 1px solid var(--mb-border);
    background: var(--mb-bg);
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.mb-post::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--mb-accent);
    box-shadow: 0 0 12px rgba(188, 19, 254, 0.35);
}

.mb-post:hover {
    background: var(--mb-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}

.mb-post__link {
    display: block;
    padding: 16px 18px 18px 20px;
    color: inherit;
    text-decoration: none;
}

.mb-post__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.mb-post__badge-icon {
    font-size: 14px;
    line-height: 1;
}

.mb-post__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.mb-post__ava {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(145deg, #bc13fe, #7c4dff);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.mb-post__meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 2px 10px;
    min-width: 0;
    flex: 1;
}

.mb-post__name {
    grid-column: 1;
    grid-row: 1;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.mb-post__action {
    grid-column: 1;
    grid-row: 2;
    font-size: 12px;
    font-weight: 600;
    color: var(--mb-muted);
    line-height: 1.35;
}

.mb-post__time {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--mb-faint);
    font-size: 12px;
    white-space: nowrap;
}

.mb-post__body {
    padding-left: 0;
}

.mb-post__title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: #fff;
}

.mb-post__snippet {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.58;
    color: var(--mb-text);
    word-break: break-word;
}

.mb-post__context {
    margin: 0 0 10px;
}

.mb-post__context-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--mb-muted);
}

.mb-post__media {
    margin-top: 12px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--mb-border);
    background: rgba(0, 0, 0, 0.45);
    width: 100%;
    max-width: 100%;
    line-height: 0;
}

.mb-post__media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(360px, 55vh);
    object-fit: cover;
    object-position: center;
}

/* site-pages.css sets height:auto on all imgs — keep feed previews proportional */
.site-content .activity-page .mb-post__media img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(360px, 55vh);
    object-fit: cover;
}

.act-filters {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.act-filter {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--mb-muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.act-filter:hover {
    color: #fff;
    border-color: rgba(188, 19, 254, 0.35);
}

.act-filter.is-active {
    color: #fff;
    background: rgba(188, 19, 254, 0.18);
    border-color: rgba(188, 19, 254, 0.45);
    box-shadow: 0 0 0 1px rgba(188, 19, 254, 0.12);
}

/* ── Type colors ── */

.mb-post--type-micro::before { background: #a855f7; }
.mb-post--type-micro .mb-post__badge { color: #e9d5ff; background: rgba(168, 85, 247, 0.16); border-color: rgba(168, 85, 247, 0.28); }
.mb-post--type-micro .mb-post__ava { background: linear-gradient(145deg, #bc13fe, #7c4dff); }
.mb-post--type-micro:hover { border-color: rgba(168, 85, 247, 0.35); }

.mb-post--type-post::before { background: #f43f5e; }
.mb-post--type-post .mb-post__badge { color: #fecdd3; background: rgba(244, 63, 94, 0.14); border-color: rgba(244, 63, 94, 0.28); }
.mb-post--type-post .mb-post__ava { background: linear-gradient(145deg, #f43f5e, #ec4899); }
.mb-post--type-post:hover { border-color: rgba(244, 63, 94, 0.35); }

.mb-post--type-photo::before { background: #0ea5e9; }
.mb-post--type-photo .mb-post__badge { color: #bae6fd; background: rgba(14, 165, 233, 0.14); border-color: rgba(14, 165, 233, 0.28); }
.mb-post--type-photo .mb-post__ava { background: linear-gradient(145deg, #0ea5e9, #6366f1); }
.mb-post--type-photo:hover { border-color: rgba(14, 165, 233, 0.35); }

.mb-post--type-video::before { background: #6366f1; }
.mb-post--type-video .mb-post__badge { color: #c7d2fe; background: rgba(99, 102, 241, 0.14); border-color: rgba(99, 102, 241, 0.28); }
.mb-post--type-video .mb-post__ava { background: linear-gradient(145deg, #6366f1, #8b5cf6); }
.mb-post--type-video:hover { border-color: rgba(99, 102, 241, 0.35); }

.mb-post--type-story::before { background: #ec4899; }
.mb-post--type-story .mb-post__badge { color: #fbcfe8; background: rgba(236, 72, 153, 0.14); border-color: rgba(236, 72, 153, 0.28); }
.mb-post--type-story .mb-post__ava { background: linear-gradient(145deg, #ec4899, #f97316); }
.mb-post--type-story:hover { border-color: rgba(236, 72, 153, 0.35); }

.mb-post--type-forum_topic::before { background: #f59e0b; }
.mb-post--type-forum_topic .mb-post__badge { color: #fde68a; background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.32); }
.mb-post--type-forum_topic .mb-post__ava { background: linear-gradient(145deg, #f59e0b, #eab308); }
.mb-post--type-forum_topic:hover { border-color: rgba(245, 158, 11, 0.38); }

.mb-post--type-forum_reply::before { background: #38bdf8; }
.mb-post--type-forum_reply .mb-post__badge { color: #bae6fd; background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.3); }
.mb-post--type-forum_reply .mb-post__ava { background: linear-gradient(145deg, #0284c7, #38bdf8); }
.mb-post--type-forum_reply:hover { border-color: rgba(56, 189, 248, 0.35); }
.mb-post--type-forum_reply .mb-post__title { font-size: 15px; color: var(--mb-muted); font-weight: 700; }
.mb-post--type-forum_reply .mb-post__snippet { font-size: 16px; color: #fff; }

.mb-post--type-comment::before { background: #14b8a6; }
.mb-post--type-comment .mb-post__badge { color: #99f6e4; background: rgba(20, 184, 166, 0.14); border-color: rgba(20, 184, 166, 0.28); }
.mb-post--type-comment .mb-post__ava { background: linear-gradient(145deg, #14b8a6, #06b6d4); }
.mb-post--type-comment:hover { border-color: rgba(20, 184, 166, 0.35); }
.mb-post--type-comment .mb-post__title { font-size: 15px; color: var(--mb-muted); font-weight: 700; }

.mb-post--type-review::before { background: #eab308; }
.mb-post--type-review .mb-post__badge { color: #fef08a; background: rgba(234, 179, 8, 0.14); border-color: rgba(234, 179, 8, 0.28); }
.mb-post--type-review .mb-post__ava { background: linear-gradient(145deg, #eab308, #f59e0b); }
.mb-post--type-review:hover { border-color: rgba(234, 179, 8, 0.35); }
.mb-post--type-review .mb-post__title { font-size: 15px; color: var(--mb-muted); font-weight: 700; }

/* legacy tone aliases */
.mb-post--forum:not(.mb-post--type-forum_topic):not(.mb-post--type-forum_reply)::before { background: #f59e0b; }
.mb-post--forum_reply::before { background: #38bdf8; }

/* ── Composer ── */

.act-composer {
    margin-top: 16px;
    scroll-margin-top: 72px;
    scroll-margin-bottom: 100px;
}

.act-composer__box {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(188, 19, 254, 0.2);
    background: var(--mb-bg);
}

.act-composer__label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.act-composer__input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--mb-border);
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
    min-height: 84px;
    font-family: inherit;
}

.act-composer__input:focus {
    outline: none;
    border-color: rgba(188, 19, 254, 0.45);
    box-shadow: 0 0 0 3px rgba(188, 19, 254, 0.12);
}

.act-composer__toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.act-composer__attach {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--mb-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--mb-muted);
    font-size: 13px;
    cursor: pointer;
}

.act-composer__attach input { display: none; }

.act-composer__count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--mb-faint);
}

.act-composer__send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--mb-accent), #7c4dff);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.act-composer__ghost {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--mb-border);
    color: var(--mb-muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.act-composer__box--guest { text-align: center; }
.act-composer__guest-text { margin: 0 0 14px; color: var(--mb-muted); }
.act-composer__guest-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 1199px) {
    body.page-activity,
    body:has(.activity-page) {
        min-height: 0;
    }

    body.page-activity .site-shell,
    body:has(.activity-page) .site-shell {
        flex: 0 1 auto;
    }

    body.page-activity .main-footer,
    body:has(.activity-page) .main-footer {
        margin-top: 0;
    }

    body.page-activity .activity-page,
    .activity-page {
        width: 100%;
        max-width: 620px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 12px;
        padding-right: 12px;
        padding-bottom: calc(12px + var(--bottom-nav-h, 62px) + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
    }
}

@media (max-width: 640px) {
    .act-hero {
        padding: 16px 14px 14px;
        border-radius: 18px;
    }

    .act-hero__tags {
        gap: 6px;
    }

    .act-hero__tag {
        font-size: 10px;
        padding: 5px 9px;
    }

    .act-head__write { display: none; }

    .act-fab {
        display: flex;
        position: fixed;
        right: 14px;
        bottom: calc(var(--bottom-nav-h, 62px) + 14px + env(safe-area-inset-bottom, 0px));
        z-index: 45;
        align-items: center;
        justify-content: center;
        width: 54px;
        height: 54px;
        border: 0;
        border-radius: 50%;
        background: linear-gradient(145deg, var(--mb-accent), #7c4dff);
        color: #fff;
        cursor: pointer;
        box-shadow: 0 8px 28px rgba(188, 19, 254, 0.45);
    }

    .mb-post__body { padding-left: 0; }
    .mb-post__meta { grid-template-columns: 1fr; }
    .mb-post__time { grid-column: 1; grid-row: 3; justify-self: start; margin-top: 2px; }
}

@media (min-width: 1200px) {
    body.page-activity .site-shell,
    body.page-activity .site-content > main,
    .site-shell:has(.activity-page),
    .site-content > main:has(.activity-page) {
        min-height: 0 !important;
    }

    body.page-activity .site-content {
        padding-left: 8px;
        padding-right: 16px;
    }

    body.page-activity .activity-page,
    .activity-page {
        width: 100%;
        max-width: min(620px, 100%);
        margin-left: 0;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
    }
}
