/* ============================================================================
   8Bit Forum - Green/Neon/Cyberspace Design
   ============================================================================ */

/* --- CSS Variables --- */
:root {
    --bg-dark: #050a09;
    --bg-main: #070d0c;
    --bg-card: #0c1a17;
    --bg-card-hover: #112520;
    --bg-input: #09100e;
    --border: #2a5c4d;
    --border-glow: rgba(0, 255, 204, 0.27);
    --neon-green: #00ffcc;
    --neon-cyan: #00ccff;
    --neon-dim: #00b38e;
    --text-primary: #f0f5f4;
    --text-secondary: #a8cdc5;
    --text-muted: #71a89d;
    --danger: #ff4444;
    --warning: #ffaa00;
    --success: #00ffcc;
    --radius: 8px;
    --shadow-neon: 0 0 10px rgba(0,255,204,0.2), 0 0 30px rgba(0,255,204,0.07);
    --shadow-neon-strong: 0 0 10px rgba(0,255,204,0.4), 0 0 30px rgba(0,255,204,0.2), 0 0 60px rgba(0,255,204,0.07);
    --font-retro: 'VT323', 'Courier New', monospace;
    --font-mono: 'Courier New', 'Consolas', 'Monaco', monospace;
    --font-body: -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    /* Derived accent variables (overridden by applyThemeColor) */
    --accent-dark: #0a1714;
    --accent-mid: #0f211d;
    --accent-light: #16312b;
    --accent-bright: #1b3c35;
    --accent-border: rgba(30, 100, 85, 0.6);
    --accent-glow-xs: rgba(0, 255, 204, 0.03);
    --accent-glow-sm: rgba(0, 255, 204, 0.063);
    --accent-glow-md: rgba(0, 255, 204, 0.2);
    --text-accent: #5fbfae;
    --text-accent-dim: #52b3a1;
    --scanline-tint: rgba(0, 255, 204, 0.015);
    --icon-hue: 108deg;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Monospace for headings, nav, badges, labels */
h1, h2, h3, h4, .nav-bar, .ai-badge, .breadcrumb,
.btn, .card-name, .card-count, .loading-text,
.form-group label { font-family: var(--font-mono); }

a { color: var(--neon-green); text-decoration: none; }
a:hover { color: var(--neon-cyan); text-shadow: 0 0 8px var(--neon-cyan); }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-dim); }

/* --- Neon Line Decoration --- */
.neon-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-green), var(--neon-cyan), var(--neon-green), transparent);
    box-shadow: 0 0 8px var(--neon-green), 0 0 16px var(--neon-green);
    margin: 0;
}

@keyframes neonPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green); }
    50% { opacity: 0.7; box-shadow: 0 0 5px var(--neon-green), 0 0 10px var(--neon-green); }
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* --- Header / Navigation --- */
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-main));
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    cursor: pointer;
    position: relative;
}

.nav-logo h1 {
    font-size: 1.4rem;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green);
    letter-spacing: 2px;
}

.nav-logo .logo-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}
.nav-lang-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    cursor: pointer;
    outline: none;
}
.nav-lang-select:focus {
    border-color: var(--neon-green);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    border-color: var(--neon-green);
    box-shadow: var(--shadow-neon);
    color: var(--neon-green);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
    border-color: var(--neon-dim);
    color: var(--neon-green);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-mid), var(--accent-bright));
    box-shadow: var(--shadow-neon-strong);
}
.btn-danger {
    background: rgba(255, 68, 68, 0.15);
    border-color: #ff4444;
    color: #ff4444;
}
.btn-danger:hover {
    background: rgba(255, 68, 68, 0.3);
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.4);
}

.btn-small {
    padding: 4px 10px;
    font-size: 0.75rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(0.8) sepia(1) hue-rotate(var(--icon-hue)) saturate(3);
}

/* --- Main Content --- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    min-height: calc(100vh - 120px);
}

/* --- ASCII FX Background --- */
.ascii-fx-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    margin: -20px 0;
}
.ascii-fx-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.ascii-fx-wrapper .section-header,
.ascii-fx-wrapper .system-header,
.ascii-fx-wrapper .computer-grid,
.ascii-fx-wrapper .neon-line,
.ascii-fx-wrapper > div {
    position: relative;
    z-index: 1;
}

/* --- Computer Grid (Home) --- */
.computer-grid {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
    max-width: 1100px;
    margin: 0 auto;
}
.computer-grid.active {
    display: flex;
}
.system-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}
.system-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.system-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.system-tab:hover {
    color: var(--text-secondary);
    border-color: var(--text-secondary);
}
.system-tab.active {
    color: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 8px var(--accent-glow-sm);
}

.computer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
    padding: 12px 6px;
    background: linear-gradient(135deg, rgba(12, 26, 23, 0.8), rgba(17, 37, 32, 0.8));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 6px var(--accent-glow-sm);
}

.computer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.computer-card:hover {
    border-color: var(--neon-green);
    box-shadow: var(--shadow-neon-strong);
    transform: translateY(-4px);
}

.computer-card:hover::before {
    opacity: 1;
    animation: neonPulse 2s infinite;
}

.computer-card img {
    width: 100%;
    max-width: 160px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 6px var(--accent-glow-md));
    border-radius: 4px;
}

.computer-card .card-name {
    font-size: 0.8rem;
    color: var(--neon-green);
    font-weight: bold;
    letter-spacing: 1px;
}

