/* ModsParadise light/dark mode add-on */
.theme-settings-panel{max-width:1200px;}
.theme-settings-row{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;}
.theme-settings-row h2{margin:0 0 6px;}
.theme-toggle-btn{display:inline-flex;align-items:center;gap:10px;border:1px solid var(--line);background:var(--card);color:var(--text);border-radius:999px;padding:10px 14px;font-weight:800;cursor:pointer;box-shadow:0 1px 3px rgba(15,23,42,.08);white-space:nowrap;}
.theme-toggle-btn:hover{border-color:var(--accent);}
.theme-icon{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:999px;font-size:16px;line-height:1;background:#f3f4f6;color:#111827;}
.theme-icon-moon{display:none;}

html.mp-dark{--bg:#0f172a;--card:#111827;--line:#263244;--text:#f8fafc;--muted:#a8b3c7;--accent:#6366f1;--accent2:#60a5fa;--danger:#ef4444;--ok:#22c55e;}
html.mp-dark body{background:var(--bg);color:var(--text);}
html.mp-dark .topbar,
html.mp-dark .footer,
html.mp-dark .hero,
html.mp-dark .panel,
html.mp-dark .file-card,
html.mp-dark .cat,
html.mp-dark .table,
html.mp-dark .server-card,
html.mp-dark .server-modal-box,
html.mp-dark .mp-account-menu>summary,
html.mp-dark .mp-account-panel,
html.mp-dark .mp-account-head,
html.mp-dark .user-menu-button,
html.mp-dark .user-menu-panel,
html.mp-dark .empty-state,
html.mp-dark .theme-toggle-btn{background:var(--card)!important;border-color:var(--line)!important;color:var(--text)!important;}
html.mp-dark .drop-menu{background:var(--card)!important;border-color:var(--line)!important;box-shadow:0 18px 40px rgba(0,0,0,.35)!important;}
html.mp-dark .topbar nav>a,
html.mp-dark .drop>button,
html.mp-dark .mp-account-panel>a,
html.mp-dark .user-menu-panel>a,
html.mp-dark .file-meta,
html.mp-dark .profile-bio p{color:#dbe4f0!important;}
html.mp-dark .topbar nav>a:hover,
html.mp-dark .drop>button:hover,
html.mp-dark .author-link,
html.mp-dark .profile-socials a{color:var(--accent2)!important;}
html.mp-dark .input,
html.mp-dark input,
html.mp-dark select,
html.mp-dark textarea{background:#0b1220!important;border-color:var(--line)!important;color:var(--text)!important;}
html.mp-dark input::placeholder,
html.mp-dark textarea::placeholder{color:#7f8ca3!important;}
html.mp-dark .btn.ghost,
html.mp-dark button.btn.ghost{background:#0b1220!important;color:var(--text)!important;border-color:var(--line)!important;}
html.mp-dark .thumb,
html.mp-dark .server-thumb,
html.mp-dark .profile-stats div,
html.mp-dark .profile-socials a,
html.mp-dark .drop-menu a:hover,
html.mp-dark .settings-tabs a:hover,
html.mp-dark .settings-tabs a.active,
html.mp-dark .user-menu-panel>a:hover,
html.mp-dark .mp-account-panel>a:hover{background:#172033!important;}
html.mp-dark .notice{background:#2a1a0b!important;border-color:#92400e!important;color:#fed7aa!important;}
html.mp-dark .alert.ok{background:#052e1b!important;color:#bbf7d0!important;border-color:#166534!important;}
html.mp-dark .alert.err{background:#3b0a0a!important;color:#fecaca!important;border-color:#991b1b!important;}
html.mp-dark .table th,
html.mp-dark .table td{border-color:var(--line)!important;}
html.mp-dark .muted{color:var(--muted)!important;}
html.mp-dark .theme-icon-sun{display:none;}
html.mp-dark .theme-icon-moon{display:inline-grid;background:#1e293b;color:#f8fafc;}
html.mp-dark img{color-scheme:dark;}

/* Dark mode: account dropdown visibility fix */
html.mp-dark .mp-account-panel{
  background:#111827!important;
  border-color:#263244!important;
  color:#f8fafc!important;
  box-shadow:0 18px 40px rgba(0,0,0,.42)!important;
  overflow:hidden;
}
html.mp-dark .mp-account-panel .mp-account-head{
  background:#111827!important;
  border-color:#263244!important;
  color:#f8fafc!important;
}
html.mp-dark .mp-account-panel .mp-account-head strong{color:#f8fafc!important;}
html.mp-dark .mp-account-panel .mp-account-head span,
html.mp-dark .mp-account-panel .mp-account-head div span{color:#a8b3c7!important;}
html.mp-dark .mp-account-panel>a,
html.mp-dark .mp-account-panel>a:visited{
  background:#111827!important;
  color:#e5eefc!important;
  border-color:#263244!important;
}
html.mp-dark .mp-account-panel>a:hover{background:#172033!important;color:#ffffff!important;}
html.mp-dark .mp-account-menu>summary{background:#111827!important;border-color:#263244!important;color:#f8fafc!important;}
html.mp-dark .mp-account-name,
html.mp-dark .mp-account-chevron{color:#f8fafc!important;}

/* Dark mode: keep usernames/authors readable on cards, media and post listings */
html.mp-dark .author-link,
html.mp-dark a.author-link,
html.mp-dark .account-link,
html.mp-dark a.account-link,
html.mp-dark .file-card .file-meta a,
html.mp-dark .file-card .file-meta strong,
html.mp-dark .file-card .file-meta b,
html.mp-dark .file-card a[href*="profile"],
html.mp-dark .file-card a[href*="user"],
html.mp-dark .media-card a[href*="profile"],
html.mp-dark .media-card a[href*="user"],
html.mp-dark .server-card a[href*="profile"],
html.mp-dark .server-card a[href*="user"],
html.mp-dark .mod-card a[href*="profile"],
html.mp-dark .mod-card a[href*="user"],
html.mp-dark .post-author,
html.mp-dark .post-author a,
html.mp-dark .byline a,
html.mp-dark .byline strong,
html.mp-dark .file-by a,
html.mp-dark .file-by strong{
  color:#ffffff!important;
}
html.mp-dark .file-card .file-meta,
html.mp-dark .file-card .file-meta span,
html.mp-dark .file-card .file-meta small{color:#dbe4f0!important;}


/* Dark mode: latest file card author names */
.card-author-name{font-weight:900;text-decoration:none;color:#111827;}
html.mp-dark .card-author-name,
html.mp-dark a.card-author-name,
html.mp-dark .file-card .card-author-name,
html.mp-dark .file-card .muted .card-author-name{
  color:#ffffff!important;
}

/* Dark mode: force ALL author/user links inside file cards to stay readable */
html.mp-dark .file-card .muted a,
html.mp-dark .file-card .muted a:visited,
html.mp-dark .file-card .muted strong,
html.mp-dark .file-card .muted b,
html.mp-dark .file-card .file-body .muted a,
html.mp-dark .file-card .file-body .muted a:visited,
html.mp-dark .file-card .file-body .muted strong,
html.mp-dark .file-card .file-body .muted b,
html.mp-dark .file-card .file-body a[href^="/profile"],
html.mp-dark .file-card .file-body a[href*="profile.php"],
html.mp-dark .file-card .file-body a[href*="/user"],
html.mp-dark .file-card .file-body a[href*="user.php"]{
  color:#ffffff!important;
}

/* Dark mode: category dropdown/card icons must stay visible */
html.mp-dark .drop-menu i,
html.mp-dark .drop-menu svg,
html.mp-dark .drop-menu .cat-icon,
html.mp-dark .category-icon,
html.mp-dark .cat i,
html.mp-dark .cat svg,
html.mp-dark .cat .cat-icon,
html.mp-dark .category-card i,
html.mp-dark .category-card svg,
html.mp-dark .category-card .cat-icon{
  color:#ffffff!important;
  fill:#ffffff!important;
  stroke:#ffffff!important;
}
html.mp-dark .drop-menu svg *,
html.mp-dark .cat svg *,
html.mp-dark .category-card svg *{
  color:#ffffff!important;
  fill:#ffffff!important;
  stroke:#ffffff!important;
}

/* Dark mode: server and mod shop promotion descriptions */
html.mp-dark .server-card .server-desc,
html.mp-dark .server-card .server-description,
html.mp-dark .server-card .description,
html.mp-dark .server-card .desc,
html.mp-dark .server-card p,
html.mp-dark .mod-shop-card .server-desc,
html.mp-dark .mod-shop-card .server-description,
html.mp-dark .mod-shop-card .description,
html.mp-dark .mod-shop-card .desc,
html.mp-dark .mod-shop-card p,
html.mp-dark .shop-card .server-desc,
html.mp-dark .shop-card .server-description,
html.mp-dark .shop-card .description,
html.mp-dark .shop-card .desc,
html.mp-dark .shop-card p,
html.mp-dark .promotion-card .server-desc,
html.mp-dark .promotion-card .server-description,
html.mp-dark .promotion-card .description,
html.mp-dark .promotion-card .desc,
html.mp-dark .promotion-card p{
  color:#ffffff!important;
}

/* Dark mode: server and mod shop promotion names/titles */
html.mp-dark .server-card h1,
html.mp-dark .server-card h2,
html.mp-dark .server-card h3,
html.mp-dark .server-card h4,
html.mp-dark .server-card .server-title,
html.mp-dark .server-card .server-name,
html.mp-dark .server-card .card-title,
html.mp-dark .server-card .title,
html.mp-dark .mod-shop-card h1,
html.mp-dark .mod-shop-card h2,
html.mp-dark .mod-shop-card h3,
html.mp-dark .mod-shop-card h4,
html.mp-dark .mod-shop-card .server-title,
html.mp-dark .mod-shop-card .server-name,
html.mp-dark .mod-shop-card .shop-title,
html.mp-dark .mod-shop-card .shop-name,
html.mp-dark .mod-shop-card .card-title,
html.mp-dark .mod-shop-card .title,
html.mp-dark .shop-card h1,
html.mp-dark .shop-card h2,
html.mp-dark .shop-card h3,
html.mp-dark .shop-card h4,
html.mp-dark .shop-card .server-title,
html.mp-dark .shop-card .server-name,
html.mp-dark .shop-card .shop-title,
html.mp-dark .shop-card .shop-name,
html.mp-dark .shop-card .card-title,
html.mp-dark .shop-card .title,
html.mp-dark .promotion-card h1,
html.mp-dark .promotion-card h2,
html.mp-dark .promotion-card h3,
html.mp-dark .promotion-card h4,
html.mp-dark .promotion-card .server-title,
html.mp-dark .promotion-card .server-name,
html.mp-dark .promotion-card .shop-title,
html.mp-dark .promotion-card .shop-name,
html.mp-dark .promotion-card .card-title,
html.mp-dark .promotion-card .title {
  color: #ffffff !important;
}

/* Dark mode: posted-by usernames on server and mod shop cards */
.server-meta .posted-by-name,
.server-meta .username-link {
  font-weight:900!important;
  text-decoration:none!important;
}
html.mp-dark .server-meta .posted-by-name,
html.mp-dark .server-meta .username-link,
html.mp-dark .server-card .server-meta a.username-link,
html.mp-dark .mod-shop-card .server-meta a.username-link,
html.mp-dark .shop-card .server-meta a.username-link,
html.mp-dark .promotion-card .server-meta a.username-link {
  color:#ffffff!important;
}
html:not(.mp-dark) .server-meta .posted-by-name,
html:not(.mp-dark) .server-meta .username-link {
  color:#111827!important;
}

/* Dark mode: keep Staff Dashboard stat pill text readable */
html.mp-dark .staff-stats a,
html.mp-dark .staff-stats a:visited,
html.mp-dark .staff-stats a strong {
  color: #111827 !important;
}

html.mp-dark .staff-stats a {
  background: #ffffff !important;
  border-color: #d1d5db !important;
}
