:root{--bg:#f4f7fb;--card:#fff;--text:#111827;--muted:#6b7280;--line:#e5e7eb;--primary:#2563eb;--primary-dark:#1d4ed8;--soft:#eef4ff;--soft2:#f8fbff;--shadow:0 16px 44px rgba(15,23,42,.08);--radius:22px}
*{box-sizing:border-box}
body{background:linear-gradient(180deg,#f8fbff 0%,#f3f5f9 100%);color:var(--text);font-family:Tahoma,Arial,sans-serif}
a{text-decoration:none}
.site-navbar{background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:1000}
.site-brand{font-size:30px;font-weight:900;color:var(--text);letter-spacing:.3px}.site-brand span{color:var(--primary)}
.nav-link-custom{color:var(--muted);font-weight:700;padding:10px 14px;border-radius:12px;transition:.2s}
.nav-link-custom:hover{background:var(--soft);color:var(--primary)}
.top-user-badge{background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:8px 14px;font-weight:700}
.layout-grid{display:grid;grid-template-columns:290px minmax(0,1fr) 320px;gap:20px;align-items:start}
.card-ui{background:var(--card);border:1px solid rgba(229,231,235,.9);border-radius:var(--radius);box-shadow:var(--shadow)}
.card-ui-header{padding:18px 20px;border-bottom:1px solid var(--line);font-size:22px;font-weight:800}
.card-ui-body{padding:20px}
.user-panel{padding:22px;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)}
.user-avatar,.post-avatar,.profile-avatar-img,.user-tile-avatar{width:72px;height:72px;border-radius:50%;object-fit:cover;background:linear-gradient(135deg,#2563eb,#60a5fa);color:#fff;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:800;margin-bottom:14px}
.post-avatar,.user-tile-avatar{width:52px;height:52px;font-size:18px;margin-bottom:0}
.user-name{font-size:20px;font-weight:800;margin-bottom:4px}
.user-email{color:var(--muted);font-size:14px;margin-bottom:14px;word-break:break-word}
.side-links a{display:block;padding:11px 13px;color:var(--text);border-radius:12px;margin-bottom:8px;transition:.2s;background:#f8fafc;font-weight:700}
.side-links a:hover{background:var(--soft);color:var(--primary)}
.post-create-box textarea,.comment-form textarea,.message-composer,.settings-textarea{resize:none;border-radius:14px;border:1px solid var(--line);padding:14px}
.post-create-box textarea{min-height:120px}.comment-form textarea{min-height:90px}.message-composer{min-height:110px}.settings-textarea{min-height:120px}
.btn-primary-custom{background:var(--primary);border:none;color:#fff;border-radius:12px;padding:12px 18px;font-weight:700;transition:.2s}.btn-primary-custom:hover{background:var(--primary-dark)}
.post-card{background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);padding:18px;margin-bottom:16px}
.post-top{display:flex;align-items:flex-start;gap:14px;margin-bottom:14px}.post-author{font-size:17px;font-weight:800}.post-time{color:var(--muted);font-size:13px}.post-body{font-size:16px;line-height:1.9;margin-bottom:16px}
.post-image{width:100%;max-height:420px;object-fit:cover;border-radius:16px;border:1px solid var(--line);margin-bottom:12px}
.post-meta{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:14px;border-top:1px solid var(--line);padding-top:10px;margin-top:10px}
.post-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;border-top:1px solid var(--line);padding-top:14px;margin-top:12px}.post-actions form{margin:0}
.post-action-btn{width:100%;border:none;background:#f8fafc;color:var(--text);border-radius:12px;padding:10px;font-weight:700;transition:.2s}.post-action-btn:hover{background:var(--soft);color:var(--primary)}
.stat-box,.profile-stat,.explore-card,.short-card,.video-card,.quick-card,.profile-mini-card,.admin-tile,.settings-card{background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:16px}
.stat-box{margin-bottom:12px}.stat-label{color:var(--muted);font-size:14px}.stat-value{font-size:28px;font-weight:800;margin-top:6px}
.mini-list-item,.row-item,.comment-item,.message-item,.notify-item{padding:12px 0;border-bottom:1px solid var(--line)}
.mini-list-item:last-child,.row-item:last-child,.comment-item:last-child,.message-item:last-child,.notify-item:last-child{border-bottom:none}
.section-title{font-size:24px;font-weight:800;margin-bottom:16px}
.comment-box{margin-top:14px;padding-top:14px;border-top:1px dashed var(--line)}
.profile-hero{padding:24px}
.profile-cover{height:230px;border-radius:18px;background:linear-gradient(135deg,#1d4ed8,#60a5fa);margin-bottom:18px;background-size:cover;background-position:center}
.profile-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
.search-grid,.messages-grid,.explore-grid,.admin-grid,.settings-grid,.profile-summary{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.short-viewport{border-radius:24px;overflow:hidden;background:linear-gradient(180deg,#111827 0%,#1f2937 100%);color:#fff;padding:22px;min-height:420px;display:flex;flex-direction:column;justify-content:space-between;box-shadow:0 20px 50px rgba(0,0,0,.22)}
.short-badge{display:inline-block;background:rgba(255,255,255,.16);padding:6px 10px;border-radius:999px;font-size:12px}
.short-title{font-size:28px;font-weight:800;margin-top:18px}
.short-meta{display:flex;justify-content:space-between;align-items:center;margin-top:16px}
.user-tile{display:flex;align-items:center;gap:14px}
.message-bubble{padding:12px 14px;border-radius:16px;max-width:85%;margin-bottom:10px}
.message-left{background:#f3f4f6}.message-right{background:#e8f0ff;margin-right:auto}
.notify-pill{display:inline-block;background:var(--soft);color:var(--primary);padding:6px 10px;border-radius:999px;font-size:12px;font-weight:700}
.hero-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
.hero-box{background:linear-gradient(135deg,#0f172a,#1d4ed8);color:#fff;border-radius:18px;padding:18px;min-height:120px}
.hero-box small{opacity:.8}
.feed-highlight{padding:22px;border-radius:18px;background:linear-gradient(135deg,#ffffff,#eef4ff);border:1px solid var(--line);margin-bottom:18px}
.feed-highlight h3{font-size:28px;font-weight:900;margin-bottom:8px}.feed-highlight p{color:var(--muted);margin:0}
.video-grid-card{background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;box-shadow:var(--shadow)}
.video-grid-thumb{height:180px;background:linear-gradient(135deg,#dbeafe,#eff6ff);display:flex;align-items:center;justify-content:center;font-size:44px;color:#2563eb}
.video-grid-body{padding:16px}
.footer-note{margin-top:20px;padding:14px 18px;border-radius:16px;background:#ffffff;border:1px solid var(--line);color:var(--muted);font-size:14px}
.user-hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.sidebar-card-title{font-size:15px;font-weight:800;margin-bottom:8px}
.sidebar-card-text{font-size:13px;color:var(--muted);line-height:1.7}
@media (max-width:1100px){.layout-grid,.search-grid,.messages-grid,.explore-grid,.profile-stats,.hero-strip,.profile-summary,.admin-grid,.settings-grid{grid-template-columns:1fr}}
/* V16 tweaks */
body{background:linear-gradient(180deg,#edf4ff 0%,#f7fbff 38%,#eef5ff 100%)}
.site-navbar{background:rgba(240,247,255,.96)}
.hero-box{background:linear-gradient(135deg,#1e3a8a,#2563eb)}
.post-image{object-fit:contain;background:#f3f7ff}
.attachment-contain{object-fit:contain!important}
.file-chip{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:12px;background:#eef4ff;border:1px solid #cfe0ff;color:#1d4ed8;font-weight:700}
.comment-thread{margin-top:12px;padding-right:18px;border-right:2px solid #dbeafe}
.comment-actions{display:flex;gap:10px;align-items:center;margin-top:8px;flex-wrap:wrap}
.comment-like-btn,.comment-reply-btn{border:none;background:#eef4ff;color:#1d4ed8;border-radius:10px;padding:6px 10px;font-size:12px;font-weight:700}
.messages-grid{grid-template-columns:330px 1fr}
.message-pane{min-height:560px;display:flex;flex-direction:column}
.message-scroll{max-height:420px;overflow:auto;padding-left:4px}
.message-composer-wrap{margin-top:auto;padding-top:12px;border-top:1px solid var(--line)}
.audio-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
.audio-status{font-size:12px;color:var(--muted)}
.messages-grid .row-item a{padding:8px 0;display:block}
.quick-card,.settings-card,.profile-mini-card{background:#f4f8ff}
/* Articles edition */
.articles-layout{grid-template-columns:250px minmax(0,1fr) 260px}
.article-editor{min-height:320px;resize:vertical;line-height:1.9}
.article-title{font-size:27px;line-height:1.45;margin-bottom:8px}.article-title a{color:var(--text)}.article-title a:hover{color:var(--primary)}
.article-summary{color:#475569;line-height:1.9;font-size:16px}.two-actions{grid-template-columns:repeat(2,1fr)}
.article-page{max-width:900px;margin-inline:auto}.article-page h1{font-size:42px;line-height:1.4;font-weight:900}.article-lead{font-size:20px;line-height:1.9;color:#475569;border-right:4px solid var(--primary);padding-right:16px}.article-cover{max-height:560px;margin:18px 0 28px}.article-content{font-size:18px;line-height:2.15;white-space:normal}.external-link-card{margin-top:30px;padding:18px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:16px;display:flex;flex-direction:column;gap:8px;word-break:break-all}
@media(max-width:1100px){.articles-layout{grid-template-columns:1fr}.article-page h1{font-size:31px}}
/* Discussions and interaction */
.discussion-count{min-width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--soft);color:var(--primary);font-size:14px}
.discussion-item{padding:18px;border:1px solid var(--line);border-radius:16px;margin-bottom:14px;background:#fff}.reply-item{background:#f8fafc;border-radius:12px;padding:14px;margin-top:10px}.comment-body{font-size:16px;line-height:1.8}.comment-delete-btn{border:0;background:#fff1f2;color:#be123c;border-radius:10px;padding:6px 10px;font-size:12px;font-weight:700}.reply-form{margin-top:12px}.empty-discussion{padding:24px;text-align:center;color:var(--muted);background:#f8fafc;border-radius:14px}.notification-unread{background:#eff6ff;border-right:4px solid var(--primary);padding-right:14px}.notification-link{display:block;color:var(--text);font-weight:700}.notification-link:hover{color:var(--primary)}
.article-interactions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}.article-interactions form{margin:0}@media(max-width:700px){.article-interactions{grid-template-columns:1fr}}
/* Discovery and pagination */
.article-tags{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0 14px}.article-tags a{font-size:13px;color:#1d4ed8;background:#eff6ff;border-radius:999px;padding:5px 10px}.pagination-wrap{display:flex;gap:7px;justify-content:center;flex-wrap:wrap;margin:24px 0}.page-link-custom{min-width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;background:#fff;border:1px solid var(--line);border-radius:10px;color:var(--text);font-weight:700}.page-link-custom.active,.page-link-custom:hover{background:var(--primary);color:#fff}.search-result-count{color:var(--muted);margin:0 0 16px}.popular-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.popular-card{display:grid;grid-template-columns:48px 1fr;gap:14px}.popular-rank{width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--primary);color:#fff;font-size:20px;font-weight:900}.popularity-stats,.author-stats{display:flex;gap:18px;flex-wrap:wrap;color:var(--muted);font-size:14px}.author-profile-body{padding:0 24px 24px}.author-bio{color:var(--muted);margin:6px 0}.author-stats{border-top:1px solid var(--line);padding-top:18px;margin-top:18px}@media(max-width:800px){.popular-grid{grid-template-columns:1fr}}
/* Launch and moderation */
.public-hero{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:42px;border-radius:24px;background:linear-gradient(135deg,#0f172a,#2563eb);color:#fff;margin-bottom:28px}.public-hero h1{font-size:40px;font-weight:900}.public-hero p{opacity:.85;font-size:18px}.public-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:22px}.public-articles-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.public-card-image{height:240px}.popular-mini-rank{display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;border-radius:50%;background:var(--soft);color:var(--primary);font-weight:800;margin-left:8px}.admin-table{max-height:620px;overflow:auto}.admin-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid var(--line)}.status-badge{display:inline-block;padding:4px 8px;border-radius:999px;font-size:11px;margin-left:8px}.status-open{background:#fef3c7;color:#92400e}.status-resolved{background:#dcfce7;color:#166534}.status-dismissed{background:#f1f5f9;color:#475569}.report-box{margin-top:24px;color:#be123c}.report-inline{font-size:12px;color:#be123c;min-width:180px}.report-inline summary,.report-box summary{cursor:pointer;font-weight:700}@media(max-width:900px){.public-layout,.public-articles-grid{grid-template-columns:1fr}.public-hero{padding:28px;align-items:flex-start;flex-direction:column}.public-hero h1{font-size:31px}}
