/* DigitalGeek - Global Stylesheet v3.0 */
/* Brand: blue #3b82f6 -> purple #7c3aed -> pink #ec4899 */

:root {
  --ink:        #0e1117;
  --ink-2:      #1e2230;
  --ink-3:      #404558;
  --muted:      #6b7280;
  --subtle:     #9ca3af;
  --line:       #e5e7ef;
  --bg:         #f4f5fb;
  --surface:    #ffffff;
  --surface-2:  #eef0f8;
  --blue:       #3b82f6;
  --purple:     #7c3aed;
  --pink:       #ec4899;
  --grad:       linear-gradient(135deg, #3b82f6 0%, #7c3aed 50%, #ec4899 100%);
  --grad-h:     linear-gradient(135deg, #2563eb 0%, #6d28d9 50%, #db2777 100%);
  --accent:     #7c3aed;
  --accent-pale:#f3f0ff;
  --navy:       #080e1a;
  --green:      #10b981;
  --red:        #ef4444;
  --ff-head:    'Inter', 'Source Sans 3', 'Segoe UI', sans-serif;
  --ff-body:    'Source Sans 3', 'Segoe UI', sans-serif;
  --ff-mono:    'JetBrains Mono', monospace;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.07);
  --shadow-md:  0 4px 16px rgba(0,0,0,.09);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.13);
  --r:          10px;
  --r-sm:       6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--ff-body); cursor: pointer; }
input, textarea, select { font-family: var(--ff-body); }

