/* =====================================================================
   FORMALITY RS — global.css
   Invision Community (IPS) style pass over the existing MyBB theme.

   WHAT STAYED THE SAME:
     • Your entire colour palette (all --electric-blue / --deep-blue etc.)
     • Your images (backgroundblack1.png, fmdivider.png, banner, clan logo)
     • Your fonts (Oswald / Inter / Space Grotesk)
     • Every custom template class you built (.forum_row, .post_author, ...)

   WHAT CHANGED (to read as Invision, not a neon gamer template):
     • Card radius 12px -> 6px, flat single shadow instead of glow-shadows
     • Buttons are flat solid fills (no gradient shimmer / skew sweep)
     • Quiet hovers + a clean accent read-marker instead of glowing borders
     • Removed scattered animation: aurora, pulse rings, floating/rotating
       avatars, pulsing clan logo, neon badge pulse, button shine, image zoom
     • Accent colour now appears on active/hover states (the IPS way)

   HOW TO USE: replace your current global.css with this in
   Admin CP -> Templates & Style -> Themes -> [your theme] -> global.css
   ===================================================================== */

/* Import Fonts (unchanged) */
@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Oswald:wght@600;700&family=Space+Grotesk:wght@700&display=swap);

/* =========================================
   CSS CUSTOM PROPERTIES — your palette, kept
   (added a few IPS-oriented structural tokens)
   ========================================= */
:root {
    --electric-blue:   #00d4ff;
    --electric-glow:   rgba(0, 212, 255, 0.45);
    --electric-subtle: rgba(0, 212, 255, 0.15);
    --steel-blue:      #4a90e2;
    --deep-blue:       #2161b5;
    --glass-bg:        rgba(18, 18, 22, 0.97);
    --glass-border:    rgba(0, 212, 255, 0.12);
    --surface-dark:    #0d1117;
    --text-primary:    #e2eaf3;
    --text-muted:      #8b9eb3;

    /* --- IPS structural tokens (new) --- */
    --card-bg:      rgba(23, 25, 31, 0.98);   /* lifted off the near-black backdrop so panels read as panels */
    --card-header:  rgba(0, 0, 0, 0.30);      /* solid header strip            */
    --border:       rgba(255, 255, 255, 0.10);/* quiet hairline borders        */
    --border-soft:  rgba(255, 255, 255, 0.055);
    --row-hover:    rgba(255, 255, 255, 0.045);
    --shadow:       0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-raise: 0 4px 14px rgba(0, 0, 0, 0.5);
    --radius:       6px;   /* cards / boxes  */
    --radius-sm:    4px;   /* buttons/inputs */
}

/* =========================================
   1. BASE STYLES & LAYOUT
   ========================================= */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: var(--surface-dark);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Background image kept. */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-image: url(/images/backgroundblack1.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    z-index: -2;
}
/* Aurora overlay REMOVED — IPS keeps the backdrop calm. */

a { color: var(--electric-blue); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #ffffff; }   /* clean colour shift, no glow */

#container { width: 90%; max-width: 1100px; margin: 20px auto; }

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
#header { background: transparent; padding: 25px 5% 0 5%; border: none; margin-bottom: 0; }

/* Logo image kept; text fallback simplified, glow drop-shadow removed. */
#logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 30px; font-weight: 700;
    color: #ffffff;
    display: block; margin-bottom: 22px; text-align: center; letter-spacing: 1px;
}
#logo img { display: block; margin: 0 auto; max-width: 100%; height: auto; }

/* Breadcrumb trail (Community › Forum › Topic) — IPS4-style bar. */
.navigation {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px 18px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
}
.navigation a { color: var(--electric-blue); font-weight: 500; }
.navigation a:hover { color: #ffffff; }

/* Hide the breadcrumb on the main forum index only. The index is the only
   page that renders category blocks; forum and topic views don't, so the
   trail stays visible there (Community › Forum › Topic). */
body:has(.category_block) .navigation { display: none; }

/* Top nav: clean IPS tab bar. Normal case, quiet hover underline, no glow. */
#panel { text-align: center; margin-bottom: 0; border: none !important; background: transparent !important; }
#header a, #panel a, .menu a {
    color: var(--text-primary) !important;
    font-weight: 600; font-size: 14px;
    letter-spacing: 0.2px;
    transition: color 0.15s ease;
}
#header a:hover, #panel a:hover, .menu a:hover {
    color: var(--electric-blue) !important;
}
.menu ul, #header ul {
    display: flex !important; flex-direction: row !important;
    justify-content: center !important; list-style: none !important;
    margin: 14px 0 !important; gap: 34px !important;
}
.portal, .search, .memberlist, .calendar, .help { display: none !important; }
#header form { display: none !important; }