/* --- Category Grid --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    padding: 20px 0;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 10px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    box-shadow: 0 0 6px var(--accent-glow-sm);
}

.category-card:hover {
    border-color: var(--neon-green);
    box-shadow: var(--shadow-neon);
    transform: translateY(-3px);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 8px var(--neon-green));
}

.category-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--neon-green);
    fill: none;
    stroke-width: 1.5;
    filter: drop-shadow(0 0 4px var(--neon-green));
}

.category-card .card-name {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: bold;
}

.category-card .card-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- Custom (flat) Category Cards --- */
.category-grid-custom {
    padding-top: 0;
}
.category-card-flat {
    padding: 8px 10px;
    position: relative;
}
.category-card-flat .category-icon { display: none; }
.category-card-flat .card-name {
    font-size: 0.78rem;
}
.category-card-flat .card-count {
    font-size: 0.68rem;
    margin-top: 2px;
}
.cat-delete, .cat-edit {
    position: absolute;
    left: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}
.cat-delete {
    top: -8px;
    left: 16px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
}
.cat-delete svg {
    stroke: var(--text-secondary);
}
.cat-delete:hover svg {
    stroke: var(--danger);
}
.cat-edit {
    top: -8px;
    left: -8px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
}
.cat-edit svg {
    stroke: var(--text-secondary);
}
.cat-edit:hover svg {
    stroke: var(--neon-green);
}
.category-card-flat:hover .cat-delete,
.category-card-flat:hover .cat-edit {
    opacity: 1;
}
.category-card-add {
    border-style: dashed;
    opacity: 0.5;
    justify-content: center;
}
.category-card-add .card-name {
    font-size: 1.4rem;
    color: var(--neon-dim);
}
.category-card-add:hover {
    opacity: 1;
}

/* --- Breadcrumb --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--neon-green); }
.breadcrumb .sep { color: var(--text-muted); }

/* --- Post List --- */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-item {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.post-item:hover {
    border-color: var(--neon-dim);
    box-shadow: var(--shadow-neon);
}

.post-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-mid));
    border: 1px solid var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: var(--thumb-placeholder);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 32px 32px;
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-back svg {
    fill: var(--neon-green);
    stroke: none;
    filter: drop-shadow(0 0 4px var(--neon-green));
    transition: all 0.3s;
    image-rendering: pixelated;
}

.btn-back:hover svg {
    filter: drop-shadow(0 0 8px var(--neon-green));
}

.post-thumb svg {
    width: 32px;
    height: 32px;
    stroke: var(--neon-green);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 4px var(--neon-green));
}

.post-info {
    flex: 1;
    min-width: 0;
}

.post-item .post-title {
    font-size: 0.85rem;
    color: var(--text-accent);
    margin-bottom: 6px;
    font-family: var(--font-body);
    font-weight: 600;
}

.post-item .post-excerpt {
    font-size: 0.76rem;
    color: #C8C7C7;
    line-height: 1.65;
    letter-spacing: 0.01em;
}

.post-item .post-meta {
    font-size: 0.68rem;
    color: var(--text-accent-dim);
    margin-top: 8px;
}

/* --- Single Post View --- */
.post-view {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 80%;
    margin: 0 auto;
}

.post-view .post-content {
    font-size: 0.78rem;
    line-height: 1.7;
    color: #C8C7C7;
    font-family: var(--font-body);
}
.post-view .post-content p { margin: 0 0 0.8em 0; }
.post-view .post-content p:last-child { margin-bottom: 0; }

/* Inline images in post text */
.post-inline-image {
    margin: 12px 0;
    text-align: center;
}
.post-inline-image img {
    max-width: 80%;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}
.img-source-link {
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.5;
}
.img-source-link a {
    color: var(--neon-green);
    text-decoration: none;
}
.img-source-link a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Lightbox overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
    max-width: 85vw;
    max-height: 85vh;
    border-radius: var(--radius);
    border: 1px solid var(--neon-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
    cursor: default;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: var(--neon-green);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    text-shadow: 0 0 10px var(--neon-green);
    z-index: 10000;
}
.lightbox-close:hover { opacity: 0.7; }

/* YouTube video embeds */
.post-video-embed {
    margin: 16px 0;
    text-align: center;
}
.post-video-embed iframe {
    width: 100%;
    max-width: 560px;
    height: 315px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

/* Code blocks */
.code-block {
    position: relative;
    margin: 12px 0;
    border-radius: var(--radius);
    background: #0a0f0a;
    border: 1px solid var(--border);
    overflow: hidden;
}
.code-block .code-lang {
    display: block;
    padding: 4px 12px;
    font-size: 0.7rem;
    color: var(--neon-green);
    background: rgba(0,255,100,0.05);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.code-block pre {
    margin: 0;
    padding: 14px;
    overflow-x: auto;
}
.code-block code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    color: #e0e0e0;
    white-space: pre;
}
code.inline-code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: rgba(0,255,100,0.08);
    border: 1px solid rgba(0,255,100,0.15);
    border-radius: 3px;
    padding: 1px 5px;
    color: var(--neon-green);
}

ul.post-list {
    margin: 12px 0;
    padding-left: 20px;
    list-style: disc;
}
ul.post-list li {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #C8C7C7;
    margin-bottom: 4px;
}

