/* ============================================
   Forum activity feed (index)
   ============================================ */

.forum-feed-page {
    --ff-accent: #3fa9f5;
    --ff-accent-2: #5ec8ff;
    --ff-ink: rgba(255, 255, 255, 0.92);
    --ff-muted: rgba(255, 255, 255, 0.55);
    --ff-faint: rgba(255, 255, 255, 0.28);
    --ff-line: rgba(255, 255, 255, 0.08);
    --ff-glow: rgba(63, 169, 245, 0.18);
}

.forum-feed-page .container {
    max-width: 1100px;
}

.ff-hero {
    position: relative;
    margin: 0 0 1.75rem;
    padding: 1.6rem 0 1.2rem;
    overflow: hidden;
}

.ff-hero::before {
    content: '';
    position: absolute;
    inset: -40% -10% auto;
    height: 220px;
    background:
        radial-gradient(ellipse at 20% 40%, rgba(63, 169, 245, 0.22), transparent 55%),
        radial-gradient(ellipse at 80% 20%, rgba(46, 204, 113, 0.08), transparent 50%);
    pointer-events: none;
    animation: ffGlow 8s ease-in-out infinite alternate;
}

@keyframes ffGlow {
    from { opacity: 0.7; transform: translateY(0); }
    to { opacity: 1; transform: translateY(8px); }
}

.ff-brand {
    position: relative;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    margin: 0 0 0.45rem;
    line-height: 1.1;
}

.ff-brand span {
    color: var(--ff-accent);
}

.ff-lead {
    position: relative;
    max-width: 34rem;
    color: var(--ff-muted);
    font-size: 1.02rem;
    margin: 0 0 1.15rem;
}

.ff-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.ff-actions .btn,
.ff-actions .btn-secondary {
    border-radius: 10px;
    padding: 0.7rem 1.15rem;
    font-weight: 600;
    text-decoration: none;
}

.ff-meta {
    position: relative;
    margin-top: 0.9rem;
    color: var(--ff-faint);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.ff-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .ff-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .ff-rail {
        order: -1;
    }
}

.ff-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ff-accent);
    margin: 0 0 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.ff-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--ff-line);
}

.ff-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: start;
    padding: 1rem 0.15rem;
    border-bottom: 1px solid var(--ff-line);
    text-decoration: none;
    color: inherit;
    transition: background 0.25s ease, transform 0.25s ease;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(10px);
    animation: ffIn 0.45s ease forwards;
}

.ff-item:nth-child(1) { animation-delay: 0.05s; }
.ff-item:nth-child(2) { animation-delay: 0.1s; }
.ff-item:nth-child(3) { animation-delay: 0.15s; }
.ff-item:nth-child(4) { animation-delay: 0.2s; }
.ff-item:nth-child(5) { animation-delay: 0.25s; }
.ff-item:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes ffIn {
    to { opacity: 1; transform: translateY(0); }
}

.ff-item:hover {
    background: rgba(63, 169, 245, 0.04);
    transform: translateX(2px);
}

.ff-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(63, 169, 245, 0.35), rgba(20, 40, 60, 0.9));
    border: 1px solid rgba(63, 169, 245, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.ff-avatar-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ff-avatar img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ff-body {
    min-width: 0;
}

.ff-kind {
    display: inline-block;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ff-accent-2);
    margin-bottom: 0.2rem;
}

.ff-kind.is-reply { color: #7dcea0; }

.ff-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ff-ink);
    margin: 0 0 0.25rem;
    line-height: 1.35;
}

.ff-excerpt {
    color: var(--ff-muted);
    font-size: 0.9rem;
    line-height: 1.45;
    margin: 0 0 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ff-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    color: var(--ff-faint);
    font-size: 0.78rem;
}

.ff-foot b { color: var(--ff-muted); font-weight: 500; }

.ff-side {
    text-align: right;
    color: var(--ff-faint);
    font-size: 0.75rem;
    white-space: nowrap;
    padding-top: 0.15rem;
}

.ff-replies {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.35rem;
    color: var(--ff-muted);
    font-size: 0.78rem;
}

.ff-empty {
    padding: 2.2rem 0.5rem 1.5rem;
    border-top: 1px solid var(--ff-line);
    text-align: left;
}

.ff-empty h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    margin: 0 0 0.5rem;
}

.ff-empty p {
    color: var(--ff-muted);
    max-width: 32rem;
    margin: 0 0 1.2rem;
}