/* =========================================
   3. GLOBAL FORUM TABLES (MyBB core classes)
   Flat IPS "ipsBox" surfaces.
   ========================================= */
.tborder {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    width: 100%;
}

/* Section header strip: solid, thin bottom border, no text glow. */
.thead {
    background: var(--card-header) !important;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-size: 14px; font-weight: 600;
    padding: 14px 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}
.thead a { color: #ffffff; }

.forum-header-container {
    background:
        linear-gradient(rgba(13, 17, 23, 0.55), rgba(13, 17, 23, 0.68)),
        url(/images/fmdivider.png) repeat-x center top;
    background-color: #151c25;
    background-size: auto, cover;
    overflow: hidden;
}

/* Column-label sub-header. */
.tcat {
    background: rgba(0, 0, 0, 0.22);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-soft);
    letter-spacing: 1px;
}
.tcat a { color: var(--text-muted); }

/* Rows: no stripe, quiet hover. */
.trow1, .trow2 {
    background: transparent;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
    transition: background 0.15s ease;
}
.trow1:hover, .trow2:hover { background: var(--row-hover); }

/* Table footer (was unstyled before — added for consistency). */
.tfoot {
    background: rgba(0, 0, 0, 0.22);
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    color: var(--text-muted);
}

/* =========================================
   4. IPB-STYLE INDEX PAGE (your custom classes)
   ========================================= */
.category_block {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.category_header {
    /* Gentle scrim over the wave so it reads calmer (IPS4 headers are clean).
       Raise the two alpha values toward 1 to darken, lower them to brighten,
       or delete the linear-gradient line entirely for the full-brightness wave. */
    background:
        linear-gradient(rgba(13, 17, 23, 0.55), rgba(13, 17, 23, 0.68)),
        url(/images/fmdivider.png) repeat-x center top;
    background-size: auto, cover;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}
.category_header a {
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-size: 16px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    transition: color 0.15s ease;
}
.category_header a:hover { color: var(--electric-blue); }

/* Forum row: clean IPS row. Quiet hover + a subtle accent read-marker. */
.forum_row {
    display: flex; align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-soft);
    border-left: 2px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.forum_row:hover {
    background: var(--row-hover);
    border-left-color: var(--electric-blue);
}
.forum_row:last-child { border-bottom: none; }

.forum_icon { flex-shrink: 0; width: 54px; text-align: center; }

/* Read/unread marker: flat dot. Solid accent when active. No pulse ring. */
.node_indicator {
    display: inline-block; width: 12px; height: 12px;
    background-color: #2a3444; border-radius: 50%;
    position: relative; margin: 0 auto;
}
.node_indicator.on {
    background-color: var(--electric-blue);
}

.forum_details { flex-grow: 1; padding: 0 18px; }
.forum_stats { flex-shrink: 0; width: 120px; text-align: right; color: var(--text-muted); font-weight: 500; }
.forum_lastpost { flex-shrink: 0; width: 220px; text-align: right; padding-left: 18px; font-size: 13px; color: var(--text-muted); }

/* Board titles: readable Inter, semibold, accent on hover, no glow. */
.forum_name { font-size: 16px; font-weight: 600; display: block; margin-bottom: 4px; }
.forum_name a {
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    transition: color 0.15s ease;
}
.forum_name a:hover { color: var(--electric-blue); }
.forum_description { font-size: 13px; color: var(--text-muted); line-height: 1.45; font-family: 'Inter', sans-serif; }

/* =========================================
   5. IPB-STYLE THREAD LISTINGS
   ========================================= */
.thread_row td {
    padding: 15px 15px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
    transition: background 0.15s ease;
}
.thread_row:hover td { background: var(--row-hover) !important; }

.thread_title a {
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: color 0.15s ease;
}
.thread_title a:hover { color: var(--electric-blue); }

/* =========================================
   6. IPB-STYLE POST STRUCTURE
   Flat card. No hover levitation.
   ========================================= */
.post {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: border-color 0.15s ease;
}
.post:hover { border-color: rgba(255, 255, 255, 0.12); }

.post_author {
    width: 210px;
    background: rgba(0, 0, 0, 0.28) !important;
    border: none !important;
    border-right: 1px solid var(--border) !important;
    padding: 24px 15px !important;
    display: block !important;
    flex-shrink: 0;
    text-align: center;
}

/* Avatar: rounded square, static. No float, no rotate-on-hover. */
.author_avatar img {
    border-radius: var(--radius) !important;
    width: 92px !important; height: 92px !important;
    object-fit: cover;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    transition: border-color 0.15s ease;
}
.author_avatar img:hover { border-color: var(--electric-blue); }

/* Cap the rank badge (and any secondary author-column image) so the
   mini-profile stays compact and consistent post to post. The avatar
   keeps its fixed 92px size via the rule above (its width is !important,
   so this max-width leaves it untouched). */
.post_author img { max-width: 140px; height: auto; }

.post_author .smalltext {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 10px; margin-top: 12px;
    display: inline-block; width: 85%;
}

.post_content { flex-grow: 1; min-width: 0; padding: 0; display: flex; flex-direction: column; }
.post_meta {
    background: rgba(0, 0, 0, 0.15);
    padding: 12px 22px;
    border-bottom: 1px solid var(--border-soft);
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--text-muted) !important;
    letter-spacing: 0.3px;
    font-family: 'Inter', sans-serif;
}
.post_body {
    line-height: 1.6;
    font-size: 15px;
    color: #d8e2ec !important;
    padding: 22px;
    flex-grow: 1;
    overflow-wrap: break-word;
    font-family: 'Inter', sans-serif;
}
.post_head { max-width: 100%; overflow-x: hidden; }
.signature {
    margin-top: 24px !important;
    border-top: 1px solid var(--border) !important;
    padding-top: 18px !important;
    padding-bottom: 6px;
    color: var(--text-muted);
    display: flow-root;   /* contain floated signature images so they can't spill past the divider line */
}
/* Keep signature images inside the signature box. Aligned (floated) images
   were escaping the bottom border; capping width + containing floats fixes it
   for every user. Raise/remove max-height if you want taller signature images. */