/* ── CONTAINER ── */
.container { max-width: 1260px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.container-md { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ── CATEGORY BADGES ── */
.badge { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; padding: 3px 9px; border-radius: 3px; white-space: nowrap; }
.ai        { background: #eff6ff; color: #1d4ed8; }
.cyber     { background: #fef2f2; color: #dc2626; }
.cloud     { background: #ecfdf5; color: #059669; }
.dev       { background: #f5f3ff; color: #7c3aed; }
.networking{ background: #fffbeb; color: #d97706; }
.devops    { background: #fff7ed; color: #ea580c; }
.data      { background: #ecfeff; color: #0891b2; }
.linux     { background: #f0fdf4; color: #16a34a; }
.hardware  { background: #fff1f2; color: #e11d48; }
.enterprise{ background: #f0fdf4; color: #15803d; }
.quantum   { background: #fdf4ff; color: #9333ea; }
.mobile    { background: #fdf2f8; color: #be185d; }
.general   { background: var(--surface-2); color: var(--ink-3); }

/* ── GRADIENT UTILITIES ── */
.grad-text { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all .15s; }
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { opacity: .88; }
.btn-outline { background: transparent; border: 1.5px solid var(--line); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--muted); padding: 6px 12px; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font-size: 14px; color: var(--ink); background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.form-input::placeholder { color: var(--subtle); }
textarea.form-input { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 4px; }

/* ── TOPBAR ── */
.topbar { background: var(--navy); padding: 7px 0; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; }
.topbar-date { font-family: var(--ff-mono); font-size: 11px; color: rgba(255,255,255,.35); }
.topbar-links { display: flex; gap: 20px; align-items: center; }
.topbar-links a { color: rgba(255,255,255,.45); font-size: 12px; transition: color .2s; }
.topbar-links a:hover { color: #fff; }
.topbar-breaking { display: flex; align-items: center; gap: 8px; }
.breaking-pill { background: var(--grad); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 2px 8px; border-radius: 2px; flex-shrink: 0; }
.breaking-text { font-size: 12px; color: rgba(255,255,255,.65); max-width: 360px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: opacity .3s; }

/* ── HEADER ── */
.site-header { background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.07); position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 20px rgba(0,0,0,.4); }
.header-inner { display: flex; align-items: center; height: 66px; gap: 20px; }
.logo-wrap { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 42px; width: auto; }
.logo-fallback { display: none; font-family: var(--ff-head); font-size: 20px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-search { flex: 1; max-width: 380px; position: relative; }
.header-search input { width: 100%; padding: 9px 16px 9px 38px; border: 1.5px solid rgba(255,255,255,.1); border-radius: 99px; font-size: 14px; color: #fff; background: rgba(255,255,255,.07); transition: all .2s; }
.header-search input:focus { outline: none; border-color: rgba(124,58,237,.7); background: rgba(255,255,255,.1); }
.header-search input::placeholder { color: rgba(255,255,255,.3); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.3); font-size: 14px; pointer-events: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.btn-subscribe { padding: 8px 20px; background: var(--grad); color: #fff; border: none; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: opacity .2s; }
.btn-subscribe:hover { opacity: .88; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 1px solid rgba(255,255,255,.15); border-radius: 99px; cursor: pointer; transition: all .2s; background: rgba(255,255,255,.05); }
.user-btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); }
.user-btn img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.user-btn span { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.8); }
.user-menu { position: absolute; top: 100%; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); min-width: 180px; z-index: 300; padding: 6px; display: none; }
.user-menu.open { display: block; }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; color: var(--ink-2); border-radius: var(--r-sm); width: 100%; text-align: left; background: none; border: none; cursor: pointer; transition: background .1s; }
.user-menu a:hover, .user-menu button:hover { background: var(--surface-2); }
.user-menu .divider { height: 1px; background: var(--line); margin: 4px 0; }
.header-user-wrap { position: relative; }

/* ── NAV ── */
.site-nav { background: #0a1020; border-bottom: 1px solid rgba(255,255,255,.1); }
.nav-inner { display: flex; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-link { padding: 13px 15px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,.5); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.nav-link:hover { color: rgba(255,255,255,.85); }
.nav-link.active { color: #fff; border-bottom-color: var(--purple); font-weight: 600; }
.nav-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.nav-sep { width: 1px; background: rgba(255,255,255,.1); margin: 8px 4px; }
.nav-pill { background: var(--grad); color: #fff !important; border-radius: 99px; padding: 4px 12px !important; font-size: 12px !important; font-weight: 700 !important; border-bottom: none !important; margin: auto 4px; }

/* ── AD STRIP ── */
.ad-strip { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 10px 0; text-align: center; }
.ad-label { font-size: 10px; color: var(--subtle); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 5px; }
.ad-ph { display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 728px; height: 90px; background: #e8eaf2; border: 1px dashed #c5c9dc; border-radius: 4px; color: var(--subtle); font-size: 12px; font-family: var(--ff-mono); }

/* ── FOOTER ── */
.site-footer { background: var(--navy); color: rgba(255,255,255,.5); }
.footer-top { border-bottom: 1px solid rgba(255,255,255,.07); padding: 44px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 36px; }
.footer-logo img { height: 36px; width: auto; margin-bottom: 12px; }
.footer-brand p { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.4); max-width: 250px; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.social-btn { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 13px; transition: all .15s; }
.social-btn:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.07); color: #fff; }
.footer-col h4 { color: rgba(255,255,255,.85); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 13px; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,.4); margin-bottom: 8px; transition: color .15s; }
.footer-col a:hover { color: rgba(255,255,255,.8); }
.footer-bottom { padding: 16px 0; display: flex; align-items: center; justify-content: space-between; font-size: 12px; flex-wrap: wrap; gap: 8px; }
.footer-copy { color: rgba(255,255,255,.3); }
.footer-credit { color: rgba(255,255,255,.3); }
.footer-credit a { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 500; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: rgba(255,255,255,.3); transition: color .2s; }
.footer-links a:hover { color: rgba(255,255,255,.65); }

/* ── AUTH MODAL ── */
.auth-modal-bg { display: none; position: fixed; inset: 0; background: rgba(8,14,26,.85); z-index: 600; align-items: center; justify-content: center; backdrop-filter: blur(8px); }
.auth-modal-bg.open { display: flex; }
.auth-modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 420px; padding: 36px; box-shadow: var(--shadow-lg); animation: fadeUp .25s ease; position: relative; }
@keyframes fadeUp { from{transform:translateY(16px);opacity:0;} to{transform:translateY(0);opacity:1;} }
.auth-modal-close { position: absolute; top: 16px; right: 16px; background: var(--surface-2); border: none; width: 30px; height: 30px; border-radius: 50%; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.auth-modal-close:hover { background: var(--line); color: var(--ink); }
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--line); }
.auth-tab { flex: 1; text-align: center; padding: 10px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo img { height: 40px; width: auto; margin: 0 auto; }
.auth-title { font-family: var(--ff-head); font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-sub { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 24px; }
.google-btn { width: 100%; padding: 10px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; transition: all .15s; }
.google-btn:hover { border-color: var(--accent); background: var(--accent-pale); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-divider span { font-size: 12px; color: var(--subtle); }
.auth-submit { width: 100%; padding: 11px; background: var(--grad); color: #fff; border: none; border-radius: var(--r-sm); font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 4px; transition: opacity .2s; }
.auth-submit:hover { opacity: .88; }
.auth-error { background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--r-sm); padding: 10px 14px; font-size: 13px; color: var(--red); margin-bottom: 14px; display: none; }
.auth-error.show { display: block; }

/* ── ALERTS ── */
.alert { padding: 12px 16px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: var(--accent-pale); border: 1px solid rgba(124,58,237,.25); color: var(--accent); }

/* ── PAGINATION ── */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 28px; }
.page-btn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; background: var(--surface); color: var(--ink-2); }
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--grad); color: #fff; border-color: transparent; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── SKELETON LOADING ── */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, #e8eaf4 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 4px; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) {
  .header-search { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar-date, .topbar-breaking { display: none; }
}

/* ── DARK MODE & THEME v4 ────────────────────────────────── */
.container { max-width: 1380px; padding: 0 28px; }
body { font-size: 15.5px; line-height: 1.65; }
:root { --ink:#080d18; --ink-2:#161d2e; --ink-3:#2d3652; --muted:#546080; --subtle:#7d8aaa; --line:#dde0ee; --bg:#eef0f8; --surface:#ffffff; --surface-2:#e8eaf5; }
[data-theme="dark"] { --ink:#f0f2ff; --ink-2:#d4d8f0; --ink-3:#a8b0d0; --muted:#7880a8; --subtle:#4a5278; --line:#1e2540; --bg:#0a0f1e; --surface:#111827; --surface-2:#151e30; --accent:#818cf8; --accent-pale:#1e1b4b; }
[data-theme="dark"] body { background:var(--bg); color:var(--ink); }
[data-theme="dark"] .article-card,[data-theme="dark"] .hero-side,[data-theme="dark"] .widget,[data-theme="dark"] .latest-bar,[data-theme="dark"] .forum-section,[data-theme="dark"] .profile-card,[data-theme="dark"] .panel { background:var(--surface); border-color:var(--line); }
[data-theme="dark"] .form-input { background:var(--surface-2); border-color:var(--line); color:var(--ink); }
[data-theme="dark"] .form-input::placeholder { color:var(--subtle); }
[data-theme="dark"] .auth-modal { background:var(--surface); }
[data-theme="dark"] .ad-ph,[data-theme="dark"] .sb-ad-slot { background:var(--surface-2); border-color:var(--line); color:var(--subtle); }
[data-theme="dark"] .tag-pill { background:var(--surface-2); border-color:var(--line); color:var(--ink-3); }
[data-theme="dark"] .about-stat { background:var(--surface-2); }
[data-theme="dark"] .nl-widget { background:var(--surface-2); border:1px solid var(--line); }
[data-theme="dark"] .hero-grid { background:var(--line); }
[data-theme="dark"] .latest-item:hover,[data-theme="dark"] .article-card:hover,[data-theme="dark"] .hero-side:hover,[data-theme="dark"] .forum-thread:hover { background:var(--surface-2); }
[data-theme="dark"] ::-webkit-scrollbar { width:8px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background:var(--surface-2); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background:var(--line); border-radius:4px; }
.theme-toggle { width:36px; height:36px; border-radius:50%; border:1px solid var(--line); background:var(--surface); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:16px; transition:all .2s; flex-shrink:0; }
.theme-toggle:hover { border-color:var(--accent); background:var(--accent-pale); }

/* ── DARK MODE & THEME v4 ────────────────────────────────── */
.container { max-width: 1380px; padding: 0 28px; }
body { font-size: 15.5px; line-height: 1.65; }
:root { --ink:#080d18; --ink-2:#161d2e; --ink-3:#2d3652; --muted:#546080; --subtle:#7d8aaa; --line:#dde0ee; --bg:#eef0f8; --surface:#ffffff; --surface-2:#e8eaf5; }
[data-theme="dark"] { --ink:#f0f2ff; --ink-2:#d4d8f0; --ink-3:#a8b0d0; --muted:#7880a8; --subtle:#4a5278; --line:#1e2540; --bg:#0a0f1e; --surface:#111827; --surface-2:#151e30; --accent:#818cf8; --accent-pale:#1e1b4b; }
[data-theme="dark"] body { background:var(--bg); color:var(--ink); }
[data-theme="dark"] .article-card,[data-theme="dark"] .hero-side,[data-theme="dark"] .widget,[data-theme="dark"] .latest-bar,[data-theme="dark"] .forum-section,[data-theme="dark"] .profile-card,[data-theme="dark"] .panel { background:var(--surface); border-color:var(--line); }
[data-theme="dark"] .form-input { background:var(--surface-2); border-color:var(--line); color:var(--ink); }
[data-theme="dark"] .form-input::placeholder { color:var(--subtle); }
[data-theme="dark"] .auth-modal { background:var(--surface); }
[data-theme="dark"] .ad-ph,[data-theme="dark"] .sb-ad-slot { background:var(--surface-2); border-color:var(--line); color:var(--subtle); }
[data-theme="dark"] .tag-pill { background:var(--surface-2); border-color:var(--line); color:var(--ink-3); }
[data-theme="dark"] .about-stat { background:var(--surface-2); }
[data-theme="dark"] .nl-widget { background:var(--surface-2); border:1px solid var(--line); }
[data-theme="dark"] .hero-grid { background:var(--line); }
[data-theme="dark"] .latest-item:hover,[data-theme="dark"] .article-card:hover,[data-theme="dark"] .hero-side:hover,[data-theme="dark"] .forum-thread:hover { background:var(--surface-2); }
[data-theme="dark"] ::-webkit-scrollbar { width:8px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background:var(--surface-2); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background:var(--line); border-radius:4px; }
.theme-toggle { width:36px; height:36px; border-radius:50%; border:1px solid var(--line); background:var(--surface); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:16px; transition:all .2s; flex-shrink:0; }
.theme-toggle:hover { border-color:var(--accent); background:var(--accent-pale); }

/* ── DARK MODE v2 - Better palette ───────────────────────── */
[data-theme="dark"] {
  --ink:        #e8ecff;
  --ink-2:      #c5ccee;
  --ink-3:      #8892c0;
  --muted:      #5d6899;
  --subtle:     #3d4a70;
  --line:       #1c2440;
  --bg:         #080d1a;
  --surface:    #0e1525;
  --surface-2:  #131c30;
  --accent:     #7c6fff;
  --accent-pale: #1a1840;
  --navy:       #050a14;
  --red:        #ff6b6b;
  --green:      #4ade80;
  --orange:     #fbbf24;
}

[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

/* Cards and surfaces */
[data-theme="dark"] .article-card,
[data-theme="dark"] .hero-side,
[data-theme="dark"] .widget,
[data-theme="dark"] .latest-bar,
[data-theme="dark"] .forum-section,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .panel,
[data-theme="dark"] .edit-form,
[data-theme="dark"] .tab-content,
[data-theme="dark"] .opinion-card + div,
[data-theme="dark"] .tools-strip,
[data-theme="dark"] .about-body { 
  background: var(--surface); 
  border-color: var(--line); 
}

/* Hero grid */
[data-theme="dark"] .hero-grid { background: var(--line); }
[data-theme="dark"] .hero-main { background: var(--surface); }
[data-theme="dark"] .hero-side { background: var(--surface); }
[data-theme="dark"] .hero-side:hover { background: var(--surface-2); }

/* Latest bar */
[data-theme="dark"] .latest-bar { background: var(--surface); }
[data-theme="dark"] .latest-head { background: var(--grad); }
[data-theme="dark"] .latest-item:hover { background: var(--surface-2); }

/* Cards */
[data-theme="dark"] .article-card:hover { background: var(--surface-2); }
[data-theme="dark"] .card-foot { border-color: var(--surface-2); }

/* Badges - fix white backgrounds */
[data-theme="dark"] .badge { border: 1px solid rgba(255,255,255,0.1); }
[data-theme="dark"] .badge.ai { background:#1e3a8a; color:#93c5fd; }
[data-theme="dark"] .badge.cyber { background:#7f1d1d; color:#fca5a5; }
[data-theme="dark"] .badge.cloud { background:#064e3b; color:#6ee7b7; }
[data-theme="dark"] .badge.dev { background:#3b0764; color:#c4b5fd; }
[data-theme="dark"] .badge.linux { background:#14532d; color:#86efac; }
[data-theme="dark"] .badge.networking { background:#78350f; color:#fcd34d; }
[data-theme="dark"] .badge.devops { background:#7c2d12; color:#fdba74; }
[data-theme="dark"] .badge.data { background:#0c4a6e; color:#7dd3fc; }
[data-theme="dark"] .badge.hardware { background:#831843; color:#f9a8d4; }
[data-theme="dark"] .badge.quantum { background:#4a1d96; color:#ddd6fe; }
[data-theme="dark"] .badge.general { background:#1e293b; color:#94a3b8; }

/* Forms */
[data-theme="dark"] .form-input { 
  background: var(--surface-2); 
  border-color: var(--line); 
  color: var(--ink); 
}
[data-theme="dark"] .form-input::placeholder { color: var(--subtle); }
[data-theme="dark"] .form-input:focus { border-color: var(--accent); }

/* Auth modal */
[data-theme="dark"] .auth-modal { background: var(--surface); }
[data-theme="dark"] .auth-modal-bg.open { background: rgba(0,0,0,.88); }
[data-theme="dark"] .auth-tabs { border-color: var(--line); }
[data-theme="dark"] .auth-tab.active { border-color: var(--accent); color: var(--accent); }

/* Sidebar widget */
[data-theme="dark"] .nl-widget { background: var(--surface-2); border: 1px solid var(--line); }
[data-theme="dark"] .nl-input { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .tag-pill { background: var(--surface-2); border-color: var(--line); color: var(--ink-3); }
[data-theme="dark"] .tag-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-pale); }
[data-theme="dark"] .about-stat { background: var(--surface-2); }

/* Forum */
[data-theme="dark"] .forum-thread:hover { background: var(--surface-2); }
[data-theme="dark"] .vote-btn { border-color: var(--line); color: var(--muted); }
[data-theme="dark"] .forum-head { background: var(--surface-2); border-color: var(--line); }
[data-theme="dark"] .new-thread-btn { border-color: var(--accent); color: var(--accent); }

/* Profile */
[data-theme="dark"] .profile-tab { color: var(--muted); }
[data-theme="dark"] .profile-tab.active { color: var(--accent); border-color: var(--accent); }
[data-theme="dark"] .profile-stats-bar { border-color: var(--line); }
[data-theme="dark"] .profile-stat { border-color: var(--line); }

/* Footer */
[data-theme="dark"] .site-footer { background: var(--navy); }

/* Toggle button improved */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all .2s;
  flex-shrink: 0;
  line-height: 1;
}
.theme-toggle:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}

/* Scrollbar dark mode */
[data-theme="dark"] ::-webkit-scrollbar { width: 6px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--surface-2); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* ── SPACING & CONTRAST OVERHAUL v5 ─────────────────────── */

/* Bigger base font and line height */
body { font-size: 16px; line-height: 1.7; }

/* Wider container with more breathing room */
.container { max-width: 1400px; padding: 0 36px; }

/* ── BADGES - More visible ───────────────────────────────── */
.badge { font-size: 11px; padding: 4px 10px; border-radius: 4px; letter-spacing: .5px; }
.badge.ai { background:#dbeafe; color:#1d4ed8; }
.badge.cyber { background:#fee2e2; color:#b91c1c; }
.badge.cloud { background:#d1fae5; color:#065f46; }
.badge.dev { background:#ede9fe; color:#5b21b6; }
.badge.linux { background:#dcfce7; color:#15803d; }
.badge.networking { background:#fef3c7; color:#92400e; }
.badge.devops { background:#ffedd5; color:#9a3412; }
.badge.data { background:#e0f2fe; color:#0369a1; }
.badge.hardware { background:#fce7f3; color:#9d174d; }
.badge.quantum { background:#f3e8ff; color:#6b21a8; }
.badge.general { background:#f1f5f9; color:#475569; }

/* ── ARTICLE CARDS - More presence ───────────────────────── */
.article-card { border-radius: 12px; border-width: 1.5px; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.article-card .card-body { padding: 20px 22px 22px; }
.article-card .card-body h3 { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.card-exc { font-size: 14.5px; line-height: 1.7; color: var(--ink-3); }
.card-foot { font-size: 13px; padding-top: 12px; margin-top: auto; }

/* ── CARD THUMBNAIL - Taller ─────────────────────────────── */
.card-thumb { aspect-ratio: 16/8; }

/* ── HERO SECTION - More impact ──────────────────────────── */
.hero-main-content { padding: 28px 32px 32px; }
.hero-main-content h2 { font-size: 28px; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.hero-exc { font-size: 15.5px; line-height: 1.75; color: var(--ink-3); margin-bottom: 18px; }
.hero-visual { height: 280px; }
.hero-side { padding: 22px 24px; }
.hero-side h3 { font-size: 17px; font-weight: 700; line-height: 1.4; }

/* ── LATEST BAR - Bigger text ────────────────────────────── */
.latest-head { padding: 11px 20px; font-size: 12px; }
.latest-item { padding: 16px 20px; }
.latest-item h4 { font-size: 14px; font-weight: 600; line-height: 1.5; }
.li-cat { font-size: 11px; margin-bottom: 5px; }
.li-time { font-size: 12px; margin-top: 6px; }

/* ── SECTION LABELS ──────────────────────────────────────── */
.sec-label h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.see-all { font-size: 13px; font-weight: 600; }

/* ── ARTICLE ROWS - More spacing ─────────────────────────── */
.article-row { padding: 18px 0; gap: 16px; }
.row-title { font-size: 15.5px; font-weight: 700; line-height: 1.45; margin-bottom: 7px; }
.row-thumb { width: 100px; height: 70px; border-radius: 8px; }
.row-meta { font-size: 12.5px; }

/* ── SIDEBAR WIDGETS ─────────────────────────────────────── */
.widget { border-radius: 12px; border-width: 1.5px; }
.widget-head { padding: 14px 18px; }
.widget-head h3 { font-size: 13px; letter-spacing: .8px; }
.widget-body { padding: 14px 18px; }
.ti-title { font-size: 14px; font-weight: 600; line-height: 1.45; }
.ti-num { font-size: 18px; }
.ti-cat { font-size: 11px; margin-bottom: 3px; }
.trending-item { padding: 12px 0; gap: 13px; }

/* ── NEWSLETTER WIDGET ───────────────────────────────────── */
.nl-widget { padding: 22px; border-radius: 12px; }
.nl-widget h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.nl-widget p { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }

/* ── FORUM SECTION ───────────────────────────────────────── */
.forum-section { border-radius: 12px; border-width: 1.5px; }
.forum-head { padding: 16px 22px; }
.forum-head h2 { font-size: 17px; font-weight: 700; }
.forum-thread { padding: 16px 22px; gap: 14px; }
.thread-title { font-size: 15px; font-weight: 700; line-height: 1.45; }
.thread-exc { font-size: 13.5px; line-height: 1.65; margin-bottom: 8px; }
.thread-meta { font-size: 12.5px; }
.vote-count { font-size: 13px; font-weight: 800; }

/* ── MAIN LAYOUT - More gap ──────────────────────────────── */
.main-layout { gap: 40px; padding: 36px 0 72px; }

/* ── HEADER - Bigger ─────────────────────────────────────── */
.site-header { height: 66px; }
.logo-text { font-size: 23px; font-weight: 800; }

/* ── TOPBAR - Slightly taller ────────────────────────────── */
.topbar { padding: 8px 0; }

/* ── NAV - More breathing room ───────────────────────────── */
.site-nav { padding: 0; }
.nav-inner { gap: 6px; }
.nav-link { padding: 10px 14px; font-size: 13.5px; font-weight: 600; }

/* ── OPINION CARD ────────────────────────────────────────── */
.opinion-card { padding: 32px; border-radius: 12px; }
.opinion-card h3 { font-size: 22px; font-weight: 800; line-height: 1.35; margin-bottom: 12px; }
.opinion-card p { font-size: 15px; line-height: 1.75; margin-bottom: 20px; }

/* ── ABOUT WIDGET ────────────────────────────────────────── */
.about-body p { font-size: 14px; line-height: 1.7; }
.stat-num { font-size: 22px; font-weight: 800; }
.stat-lbl { font-size: 12px; }

/* ── SEARCH DROPDOWN ─────────────────────────────────────── */
#search-dropdown a { padding: 10px 16px; gap: 12px; }

/* ── SMOOTH TRANSITIONS ──────────────────────────────────── */
.article-card, .widget, .forum-section, .forum-thread, .trending-item, .latest-item, .hero-side {
  transition: background .15s, transform .2s, box-shadow .2s, border-color .15s;
}

/* ── SPACING & CONTRAST OVERHAUL v5 ─────────────────────── */

/* Bigger base font and line height */
body { font-size: 16px; line-height: 1.7; }

/* Wider container with more breathing room */
.container { max-width: 1400px; padding: 0 36px; }

/* ── BADGES - More visible ───────────────────────────────── */
.badge { font-size: 11px; padding: 4px 10px; border-radius: 4px; letter-spacing: .5px; }
.badge.ai { background:#dbeafe; color:#1d4ed8; }
.badge.cyber { background:#fee2e2; color:#b91c1c; }
.badge.cloud { background:#d1fae5; color:#065f46; }
.badge.dev { background:#ede9fe; color:#5b21b6; }
.badge.linux { background:#dcfce7; color:#15803d; }
.badge.networking { background:#fef3c7; color:#92400e; }
.badge.devops { background:#ffedd5; color:#9a3412; }
.badge.data { background:#e0f2fe; color:#0369a1; }
.badge.hardware { background:#fce7f3; color:#9d174d; }
.badge.quantum { background:#f3e8ff; color:#6b21a8; }
.badge.general { background:#f1f5f9; color:#475569; }

/* ── ARTICLE CARDS - More presence ───────────────────────── */
.article-card { border-radius: 12px; border-width: 1.5px; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.article-card .card-body { padding: 20px 22px 22px; }
.article-card .card-body h3 { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.card-exc { font-size: 14.5px; line-height: 1.7; color: var(--ink-3); }
.card-foot { font-size: 13px; padding-top: 12px; margin-top: auto; }

/* ── CARD THUMBNAIL - Taller ─────────────────────────────── */
.card-thumb { aspect-ratio: 16/8; }

/* ── HERO SECTION - More impact ──────────────────────────── */
.hero-main-content { padding: 28px 32px 32px; }
.hero-main-content h2 { font-size: 28px; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.hero-exc { font-size: 15.5px; line-height: 1.75; color: var(--ink-3); margin-bottom: 18px; }
.hero-visual { height: 280px; }
.hero-side { padding: 22px 24px; }
.hero-side h3 { font-size: 17px; font-weight: 700; line-height: 1.4; }

/* ── LATEST BAR - Bigger text ────────────────────────────── */
.latest-head { padding: 11px 20px; font-size: 12px; }
.latest-item { padding: 16px 20px; }
.latest-item h4 { font-size: 14px; font-weight: 600; line-height: 1.5; }
.li-cat { font-size: 11px; margin-bottom: 5px; }
.li-time { font-size: 12px; margin-top: 6px; }

/* ── SECTION LABELS ──────────────────────────────────────── */
.sec-label h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.see-all { font-size: 13px; font-weight: 600; }

/* ── ARTICLE ROWS - More spacing ─────────────────────────── */
.article-row { padding: 18px 0; gap: 16px; }
.row-title { font-size: 15.5px; font-weight: 700; line-height: 1.45; margin-bottom: 7px; }
.row-thumb { width: 100px; height: 70px; border-radius: 8px; }
.row-meta { font-size: 12.5px; }

/* ── SIDEBAR WIDGETS ─────────────────────────────────────── */
.widget { border-radius: 12px; border-width: 1.5px; }
.widget-head { padding: 14px 18px; }
.widget-head h3 { font-size: 13px; letter-spacing: .8px; }
.widget-body { padding: 14px 18px; }
.ti-title { font-size: 14px; font-weight: 600; line-height: 1.45; }
.ti-num { font-size: 18px; }
.ti-cat { font-size: 11px; margin-bottom: 3px; }
.trending-item { padding: 12px 0; gap: 13px; }

/* ── NEWSLETTER WIDGET ───────────────────────────────────── */
.nl-widget { padding: 22px; border-radius: 12px; }
.nl-widget h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.nl-widget p { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }

/* ── FORUM SECTION ───────────────────────────────────────── */
.forum-section { border-radius: 12px; border-width: 1.5px; }
.forum-head { padding: 16px 22px; }
.forum-head h2 { font-size: 17px; font-weight: 700; }
.forum-thread { padding: 16px 22px; gap: 14px; }
.thread-title { font-size: 15px; font-weight: 700; line-height: 1.45; }
.thread-exc { font-size: 13.5px; line-height: 1.65; margin-bottom: 8px; }
.thread-meta { font-size: 12.5px; }
.vote-count { font-size: 13px; font-weight: 800; }

/* ── MAIN LAYOUT - More gap ──────────────────────────────── */
.main-layout { gap: 40px; padding: 36px 0 72px; }

/* ── HEADER - Bigger ─────────────────────────────────────── */
.site-header { height: 66px; }
.logo-text { font-size: 23px; font-weight: 800; }

/* ── TOPBAR - Slightly taller ────────────────────────────── */
.topbar { padding: 8px 0; }

/* ── NAV - More breathing room ───────────────────────────── */
.site-nav { padding: 0; }
.nav-inner { gap: 6px; }
.nav-link { padding: 10px 14px; font-size: 13.5px; font-weight: 600; }

/* ── OPINION CARD ────────────────────────────────────────── */
.opinion-card { padding: 32px; border-radius: 12px; }
.opinion-card h3 { font-size: 22px; font-weight: 800; line-height: 1.35; margin-bottom: 12px; }
.opinion-card p { font-size: 15px; line-height: 1.75; margin-bottom: 20px; }

/* ── ABOUT WIDGET ────────────────────────────────────────── */
.about-body p { font-size: 14px; line-height: 1.7; }
.stat-num { font-size: 22px; font-weight: 800; }
.stat-lbl { font-size: 12px; }

/* ── SEARCH DROPDOWN ─────────────────────────────────────── */
#search-dropdown a { padding: 10px 16px; gap: 12px; }

/* ── SMOOTH TRANSITIONS ──────────────────────────────────── */
.article-card, .widget, .forum-section, .forum-thread, .trending-item, .latest-item, .hero-side {
  transition: background .15s, transform .2s, box-shadow .2s, border-color .15s;
}

/* ── SPACING & CONTRAST OVERHAUL v5 ─────────────────────── */

/* Bigger base font and line height */
body { font-size: 16px; line-height: 1.7; }

/* Wider container with more breathing room */
.container { max-width: 1400px; padding: 0 36px; }

/* ── BADGES - More visible ───────────────────────────────── */
.badge { font-size: 11px; padding: 4px 10px; border-radius: 4px; letter-spacing: .5px; }
.badge.ai { background:#dbeafe; color:#1d4ed8; }
.badge.cyber { background:#fee2e2; color:#b91c1c; }
.badge.cloud { background:#d1fae5; color:#065f46; }
.badge.dev { background:#ede9fe; color:#5b21b6; }
.badge.linux { background:#dcfce7; color:#15803d; }
.badge.networking { background:#fef3c7; color:#92400e; }
.badge.devops { background:#ffedd5; color:#9a3412; }
.badge.data { background:#e0f2fe; color:#0369a1; }
.badge.hardware { background:#fce7f3; color:#9d174d; }
.badge.quantum { background:#f3e8ff; color:#6b21a8; }
.badge.general { background:#f1f5f9; color:#475569; }

/* ── ARTICLE CARDS - More presence ───────────────────────── */
.article-card { border-radius: 12px; border-width: 1.5px; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.article-card .card-body { padding: 20px 22px 22px; }
.article-card .card-body h3 { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.card-exc { font-size: 14.5px; line-height: 1.7; color: var(--ink-3); }
.card-foot { font-size: 13px; padding-top: 12px; margin-top: auto; }

/* ── CARD THUMBNAIL - Taller ─────────────────────────────── */
.card-thumb { aspect-ratio: 16/8; }

/* ── HERO SECTION - More impact ──────────────────────────── */
.hero-main-content { padding: 28px 32px 32px; }
.hero-main-content h2 { font-size: 28px; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.hero-exc { font-size: 15.5px; line-height: 1.75; color: var(--ink-3); margin-bottom: 18px; }
.hero-visual { height: 280px; }
.hero-side { padding: 22px 24px; }
.hero-side h3 { font-size: 17px; font-weight: 700; line-height: 1.4; }

/* ── LATEST BAR - Bigger text ────────────────────────────── */
.latest-head { padding: 11px 20px; font-size: 12px; }
.latest-item { padding: 16px 20px; }
.latest-item h4 { font-size: 14px; font-weight: 600; line-height: 1.5; }
.li-cat { font-size: 11px; margin-bottom: 5px; }
.li-time { font-size: 12px; margin-top: 6px; }

/* ── SECTION LABELS ──────────────────────────────────────── */
.sec-label h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.see-all { font-size: 13px; font-weight: 600; }

/* ── ARTICLE ROWS - More spacing ─────────────────────────── */
.article-row { padding: 18px 0; gap: 16px; }
.row-title { font-size: 15.5px; font-weight: 700; line-height: 1.45; margin-bottom: 7px; }
.row-thumb { width: 100px; height: 70px; border-radius: 8px; }
.row-meta { font-size: 12.5px; }

/* ── SIDEBAR WIDGETS ─────────────────────────────────────── */
.widget { border-radius: 12px; border-width: 1.5px; }
.widget-head { padding: 14px 18px; }
.widget-head h3 { font-size: 13px; letter-spacing: .8px; }
.widget-body { padding: 14px 18px; }
.ti-title { font-size: 14px; font-weight: 600; line-height: 1.45; }
.ti-num { font-size: 18px; }
.ti-cat { font-size: 11px; margin-bottom: 3px; }
.trending-item { padding: 12px 0; gap: 13px; }

/* ── NEWSLETTER WIDGET ───────────────────────────────────── */
.nl-widget { padding: 22px; border-radius: 12px; }
.nl-widget h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.nl-widget p { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }

/* ── FORUM SECTION ───────────────────────────────────────── */
.forum-section { border-radius: 12px; border-width: 1.5px; }
.forum-head { padding: 16px 22px; }
.forum-head h2 { font-size: 17px; font-weight: 700; }
.forum-thread { padding: 16px 22px; gap: 14px; }
.thread-title { font-size: 15px; font-weight: 700; line-height: 1.45; }
.thread-exc { font-size: 13.5px; line-height: 1.65; margin-bottom: 8px; }
.thread-meta { font-size: 12.5px; }
.vote-count { font-size: 13px; font-weight: 800; }

/* ── MAIN LAYOUT - More gap ──────────────────────────────── */
.main-layout { gap: 40px; padding: 36px 0 72px; }

/* ── HEADER - Bigger ─────────────────────────────────────── */
.site-header { height: 66px; }
.logo-text { font-size: 23px; font-weight: 800; }

/* ── TOPBAR - Slightly taller ────────────────────────────── */
.topbar { padding: 8px 0; }

/* ── NAV - More breathing room ───────────────────────────── */
.site-nav { padding: 0; }
.nav-inner { gap: 6px; }
.nav-link { padding: 10px 14px; font-size: 13.5px; font-weight: 600; }

/* ── OPINION CARD ────────────────────────────────────────── */
.opinion-card { padding: 32px; border-radius: 12px; }
.opinion-card h3 { font-size: 22px; font-weight: 800; line-height: 1.35; margin-bottom: 12px; }
.opinion-card p { font-size: 15px; line-height: 1.75; margin-bottom: 20px; }

/* ── ABOUT WIDGET ────────────────────────────────────────── */
.about-body p { font-size: 14px; line-height: 1.7; }
.stat-num { font-size: 22px; font-weight: 800; }
.stat-lbl { font-size: 12px; }

/* ── SEARCH DROPDOWN ─────────────────────────────────────── */
#search-dropdown a { padding: 10px 16px; gap: 12px; }

/* ── SMOOTH TRANSITIONS ──────────────────────────────────── */
.article-card, .widget, .forum-section, .forum-thread, .trending-item, .latest-item, .hero-side {
  transition: background .15s, transform .2s, box-shadow .2s, border-color .15s;
}
.badge.general { background:#f1f5f9; color:#475569; }
.article-card { border-radius: 12px; border-width: 1.5px; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.article-card .card-body { padding: 20px 22px 22px; }
.article-card .card-body h3 { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.card-exc { font-size: 14.5px; line-height: 1.7; }
.card-foot { font-size: 13px; padding-top: 12px; }
.card-thumb { aspect-ratio: 16/8; }
.hero-main-content { padding: 28px 32px 32px; }
.hero-main-content h2 { font-size: 28px; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.hero-exc { font-size: 15.5px; line-height: 1.75; margin-bottom: 18px; }
.hero-visual { height: 280px; }
.hero-side { padding: 22px 24px; }
.hero-side h3 { font-size: 17px; font-weight: 700; line-height: 1.4; }
.latest-head { padding: 11px 20px; font-size: 12px; }
.latest-item { padding: 16px 20px; }
.latest-item h4 { font-size: 14px; font-weight: 600; line-height: 1.5; }
.li-cat { font-size: 11px; margin-bottom: 5px; }
.sec-label h2 { font-size: 20px; font-weight: 800; }
.article-row { padding: 18px 0; gap: 16px; }
.row-title { font-size: 15.5px; font-weight: 700; line-height: 1.45; margin-bottom: 7px; }
.row-thumb { width: 100px; height: 70px; border-radius: 8px; }
.widget { border-radius: 12px; border-width: 1.5px; }
.widget-head { padding: 14px 18px; }
.widget-head h3 { font-size: 13px; letter-spacing: .8px; }
.widget-body { padding: 14px 18px; }
.ti-title { font-size: 14px; font-weight: 600; line-height: 1.45; }
.trending-item { padding: 12px 0; gap: 13px; }
.nl-widget { padding: 22px; border-radius: 12px; }
.nl-widget h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.nl-widget p { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.forum-section { border-radius: 12px; border-width: 1.5px; }
.forum-head { padding: 16px 22px; }
.forum-head h2 { font-size: 17px; font-weight: 700; }
.forum-thread { padding: 16px 22px; gap: 14px; }
.thread-title { font-size: 15px; font-weight: 700; line-height: 1.45; }
.thread-exc { font-size: 13.5px; line-height: 1.65; margin-bottom: 8px; }
.thread-meta { font-size: 12.5px; }
.main-layout { gap: 40px; padding: 36px 0 72px; }
.site-header { height: 66px; }
.logo-text { font-size: 23px; font-weight: 800; }
.nav-link { padding: 10px 14px; font-size: 13.5px; font-weight: 600; }
.opinion-card { padding: 32px; border-radius: 12px; }
.opinion-card h3 { font-size: 22px; font-weight: 800; line-height: 1.35; margin-bottom: 12px; }
.opinion-card p { font-size: 15px; line-height: 1.75; margin-bottom: 20px; }
.about-body p { font-size: 14px; line-height: 1.7; }
.stat-num { font-size: 22px; font-weight: 800; }
.row-thumb { width: 100px; height: 70px; border-radius: 8px; }
.widget { border-radius: 12px; border-width: 1.5px; }
.widget-head { padding: 14px 18px; }
.widget-head h3 { font-size: 13px; letter-spacing: .8px; }
.widget-body { padding: 14px 18px; }
.ti-title { font-size: 14px; font-weight: 600; line-height: 1.45; }
.trending-item { padding: 12px 0; gap: 13px; }
.nl-widget { padding: 22px; border-radius: 12px; }
.nl-widget h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.nl-widget p { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.forum-section { border-radius: 12px; border-width: 1.5px; }
.forum-head { padding: 16px 22px; }
.forum-head h2 { font-size: 17px; font-weight: 700; }
.forum-thread { padding: 16px 22px; gap: 14px; }
.thread-title { font-size: 15px; font-weight: 700; line-height: 1.45; }
.thread-exc { font-size: 13.5px; line-height: 1.65; margin-bottom: 8px; }
.thread-meta { font-size: 12.5px; }
.main-layout { gap: 40px; padding: 36px 0 72px; }
.site-header { height: 66px; }
.logo-text { font-size: 23px; font-weight: 800; }
.nav-link { padding: 10px 14px; font-size: 13.5px; font-weight: 600; }
.opinion-card { padding: 32px; border-radius: 12px; }
.opinion-card h3 { font-size: 22px; font-weight: 800; line-height: 1.35; margin-bottom: 12px; }
.opinion-card p { font-size: 15px; line-height: 1.75; margin-bottom: 20px; }
.about-body p { font-size: 14px; line-height: 1.7; }
.stat-num { font-size: 22px; font-weight: 800; }
.opinion-card p { font-size: 15px; line-height: 1.75; margin-bottom: 20px; }
.about-body p { font-size: 14px; line-height: 1.7; }
.stat-num { font-size: 22px; font-weight: 800; }
body { background: #dde0f0 !important; }
:root { --bg: #dde0f0 !important; }
.article-card { background: #ffffff !important; border: none !important; box-shadow: 0 2px 16px rgba(30,34,90,.12) !important; border-radius: 14px !important; }
.article-card:hover { box-shadow: 0 8px 32px rgba(30,34,90,.18) !important; transform: translateY(-4px) !important; }
.widget { background: #ffffff !important; border: none !important; box-shadow: 0 2px 12px rgba(30,34,90,.10) !important; border-radius: 14px !important; }
.widget-head { background: #f0f2ff !important; border-bottom: 2px solid #e0e3f5 !important; }
.forum-section { background: #ffffff !important; border: none !important; box-shadow: 0 2px 12px rgba(30,34,90,.10) !important; border-radius: 14px !important; }
.forum-head { background: #f0f2ff !important; border-bottom: 2px solid #e0e3f5 !important; }
.latest-bar { background: #ffffff !important; border: none !important; box-shadow: 0 2px 12px rgba(30,34,90,.10) !important; border-radius: 14px !important; }
.hero-grid { background: #c8ccec !important; gap: 3px !important; border: none !important; box-shadow: 0 4px 24px rgba(30,34,90,.14) !important; }
.hero-main { background: #fff !important; }
.hero-side { background: #fff !important; border: none !important; }
.site-nav { background: #fff !important; border-bottom: 2px solid #d8dbef !important; box-shadow: 0 2px 8px rgba(30,34,90,.08) !important; }
.tools-strip { background: #fff !important; border: none !important; box-shadow: 0 2px 12px rgba(30,34,90,.10) !important; border-radius: 14px !important; }
.sec-label::after { background: #c8ccec !important; height: 2px !important; }
.forum-thread { border-bottom: 1px solid #eceef8 !important; }
.trending-item { border-bottom: 1px solid #eceef8 !important; }
.nl-widget { border-radius: 14px !important; }
.opinion-card { border-radius: 14px !important; }
.sb-ad { background: #fff !important; border: none !important; box-shadow: 0 2px 8px rgba(30,34,90,.08) !important; border-radius: 14px !important; }
[data-theme="dark"] body { background: #080d1a !important; }
[data-theme="dark"] .article-card { background: #0e1525 !important; box-shadow: 0 2px 16px rgba(0,0,0,.4) !important; }
[data-theme="dark"] .widget { background: #0e1525 !important; box-shadow: 0 2px 12px rgba(0,0,0,.3) !important; }
[data-theme="dark"] .forum-section { background: #0e1525 !important; box-shadow: 0 2px 12px rgba(0,0,0,.3) !important; }
[data-theme="dark"] .latest-bar { background: #0e1525 !important; box-shadow: 0 2px 12px rgba(0,0,0,.3) !important; }
[data-theme="dark"] .hero-grid { background: #060c18 !important; }
[data-theme="dark"] .hero-main { background: #0e1525 !important; }
[data-theme="dark"] .hero-side { background: #0e1525 !important; }
[data-theme="dark"] .site-nav { background: #0e1525 !important; border-color: #1c2440 !important; }
[data-theme="dark"] .tools-strip { background: #0e1525 !important; box-shadow: 0 2px 12px rgba(0,0,0,.3) !important; }
.site-nav { background: var(--navy) !important; border-bottom: none !important; box-shadow: 0 2px 8px rgba(0,0,0,.2) !important; }
.nav-link { color: rgba(255,255,255,.7) !important; }
.nav-link:hover { color: #fff !important; background: rgba(255,255,255,.08) !important; }
.nav-link.active { color: #fff !important; background: rgba(255,255,255,.12) !important; }
.cat-btn { color: rgba(255,255,255,.7) !important; }
.cat-btn:hover, .cat-btn.active { color: #fff !important; }

/* ── NOTIFICATIONS ───────────────────────────────────────── */
.notif-wrap { position: relative; display: flex; align-items: center; }
.notif-bell { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); cursor: pointer; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.75); position: relative; transition: all .2s; }
.notif-bell:hover { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 99px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--navy); padding: 0 3px; }
.notif-dropdown { position: absolute; top: calc(100% + 12px); right: -8px; width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.18); z-index: 500; overflow: hidden; animation: fadeUp .18s ease; }
.notif-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); }
.notif-head h3 { font-size: 14px; font-weight: 700; color: var(--ink); }
.notif-head button { font-size: 12px; color: var(--accent); background: none; border: none; cursor: pointer; font-weight: 500; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; align-items: flex-start; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--accent-pale); }
.notif-item.unread:hover { background: var(--accent-pale); filter: brightness(.97); }
.notif-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; color: #fff; font-weight: 700; }
.notif-msg { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.notif-time { font-size: 11.5px; color: var(--subtle); margin-top: 4px; font-family: var(--ff-mono); }
.notif-empty { padding: 40px 18px; text-align: center; color: var(--muted); font-size: 14px; }
.notif-empty svg { margin: 0 auto 12px; display: block; opacity: .4; }

/* ── NOTIFICATION FIX ────────────────────────────────────── */
.notif-wrap { position: relative; display: flex !important; align-items: center; background: none !important; border: none !important; padding: 0 !important; }
.notif-bell { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.15) !important; background: rgba(255,255,255,.06) !important; cursor: pointer; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.8) !important; position: relative; transition: all .2s; padding: 0 !important; }
.notif-bell:hover { background: rgba(255,255,255,.16) !important; color: #fff !important; }
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; border-radius: 99px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; display: flex !important; align-items: center; justify-content: center; border: 2px solid var(--navy); padding: 0 3px; line-height: 1; }
.notif-dropdown { position: absolute; top: calc(100% + 10px); right: -8px; width: 340px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.16); z-index: 9999; overflow: hidden; }
.notif-head { padding: 14px 18px; border-bottom: 1.5px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); }
.notif-head h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0; }
.notif-head button { font-size: 12px; color: var(--accent); background: none; border: none; cursor: pointer; font-weight: 600; padding: 4px 8px; border-radius: 4px; }
.notif-head button:hover { background: var(--accent-pale); }
.notif-list { max-height: 400px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; align-items: flex-start; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: #f0f0ff; }
[data-theme="dark"] .notif-item.unread { background: #1a1840; }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-text { flex: 1; min-width: 0; }
.notif-msg { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--subtle); margin-top: 3px; }
.notif-empty { padding: 36px 18px; text-align: center; color: var(--muted); }
.notif-empty div:last-child { font-size: 12px; color: var(--subtle); margin-top: 4px; }

/* ── HEADER ACTION BUTTONS FIX ───────────────────────────── */
.header-actions { gap: 10px !important; align-items: center; }

/* Theme toggle - clean circle */
.theme-toggle {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255,255,255,.15) !important;
  background: rgba(255,255,255,.06) !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 17px !important;
  color: rgba(255,255,255,.8) !important;
  transition: all .2s !important;
  padding: 0 !important;
  line-height: 1 !important;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: rgba(255,255,255,.16) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.3) !important;
  transform: scale(1.08);
}

/* Notification bell - consistent with theme toggle */
.notif-bell {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255,255,255,.15) !important;
  background: rgba(255,255,255,.06) !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: rgba(255,255,255,.8) !important;
  transition: all .2s !important;
  padding: 0 !important;
  flex-shrink: 0;
}
.notif-bell:hover {
  background: rgba(255,255,255,.16) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.3) !important;
  transform: scale(1.08);
}

/* User button consistent spacing */
.user-btn { margin-left: 2px; }
.btn-subscribe { margin-left: 2px; }

/* Spacing between header elements */
#theme-toggle-btn { margin-right: 2px; }

/* ── DARK MODE BETTER COLORS ─────────────────────────────── */
[data-theme="dark"] {
  --bg:         #1a1d2e !important;
  --surface:    #242638 !important;
  --surface-2:  #2d3050 !important;
  --line:       #363952 !important;
  --ink:        #e8ecff !important;
  --ink-2:      #c0c8f0 !important;
  --ink-3:      #8890c0 !important;
  --muted:      #6070a0 !important;
  --subtle:     #404870 !important;
  --navy:       #141626 !important;
}

[data-theme="dark"] body { background: #1a1d2e !important; }
[data-theme="dark"] .article-card { background: #242638 !important; }
[data-theme="dark"] .widget { background: #242638 !important; }
[data-theme="dark"] .forum-section { background: #242638 !important; }
[data-theme="dark"] .latest-bar { background: #242638 !important; }
[data-theme="dark"] .hero-main { background: #242638 !important; }
[data-theme="dark"] .hero-side { background: #242638 !important; }
[data-theme="dark"] .hero-grid { background: #141626 !important; }
[data-theme="dark"] .widget-head { background: #2d3050 !important; border-color: #363952 !important; }
[data-theme="dark"] .forum-head { background: #2d3050 !important; border-color: #363952 !important; }
[data-theme="dark"] .site-nav { background: #141626 !important; border-color: #363952 !important; }
[data-theme="dark"] .tools-strip { background: #242638 !important; }
[data-theme="dark"] .tool-item { border-color: #363952 !important; }
[data-theme="dark"] .tool-item:hover { background: #2d3050 !important; }
[data-theme="dark"] .forum-thread { border-color: #363952 !important; }
[data-theme="dark"] .forum-thread:hover { background: #2d3050 !important; }
[data-theme="dark"] .latest-item:hover { background: #2d3050 !important; }
[data-theme="dark"] .latest-item { border-color: #363952 !important; }
[data-theme="dark"] .trending-item { border-color: #363952 !important; }
[data-theme="dark"] .about-stat { background: #2d3050 !important; }
[data-theme="dark"] .tag-pill { background: #2d3050 !important; border-color: #363952 !important; }
[data-theme="dark"] .form-input { background: #2d3050 !important; border-color: #363952 !important; }
[data-theme="dark"] .auth-modal { background: #242638 !important; }
[data-theme="dark"] .notif-dropdown { background: #242638 !important; border-color: #363952 !important; }
[data-theme="dark"] .notif-head { background: #2d3050 !important; border-color: #363952 !important; }
[data-theme="dark"] .notif-item { border-color: #363952 !important; }
[data-theme="dark"] .notif-item:hover { background: #2d3050 !important; }
[data-theme="dark"] .notif-item.unread { background: #1e1b4b !important; }
[data-theme="dark"] .article-card:hover { background: #2d3050 !important; }
[data-theme="dark"] .hero-side:hover { background: #2d3050 !important; }
[data-theme="dark"] #search-dropdown { background: #242638 !important; border-color: #363952 !important; }
[data-theme="dark"] .profile-card { background: #242638 !important; border-color: #363952 !important; }
[data-theme="dark"] .edit-form { background: #242638 !important; border-color: #363952 !important; }

/* ── DARK MODE CONTRAST FIX ──────────────────────────────── */
[data-theme="dark"] {
  --bg:         #12141f !important;
  --surface:    #1e2035 !important;
  --surface-2:  #272a42 !important;
  --line:       #2e3252 !important;
}
[data-theme="dark"] body { background: #12141f !important; }
[data-theme="dark"] .article-card { background: #1e2035 !important; box-shadow: 0 2px 16px rgba(0,0,0,.35) !important; border: 1px solid #2e3252 !important; }
[data-theme="dark"] .article-card:hover { background: #272a42 !important; box-shadow: 0 8px 28px rgba(0,0,0,.45) !important; }
[data-theme="dark"] .widget { background: #1e2035 !important; border: 1px solid #2e3252 !important; box-shadow: 0 2px 12px rgba(0,0,0,.3) !important; }
[data-theme="dark"] .forum-section { background: #1e2035 !important; border: 1px solid #2e3252 !important; }
[data-theme="dark"] .latest-bar { background: #1e2035 !important; border: 1px solid #2e3252 !important; }
[data-theme="dark"] .tools-strip { background: #1e2035 !important; border: 1px solid #2e3252 !important; }
[data-theme="dark"] .hero-main { background: #1e2035 !important; }
[data-theme="dark"] .hero-side { background: #1e2035 !important; }
[data-theme="dark"] .hero-grid { background: #0c0e18 !important; gap: 3px !important; }
[data-theme="dark"] .widget-head { background: #272a42 !important; border-color: #2e3252 !important; }
[data-theme="dark"] .forum-head { background: #272a42 !important; border-color: #2e3252 !important; }
[data-theme="dark"] .forum-thread:hover { background: #272a42 !important; }
[data-theme="dark"] .latest-item:hover { background: #272a42 !important; }
[data-theme="dark"] .tool-item:hover { background: #272a42 !important; }
[data-theme="dark"] .hero-side:hover { background: #272a42 !important; }
[data-theme="dark"] .sb-ad { background: #1e2035 !important; border: 1px solid #2e3252 !important; }
[data-theme="dark"] .nl-widget { background: #1a1c30 !important; border: 1px solid #2e3252 !important; }
[data-theme="dark"] .opinion-card { background: #0c0e18 !important; }

/* ══════════════════════════════════════════════════════════
   ICON & DESIGN SYSTEM v2
   ══════════════════════════════════════════════════════════ */
.hero-visual { background: linear-gradient(135deg,#060b18 0%,#0d1a35 40%,#0a0620 100%) !important; }
.live-dot { width:8px !important; height:8px !important; box-shadow:0 0 6px rgba(255,255,255,0.8); }
.forum-head h2::before { content:'💬  '; }
.nl-widget h3::before { content:'✉  '; }
.op-label::before { content:'💡  '; }
.tool-icon { font-size:28px !important; }
.profile-avatar { box-shadow:0 4px 20px rgba(124,58,237,0.3); }
#reading-progress { height:3px !important; background:linear-gradient(90deg,#3b82f6,#7c3aed,#ec4899) !important; box-shadow:0 0 8px rgba(124,58,237,0.5); }
.article-card:hover { box-shadow:0 12px 40px rgba(108,70,220,0.15),0 4px 12px rgba(0,0,0,0.1) !important; }
.btn-primary { box-shadow:0 2px 10px rgba(124,58,237,0.3) !important; }
.btn-primary:hover { box-shadow:0 4px 16px rgba(124,58,237,0.4) !important; transform:translateY(-1px); }
.nav-link { border-radius:8px !important; font-weight:600 !important; }
.nav-link.active { background:rgba(124,58,237,0.15) !important; color:var(--accent) !important; }
.nav-link:hover { background:rgba(0,0,0,0.05) !important; }
[data-theme="dark"] .nav-link:hover { background:rgba(255,255,255,0.06) !important; }
[data-theme="dark"] .nav-link.active { background:rgba(124,58,237,0.2) !important; color:#a78bfa !important; }
.thumb-grad { background:linear-gradient(135deg,#060b18 0%,#1a1035 60%,#0e0624 100%) !important; }
.row-grad { background:linear-gradient(135deg,#060b18 0%,#1a1035 100%) !important; }
.site-footer { border-top:3px solid transparent; border-image:linear-gradient(90deg,#3b82f6,#7c3aed,#ec4899) 1; }
#search-dropdown { border-radius:14px !important; box-shadow:0 16px 48px rgba(0,0,0,0.18) !important; }
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--line); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--muted); }

/* ── NAV LINK ICONS ──────────────────────────────────────── */
.nav-link { display: inline-flex; align-items: center; gap: 5px; }
.nav-link svg { flex-shrink: 0; opacity: 0.8; }
.nav-link.active svg { opacity: 1; }
.nav-link:hover svg { opacity: 1; }

/* ── WIDGET HEAD ICONS ───────────────────────────────────── */
.widget-head h3 { display: flex; align-items: center; }
.widget-head h3 svg { flex-shrink: 0; opacity: 0.7; }

/* ── FOOTER UPGRADE ──────────────────────────────────────── */
.social-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.65); transition: all .2s; text-decoration: none;
}
.social-btn:hover {
  background: rgba(255,255,255,.15);
  color: #fff; border-color: rgba(255,255,255,.3);
  transform: translateY(-2px);
}
.footer-social { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.footer-newsletter { margin-top: 20px; }
.footer-nl-label { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.footer-nl-form { display: flex; gap: 6px; }
.footer-nl-input { flex: 1; padding: 9px 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-sm); color: #fff; font-size: 13px; font-family: var(--ff-body); min-width: 0; }
.footer-nl-input::placeholder { color: rgba(255,255,255,.3); }
.footer-nl-input:focus { outline: none; border-color: rgba(124,58,237,.5); }
.footer-nl-btn { padding: 9px 16px; background: var(--grad); border: none; border-radius: var(--r-sm); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: var(--ff-body); }
.footer-nl-btn:hover { opacity: .88; }
.footer-col h4 { display: flex; align-items: center; gap: 6px; }
.footer-col h4::before { content: ''; display: inline-block; width: 3px; height: 14px; background: var(--grad); border-radius: 2px; }

/* ── SOCIAL BUTTONS BRAND COLORS ─────────────────────────── */
.social-btn.social-x:hover { background: #000 !important; border-color: #000 !important; color: #fff !important; }
.social-btn.social-ig:hover { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888) !important; border-color: transparent !important; color: #fff !important; }
.social-btn { font-size: 0; } /* hide any text */
.social-btn svg { flex-shrink: 0; }

/* ── SOCIAL BTN FIX ──────────────────────────────────────── */
.social-btn { font-size: 1px !important; color: transparent !important; }
.social-btn svg { color: rgba(255,255,255,.7) !important; fill: rgba(255,255,255,.7) !important; }
.social-btn:hover svg { color: #fff !important; fill: #fff !important; }
.social-btn.social-x:hover { background: #000 !important; border-color: #000 !important; }
.social-btn.social-ig:hover { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888) !important; border-color: transparent !important; }

/* ── MOBILE FIXES ────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Show search on mobile */
  .header-search {
    display: flex !important;
    max-width: 100% !important;
    order: 3;
    flex: 1 1 100%;
    margin: 0 !important;
  }
  .header-search input {
    width: 100% !important;
  }

  /* Header layout on mobile */
  .site-header .container {
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 10px 16px !important;
    height: auto !important;
  }
  .site-header {
    height: auto !important;
  }
  .logo-wrap { flex-shrink: 0; }
  .header-actions { margin-left: auto; flex-shrink: 0; }

  /* Bigger cards on mobile */
  .article-card .card-body { padding: 16px 18px 18px !important; }
  .article-card .card-body h3 { font-size: 17px !important; }
  .card-exc { font-size: 14px !important; }
  .card-thumb { aspect-ratio: 16/9 !important; }

  /* Hero on mobile */
  .hero-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }
  .hero-main { grid-row: auto !important; }
  .hero-visual { height: 200px !important; }
  .hero-main-content { padding: 18px 20px 20px !important; }
  .hero-main-content h2 { font-size: 22px !important; }

  /* Latest bar on mobile */
  .latest-items {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Article grid - single column */
  .article-grid { grid-template-columns: 1fr !important; }

  /* Hide sidebar on mobile */
  .sidebar { display: none !important; }
  .main-layout {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 20px 0 48px !important;
  }

  /* Container padding on mobile */
  .container { padding: 0 16px !important; }

  /* Nav on mobile - horizontal scroll */
  .nav-inner {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding: 4px 16px !important;
    scrollbar-width: none !important;
    gap: 4px !important;
  }
  .nav-inner::-webkit-scrollbar { display: none !important; }
  .nav-link {
    white-space: nowrap !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
  }

  /* Forum on mobile */
  .forum-thread { padding: 12px 16px !important; }
  .thread-title { font-size: 14px !important; }

  /* Article rows */
  .row-thumb { width: 80px !important; height: 56px !important; }
  .row-title { font-size: 14px !important; }

  /* Footer on mobile */
  .footer-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .footer-nl-form { flex-direction: column !important; }
  .footer-nl-btn { width: 100% !important; }

  /* Profile on mobile */
  .profile-card { padding: 0 16px 16px !important; }
  .profile-tabs { padding: 0 16px !important; }
  .tab-content { padding: 0 16px !important; }
  .edit-grid { grid-template-columns: 1fr !important; }

  /* Auth modal on mobile */
  .auth-modal { width: 95vw !important; padding: 20px !important; }

  /* Share buttons on mobile */
  .share-bar { gap: 8px !important; padding: 14px 16px !important; }
  .share-btn { padding: 8px 12px !important; font-size: 12px !important; }

  /* Notification dropdown on mobile */
  .notif-dropdown { width: 300px !important; right: -60px !important; }
}

@media (max-width: 480px) {
  .hero-main-content h2 { font-size: 19px !important; }
  .latest-items { grid-template-columns: 1fr !important; }
  .share-btn span { display: none !important; }
  .stat-row, .value-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ── MOBILE HEADER SPACING FIX ───────────────────────────── */
@media (max-width: 768px) {
  .site-header .container {
    padding: 12px 16px !important;
    gap: 12px !important;
  }
  .header-search {
    padding: 8px 0 !important;
  }
  .header-search input {
    padding: 10px 16px 10px 38px !important;
    font-size: 14px !important;
  }
  .logo-img { height: 32px !important; }
  .logo-text { font-size: 20px !important; }
}

/* ── PROFILE ACTIONS STATS ───────────────────────────────── */
#profile-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
#profile-actions > div:first-child strong { 
  font-size: 18px !important; 
  font-weight: 800 !important;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── PROFILE ACTIONS FIX ─────────────────────────────────── */
#profile-actions {
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  padding-top: 8px !important;
}
.profile-top-row {
  align-items: flex-end !important;
  margin-bottom: 16px !important;
}

/* ── COMMENT REACTIONS ───────────────────────────────────── */
.comment-reactions { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.reaction-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-size: 13px; cursor: pointer; transition: all .15s; color: var(--ink-3); font-family: var(--ff-body); }
.reaction-btn:hover { border-color: var(--accent); background: var(--accent-pale); transform: scale(1.05); }
.reaction-btn.active { border-color: var(--accent); background: var(--accent-pale); color: var(--accent); }
.r-count { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 8px; }
.reaction-btn.active .r-count { color: var(--accent); }

/* ── THREAD REPLY BOX FIX ────────────────────────────────── */
.reply-form textarea,
.comment-textarea,
#reply-content,
textarea.form-input {
  min-height: 120px !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  resize: vertical !important;
}
.reply-form {
  background: var(--surface) !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 14px !important;
  padding: 20px !important;
  margin-top: 20px !important;
}
.reply-form .form-group { margin-bottom: 12px !important; }

/* ── COMMENT REACTIONS v2 ────────────────────────────────── */
.comment-reactions {
  display: flex !important;
  gap: 6px !important;
  margin: 8px 0 !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}
.reaction-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 5px 12px !important;
  border-radius: 99px !important;
  border: 1.5px solid var(--line) !important;
  background: var(--surface) !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all .15s !important;
  color: var(--ink-3) !important;
  font-family: var(--ff-body) !important;
  min-width: auto !important;
  width: auto !important;
  height: 32px !important;
  white-space: nowrap !important;
}
.reaction-btn:hover {
  border-color: var(--accent) !important;
  background: var(--accent-pale) !important;
  transform: translateY(-1px) scale(1.05) !important;
}
.reaction-btn.active {
  border-color: var(--accent) !important;
  background: var(--accent-pale) !important;
  color: var(--accent) !important;
}
.r-emoji { font-size: 15px; line-height: 1; }
.r-count {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--muted) !important;
  min-width: 0 !important;
}
.r-count:empty { display: none !important; }
.reaction-btn.active .r-count { color: var(--accent) !important; }

/* ── COMMENT REPLIES ─────────────────────────────────────── */
.comment-reply-btn { display:inline-flex; align-items:center; gap:5px; background:none; border:none; font-size:12.5px; color:var(--muted); cursor:pointer; padding:4px 8px; border-radius:6px; font-family:var(--ff-body); transition:all .15s; }
.comment-reply-btn:hover { color:var(--accent); background:var(--accent-pale); }
.comment-replies { margin-left:48px; margin-top:8px; border-left:2px solid var(--line); padding-left:16px; }
.reply-form-inline { background:var(--surface-2); border:1.5px solid var(--line); border-radius:12px; padding:14px; margin-bottom:12px; }
.reply-form-header { display:flex; align-items:center; gap:8px; margin-bottom:8px; font-size:13px; color:var(--muted); }
.reply-textarea { width:100%; min-height:80px; padding:10px 14px; border:1.5px solid var(--line); border-radius:10px; font-size:14px; font-family:var(--ff-body); resize:vertical; background:var(--surface); color:var(--ink); margin:8px 0; display:block; }
.reply-textarea:focus { outline:none; border-color:var(--accent); }

/* ── COMMENT REPLY THREAD LINE FIX ──────────────────────── */
.comment-replies {
  margin-left: 44px !important;
  margin-top: 12px !important;
  padding-left: 20px !important;
  border-left: 2px solid var(--line) !important;
  position: relative;
}

/* Connector dot */
.comment-replies::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}

/* ── COMMENT TEXTAREA DARK MODE FIX ─────────────────────── */
.comment-textarea,
.reply-textarea,
#comment-text {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

.comment-textarea:focus,
.reply-textarea:focus,
#comment-text:focus {
  border-color: var(--accent) !important;
  outline: none !important;
}

[data-theme="dark"] .comment-textarea,
[data-theme="dark"] .reply-textarea,
[data-theme="dark"] #comment-text {
  background: var(--surface-2) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

[data-theme="dark"] .reply-form-inline {
  background: var(--surface) !important;
  border-color: var(--line) !important;
}

[data-theme="dark"] .comment-item {
  border-color: var(--line) !important;
}

/* === Comment Sort Dropdown (v30) === */
#comment-sort {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--ff-body);
  transition: border-color .15s;
}
#comment-sort:hover, #comment-sort:focus {
  border-color: var(--accent);
  outline: none;
}
[data-theme="dark"] #comment-sort {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}

/* === Reputation Badge (v30) === */
.rep-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(124,58,237,0.12));
  border: 1px solid rgba(124,58,237,0.25);
  color: #7c3aed;
  font-family: var(--ff-body);
  white-space: nowrap;
}
[data-theme="dark"] .rep-badge {
  background: rgba(124,58,237,0.18);
  border-color: rgba(124,58,237,0.35);
  color: #a78bfa;
}

/* Rep stat on profile */
.stat-rep-value {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* Rep shown in comments */
.comment-rep {
  font-size: 11px;
  font-weight: 600;
  color: #7c3aed;
  background: rgba(124,58,237,0.08);
  padding: 1px 6px;
  border-radius: 99px;
  margin-left: 4px;
}
[data-theme="dark"] .comment-rep {
  color: #a78bfa;
  background: rgba(124,58,237,0.15);
}

/* === Rep Badge Premium Override (v30) === */
.rep-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  font-family: var(--ff-body);
  white-space: nowrap;
}

.comment-rep {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #64748b, #94a3b8);
  color: #fff !important;
  margin-left: 5px;
  vertical-align: middle;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* === Role Badge Dark Mode (v30) === */
[data-theme="dark"] .role-admin {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #f59e0b;
  border-color: rgba(245,158,11,0.3);
}
[data-theme="dark"] .role-moderator {
  background: linear-gradient(135deg, #1e3a5f, #1e40af);
  color: #93c5fd;
  border-color: rgba(147,197,253,0.3);
}
[data-theme="dark"] .role-member {
  background: var(--surface-2);
  color: var(--ink-3);
  border-color: var(--line);
}

/* === Profile Badges (v30) === */
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0 4px;
}
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: default;
  transition: all .2s;
  position: relative;
}
.profile-badge:hover {
  border-color: var(--badge-color, var(--accent));
  background: color-mix(in srgb, var(--badge-color, var(--accent)) 8%, transparent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.profile-badge-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.profile-badge-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}
[data-theme="dark"] .profile-badge {
  background: var(--surface-2);
}

/* === @Mention Autocomplete (v30) === */
.mention-dropdown {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 999;
  min-width: 220px;
  overflow: hidden;
  margin-top: 2px;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .1s;
}
.mention-item:hover {
  background: var(--accent-pale);
}
.mention-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.mention-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
[data-theme="dark"] .mention-dropdown {
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Make comment form relatively positioned for dropdown */
.comment-form-wrap {
  position: relative;
}