.ff-empty-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ff-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--ff-line);
    border-radius: 8px;
    color: var(--ff-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.ff-chip:hover {
    border-color: rgba(63, 169, 245, 0.45);
    color: #fff;
    background: rgba(63, 169, 245, 0.08);
}

.ff-rail {
    position: sticky;
    top: 100px;
}

.ff-rail-block + .ff-rail-block {
    margin-top: 1.4rem;
}

.ff-rail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ff-rail-list a {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0;
    color: var(--ff-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    font-size: 0.88rem;
    transition: color 0.2s ease;
}

.ff-rail-list a:hover {
    color: #fff;
}

.ff-rail-list .count {
    color: var(--ff-faint);
    font-variant-numeric: tabular-nums;
}

.ff-rail-cat {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ff-faint);
    margin: 0.7rem 0 0.25rem;
}

.ff-admin {
    margin-top: 2.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--ff-line);
}

.ff-admin .admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Light theme */
html[data-theme="light"] .forum-feed-page {
    --ff-ink: #1a2332;
    --ff-muted: #5a6a7c;
    --ff-faint: #6a7a8c;
    --ff-line: rgba(26, 35, 50, 0.12);
    --ff-glow: rgba(63, 169, 245, 0.12);
}

html[data-theme="light"] .ff-brand {
    color: #1a2332 !important;
}

html[data-theme="light"] .ff-meta {
    color: #6a7a8c !important;
}

html[data-theme="light"] .ff-lead,
html[data-theme="light"] .ff-empty p,
html[data-theme="light"] .ff-rail-list a,
html[data-theme="light"] .ff-rail-list .count,
html[data-theme="light"] .ff-rail-cat,
html[data-theme="light"] .ff-excerpt,
html[data-theme="light"] .ff-foot,
html[data-theme="light"] .ff-side {
    color: #5a6a7c !important;
}

html[data-theme="light"] .ff-title {
    color: #1a2332 !important;
}

html[data-theme="light"] .ff-rail-list a:hover {
    color: #1568a8 !important;
}

html[data-theme="light"] .ff-section-title {
    align-items: center;
    line-height: 1;
}

html[data-theme="light"] .ff-section-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0.95em;
}

html[data-theme="light"] .ff-rail {
    background: #ffffff !important;
    border: 1px solid rgba(45, 140, 214, 0.28) !important;
    border-radius: 12px;
    padding: 1rem 1.15rem 1.15rem;
    box-shadow: 0 8px 24px rgba(26, 48, 72, 0.08);
    color: #1a2332;
}

html[data-theme="light"] .ff-empty {
    background: #ffffff !important;
    border: 1px solid rgba(45, 140, 214, 0.28) !important;
    border-radius: 12px;
    padding: 1.6rem 1.4rem 1.4rem;
    box-shadow: 0 8px 24px rgba(26, 48, 72, 0.08);
    color: #1a2332;
    border-top: 1px solid rgba(45, 140, 214, 0.28) !important;
}

html[data-theme="light"] .ff-feed {
    background: #ffffff;
    border: 1px solid rgba(45, 140, 214, 0.28);
    border-radius: 12px;
    padding: 0.35rem 1rem;
    box-shadow: 0 8px 24px rgba(26, 48, 72, 0.08);
    border-top: 1px solid rgba(45, 140, 214, 0.28);
}

html[data-theme="light"] .ff-item {
    background: transparent !important;
    border-bottom-color: rgba(26, 35, 50, 0.1) !important;
    box-shadow: none !important;
    color: #1a2332;
}

html[data-theme="light"] .ff-item:hover {
    background: rgba(63, 169, 245, 0.05) !important;
}

html[data-theme="light"] .ff-card {
    background: #ffffff !important;
    border-color: rgba(45, 140, 214, 0.28) !important;
    color: #1a2332;
}

html[data-theme="light"] .ff-empty h2,
html[data-theme="light"] .ff-rail-title {
    color: #1568a8 !important;
}

html[data-theme="light"] .ff-chip {
    background: #f4f7fb !important;
    border-color: rgba(45, 140, 214, 0.28) !important;
    color: #3a4a5c !important;
}

html[data-theme="light"] .ff-chip:hover {
    color: #1568a8 !important;
    background: rgba(63, 169, 245, 0.1) !important;
    border-color: rgba(45, 140, 214, 0.45) !important;
}

html[data-theme="light"] .ff-actions .btn-secondary {
    background: #ffffff !important;
    color: #1a5f96 !important;
    border: 1px solid rgba(45, 140, 214, 0.35) !important;
}