.signature img {
    max-width: 100%;
    height: auto;
    max-height: 250px;   /* optional tidy cap; delete this line to allow any height */
}
.postbit_group_image, .post_author img[src*="star"], .inline_rating, .star_rating, form[action*="ratethread"], #thread_rating_container { display: none !important; }

/* Post images: sit still. Cinematic zoom removed. */
.post_body img {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

/* Post control links (Edit / Delete / Reply / Quote / Report ...) -> small
   IPS buttons. Styling every link in the controls bar (rather than naming
   each class) guarantees Delete and any others are caught too. */
.postbit_buttons, .post_controls {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: flex-end;
    padding: 12px 22px;
    border-top: 1px solid var(--border-soft);
}
.postbit_buttons a, .post_controls a {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted) !important;
    font-size: 12px; font-weight: 600;
    line-height: 1.4;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.postbit_buttons a:hover, .post_controls a:hover {
    background: var(--row-hover);
    border-color: var(--electric-blue);
    color: var(--electric-blue) !important;
}

/* =========================================
   7. IPB-STYLE USER PROFILES
   ========================================= */
.profile_layout { display: flex; gap: 24px; align-items: flex-start; }
.profile_sidebar { width: 300px; flex-shrink: 0; }
.profile_block {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px; padding: 24px;
    box-shadow: var(--shadow);
}

.profile-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    color: #ccc;
    box-shadow: var(--shadow);
}
.profile-card-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

/* =========================================
   8. UI ELEMENTS & MISC — Buttons
   Flat solid IPS buttons. No gradient, shimmer, or scale.
   ========================================= */
.button, a.button, button, input.button, .new_reply_button, .new_thread_button {
    background: var(--deep-blue);
    color: #ffffff !important;
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.2px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-block;
    transition: background 0.15s ease;
    box-shadow: none;
}
.button:hover, a.button:hover, button:hover, input.button:hover, .new_reply_button:hover, .new_thread_button:hover {
    background: var(--steel-blue);
}

/* Pagination (was unstyled — added, IPS numbered pills). */
.pagination { margin: 16px 0; font-size: 13px; }
.pagination a, .pagination .pagination_current, .pagination span {
    display: inline-block;
    min-width: 30px; text-align: center;
    padding: 6px 10px; margin: 0 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    transition: background 0.15s ease, border-color 0.15s ease;
}
.pagination a:hover { background: var(--row-hover); border-color: var(--electric-blue); color: #fff; }
.pagination .pagination_current {
    background: var(--deep-blue); border-color: var(--deep-blue); color: #fff;
}

/* Dropdown menus (was unstyled — added for consistency). */
.popup_menu {
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-raise) !important;
    overflow: hidden;
}
.popup_menu .popup_item {
    background: transparent !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-soft) !important;
    padding: 9px 14px !important;
}
.popup_menu .popup_item:hover { background: var(--row-hover) !important; color: var(--electric-blue) !important; }

fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

/* =========================================
   9. CLAN HEADER & ALIGNMENT (your branded block)
   Kept, but the background logo is static now (pulse removed).
   ========================================= */
.clan-header-wrapper {
    position: relative; display: flex; flex-direction: column; align-items: center;
    background: var(--card-bg);
    /* ↓↓↓ SPACING KNOB: raise/lower the gap between the banner+nav and this
       rank block. Increase this to push it down; use a negative value
       (e.g. -20px) to pull it up tighter under the banner. */
    margin-top: 0;
    padding: 18px 50px; margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.clan-logo-container {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0; pointer-events: none;
    opacity: 0.14;   /* was a pulsing animation — now a calm watermark */
}
.clan-logo-container img { max-width: 600px; width: 100%; height: auto; display: block; filter: blur(1px); }
.clan-rows { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 1100px; }
.clan-row { display: flex; justify-content: space-between; width: 100%; align-items: flex-start; padding: 0 30px; }
.clan-item { display: flex; flex-direction: column; align-items: center; width: 240px; min-width: 240px; }

@media screen and (min-width: 769px) {
    .clan-row {
        display: grid;
        grid-template-columns: 260px 1fr 260px;
        align-items: start;
        padding: 0;
        max-width: 980px;
        margin: 0 auto;
    }
    .clan-item { width: auto; min-width: 0; justify-self: center; align-items: center; text-align: center; }
    .clan-row > .clan-item:first-child { grid-column: 1; }
    .clan-row > .clan-item:last-child  { grid-column: 3; }
    .clan-row .rank-name, .clan-row .info-desc { text-align: center; }
}
.rank-title {
    font-family: 'Oswald', sans-serif;
    font-size: 20px !important; font-weight: 600 !important;
    margin: 0 0 8px 0 !important;
    text-transform: uppercase; letter-spacing: 1px;
    color: #ffffff;
}
.rank-name, .info-desc { color: #cccccc; font-size: 14px; margin: 0 !important; line-height: 1.6; text-align: center; }

/* Rank-colour gradient text kept (this is your identity), glow softened. */
.glow-red-gradient    { background: linear-gradient(to bottom, #ff4d4d, #b30000); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.glow-green-gradient  { background: linear-gradient(to bottom, #00ff00, #008000); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.glow-orange-gradient { background: linear-gradient(to bottom, #ffc000, #ff9f1a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.glow-purple          { background: linear-gradient(to bottom, #bf40bf, #4b0082); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.glow-white           { background: linear-gradient(to bottom, #ffffff, #aaaaaa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* =========================================
   10. SCROLLBAR & MOBILE
   ========================================= */
html { scrollbar-width: thin; scrollbar-color: var(--steel-blue) var(--surface-dark); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-dark); }
::-webkit-scrollbar-thumb { background: var(--steel-blue); border-radius: 10px; }

@media screen and (max-width: 768px) {
    .post { flex-direction: column !important; }
    .post_author { width: 100% !important; border-right: none !important; border-bottom: 1px solid var(--border) !important; }
    .clan-row { flex-direction: column; align-items: center; gap: 40px; }
    .clan-logo-container img { max-width: 90% !important; margin: 0 auto; }
    .clan-header-wrapper { padding: 40px 20px; }
}

/* =========================================
   11. FOOTER
   ========================================= */
#footer_wrapper {
    background: rgba(10, 14, 20, 0.92);
    border-top: 1px solid var(--border);
    padding: 36px 5% 28px 5%;
    margin-top: 50px;
    color: var(--text-muted);
    width: 100%; box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; list-style: none; padding: 0; margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.3px; }
.footer-links li { display: inline-block; }
.footer-links a { color: var(--text-primary) !important; transition: color 0.15s ease; }
.footer-links a:hover { color: var(--electric-blue) !important; }
.footer-links li:not(:last-child)::after { content: "•"; color: var(--text-muted); margin-left: 22px; }
.footer-bottom { display: flex; justify-content: space-between; width: 100%; align-items: flex-end; font-size: 12px; border-top: 1px solid var(--border); padding-top: 22px; }
.footer-time { text-align: left; }
.footer-copyright { text-align: right; color: var(--text-muted); line-height: 1.6; }
.footer-copyright strong { color: #ffffff; font-size: 13px; }

@media screen and (max-width: 768px) {
    .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
    .footer-time, .footer-copyright { text-align: center; }
    .footer-links li:not(:last-child)::after { display: none; }
}

/* =========================================
   12. USER CP LAYOUT & SIDEBAR
   ========================================= */
.usercp_container { display: flex; gap: 24px; align-items: flex-start; margin-top: 24px; width: 100%; }
.usercp_sidebar { width: 270px; flex-shrink: 0; }
.usercp_content { flex-grow: 1; min-width: 0; }

.usercp-nav-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    margin-bottom: 14px; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow);
}
.usercp-nav-header {
    background: var(--card-header);
    color: #ffffff; padding: 13px 18px;
    font-weight: 600; font-family: 'Oswald', sans-serif;
    text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}
.usercp-nav-header:hover { background: rgba(255, 255, 255, 0.04); }
.usercp-nav-links { list-style: none; margin: 0; padding: 0; }
.usercp-nav-links li a {
    display: block; padding: 11px 18px;
    color: var(--text-muted) !important;
    text-decoration: none;
    border-bottom: 1px solid var(--border-soft);
    border-left: 2px solid transparent;
    font-size: 13px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.usercp-nav-links li a:hover {
    background: var(--row-hover);
    color: var(--electric-blue) !important;
    border-left-color: var(--electric-blue);
}
.usercp-nav-links li:last-child a { border-bottom: none; }

@media screen and (max-width: 768px) {
    .usercp_container { flex-direction: column; }
    .usercp_sidebar { width: 100%; margin-bottom: 24px; }
}

/* =========================================
   13. QUOTE BOXES
   ========================================= */
blockquote {
    border: 1px solid var(--border);
    border-left: 3px solid var(--electric-blue);
    background: rgba(0, 0, 0, 0.2);
    color: #cccccc;
    margin: 15px 0; padding: 16px 18px;
    border-radius: var(--radius-sm);
}
blockquote cite {
    font-weight: 600; color: var(--electric-blue);
    font-style: normal; display: block;
    padding-bottom: 8px; margin: 0 0 12px 0;
    border-bottom: 1px solid var(--border-soft);
    font-family: 'Inter', sans-serif;
}

/* =========================================
   14. USER BADGES
   Flat pill. Pulse removed.
   ========================================= */
.user-badge {
    display: inline-block;
    padding: 5px 12px; border-radius: 20px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    background: var(--electric-subtle);
    border: 1px solid rgba(0, 212, 255, 0.35);
    color: var(--electric-blue);
    margin-top: 8px;
    font-family: 'Inter', sans-serif;
}

/* =========================================
   15. INPUTS & TEXTAREAS
   ========================================= */
input[type="text"], input[type="password"], textarea, select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm); padding: 10px 13px;
    transition: border-color 0.15s ease;
    font-family: 'Inter', sans-serif;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--electric-blue);
}