.post-view .post-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 8px var(--accent-glow-md);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: var(--select-arrow);
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* --- Auth Panel --- */
.auth-panel {
    max-width: 400px;
    margin: 60px auto;
    padding: 32px;
    background: linear-gradient(135deg, var(--bg-card), var(--accent-dark));
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.auth-panel h2 {
    text-align: center;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    margin-bottom: 24px;
    letter-spacing: 2px;
}

/* --- Admin Panel --- */
.admin-panel {
    max-width: 800px;
    margin: 0 auto;
}

.admin-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.admin-section h3 {
    color: var(--neon-green);
    margin-bottom: 16px;
    font-size: 1rem;
    letter-spacing: 1px;
}

/* --- Loading Indicator --- */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 13, 6, 0.85);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active { display: flex; }

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--neon-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    color: var(--neon-green);
    margin-top: 16px;
    font-size: 0.85rem;
    text-shadow: 0 0 8px var(--neon-green);
    letter-spacing: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Toast Messages --- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: var(--accent-dark);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    box-shadow: 0 0 10px var(--accent-glow-md);
}

.toast.error {
    background: #2a0a0a;
    border: 1px solid var(--danger);
    color: var(--danger);
    box-shadow: 0 0 10px #ff444433;
}

/* --- AI Processing Indicator --- */
.ai-processing {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-mid));
    border: 1px solid var(--neon-dim);
    border-radius: var(--radius);
    margin: 16px 0;
    box-shadow: var(--shadow-neon);
}

.ai-processing .ai-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    margin: 0 3px;
    animation: aiDot 1.4s infinite ease-in-out;
    box-shadow: 0 0 6px var(--neon-green);
}

.ai-processing .ai-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-processing .ai-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiDot {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.ai-processing .ai-label {
    color: var(--neon-green);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* --- Section Header --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h2 {
    color: var(--neon-green);
    font-size: 1.05rem;
    text-shadow: 0 0 8px var(--accent-glow-md);
    letter-spacing: 1px;
}

.section-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--neon-green);
    fill: none;
    stroke-width: 1.5;
    filter: drop-shadow(0 0 4px var(--neon-green));
}

/* --- Forum Badge --- */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
    border: 1px solid var(--neon-dim);
    border-radius: 10px;
    font-size: 0.5rem;
    color: var(--neon-green);
    letter-spacing: 1px;
}

/* --- "The First" Stamp + AI Badge (background decorations) --- */
.stamp-the-first {
    position: absolute;
    top: 30%;
    right: -60px;
    transform: translateY(-50%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.stamp-the-first::after {
    content: 'THE FIRST';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-18deg);
    font-size: 1.3rem;
    font-weight: bold;
    color: #cc2222;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: 3px solid #cc2222;
    border-radius: 8px;
    padding: 4px 14px;
    white-space: nowrap;
    opacity: 1;
    pointer-events: none;
    text-shadow: none;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='3' seed='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='60' filter='url(%23n)' opacity='0.7'/%3E%3Crect width='200' height='60' fill='white' opacity='0.55'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='3' seed='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='60' filter='url(%23n)' opacity='0.7'/%3E%3Crect width='200' height='60' fill='white' opacity='0.55'/%3E%3C/svg%3E");
    -webkit-mask-size: cover;
    mask-size: cover;
}

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

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.85rem;
    max-width: 400px;
    margin: 0 auto;
}

/* --- Scanline Overlay (subtle retro effect) --- */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        var(--scanline-tint) 2px,
        var(--scanline-tint) 4px
    );
    z-index: 9999;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination .btn { min-width: 36px; justify-content: center; }
.pagination .btn.active {
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: var(--shadow-neon);
}

/* --- Settings Panel --- */
.settings-panel {
    max-width: 680px;
    margin: 40px auto;
}

/* --- Content with Sidebar --- */
.content-with-sidebar {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.content-main {
    flex: 1;
    min-width: 0;
}

.sidebar {
    flex-shrink: 0;
    width: 220px;
    position: sticky;
    top: 80px;
}

.sidebar-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}
.sidebar-box:last-child { margin-bottom: 0; }

.sidebar-box h3 {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-dim);
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.sidebar-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-item:last-child { border-bottom: none; }

.sidebar-item:hover .sidebar-title { color: var(--neon-green); }

.sidebar-rank {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--neon-dim);
    font-family: var(--font-mono);
    font-weight: bold;
}

.sidebar-info { min-width: 0; }

.sidebar-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.sidebar-views {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: var(--font-mono);
}

/* --- AI Assistant Panel (Create Post) --- */
.ai-assistant-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.ai-assistant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-mid));
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--neon-dim);
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.ai-assistant-header:hover { color: var(--neon-green); }

.ai-toggle {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.2s;
}

.ai-assistant-panel.open .ai-toggle { transform: rotate(45deg); }

.ai-assistant-body {
    display: none;
    padding: 14px;
    background: var(--bg-dark);
}

.ai-assistant-panel.open .ai-assistant-body { display: block; }

.ai-stream-output {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.7;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    font-family: var(--font-body);
    font-style: italic;
}

/* --- Edit Live Preview (collapsible) --- */
.edit-preview-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}
.edit-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-mid));
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--neon-dim);
    font-family: var(--font-mono);
    letter-spacing: 1px;
}
.edit-preview-header:hover { color: var(--neon-green); }
.edit-preview-panel .ai-toggle { transition: transform 0.2s; }
.edit-preview-panel.open .ai-toggle { transform: rotate(45deg); }
.edit-preview-body {
    display: none;
    padding: 0;
    background: var(--bg-dark);
}
.edit-preview-panel.open .edit-preview-body { display: block; }
.edit-live-preview {
    padding: 16px;
    min-height: 60px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}
.edit-live-preview:empty::before {
    content: '...';
    color: var(--text-muted);
}
.edit-live-preview img {
    max-width: 100%;
    border-radius: var(--radius);
}