/* =========================================
   16. TEXT SELECTION
   ========================================= */
::selection      { background: rgba(0, 212, 255, 0.30); color: #ffffff; }
::-moz-selection { background: rgba(0, 212, 255, 0.30); color: #ffffff; }

/* =========================================
   17. HIDE ONLINE STATUS ICON (kept)
   ========================================= */
.post_author img[src*="online"], .post_author img[src*="offline"] { display: none !important; }

/* =========================================
   18. POST-BIT STATS
   ========================================= */
.author_statistics {
    margin-top: 12px; padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 13px; line-height: 1.7;
    text-align: center; display: inline-block; width: 85%;
}
.author_statistics strong {
    color: var(--text-muted);
    text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px;
    margin-right: 10px; display: inline-block; width: 50px; text-align: right;
}

/* =========================================
   19. NEW THREAD / REPLY FORM
   ========================================= */
#newthread, #newreply, #editpost {
    background: transparent !important;
    border: none !important;
}
#newthread .tborder,
#newreply .tborder,
#editpost .tborder {
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    margin-bottom: 20px !important;
    overflow: hidden !important;
}
#newthread .thead,
#newreply .thead,
#editpost .thead {
    background: var(--card-header) !important;
    color: #ffffff !important;
    font-family: 'Oswald', sans-serif !important;
    font-size: 14px !important; font-weight: 600 !important;
    text-transform: uppercase !important; letter-spacing: 1px !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid var(--border) !important;
}
#newthread td,
#newreply td,
#editpost td {
    background: transparent !important;
    border-color: var(--border-soft) !important;
    color: var(--text-primary) !important;
    padding: 13px 18px !important;
    vertical-align: top !important;
}
#newthread .trow1, #newthread .trow2,
#newreply .trow1,  #newreply .trow2,
#editpost .trow1,  #editpost .trow2 { background: transparent !important; }