/* --- Preview Panel --- */
.preview-panel {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--neon-dim);
    border-radius: var(--radius);
    margin-bottom: 16px;
    max-height: 75vh;
    overflow-y: auto;
}

.preview-text {
    color: var(--text-primary);
    white-space: pre-wrap;
    line-height: 1.8;
    font-size: 0.95rem;
    font-family: var(--font-body);
}

.preview-changes {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-mid));
    border: 1px solid var(--accent-light);
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.preview-changes strong {
    display: block;
    color: var(--neon-dim);
    margin-bottom: 6px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.preview-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.revision-panel {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

/* --- Image Upload & Preview --- */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.image-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-thumb-large {
    width: 160px;
    height: 120px;
}

.image-thumb-large img { cursor: pointer; }
.image-thumb-large img:hover { opacity: 0.85; }

.image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 20px;
    text-align: center;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.image-remove:hover { opacity: 0.85; }
.image-insert {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    color: var(--neon-green);
    cursor: pointer;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    border: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1;
}
.image-thumb:hover .image-insert { opacity: 1; }

/* --- Like Button --- */
.btn-like {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--accent-border);
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-like svg {
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.2s;
}

.btn-like:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 8px var(--accent-glow-md);
}

.btn-like:hover svg {
    stroke: var(--neon-green);
}

.btn-like.liked {
    border-color: var(--neon-green);
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
}

.btn-like.liked svg {
    fill: var(--neon-green);
    stroke: var(--neon-green);
}

.btn-edit-post,
.btn-delete-post {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--accent-border);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-edit-post svg,
.btn-delete-post svg { stroke: var(--text-muted); transition: all 0.2s; }
.btn-edit-post:hover { border-color: var(--neon-green); box-shadow: 0 0 8px var(--border-glow); }
.btn-edit-post:hover svg { stroke: var(--neon-green); }
.btn-delete-post:hover { border-color: var(--danger); box-shadow: 0 0 8px rgba(255,68,68,0.3); }
.btn-delete-post:hover svg { stroke: var(--danger); }

.like-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--neon-green);
    font-family: var(--font-mono);
    padding: 4px 8px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-mid));
    border: 1px solid var(--accent-light);
    border-radius: var(--radius);
}

/* --- Scroll-Down Button --- */
.btn-scroll-down {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--accent-border);
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-scroll-down:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 8px var(--accent-glow-md);
}
.btn-scroll-down:hover svg {
    stroke: var(--neon-green);
}
.btn-scroll-down svg {
    stroke: var(--text-muted);
    transition: all 0.2s;
}

/* --- Watch / Watchlist --- */
.btn-watch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--accent-border);
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-watch svg {
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.2s;
}
.btn-watch:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 8px var(--accent-glow-md);
}
.btn-watch:hover svg {
    stroke: var(--neon-green);
}
.btn-watch.watched {
    border-color: var(--neon-green);
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
}
.btn-watch.watched svg {
    stroke: var(--neon-green);
}
.btn-watch.watched svg path {
    fill: var(--neon-green);
}
.btn-watch.watched svg circle {
    fill: var(--bg-dark);
    stroke: var(--neon-green);
}
.watch-icon-inline {
    fill: none;
    stroke: var(--neon-green);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -2px;
    margin-right: 2px;
}
.watch-section-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--neon-green);
    text-shadow: 0 0 6px var(--accent-glow-md);
    margin: 20px 0 10px;
    letter-spacing: 0.5px;
}
.watch-section-title:first-child {
    margin-top: 0;
}
.post-watched {
    border-color: var(--neon-dim) !important;
    background: linear-gradient(135deg, var(--bg-card), var(--accent-dark)) !important;
}
.watch-separator {
    height: 1px;
    margin: 16px 0;
    background: linear-gradient(90deg, transparent, var(--neon-dim), transparent);
    box-shadow: 0 0 6px var(--accent-glow-md);
}

/* --- Import Post: Drop Zone, Tip, Draft --- */
.drop-zone {
    border: 2px dashed var(--neon-dim);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.drop-zone:hover {
    border-color: var(--neon-green);
    color: var(--text-secondary);
}

.drop-zone.dragover {
    border-color: var(--neon-green);
    background: var(--accent-glow-xs);
    box-shadow: 0 0 12px var(--accent-glow-md);
    color: var(--neon-green);
}

.drop-zone-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.drop-zone-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.import-tip {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-mid));
    border: 1px solid var(--neon-dim);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.import-tip .btn { margin-top: 10px; }

.draft-panel {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
}

.draft-panel .form-textarea {
    border: none;
    background: transparent;
    min-height: 300px;
    font-family: var(--font-body);
    line-height: 1.8;
}

/* Translation overlay */
.translate-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.translate-box {
    background: var(--bg-card);
    border: 1px solid var(--neon-blue);
    border-radius: var(--radius);
    padding: 32px 48px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.15);
}

.translate-box .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.translate-box p {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
}

.translate-hint {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.translate-hint .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- Site Footer --- */
.site-footer {
    margin-top: 48px;
    padding: 0;
}
.site-footer .neon-line {
    margin-bottom: 0;
    opacity: 0.35;
    box-shadow: none;
}
.footer-content {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--bg-card);
}
.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-family: var(--font-mono);
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--neon-green);
    text-shadow: 0 0 6px var(--neon-green);
}
.footer-sep {
    color: var(--border);
    font-size: 0.7rem;
}
.footer-copy {
    color: var(--text-muted);
    font-size: 0.6rem;
    font-family: var(--font-mono);
    letter-spacing: 1px;
}
/* Legal page styling */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}
.legal-page h1 {
    color: var(--neon-green);
    font-size: 1.4rem;
    margin-bottom: 24px;
}
.legal-page h2 {
    color: var(--neon-green);
    font-size: 1rem;
    margin-top: 28px;
    margin-bottom: 12px;
}
.legal-page p, .legal-page li {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 12px;
}
.legal-page ul {
    padding-left: 20px;
    margin-bottom: 12px;
}
.legal-page li {
    margin-bottom: 6px;
}
.legal-page a {
    color: var(--neon-green);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .computer-grid { grid-template-columns: repeat(3, 1fr); }
    .sidebar { display: none; }
    .content-with-sidebar { display: block; }
}

@media (max-width: 768px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .computer-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-bar { padding: 8px 12px; }
    .nav-logo h1 { font-size: 1.1rem; }
    .main-content { padding: 12px; }
}

/* --- Onboarding Slideshow --- */
.onboarding-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-dark);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.onboarding-overlay::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, var(--accent-glow-sm) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, var(--accent-glow-sm) 0%, transparent 60%);
    pointer-events: none;
}
.onboarding-container {
    position: relative;
    max-width: 600px;
    width: 90%;
    text-align: center;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    height: 80vh;
}
.onboarding-slide {
    animation: obSlideIn 0.4s ease-out;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.onboarding-icon {
    font-size: 64px;
    margin-bottom: 24px;
    line-height: 1;
    filter: drop-shadow(0 0 20px var(--neon-green));
}
.onboarding-icon svg {
    width: 80px;
    height: 80px;
    stroke: var(--neon-green);
    stroke-width: 1.5;
    fill: none;
    filter: drop-shadow(0 0 12px var(--neon-green));
}
.onboarding-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--neon-green);
    margin-bottom: 16px;
    text-shadow: 0 0 20px var(--accent-glow-md);
}
.onboarding-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}
.onboarding-text strong {
    color: var(--neon-green);
}
.onboarding-systems {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin: 20px 0 32px;
}
.onboarding-sys {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 14px;
    font-size: 0.85rem;
    color: var(--text-accent);
    font-family: var(--font-mono);
    white-space: nowrap;
}
.onboarding-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: auto;
    margin-bottom: 5vh;
    flex-shrink: 0;
}
.onboarding-dots {
    display: flex;
    gap: 8px;
}
.onboarding-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s;
    cursor: pointer;
}
.onboarding-dot.active {
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
}
.ob-btn {
    background: transparent;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    padding: 10px 24px;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}
.ob-btn:hover {
    background: var(--accent-glow-sm);
    box-shadow: 0 0 15px var(--accent-glow-md);
}
.ob-btn-primary {
    background: var(--neon-green);
    color: var(--bg-dark);
    font-weight: bold;
    border-color: var(--neon-green);
}
.ob-btn-primary:hover {
    box-shadow: 0 0 20px var(--accent-glow-md);
    background: var(--neon-green);
}
.ob-lang-wrap {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
}
.ob-lang-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    outline: none;
}
.ob-lang-select:focus {
    border-color: var(--neon-green);
}
.ob-skip {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 8px 12px;
    z-index: 2;
    transition: color 0.3s;
}
.ob-skip:hover {
    color: var(--text-secondary);
}
.onboarding-logo {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    color: var(--neon-green);
    text-shadow: 0 0 30px var(--accent-glow-md);
    margin-bottom: 4px;
}
.onboarding-logo-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 32px;
}
@keyframes obSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
    .onboarding-title { font-size: 1.3rem; }
    .onboarding-icon { font-size: 48px; }
    .onboarding-icon svg { width: 56px; height: 56px; }
    .onboarding-logo { font-size: 1.8rem; }
    .onboarding-container { padding: 24px 16px; }
}

/* --- Nav Center (Timeline Button) --- */
.nav-center {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}
.btn-timeline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    border-color: rgba(0, 180, 230, 0.35);
    color: rgba(0, 180, 230, 0.8);
}
.btn-timeline:hover {
    border-color: rgba(0, 220, 255, 0.9);
    color: rgb(0, 230, 255);
    box-shadow: 0 0 16px rgba(0, 200, 255, 0.4);
}
.btn-timeline svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}
.btn-magazine {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    border-color: rgba(255, 80, 80, 0.35) !important;
    color: rgba(255, 80, 80, 0.8) !important;
}
.btn-magazine:hover {
    border-color: rgba(255, 80, 80, 0.9) !important;
    color: #ff5555 !important;
    background: rgba(255,62,62,0.15) !important;
    box-shadow: 0 0 16px rgba(255, 62, 62, 0.4);
}
.btn-tour {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}
.btn-tour:hover { color: var(--neon-green); }
.btn-tour svg { stroke: currentColor; stroke-width: 1.5; fill: none; }

/* --- Nav Search --- */
.nav-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 10px;
    transition: border-color 0.2s;
}
.nav-search:hover { border-color: var(--neon-dim); box-shadow: 0 0 12px var(--accent-glow-md); }
.nav-search:focus-within { border-color: var(--neon-green); box-shadow: 0 0 16px var(--accent-glow-md); }
.nav-search svg { stroke: var(--text-muted); flex-shrink: 0; }
.nav-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.7rem;
    width: 100px;
}
.nav-search input::placeholder { color: var(--text-muted); font-size: 0.7rem; }