#newthread td.trow1:first-child, #newreply td.trow1:first-child, #editpost td.trow1:first-child,
#newthread td.trow2:first-child, #newreply td.trow2:first-child, #editpost td.trow2:first-child {
    color: var(--text-muted) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important; font-weight: 600 !important;
    text-transform: uppercase !important; letter-spacing: 0.5px !important;
    white-space: nowrap !important; width: 160px !important;
}
#newthread input[name="subject"],
#newreply input[name="subject"],
#editpost input[name="subject"] {
    width: 100% !important; box-sizing: border-box !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important; padding: 11px 14px !important;
    font-family: 'Inter', sans-serif !important; font-size: 15px !important;
    transition: border-color 0.15s ease !important;
}
#newthread input[name="subject"]:focus,
#newreply input[name="subject"]:focus,
#editpost input[name="subject"]:focus {
    border-color: var(--electric-blue) !important;
    outline: none !important;
}
.sceditor-container {
    border: 1px solid var(--border) !important;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
    overflow: hidden !important;
    background: #13191f !important;
}
.sceditor-toolbar {
    background: rgba(10, 14, 20, 0.95) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    padding: 8px !important; margin: 0 !important;
}
.sceditor-toolbar .sceditor-group {
    border-right: 1px solid var(--border) !important;
    margin-right: 4px !important; padding-right: 4px !important;
}
.sceditor-toolbar .sceditor-group:last-child { border-right: none !important; }
.sceditor-button {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-sm) !important; padding: 4px !important;
    cursor: pointer !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
    opacity: 0.8;
}
.sceditor-button:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--border) !important;
    opacity: 1;
}
.sceditor-button.active, .sceditor-button:active {
    background: var(--electric-subtle) !important;
    border-color: rgba(0, 212, 255, 0.35) !important;
    opacity: 1;
}
.sceditor-container iframe { background: #13191f !important; color-scheme: dark !important; }
.sceditor-container textarea,
#message, textarea[name="message"] {
    width: 100% !important; box-sizing: border-box !important;
    background: #13191f !important; border: none !important;
    color: var(--text-primary) !important; padding: 16px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important; line-height: 1.7 !important;
    min-height: 300px !important; resize: vertical !important;
}
.sceditor-container textarea:focus,
#message:focus, textarea[name="message"]:focus {
    box-shadow: inset 0 0 0 1px var(--electric-blue) !important;
    outline: none !important;
}
#codebuttons, .codebuttons {
    background: rgba(10, 14, 20, 0.95) !important;
    border: 1px solid var(--border) !important; border-bottom: none !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    padding: 10px 12px !important;
    display: flex !important; flex-wrap: wrap !important; gap: 4px !important;
}
.codebuttons input[type="button"],
.codebuttons input[type="submit"],
#codebuttons input[type="button"] {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important; padding: 5px 10px !important;
    font-size: 12px !important; font-family: 'Inter', sans-serif !important;
    cursor: pointer !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}
.codebuttons input[type="button"]:hover,
#codebuttons input[type="button"]:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--electric-blue) !important;
}
#newthread .trow1 input[type="checkbox"],
#newreply .trow1 input[type="checkbox"],
#editpost .trow1 input[type="checkbox"],
#newthread .trow2 input[type="checkbox"],
#newreply .trow2 input[type="checkbox"],
#editpost .trow2 input[type="checkbox"] {
    accent-color: var(--electric-blue);
    width: 15px; height: 15px; cursor: pointer;
}
#newthread select, #newreply select, #editpost select {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important; padding: 10px 14px !important;
    font-family: 'Inter', sans-serif !important;
    transition: border-color 0.15s ease !important; cursor: pointer !important;
}
#newthread select:focus, #newreply select:focus, #editpost select:focus {
    border-color: var(--electric-blue) !important; outline: none !important;
}
.smilie_div, #smilie_div {
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important; padding: 12px !important;
}
.smilie_div a img, #smilie_div a img {
    border-radius: var(--radius-sm) !important;
    transition: transform 0.15s ease !important;
    opacity: 0.9;
}
.smilie_div a img:hover, #smilie_div a img:hover {
    transform: scale(1.15) !important;
    opacity: 1;
}
#newthread .tfoot, #newreply .tfoot, #editpost .tfoot {
    background: rgba(10, 14, 20, 0.8) !important;
    border-top: 1px solid var(--border) !important;
    padding: 18px !important; text-align: right !important;
    border-radius: 0 0 var(--radius) var(--radius) !important;
}