/* Nav AI Toggle (inside header search) */
.nav-ai-toggle {
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    user-select: none;
    margin-right: 4px;
    flex-shrink: 0;
}
.nav-ai-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border: 1px solid var(--text-muted);
    border-radius: 2px;
    background: var(--bg-input);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
.nav-ai-toggle input[type="checkbox"]:checked {
    background: var(--neon-green);
    border-color: var(--neon-green);
}
.nav-ai-toggle input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 1px;
    font-size: 10px;
    color: var(--bg-dark);
    font-weight: bold;
}
.nav-ai-toggle span {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.nav-ai-toggle input:checked + span {
    color: var(--neon-green);
}

/* --- Search Page --- */
.ai-search-box {
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-mid));
    border: 1px solid var(--accent-light);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.ai-search-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.ai-search-text {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .nav-center { display: none; }
}

/* --- Timeline View --- */
.timeline-wrap {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    padding: 0 0 40px;
}
.timeline-line {
    position: absolute;
    left: 100px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--neon-green), var(--neon-dim), transparent);
    box-shadow: 0 0 8px var(--accent-glow-md);
}
/* Left column: date + image */
.tl-item-left {
    position: absolute;
    left: -126px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
    gap: 6px;
    pointer-events: none;
}
.tl-date-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px var(--accent-glow-md);
    white-space: nowrap;
    text-align: center;
}
.tl-item-newdate {
    margin-top: 24px;
}
.tl-item-newdate:first-child {
    margin-top: 0;
}
/* Post node */
.tl-item {
    position: relative;
    margin-left: 126px;
    margin-bottom: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s;
}
.tl-item:hover {
    border-color: var(--neon-dim);
    box-shadow: var(--shadow-neon);
    background: var(--bg-card-hover);
}
.tl-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 22px;
    width: 22px;
    height: 2px;
    background: var(--border);
}
.tl-item::after {
    content: '';
    position: absolute;
    left: -32px;
    top: 17px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    transform: rotate(45deg);
    background: var(--accent-mid);
    border: 1px solid var(--neon-dim);
    transition: all 0.25s;
    z-index: 2;
}
.tl-item:hover::after {
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
}
.tl-item-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px var(--accent-glow-md));
}
.tl-item-body {
    min-width: 0;
}
.tl-item-title {
    font-size: 0.82rem;
    color: var(--text-accent);
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}
.tl-item-excerpt {
    font-size: 0.73rem;
    color: #C8C7C7;
    line-height: 1.5;
    margin-bottom: 8px;
}
.tl-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tl-badge {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}
.tl-badge-computer {
    background: var(--accent-dark);
    border: 1px solid var(--accent-border);
    color: var(--neon-green);
}
.tl-badge-category {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.tl-badge-time {
    font-size: 0.63rem;
    color: var(--text-muted);
    margin-left: auto;
}
@media (max-width: 640px) {
    .timeline-wrap { padding-left: 0; }
    .timeline-line { left: 18px; }
    .tl-item { margin-left: 44px; padding: 10px 14px; }
    .tl-item::before { width: 16px; left: -20px; }
    .tl-item::after { left: -26px; }
    .tl-item-title { font-size: 0.85rem; }
    .tl-item-left { display: none; }
}

/* --- Comments --- */
.comments-section {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}
.comments-title {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--neon-green);
    text-shadow: 0 0 6px var(--accent-glow-md);
    margin-bottom: 16px;
}
.comments-title span {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-shadow: none;
}
.comment-list { margin-bottom: 20px; }
.comment-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 8px;
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.comment-author {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-green);
}
.comment-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.comment-ai-badge {
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 8px;
    background: var(--accent-dark);
    color: var(--neon-dim);
    border: 1px solid var(--neon-dim);
}
.comment-text {
    font-size: 0.78rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.comment-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.btn-comment-action {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 2px 6px;
    font-family: var(--font-mono);
}
.btn-comment-action:hover { color: var(--neon-green); }
.btn-comment-delete:hover { color: var(--danger); }
.comment-empty {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    padding: 12px 0;
}
.comment-login-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 12px;
}
.comment-banned {
    color: var(--danger);
    font-size: 0.8rem;
    text-align: center;
    padding: 12px;
    background: rgba(255,0,0,0.05);
    border-radius: var(--radius);
    border: 1px solid var(--danger);
}
.comment-form { margin-top: 4px; }
.comment-textarea {
    width: 100%;
    min-height: 80px;
    background: var(--bg-dark);
    border: 1px solid var(--neon-dim);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 0.85rem;
    font-family: var(--font-main);
    resize: vertical;
    box-sizing: border-box;
}
.comment-textarea:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 6px var(--accent-glow-sm);
}
.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}
.comment-char-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.btn-comment-submit {
    font-size: 0.8rem;
    padding: 6px 16px;
}
.comment-edit-textarea {
    min-height: 60px;
    margin-bottom: 8px;
}
.comment-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
/* Comment image drop zone & previews */
.comment-drop-zone {
    border: 1px dashed var(--neon-dim);
    border-radius: var(--radius);
    padding: 8px;
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.comment-drop-zone:hover,
.comment-drop-zone.dragover {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.05);
}
.comment-image-preview {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.comment-img-thumb {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.comment-img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}
.comment-img-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: #ff4444;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}
.comment-images {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
/* Comment AI suggestion */
.comment-suggestion {
    background: var(--bg-card);
    border: 1px solid var(--neon-dim);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
}
.comment-suggestion-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--neon-green);
    margin-bottom: 6px;
}
.comment-suggestion-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.comment-suggestion-text {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    margin-bottom: 12px;
}
.comment-suggestion-actions {
    display: flex;
    gap: 8px;
}