/* =========================================
   20. QUICK REPLY BOX
   ========================================= */
#quickreply_form, #quickreply, #qr_ {
    background: transparent !important;
    border: none !important;
}
#quickreply_form .tborder, #quickreply .tborder, #qr_ .tborder,
#quickreply_form > table,  #quickreply > table {
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    overflow: hidden !important; width: 100% !important;
}
#quickreply_form .thead, #quickreply .thead, #qr_ .thead {
    background: var(--card-header) !important;
    color: #ffffff !important;
    font-family: 'Oswald', sans-serif !important;
    font-size: 14px !important; font-weight: 600 !important;
    text-transform: uppercase !important; letter-spacing: 1px !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid var(--border) !important;
}
#quickreply_form td, #quickreply td, #qr_ td {
    background: transparent !important;
    border-color: var(--border-soft) !important;
    color: var(--text-primary) !important;
    padding: 13px 18px !important; vertical-align: top !important;
}
#quickreply_form .trow1, #quickreply_form .trow2,
#quickreply .trow1,       #quickreply .trow2,
#qr_ .trow1,              #qr_ .trow2 { background: transparent !important; }

#quickreply_form textarea, #quickreply textarea, #message_quick {
    width: 100% !important; box-sizing: border-box !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important; padding: 16px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important; line-height: 1.7 !important;
    min-height: 160px !important; resize: vertical !important;
    transition: border-color 0.15s ease !important;
}
#quickreply_form textarea:focus, #quickreply textarea:focus, #message_quick:focus {
    border-color: var(--electric-blue) !important;
    outline: none !important;
}
#quickreply_form .codebuttons, #quickreply .codebuttons {
    background: rgba(10, 14, 20, 0.95) !important;
    border: 1px solid var(--border) !important; border-bottom: none !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important; padding: 10px 12px !important;
}
#quickreply_form .tfoot, #quickreply .tfoot, #qr_ .tfoot {
    background: rgba(10, 14, 20, 0.8) !important;
    border-top: 1px solid var(--border) !important;
    padding: 14px 18px !important;
    border-radius: 0 0 var(--radius) var(--radius) !important;
}

/* =========================================
   IPS4 CONTENT & UI DETAILS  (pure CSS, no template changes)
   ========================================= */

/* --- [code] boxes: IPS4 "ipsCode" look --- */
.codeblock, .code, pre.code, .post_body pre {
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin: 14px 0;
    font-family: Consolas, 'SFMono-Regular', Menlo, monospace;
    font-size: 13px; line-height: 1.6;
    color: #d8e2ec;
    overflow-x: auto;   /* long lines scroll instead of stretching the post */
}
.codeblock .title, .code .title {
    display: block;
    margin: -14px -16px 12px -16px;
    padding: 8px 16px;
    background: var(--card-header);
    border-bottom: 1px solid var(--border);
    font-family: 'Inter', sans-serif;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted);
}
.post_body code {
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: Consolas, monospace;
    font-size: 0.9em;
}

/* --- Error / validation notices: IPS4 "ipsMessage" (error) boxes --- */
.error, .validation_error, .inline_error {
    background: rgba(255, 77, 77, 0.08);
    border: 1px solid rgba(255, 77, 77, 0.30);
    border-left: 3px solid #ff4d4d;
    border-radius: var(--radius-sm);
    padding: 14px 16px; margin: 14px 0;
    color: #f3d6d6;
}
.error ul, .error li, .validation_error ul, .validation_error li { list-style: none; margin: 0; }

/* --- Destructive control: IPS4 shows Delete as a red "important" button.
       Targeted by the delete URL so only Delete reddens; the others stay neutral. */
.postbit_buttons a[href*="deletepost"], .post_controls a[href*="deletepost"],
.postbit_buttons a[href*="action=delete"], .post_controls a[href*="action=delete"] {
    background: rgba(255, 77, 77, 0.10);
    border-color: rgba(255, 77, 77, 0.40);
    color: #ff8a8a !important;
}
.postbit_buttons a[href*="deletepost"]:hover, .post_controls a[href*="deletepost"]:hover,
.postbit_buttons a[href*="action=delete"]:hover, .post_controls a[href*="action=delete"]:hover {
    background: rgba(255, 77, 77, 0.20);
    border-color: #ff4d4d;
    color: #ffffff !important;
}