/* --- Admin: Red Dot + Warning Log --- */
.admin-btn {
    position: relative;
    overflow: visible !important;
}
.admin-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff3333;
    box-shadow: 0 0 8px #ff3333, 0 0 16px rgba(255,51,51,0.4);
    z-index: 10;
    pointer-events: none;
    animation: admin-dot-pulse 1.5s ease-in-out infinite;
}
@keyframes admin-dot-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #ff3333; }
    50% { opacity: 0.7; box-shadow: 0 0 16px #ff3333, 0 0 24px rgba(255,51,51,0.3); }
}
.warning-item {
    padding: 12px;
    background: var(--bg-dark);
    border-radius: var(--radius);
    margin-bottom: 8px;
    border: 1px solid var(--border);
}
.warning-unseen {
    border-color: var(--danger);
    background: rgba(255,0,0,0.03);
}
.warning-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.warning-user {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-green);
}
.warning-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.warning-text {
    font-size: 0.8rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 8px 10px;
    margin-bottom: 6px;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid var(--border);
}
.warning-meta {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.warning-seen-btn {
    margin-left: auto;
}

/* ============================================================================
   Messaging System
   ============================================================================ */

/* --- Nav Messages Button + Badge --- */
.btn-messages {
    position: relative;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}
.btn-messages:hover {
    color: var(--neon-green);
    border-color: var(--neon-green);
}
.btn-messages svg { width: 16px; height: 16px; }
.msg-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* --- Watchlist Nav Button & Dropdown --- */
.btn-watchlist {
    position: relative;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}
.btn-watchlist:hover {
    color: var(--neon-green);
    border-color: var(--neon-green);
}
.btn-watchlist svg { width: 16px; height: 16px; }
.watch-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--neon-green);
    color: var(--bg-dark);
    font-size: 0.6rem;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    box-shadow: 0 0 6px var(--accent-glow-md);
}
.watch-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 340px;
    max-height: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: hidden;
}
.watch-drop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--neon-green);
    font-family: var(--font-mono);
}
.watch-drop-mark {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    font-family: var(--font-mono);
}
.watch-drop-mark:hover { color: var(--neon-green); }
.watch-drop-list {
    overflow-y: auto;
    max-height: 360px;
}
.watch-drop-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.78rem;
    transition: background 0.15s;
}
.watch-drop-item:hover {
    background: var(--bg-card-hover);
}
.watch-item-unseen {
    background: var(--accent-dark);
    border-left: 2px solid var(--neon-green);
}
.watch-item-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--text-muted);
}
.watch-item-icon svg { stroke: var(--text-muted); }
.watch-item-unseen .watch-item-icon svg { stroke: var(--neon-green); }
.watch-item-text {
    flex: 1;
    line-height: 1.4;
}
.watch-item-text b { color: var(--text-primary); }
.watch-item-text em { color: var(--neon-green); font-style: normal; }
.watch-item-time {
    flex-shrink: 0;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.watch-drop-empty, .watch-drop-loading {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* --- Category Watch Icon --- */
.cat-watch {
    position: absolute;
    right: -6px;
    top: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
}
.cat-watch svg {
    stroke: var(--text-secondary);
}
.cat-watch:hover svg {
    stroke: var(--neon-green);
}
.cat-watch.cat-watching {
    opacity: 1;
    border-color: var(--neon-green);
    background: var(--accent-dark);
}
.cat-watch.cat-watching svg {
    stroke: var(--neon-green);
}
.category-card:hover .cat-watch,
.category-card-flat:hover .cat-watch {
    opacity: 1;
}

/* --- Messages Panel (conversation list) --- */
.messages-panel {
    max-width: 820px;
    margin: 0 auto;
    padding: 24px 16px;
}
.messages-panel .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.messages-panel .section-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--neon-green);
}

/* --- Conversation List --- */
.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.conversation-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    position: relative;
}
.conversation-item:hover {
    border-color: var(--neon-green);
    background: var(--bg-card-hover);
}
.conv-delete {
    position: absolute;
    top: -8px;
    left: -8px;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
    z-index: 2;
    background: var(--bg-card);
    border-radius: 50%;
    padding: 2px;
}
.conv-delete svg { stroke: var(--text-muted); }
.conv-delete:hover svg { stroke: var(--danger); }
.conversation-item:hover .conv-delete { opacity: 1; }
.conversation-item.has-unread {
    border-left: 3px solid var(--neon-green);
}
.conv-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    grid-column: 1;
}
.conv-meta {
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.conv-participants {
    color: var(--text-secondary);
    font-size: 0.72rem;
}
.conv-last-msg {
    color: var(--text-muted);
    font-size: 0.75rem;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.conv-time {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}
.conv-unread {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
}
.conv-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--neon-green);
    color: var(--bg-dark);
    font-size: 0.65rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
}