/* --- Post body: IPS4 article-style content --- */
.post_body a { color: var(--electric-blue); }
.post_body a:hover { color: var(--electric-blue); text-decoration: underline; }
.post_body ul, .post_body ol { padding-left: 22px; margin: 10px 0; }
.post_body li { margin: 4px 0; }
.post_body table { border-collapse: collapse; margin: 14px 0; }
.post_body table td, .post_body table th { border: 1px solid var(--border); padding: 8px 12px; }
.post_body table th { background: var(--card-header); font-weight: 600; text-align: left; }
.post_body table tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.post_body hr, hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.edited_by { font-style: italic; color: var(--text-muted); font-size: 12px; }

/* --- @mentions: IPS4 mention pill (applies only if your mention markup uses
       these classes; harmless otherwise) --- */
a.mention, a.mycode_mention, .mention {
    background: var(--electric-subtle);
    border: 1px solid rgba(0, 212, 255, 0.30);
    border-radius: 999px;
    padding: 1px 8px;
    font-weight: 600;
    color: var(--electric-blue) !important;
    text-decoration: none !important;
}

/* --- Keyboard focus rings (IPS4 has clean, consistent focus states) --- */
a:focus-visible, button:focus-visible, .button:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--electric-blue);
    outline-offset: 2px;
}

/* --- Pagination label: de-emphasise MyBB's "Pages (N):" text so it isn't a
       boxed pill. IPS4 shows just the number pills. --- */
.pagination .pages {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 8px;
}

/* --- Thread prefixes as IPS4-style pills (only if your forum uses prefixes) --- */
.prefix, span.prefix, a.prefix {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--electric-subtle);
    border: 1px solid rgba(0, 212, 255, 0.30);
    color: var(--electric-blue) !important;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.3px;
    margin-right: 6px;
    text-decoration: none !important;
}

/* --- Sub-forum links under a forum row, as small IPS4 chips --- */
.subforums a, .subforumlist a {
    display: inline-block;
    padding: 2px 8px; margin: 2px 4px 2px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    font-size: 12px;
    color: var(--text-muted) !important;
}
.subforums a:hover, .subforumlist a:hover {
    border-color: var(--electric-blue);
    color: var(--electric-blue) !important;
}

/* --- Unread vs read topics: IPS4 bolds unread topic titles and mutes read
       ones. Uses MyBB's standard subject_new / subject_old markup; harmless
       if your thread template doesn't output those classes. --- */
span.subject_new, .subject_new a { font-weight: 700; color: #ffffff; }
span.subject_old, .subject_old a { font-weight: 500; color: var(--text-muted); }
.subject_new a:hover, .subject_old a:hover { color: var(--electric-blue); }

/* =========================================
   21. RESPONSIVE LAYER
   ========================================= */
@media screen and (max-width: 1024px) {
    #container { width: 94%; }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .clan-row { grid-template-columns: 200px 1fr 200px; max-width: 820px; }
    .forum_lastpost { width: 180px; }
    .menu ul, #header ul { gap: 24px !important; }
}

@media screen and (max-width: 768px) {
    .menu ul, #header ul { flex-wrap: wrap !important; gap: 14px 20px !important; }

    .clan-header-wrapper { padding: 20px 16px !important; }
    .clan-item { width: auto !important; min-width: 0 !important; }
    .clan-rows { gap: 22px; }

    .forum_row {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "icon details details"
            "stats stats lastpost";
        align-items: center;
        gap: 4px 10px;
        padding: 12px 16px;
    }
    .forum_icon    { grid-area: icon; width: auto; }
    .forum_details { grid-area: details; padding: 0; min-width: 0; }
    .forum_stats {
        grid-area: stats; width: auto; text-align: left;
        margin-top: 6px; padding-top: 8px;
        border-top: 1px solid var(--border-soft);
        font-size: 13px;
    }
    .forum_lastpost {
        grid-area: lastpost; width: auto; text-align: right;
        padding-left: 0; margin-top: 6px; padding-top: 8px;
        border-top: 1px solid var(--border-soft);
        white-space: nowrap;
    }

    .profile_layout  { flex-direction: column; }
    .profile_sidebar { width: 100%; }

    .trow1, .trow2      { padding: 12px 14px; }
    .thread_row td      { padding: 12px 10px; }
}

@media screen and (max-width: 480px) {
    #logo               { font-size: 22px; }
    .category_header a  { font-size: 15px; letter-spacing: 0.5px; }
    .forum_name         { font-size: 15px; }
    .rank-title         { font-size: 17px !important; }
    .clan-header-wrapper { padding: 16px 12px !important; }
    .post_body          { font-size: 14px; padding: 18px; }
    .post_meta          { flex-direction: column; gap: 4px; }
}

/* =========================================
   22. REDUCED MOTION (accessibility)
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}