/* --- Inline New Conversation Panel --- */
.new-comm-inline {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 16px;
}
.new-comm-select-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 8px;
}
.user-select-list {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 280px;
    overflow-y: auto;
    user-select: none;
}
.user-select-item {
    padding: 7px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-primary);
    transition: background 0.1s;
    border-left: 3px solid transparent;
}
.user-select-item:hover {
    background: var(--bg-card-hover);
}
.user-select-item.selected {
    background: var(--accent-mid);
    color: var(--neon-green);
    border-left-color: var(--neon-green);
}
.new-comm-select-row #startCommBtn {
    align-self: stretch;
    min-width: 100px;
    font-size: 0.85rem;
    letter-spacing: 1px;
}
.new-comm-compose {
    margin-top: 10px;
}
.selected-users {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 0.75rem;
    color: var(--text-primary);
}
.user-chip .chip-remove {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1;
}
.user-chip .chip-remove:hover { color: var(--danger); }
.user-search-dropdown {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}
.user-search-dropdown.active { display: block; }
.user-search-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-primary);
    transition: background 0.15s;
}
.user-search-item:hover {
    background: var(--bg-card-hover);
    color: var(--neon-green);
}

/* --- Conversation Detail --- */
.conversation-detail {
    max-width: 820px;
    margin: 0 auto;
    padding: 24px 16px;
}
.conv-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.conv-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--neon-green);
}
.conv-participants-bar {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.conv-participants-bar span { color: var(--text-secondary); }
.conv-participants-edit {
    cursor: pointer;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
    padding: 2px;
    border-radius: 3px;
    transition: color 0.2s;
}
.conv-participants-edit:hover { color: var(--neon-green); }

/* --- Comm Rules Panel (collapsible) --- */
.conv-rules-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.conv-rules-toggle:hover { color: var(--neon-green); border-color: var(--neon-green); }
.conv-rules-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 16px;
    display: none;
}
.conv-rules-panel.active { display: block; }
.conv-rules-panel h3 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}
.conv-rules-panel textarea {
    width: 100%;
    min-height: 80px;
    resize: vertical;
}

/* --- Message Timeline (reuses .timeline-wrap / .tl-item from post timeline) --- */
.msg-timeline-wrap {
    margin-top: 16px;
}
.msg-timeline-wrap .tl-item.msg-own:hover::after {
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
}
.msg-author-left {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--neon-dim);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}
.msg-body {
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.msg-time-right {
    font-size: 0.63rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: right;
}
.msg-attachments {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.msg-attachments img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--border);
}
.msg-attachments img:hover { border-color: var(--neon-green); }
.msg-attachment-file {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-decoration: none;
}
.msg-attachment-file:hover { border-color: var(--neon-green); color: var(--neon-green); }

/* --- Compose as NOW timeline item --- */
.msg-compose-item {
    cursor: default;
}
.msg-compose-item:hover {
    border-color: var(--neon-green);
    box-shadow: var(--shadow-neon);
}
.msg-compose-item::after {
    background: var(--neon-green) !important;
    box-shadow: 0 0 8px var(--neon-green) !important;
}
.msg-compose-item textarea {
    width: 100%;
    min-height: 50px;
    resize: vertical;
    margin-bottom: 6px;
}
.conv-compose-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}
.conv-compose-actions .file-drop-zone {
    flex: 1;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 6px 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}
.conv-compose-actions .file-drop-zone:hover { border-color: var(--neon-green); }
.conv-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}
.conv-file-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.68rem;
    color: var(--text-secondary);
}
.conv-file-item .remove-file {
    cursor: pointer;
    color: var(--text-muted);
}
.conv-file-item .remove-file:hover { color: var(--danger); }

/* --- Load More --- */
.conv-load-more {
    text-align: center;
    margin-bottom: 12px;
}

/* --- Participants Panel --- */
.conv-participants-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 16px;
    display: none;
}
.conv-participants-panel.active { display: block; }
.conv-participants-panel h3 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
}
.participant-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.8rem;
    color: var(--text-primary);
}
.participant-remove {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
}
.participant-remove:hover { color: var(--danger); }

/* --- AI Moderation Feedback --- */
.msg-ai-feedback {
    background: rgba(255, 170, 0, 0.08);
    border: 1px solid var(--warning);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-top: 8px;
}
.msg-ai-feedback h4 {
    font-size: 0.8rem;
    color: var(--warning);
    margin: 0 0 6px 0;
}
.msg-ai-feedback p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
    line-height: 1.4;
}
.msg-ai-feedback .suggestion {
    color: var(--neon-green);
    font-style: italic;
}

/* --- Empty state for messages --- */
.messages-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.messages-empty svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-muted);
    margin-bottom: 12px;
    opacity: 0.5;
}

/* --- Pulse Shooter Game --- */
.system-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#pulse-shooter-btn {
    background: none;
    border: 1px solid transparent;
    color: transparent;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: var(--radius);
    cursor: default;
    opacity: 0;
    transition: none;
    user-select: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}
#pulse-shooter-btn:hover {
    opacity: 1;
    color: var(--neon-green);
    border-color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green);
    box-shadow: 0 0 6px rgba(0,255,204,0.3);
    cursor: pointer;
}
#pulse-shooter-btn.ghost-flash {
    opacity: 1;
    color: var(--neon-green);
    border-color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green);
    box-shadow: 0 0 6px rgba(0,255,204,0.3);
    cursor: pointer;
}

/* Game overlay */
#pulse-shooter-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 10, 9, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#pulse-shooter-overlay.active {
    display: flex;
}
.pulse-shooter-container {
    width: min(800px, 90vw);
    height: min(500px, 70vh);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-neon-strong);
    position: relative;
    overflow: hidden;
}
.pulse-shooter-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}
.pulse-shooter-title {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-green);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 8px var(--neon-green);
    white-space: nowrap;
}
.pulse-shooter-close {
    position: absolute;
    top: -28px;
    right: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 8px;
}
.pulse-shooter-close:hover {
    color: var(--neon-green);
}
.pulse-shooter-controls {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    white-space: nowrap;
}
