/* ================================================================
   RustFYI custom styles — overlays the existing template's style.css
   Dark industrial palette with Rust's signature orange accents.
   ================================================================ */

:root {
    --rfyi-bg:            #0e100e;
    --rfyi-bg-raised:     #181b17;
    --rfyi-bg-raised-2:   #22251f;
    --rfyi-border:        #2a2e26;
    --rfyi-border-strong: #3b3f32;
    --rfyi-text:          #d9d6c7;
    --rfyi-muted:         #8c8674;
    --rfyi-rust:          #cd412b;
    --rfyi-rust-bright:   #e85d3f;
    --rfyi-rust-dim:      #823225;
    --rfyi-metal:         #a39b85;
    --rfyi-success:       #8bb34a;
    --rfyi-dlc:           #ffb13c;
    --rfyi-shadow:        0 4px 20px rgba(0,0,0,.5);
    --rfyi-radius:        4px;
}

body.rustfyi-body {
    color: var(--rfyi-text);
    background: var(--rfyi-bg) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    position: relative;
}

/* Fixed-position image layer: covers the whole viewport, scrolls with page. */
.rustfyi-bg-image {
    position: fixed; inset: 0;
    background-image: var(--rfyi-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -2;
    pointer-events: none;
}

/* Dark overlay on top of the image so content is readable. */
.rustfyi-bg-overlay {
    position: fixed; inset: 0;
    background: linear-gradient(180deg, rgba(14,16,14,.75) 0%, rgba(14,16,14,.92) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Kill the old template's gradient div if it ever renders. */
.background-gradient { display: none !important; }

/* ---------- Brand lockup ---------- */

.rustfyi-brand {
    display: inline-flex;
    align-items: baseline;
    font-family: "Impact", "Oswald", "Arial Black", sans-serif;
    letter-spacing: 1px;
    font-size: 1.4em;
    line-height: 1;
    white-space: nowrap;
}
.rustfyi-brand-mark {
    color: var(--rfyi-rust);
    text-shadow: 0 2px 0 rgba(0,0,0,.6);
}
.rustfyi-brand-dot {
    color: var(--rfyi-text);
    margin-left: 2px;
    opacity: .9;
}

/* Mobile: tighten brand lockup so it doesn't overflow the navbar. */
@media (max-width: 575px) {
    .navbar-brand .rustfyi-brand {
        font-size: 1.1em;
        letter-spacing: .5px;
    }
    .navbar-rust .navbar-brand {
        padding-top: 2px;
        padding-bottom: 2px;
    }
}

/* External-links dropdown — align with the Rust look of the navbar. */
.rustfyi-ext-dropdown {
    background: #1a1d16;
    border: 1px solid var(--rfyi-border-strong);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
    border-radius: var(--rfyi-radius);
    padding: 6px 0;
    margin-top: 6px;
}
.rustfyi-ext-dropdown .dropdown-item {
    color: var(--rfyi-text);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 6px 16px;
}
.rustfyi-ext-dropdown .dropdown-item:hover,
.rustfyi-ext-dropdown .dropdown-item:focus {
    background: rgba(205, 65, 43, .15);
    color: var(--rfyi-rust-bright);
}
.navbar-rust .dropdown-toggle::after {
    vertical-align: 0.1em;
    margin-left: .4em;
    border-top-width: .25em;
}

/* ---------- Navbar ---------- */

.navbar-rust {
    background: linear-gradient(180deg, #1a1d16 0%, #141712 100%) !important;
    border: 1px solid var(--rfyi-border);
    box-shadow: var(--rfyi-shadow);
    margin-top: 20px;
}

.navbar-rust .nav-link {
    color: var(--rfyi-text) !important;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .5px;
    font-size: .95rem;
    padding: .6rem 1rem;
    position: relative;
    transition: color .15s ease;
}
.navbar-rust .nav-link:hover { color: var(--rfyi-rust-bright) !important; }
.navbar-rust .nav-link.active {
    color: var(--rfyi-rust-bright) !important;
}
.navbar-rust .nav-link.active::after {
    content: "";
    position: absolute; left: 1rem; right: 1rem; bottom: 4px;
    height: 2px; background: var(--rfyi-rust); border-radius: 1px;
}
.rustfyi-ext-links .nav-link { color: var(--rfyi-muted) !important; font-size: .78rem !important; }
.rustfyi-ext-links .nav-link:hover { color: var(--rfyi-metal) !important; }

/* Nudge the right-aligned nav groups a bit back toward the brand so they
   don't crowd the window edge on wide screens. */
@media (min-width: 992px) {
    .navbar-rust .navbar-nav.ms-auto { margin-right: 24px !important; }
    .navbar-rust .rustfyi-ext-links  { margin-right: 12px; }
}

/* ---------- Main container ---------- */

.rustfyi-main { padding: 40px 15px 80px; }

/* ---------- Hero ---------- */

.rustfyi-hero {
    padding: 80px 20px 60px;
}
.rustfyi-hero-label {
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--rfyi-muted);
    font-size: .85rem;
    margin-bottom: 10px;
}
.rustfyi-hero-title {
    font-size: 5rem;
    line-height: 1;
    margin: 0 0 20px;
}
.rustfyi-hero-sub {
    color: var(--rfyi-metal);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
}

/* ---------- Section cards (home) ---------- */

.rustfyi-cards { margin-top: 40px; }
.rustfyi-card {
    display: block;
    text-decoration: none;
    background: linear-gradient(180deg, var(--rfyi-bg-raised) 0%, var(--rfyi-bg) 100%);
    border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius);
    padding: 24px 20px;
    color: var(--rfyi-text);
    height: 100%;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    position: relative;
    overflow: hidden;
}
.rustfyi-card:hover {
    transform: translateY(-2px);
    border-color: var(--rfyi-rust);
    box-shadow: 0 6px 24px rgba(205, 65, 43, .18);
    color: var(--rfyi-text);
}
.rustfyi-card::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: var(--rfyi-rust);
    opacity: .6;
    transition: opacity .15s ease;
}
.rustfyi-card:hover::before { opacity: 1; }
.rustfyi-card-icon {
    font-size: 2rem; color: var(--rfyi-rust-bright);
    margin-bottom: 10px;
    font-family: "Courier New", monospace;
}
.rustfyi-card-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: .9rem;
    color: var(--rfyi-metal);
}
.rustfyi-card-count {
    font-family: "Oswald", "Impact", sans-serif;
    font-size: 2.4rem;
    color: var(--rfyi-text);
    margin: 6px 0;
    line-height: 1;
}
.rustfyi-card-desc { color: var(--rfyi-muted); font-size: .9rem; }

/* ---------- Version chips (home) ---------- */

.rustfyi-version-strip { margin-top: 50px; }
.rustfyi-vchip {
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border);
    padding: 14px 16px; border-radius: var(--rfyi-radius);
}
.rustfyi-vchip-label {
    text-transform: uppercase; font-size: .7rem; letter-spacing: 1px;
    color: var(--rfyi-muted);
}
.rustfyi-vchip-build {
    font-family: "Oswald", "Impact", sans-serif; font-size: 1.3rem;
    color: var(--rfyi-rust-bright); margin-top: 4px; line-height: 1.1;
    word-break: break-word;
}
.rustfyi-vchip-date { color: var(--rfyi-muted); font-size: .8rem; margin-top: 2px; }

.rustfyi-intro {
    margin-top: 60px; padding: 30px;
    background: var(--rfyi-bg-raised); border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius);
}
.rustfyi-intro h2 { color: var(--rfyi-rust-bright); margin-bottom: 10px; }
.rustfyi-intro p { color: var(--rfyi-text); margin: 0; }

/* ---------- Page header ---------- */

.rustfyi-page-header { margin: 40px 0 30px; border-bottom: 1px solid var(--rfyi-border); padding-bottom: 20px; }
.rustfyi-page-header h1 {
    font-family: "Oswald", "Impact", sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--rfyi-text);
    margin: 0 0 6px;
}
.rustfyi-page-header h1::before {
    content: ""; display: inline-block; width: 12px; height: 24px;
    background: var(--rfyi-rust); margin-right: 12px; vertical-align: middle;
}

/* ---------- Sidebar (category list) ---------- */

.rustfyi-sidebar { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }
.rustfyi-sidebar-title {
    font-size: .85rem; text-transform: uppercase; letter-spacing: 2px;
    color: var(--rfyi-muted); border-bottom: 1px solid var(--rfyi-border);
    padding-bottom: 10px; margin-bottom: 10px;
}
.rustfyi-cat-list { list-style: none; padding: 0; margin: 0; }
.rustfyi-cat-list a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px;
    color: var(--rfyi-text); text-decoration: none;
    border-left: 2px solid transparent;
    font-size: .95rem;
    transition: all .1s ease;
}
.rustfyi-cat-list a:hover {
    background: var(--rfyi-bg-raised); color: var(--rfyi-rust-bright);
    border-left-color: var(--rfyi-rust-dim);
}
.rustfyi-cat-list a.active {
    background: var(--rfyi-bg-raised);
    color: var(--rfyi-rust-bright);
    border-left-color: var(--rfyi-rust);
    font-weight: 600;
}
.rustfyi-cat-count {
    background: var(--rfyi-bg); color: var(--rfyi-muted);
    font-size: .75rem; padding: 2px 8px; border-radius: 10px;
    font-family: "Oswald", sans-serif;
}

/* ---------- Search ---------- */

.rustfyi-search { margin-bottom: 20px; }
.rustfyi-search input {
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border-strong);
    color: var(--rfyi-text);
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: var(--rfyi-radius);
}
.rustfyi-search input:focus {
    background: var(--rfyi-bg-raised);
    border-color: var(--rfyi-rust);
    box-shadow: 0 0 0 .2rem rgba(205,65,43,.15);
    color: var(--rfyi-text);
}
.rustfyi-search input::placeholder { color: var(--rfyi-muted); }
.rustfyi-search-meta { padding: 6px 2px; min-height: 20px; }

/* ---------- Data tables ---------- */

.rustfyi-table-wrap {
    background: var(--rfyi-bg-raised); border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius);
    overflow-x: auto;
}
.rustfyi-table { margin: 0; color: var(--rfyi-text); background: transparent !important; }
.rustfyi-table thead th {
    text-transform: uppercase; letter-spacing: 1px;
    font-size: .78rem; color: var(--rfyi-muted);
    background: var(--rfyi-bg) !important; border-bottom: 1px solid var(--rfyi-border-strong) !important;
    padding: 12px 14px;
}
.rustfyi-table tbody td {
    background: transparent !important;
    border-color: var(--rfyi-border) !important;
    padding: 10px 14px;
    font-size: .9rem;
    vertical-align: middle;
}
.rustfyi-table tbody tr:hover td { background: rgba(205,65,43,.05) !important; }
.rustfyi-table code {
    color: var(--rfyi-rust-bright);
    background: rgba(0,0,0,.3);
    padding: 2px 6px; border-radius: 3px;
    font-size: .85rem;
}
.rustfyi-cell-name { font-weight: 600; }
.rustfyi-cell-path code { font-size: .8rem; color: var(--rfyi-metal); word-break: break-all; }

/* ---------- Item icon ---------- */

.rustfyi-item-icon-cell {
    width: 60px;
    padding: 4px 8px !important;
    text-align: center;
    vertical-align: middle;
}
.rustfyi-item-icon {
    width: 40px; height: 40px;
    object-fit: contain;
    display: inline-block;
    background: transparent;
    image-rendering: -webkit-optimize-contrast;
    cursor: zoom-in;
    transition: transform .1s ease;
}
.rustfyi-item-icon:hover {
    transform: scale(1.1);
}

/* ---------- Icon zoom overlay ---------- */

.rfyi-zoom-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: zoom-out;
    animation: rfyi-zoom-fade .12s ease-out;
}
@keyframes rfyi-zoom-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.rfyi-zoom-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.rfyi-zoom-overlay img {
    width: 120px; height: 120px;   /* 3× the 40px icon */
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .6));
    border: 1px solid rgba(200, 200, 200, .18);
    border-radius: 2px;
    padding: 4px;
    background: rgba(255, 255, 255, .02);
}
.rfyi-zoom-overlay .rfyi-zoom-caption {
    color: var(--rfyi-muted);
    font-size: .85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}
/* ---------- DLC pill ---------- */

.rustfyi-dlc-pill {
    display: inline-block;
    background: linear-gradient(180deg, var(--rfyi-dlc) 0%, #d99129 100%);
    color: #1a1206 !important;
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px;
    padding: 3px 10px; border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,.4);
    transition: transform .1s ease;
    white-space: nowrap;
}
.rustfyi-dlc-pill:hover { transform: translateY(-1px); color: #1a1206 !important; }
.rustfyi-row-dlc td { border-left: 3px solid var(--rfyi-dlc) !important; }
.rustfyi-row-dlc td:first-child { padding-left: 11px; }

/* Non-clickable (seasonal / limited-time) pill — visually distinct from
   clickable DLC pills: outlined style, muted color, per-season icon. */
.rustfyi-dlc-pill-nolink {
    background: transparent !important;
    color: var(--rfyi-muted) !important;
    border: 1px dashed var(--rfyi-muted);
    cursor: not-allowed !important;
    box-shadow: none !important;
    padding: 2px 9px 2px 7px !important;
    opacity: .9;
    text-decoration: none !important;
}
.rustfyi-dlc-pill-nolink::before {
    content: "\1F512";   /* 🔒 default — overridden per season below */
    display: inline-block;
    margin-right: 5px;
    font-size: .95em;
    line-height: 1;
    vertical-align: -1px;
}
.rustfyi-dlc-pill-nolink:hover {
    transform: none !important;
    color: var(--rfyi-muted) !important;
    border-color: var(--rfyi-muted);
}

/* Per-season icons. Slug comes from the DLC 'name' field (lowercased,
   non-alphanumerics → "-"). */
.rustfyi-dlc-season-christmas::before      { content: "\1F384"; }  /* 🎄 Christmas tree */
.rustfyi-dlc-season-halloween::before      { content: "\1F383"; }  /* 🎃 jack-o-lantern */
.rustfyi-dlc-season-easter::before         { content: "\1F430"; }  /* 🐰 rabbit */
.rustfyi-dlc-season-lunar-new-year::before { content: "\1F9E7"; }  /* 🧧 red envelope */
.rustfyi-dlc-season-fireworks::before      { content: "\1F386"; }  /* 🎆 fireworks */
.rustfyi-dlc-season-twitch-drop::before,
.rustfyi-dlc-season-twitch-rivals::before  { content: "\1F3AE"; }  /* 🎮 game controller */
.rustfyi-dlc-season-movember-charity::before { content: "\2764";    /* ❤  */ color: #d55; }

/* ---------- Copy button ---------- */

.rfyi-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    margin-left: 6px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--rfyi-border-strong);
    border-radius: 3px;
    color: var(--rfyi-muted);
    cursor: pointer;
    vertical-align: middle;
    transition: all .12s ease;
}
.rfyi-copy:hover {
    color: var(--rfyi-rust-bright);
    border-color: var(--rfyi-rust-dim);
    background: rgba(205, 65, 43, .08);
}
.rfyi-copy-done {
    color: #fff !important;
    background: var(--rfyi-success) !important;
    border-color: var(--rfyi-success) !important;
}
.rfyi-copy-done .rfyi-copy-icon { display: none; }
.rfyi-copy-done::after {
    content: "✓";
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

/* Keep the <code> value and its copy button on the same line. Table-wrap
   already handles horizontal overflow if the row grows wide. */
.rustfyi-table td:has(> .rfyi-copy) {
    white-space: nowrap;
}
.rustfyi-table td:has(> .rfyi-copy) code {
    word-break: normal;
}

/* ---------- Convar flags ---------- */

.rustfyi-flag {
    display: inline-block;
    font-size: .7rem; font-weight: 600; text-transform: uppercase;
    padding: 2px 7px; border-radius: 3px;
    margin-right: 4px; margin-bottom: 2px;
    background: #333; color: #ccc;
    border: 1px solid #444;
}
.rustfyi-flag-server { background: #1f3a52; color: #87c0ea; border-color: #2a5278; }
.rustfyi-flag-client { background: #324a2b; color: #a8d684; border-color: #44663c; }
.rustfyi-flag-admin  { background: #52241f; color: #e68878; border-color: #78352c; }
.rustfyi-flag-saved  { background: #4a3a1a; color: #e8c067; border-color: #6a5225; }
.rustfyi-flag-var    { background: #2a2a2a; color: #999; border-color: #3a3a3a; }
.rustfyi-flag-cmd    { background: #3a2a4a; color: #c08adc; border-color: #52396a; }

/* ---------- Pagination ---------- */

.rustfyi-pagination { margin-top: 20px; display: flex; justify-content: center; }
.rustfyi-pagination .page-link {
    background: var(--rfyi-bg-raised); border-color: var(--rfyi-border);
    color: var(--rfyi-text);
}
.rustfyi-pagination .page-link:hover {
    background: var(--rfyi-bg-raised-2); border-color: var(--rfyi-rust-dim); color: var(--rfyi-rust-bright);
}
.rustfyi-pagination .active .page-link {
    background: var(--rfyi-rust); border-color: var(--rfyi-rust); color: #fff;
}
.rustfyi-pagination .disabled .page-link { background: var(--rfyi-bg); color: #555; }

/* ---------- Versions page ---------- */

.rustfyi-vgrid { margin-top: 10px; }
.rustfyi-vpanel {
    background: var(--rfyi-bg-raised); border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius); padding: 24px; height: 100%;
    position: relative; overflow: hidden;
}
.rustfyi-vpanel::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--rfyi-rust) 0%, var(--rfyi-rust-bright) 100%);
}
.rustfyi-vpanel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.rustfyi-vpanel-head h2 { font-size: 1.2rem; color: var(--rfyi-text); margin: 0; text-transform: uppercase; letter-spacing: 1px; }
.rustfyi-vpanel-link { color: var(--rfyi-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; text-decoration: none; }
.rustfyi-vpanel-link:hover { color: var(--rfyi-rust-bright); }
.rustfyi-vpanel-build {
    font-family: "Oswald", "Impact", sans-serif; font-size: 2.4rem;
    color: var(--rfyi-rust-bright); margin: 16px 0; line-height: 1;
    word-break: break-word;
}
.rustfyi-vpanel-meta { margin: 0; font-size: .9rem; }
.rustfyi-vpanel-meta dt { color: var(--rfyi-muted); font-weight: 400; display: inline; }
.rustfyi-vpanel-meta dd { display: inline; margin-left: 8px; color: var(--rfyi-text); }
.rustfyi-vpanel-meta dt::after { content: ":"; }
.rustfyi-vpanel-meta dt:not(:first-child) { display: block; margin-top: 8px; }

.rustfyi-vhistory { margin-top: 50px; }
.rustfyi-vhistory h2 {
    font-family: "Oswald", "Impact", sans-serif; text-transform: uppercase;
    letter-spacing: 2px; color: var(--rfyi-text); margin-bottom: 20px;
    border-bottom: 1px solid var(--rfyi-border); padding-bottom: 10px;
}
.rustfyi-vhistory h3 { color: var(--rfyi-metal); font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.rustfyi-vhistory table { background: var(--rfyi-bg-raised); border: 1px solid var(--rfyi-border); border-radius: var(--rfyi-radius); overflow: hidden; }
.rustfyi-vhistory table a { color: var(--rfyi-rust-bright); text-decoration: none; }
.rustfyi-vhistory table a:hover { text-decoration: underline; }

/* ---------- Dev notice modal ---------- */

.rustfyi-modal {
    background: linear-gradient(180deg, var(--rfyi-bg-raised) 0%, var(--rfyi-bg) 100%);
    border: 1px solid var(--rfyi-border-strong);
    color: var(--rfyi-text);
    border-radius: var(--rfyi-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    position: relative;
    overflow: hidden;
}
.rustfyi-modal-top {
    height: 4px;
    background: linear-gradient(90deg, var(--rfyi-rust) 0%, var(--rfyi-rust-bright) 50%, var(--rfyi-rust) 100%);
    box-shadow: 0 0 20px var(--rfyi-rust);
}
.rustfyi-modal .modal-header {
    padding: 24px 28px 10px;
}
.rustfyi-modal .modal-body {
    padding: 10px 28px 20px;
    color: var(--rfyi-text);
    line-height: 1.6;
}
.rustfyi-modal .modal-body strong {
    color: var(--rfyi-rust-bright);
}
.rustfyi-modal .modal-footer {
    padding: 10px 28px 24px;
}
.rustfyi-modal .modal-title {
    font-family: "Oswald", "Impact", sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--rfyi-text);
    font-size: 1.6rem;
    line-height: 1.1;
    margin: 0;
}
.rustfyi-modal-eyebrow {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--rfyi-rust-bright);
    margin-bottom: 4px;
}
.rustfyi-modal .btn-close {
    filter: invert(1) grayscale(1) brightness(.8);
    opacity: .6;
    transition: opacity .15s;
}
.rustfyi-modal .btn-close:hover { opacity: 1; }

.btn-rust {
    background: linear-gradient(180deg, var(--rfyi-rust) 0%, var(--rfyi-rust-dim) 100%);
    color: #fff;
    border: 1px solid var(--rfyi-rust-bright);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    font-size: .85rem;
    padding: 8px 22px;
    border-radius: 3px;
    transition: all .15s ease;
    box-shadow: 0 2px 8px rgba(205, 65, 43, .3);
}
.btn-rust:hover {
    background: linear-gradient(180deg, var(--rfyi-rust-bright) 0%, var(--rfyi-rust) 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(205, 65, 43, .5);
}
.btn-rust:focus { box-shadow: 0 0 0 .2rem rgba(205, 65, 43, .35); }

/* ---------- Page intro ---------- */

.rustfyi-page-intro {
    font-size: 1rem;
    line-height: 1.65;
    max-width: 900px;
    color: var(--rfyi-text) !important;
}
.rustfyi-page-intro strong {
    color: var(--rfyi-rust-bright);
    font-weight: 600;
}
.rustfyi-page-intro small {
    display: inline-block;
    margin-top: 6px;
    color: var(--rfyi-muted) !important;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- Collapsible FAQ (uses native <details>/<summary>) ---------- */

.rustfyi-faq {
    margin-top: 60px;
    padding: 24px;
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius);
}
.rustfyi-faq h2 {
    font-family: "Oswald", "Impact", sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--rfyi-rust-bright);
    font-size: 1.2rem;
    margin: 0 0 16px;
}
.rustfyi-faq details {
    border-bottom: 1px solid var(--rfyi-border);
    padding: 12px 0;
}
.rustfyi-faq details:last-child { border-bottom: 0; }
.rustfyi-faq summary {
    cursor: pointer;
    color: var(--rfyi-text);
    font-weight: 600;
    font-size: .95rem;
    list-style: none;
    position: relative;
    padding-left: 24px;
    transition: color .1s ease;
}
.rustfyi-faq summary::-webkit-details-marker { display: none; }
.rustfyi-faq summary::before {
    content: "+";
    position: absolute;
    left: 0;
    color: var(--rfyi-rust-bright);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: .9;
    transition: transform .15s ease;
    transform-origin: center;
}
.rustfyi-faq details[open] summary::before {
    transform: rotate(45deg);
}
.rustfyi-faq summary:hover { color: var(--rfyi-rust-bright); }
.rustfyi-faq p {
    margin: 10px 0 4px 24px;
    color: var(--rfyi-metal);
    line-height: 1.6;
    font-size: .92rem;
}

/* ---------- Item detail page ---------- */

.rustfyi-breadcrumb {
    margin-top: 20px;
    font-size: .85rem;
    color: var(--rfyi-muted);
}
.rustfyi-breadcrumb a {
    color: var(--rfyi-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.rustfyi-breadcrumb a:hover { color: var(--rfyi-rust-bright); }
.rustfyi-breadcrumb span { margin: 0 6px; }
.rustfyi-breadcrumb .current { color: var(--rfyi-text); text-transform: none; letter-spacing: 0; }

.rustfyi-item-detail-head {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--rfyi-border);
    margin-bottom: 30px;
}
.rustfyi-item-detail-icon {
    width: 96px; height: 96px;
    object-fit: contain;
    background: rgba(255, 255, 255, .02);
    border: 1px solid var(--rfyi-border);
    border-radius: 3px;
    padding: 6px;
    flex-shrink: 0;
}
.rustfyi-item-detail-head h1 {
    font-family: "Oswald", "Impact", sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--rfyi-text);
    margin: 0 0 6px;
    font-size: 2rem;
}
.rustfyi-item-detail-sub {
    color: var(--rfyi-muted);
    margin: 0;
    font-size: .95rem;
}
.rustfyi-item-detail-sub a {
    color: var(--rfyi-rust-bright);
    text-decoration: none;
}
.rustfyi-item-detail-sub a:hover { text-decoration: underline; }

.rustfyi-item-detail-grid {
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius);
    padding: 8px 20px;
    margin-bottom: 30px;
}
.rustfyi-item-detail-row {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rfyi-border);
    align-items: center;
}
.rustfyi-item-detail-row:last-child { border-bottom: 0; }
.rustfyi-item-detail-label {
    flex: 0 0 170px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: .72rem;
    color: var(--rfyi-muted);
    font-weight: 700;
}
.rustfyi-item-detail-value {
    flex: 1;
    color: var(--rfyi-text);
    overflow-wrap: anywhere;
}
.rustfyi-item-detail-value code {
    color: var(--rfyi-rust-bright);
    background: rgba(0,0,0,.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: .9rem;
}
.rustfyi-item-detail-value a { color: var(--rfyi-rust-bright); text-decoration: none; }
.rustfyi-item-detail-value a:hover { text-decoration: underline; }

.rustfyi-item-detail-usage {
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius);
    padding: 24px;
    margin-bottom: 30px;
}
.rustfyi-item-detail-usage h2 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--rfyi-rust-bright);
    margin: 0 0 12px;
}
.rustfyi-item-detail-usage pre {
    background: var(--rfyi-bg);
    border: 1px solid var(--rfyi-border);
    padding: 12px 16px;
    border-radius: 3px;
    overflow-x: auto;
    color: var(--rfyi-text);
    font-size: .9rem;
    margin: 10px 0;
}
.rustfyi-item-detail-usage p { color: var(--rfyi-text); margin: 10px 0; }

.rustfyi-item-detail-related {
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius);
    padding: 24px;
    margin-bottom: 30px;
}
.rustfyi-item-detail-related h2 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--rfyi-rust-bright);
    margin: 0 0 12px;
}
.rustfyi-item-detail-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.rustfyi-item-detail-related-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--rfyi-bg);
    border: 1px solid var(--rfyi-border);
    border-radius: 3px;
    color: var(--rfyi-text);
    text-decoration: none;
    transition: all .12s ease;
}
.rustfyi-item-detail-related-list a:hover {
    border-color: var(--rfyi-rust-dim);
    background: rgba(205, 65, 43, .05);
}
.rustfyi-item-detail-related-list img {
    object-fit: contain;
    flex-shrink: 0;
    background: transparent;
}
.rustfyi-item-detail-related-list span {
    flex: 1;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rustfyi-item-detail-related-list small {
    color: var(--rfyi-muted);
    font-size: .72rem;
    font-family: "Courier New", monospace;
}

/* Underline shortname on list to indicate it links to detail. */
.rustfyi-item-detail-link {
    text-decoration: none;
    border-bottom: 1px dotted var(--rfyi-border-strong);
}
.rustfyi-item-detail-link:hover { border-bottom-color: var(--rfyi-rust-bright); }

/* ---------- Servers page ---------- */

.rfyi-servers-gate {
    position: fixed; inset: 0;
    background: rgba(10, 12, 10, .9);
    display: flex; align-items: center; justify-content: center;
    z-index: 1500;
    padding: 20px;
}
.rfyi-servers-gate-card {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(180deg, var(--rfyi-bg-raised) 0%, var(--rfyi-bg) 100%);
    border: 1px solid var(--rfyi-border-strong);
    border-radius: var(--rfyi-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.rfyi-servers-gate-body {
    padding: 28px;
}
.rfyi-servers-gate-body h2 {
    font-family: "Oswald", "Impact", sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--rfyi-text);
    font-size: 1.4rem;
    margin: 0 0 8px;
}
.rfyi-servers-gate-body p { color: var(--rfyi-metal); margin: 0 0 16px; }
.rfyi-servers-gate-body input {
    background: var(--rfyi-bg); border: 1px solid var(--rfyi-border-strong);
    color: var(--rfyi-text);
}
.rfyi-servers-gate-body input:focus {
    background: var(--rfyi-bg); border-color: var(--rfyi-rust);
    box-shadow: 0 0 0 .2rem rgba(205,65,43,.15);
    color: var(--rfyi-text);
}
.rfyi-servers-gate-error {
    color: #e85d3f;
    font-size: .85rem;
    margin-top: 10px;
    min-height: 1em;
}

.rfyi-servers-ads {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(90deg, rgba(255,177,60,.08) 0%, rgba(205,65,43,.05) 100%);
    border: 1px solid rgba(255,177,60,.25);
    border-radius: var(--rfyi-radius);
}
.rfyi-servers-ads-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .72rem;
    color: var(--rfyi-dlc);
    margin-bottom: 10px;
    font-weight: 700;
}
.rfyi-servers-ad {
    position: relative;
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius);
    padding: 14px 16px;
    height: 100%;
    overflow: hidden;
}
.rfyi-servers-ad-emblem {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,177,60,.12);
    border: 1px solid rgba(255,177,60,.35);
    color: var(--rfyi-dlc);
    pointer-events: none;
    filter: drop-shadow(0 0 6px rgba(255,177,60,.25));
}
.rfyi-servers-ad-emblem svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.rfyi-servers-ad-emblem-0 .rfyi-servers-ad-emblem { color: #ffb13c; background: rgba(255,177,60,.14); border-color: rgba(255,177,60,.45); }
.rfyi-servers-ad-emblem-1 .rfyi-servers-ad-emblem { color: #ff6a3d; background: rgba(255,106,61,.14);  border-color: rgba(255,106,61,.45); }
.rfyi-servers-ad-emblem-2 .rfyi-servers-ad-emblem { color: #ffd166; background: rgba(255,209,102,.14); border-color: rgba(255,209,102,.5); }
.rfyi-servers-ad-emblem-3 .rfyi-servers-ad-emblem { color: #7bd3ff; background: rgba(123,211,255,.14); border-color: rgba(123,211,255,.45); }
.rfyi-servers-ad-emblem-4 .rfyi-servers-ad-emblem { color: #9df27d; background: rgba(157,242,125,.14); border-color: rgba(157,242,125,.45); }
.rfyi-servers-ad-emblem-5 .rfyi-servers-ad-emblem { color: #d79bff; background: rgba(215,155,255,.14); border-color: rgba(215,155,255,.45); }
.rfyi-servers-ad-head {
    padding-right: 36px;
}

/* Clickable row-number button in the servers table. */
.rfyi-srv-rownum {
    background: transparent;
    border: 1px solid transparent;
    color: var(--rfyi-muted);
    font: inherit;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.rfyi-srv-rownum:hover,
.rfyi-srv-rownum:focus {
    background: rgba(255,177,60,.12);
    border-color: rgba(255,177,60,.35);
    color: var(--rfyi-dlc);
    outline: none;
}

/* Raw-tags modal. */
.rfyi-srv-rawtags-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 20px;
}
.rfyi-srv-rawtags-modal[hidden] { display: none; }
.rfyi-srv-rawtags-card {
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius);
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.rfyi-srv-rawtags-body {
    padding: 18px 22px 22px;
    overflow: auto;
}
.rfyi-srv-rawtags-body h3 {
    margin: 4px 0 2px;
    color: var(--rfyi-text);
    font-size: 1.05rem;
    text-transform: none;
    letter-spacing: 0;
    font-family: inherit;
    font-weight: 600;
    word-break: break-word;
}
.rfyi-srv-rawtags-sub { margin-bottom: 12px; }
.rfyi-srv-rawtags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
/* Inline reference tables shown under certain convars (e.g. ping region codes). */
.rfyi-convar-extra {
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(255,177,60,.05);
    border: 1px solid rgba(255,177,60,.2);
    border-radius: 4px;
}
.rfyi-convar-extra > summary {
    cursor: pointer;
    color: var(--rfyi-dlc);
    font-weight: 600;
    font-size: .82rem;
    list-style: none;
    padding: 2px 0;
}
.rfyi-convar-extra > summary::-webkit-details-marker { display: none; }
.rfyi-convar-extra > summary::before { content: "▸ "; display: inline-block; transition: transform .12s; }
.rfyi-convar-extra[open] > summary::before { content: "▾ "; }
.rfyi-pingregion-table {
    width: 100%;
    margin: 8px 0 4px;
    font-size: .82rem;
    border-collapse: collapse;
}
.rfyi-pingregion-table th,
.rfyi-pingregion-table td {
    padding: 3px 8px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    text-align: left;
    vertical-align: top;
}
.rfyi-pingregion-table th {
    color: var(--rfyi-dlc);
    font-weight: 600;
    border-bottom-color: rgba(255,177,60,.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: .7rem;
}
.rfyi-pingregion-table code { color: var(--rfyi-text); }
.rfyi-convar-extra-note { margin: 6px 0 0; }

.rfyi-srv-rawtag-pill {
    background: rgba(255,177,60,.08);
    border: 1px solid rgba(255,177,60,.3);
    color: var(--rfyi-dlc);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: "Courier New", monospace;
    font-size: .82rem;
    white-space: nowrap;
}
.rfyi-srv-rawtags-pretty {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 6px 0 16px;
}
.rfyi-srv-rawtags-prettyrow {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.rfyi-srv-rawtags-prettylabel {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--rfyi-muted);
    min-width: 110px;
    font-weight: 700;
}
.rfyi-srv-rawtags-rawhead {
    margin: 12px 0 2px;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--rfyi-muted);
    font-weight: 700;
}
.rfyi-servers-ad-head {
    display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.rfyi-servers-ad-head h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--rfyi-text);
    text-transform: none;
    letter-spacing: 0;
    font-family: inherit;
    font-weight: 600;
}
.rfyi-servers-ad-badge {
    background: var(--rfyi-dlc);
    color: #1a1206;
    font-weight: 800;
    font-size: .62rem;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 2px;
}
.rfyi-servers-ad-meta {
    font-family: "Courier New", monospace;
    font-size: .82rem;
    color: var(--rfyi-muted);
}

.rfyi-servers-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
/* Search row: input on the left, Advanced Search button on the right,
   both aligned to the server table edges. */
.rfyi-srv-searchbar {
    display: flex;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}
.rfyi-srv-search-input.form-control {
    flex: 1 1 auto;
    height: 38px;
    padding: 6px 14px 6px 36px;
    font-size: .9rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: .01em;
    background: var(--rfyi-bg-raised) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 10px center;
    background-size: 16px 16px;
    border: 1px solid var(--rfyi-border);
    border-radius: 6px;
    color: var(--rfyi-text);
    transition: border-color .12s, box-shadow .12s;
}
.rfyi-srv-search-input.form-control:focus {
    background-color: var(--rfyi-bg-raised);
    color: var(--rfyi-text);
    border-color: var(--rfyi-rust-dim);
    box-shadow: 0 0 0 2px rgba(205,65,43,.15);
    outline: none;
}
.rfyi-srv-search-input::placeholder { color: var(--rfyi-muted); font-weight: 400; }

.rfyi-srv-advanced-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    font-size: .82rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: .02em;
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border);
    border-radius: 6px;
    color: var(--rfyi-text);
    cursor: pointer;
    transition: all .12s ease;
    white-space: nowrap;
}
.rfyi-srv-advanced-btn:hover {
    border-color: var(--rfyi-rust-dim);
    color: var(--rfyi-rust-bright);
}
.rfyi-srv-advanced-btn.is-open {
    background: var(--rfyi-rust);
    border-color: var(--rfyi-rust);
    color: #fff;
}
.rfyi-srv-advanced-btn-caret {
    font-size: .72rem;
    opacity: .8;
}
.rfyi-srv-active-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: .68rem;
    font-weight: 700;
    background: var(--rfyi-dlc);
    color: #1a1206;
    border-radius: 10px;
}

.rfyi-servers-tag-filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 14px 14px 14px;
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border);
    border-radius: 6px;
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--rfyi-border) transparent;
}
.rfyi-servers-tag-filter[hidden] { display: none; }

/* Short usage hint directly under the search bar. */
.rfyi-srv-hint {
    margin: -2px 0 0;
    font-size: .78rem;
    letter-spacing: .01em;
    color: var(--rfyi-muted);
}
.rfyi-srv-hint strong { color: var(--rfyi-dlc); font-weight: 600; }

/* Server-name line: name wrapper (which carries the fresh-wipe ribbon
   as an absolutely-positioned corner label) + the optional queue chip. */
.rfyi-srv-nameline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.rfyi-srv-namewrap {
    position: relative;
    display: inline-block;
    line-height: 1.2;
}
/* Give fresh-wipe rows a touch of top padding so the ribbon doesn't
   crash into the row above. */
.rfyi-srv-namewrap.is-fresh { padding-top: 10px; }

/* Fresh-wipe ribbon — small corner label pinned to the top-right of
   the server name. Shown when `born<unix>` indicates <24h since save. */
.rfyi-srv-wipe-ribbon {
    position: absolute;
    top: -4px;
    left: -4px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #1a1206;
    background: linear-gradient(135deg, #ffd166 0%, #ffb13c 100%);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.45),
                0 0 8px rgba(255,177,60,.55);
    white-space: nowrap;
    cursor: help;
    pointer-events: auto;
    animation: rfyi-wipe-ribbon-pulse 2.4s ease-in-out infinite;
    z-index: 2;
}
@keyframes rfyi-wipe-ribbon-pulse {
    0%, 100% { box-shadow: 0 2px 6px rgba(0,0,0,.45), 0 0 8px  rgba(255,177,60,.55); }
    50%      { box-shadow: 0 2px 6px rgba(0,0,0,.45), 0 0 14px rgba(255,177,60,.85); }
}

/* Clickable server address — opens Steam and launches Rust connect. */
.rfyi-srv-connect {
    text-decoration: none;
    color: inherit;
}
.rfyi-srv-connect code {
    cursor: pointer;
    transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.rfyi-srv-connect:hover code,
.rfyi-srv-connect:focus-visible code {
    color: var(--rfyi-rust, #d97b3a);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Fresh-wipe timestamp — same amber treatment as the ribbon, applied
   to the "Wiped" column cell when the save is <24h old. */
.rfyi-srv-wiped-fresh {
    display: inline-block;
    padding: 2px 7px;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #1a1206 !important;
    background: linear-gradient(135deg, #ffd166 0%, #ffb13c 100%);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.45),
                0 0 8px rgba(255,177,60,.55);
    white-space: nowrap;
    animation: rfyi-wipe-ribbon-pulse 2.4s ease-in-out infinite;
}

/* WebKit scrollbar — slim, matches theme, visible on hover. */
.rfyi-servers-tag-filter::-webkit-scrollbar          { width: 8px; }
.rfyi-servers-tag-filter::-webkit-scrollbar-track    { background: transparent; }
.rfyi-servers-tag-filter::-webkit-scrollbar-thumb    { background: var(--rfyi-border); border-radius: 4px; }
.rfyi-servers-tag-filter::-webkit-scrollbar-thumb:hover { background: var(--rfyi-rust-dim); }
.rfyi-srv-tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--rfyi-border);
}
.rfyi-srv-tag-group:last-child { border-bottom: 0; padding-bottom: 0; }
.rfyi-srv-tag-group-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--rfyi-muted);
    margin-right: 10px;
    min-width: 90px;
    font-weight: 700;
}
.rfyi-srv-tag {
    background: var(--rfyi-bg);
    border: 1px solid var(--rfyi-border);
    color: var(--rfyi-text);
    font-size: .78rem;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all .1s ease;
}
.rfyi-srv-tag:hover { border-color: var(--rfyi-rust-dim); color: var(--rfyi-rust-bright); }
.rfyi-srv-tag.active { background: var(--rfyi-rust); border-color: var(--rfyi-rust); color: #fff; }
.rfyi-srv-tag-count {
    display: inline-block;
    margin-left: 4px;
    font-size: .68rem;
    opacity: .7;
}

.rfyi-srv-tag-pill {
    display: inline-block;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--rfyi-border);
    color: var(--rfyi-metal);
    font-size: .68rem;
    padding: 1px 7px;
    border-radius: 10px;
    margin-right: 3px;
    margin-bottom: 2px;
    cursor: pointer;
    text-transform: lowercase;
}
.rfyi-srv-tag-pill:hover { color: var(--rfyi-rust-bright); border-color: var(--rfyi-rust-dim); }

.rfyi-srv-queue {
    color: var(--rfyi-dlc);
    font-size: .72rem;
    margin-left: 6px;
}
/* Em-dash placeholder for stats we don't have yet (world size, ent_cnt,
   fps_avg — all live only in A2S_RULES, which can't be queried from a
   host that blocks outbound UDP). */
.rfyi-srv-na { opacity: .35; }

/* Keep eight columns legible on narrow table widths. */
.rustfyi-table.table th,
.rustfyi-table.table td { padding-left: 8px; padding-right: 8px; }

.rfyi-servers-count { margin-top: 12px; }

/* ---------- Admin page ---------- */

.rfyi-admin-list {
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius);
    padding: 16px;
}
.rfyi-admin-row {
    display: grid;
    grid-template-columns: 70px 1fr 1fr 90px 1fr 40px;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--rfyi-border);
}
.rfyi-admin-row:last-child { border-bottom: 0; }
.rfyi-admin-row-head {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--rfyi-muted);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rfyi-border-strong);
}
.rfyi-admin-row input[type="text"],
.rfyi-admin-row input[type="url"],
.rfyi-admin-row input[type="number"] {
    background: var(--rfyi-bg);
    border: 1px solid var(--rfyi-border);
    color: var(--rfyi-text);
    font-size: .88rem;
}
.rfyi-admin-row input:focus {
    background: var(--rfyi-bg);
    border-color: var(--rfyi-rust);
    box-shadow: 0 0 0 .15rem rgba(205,65,43,.15);
    color: var(--rfyi-text);
}
.rfyi-admin-row input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--rfyi-rust);
    cursor: pointer;
}
.rfyi-admin-col-active { text-align: center; }
.rfyi-admin-col-del    { text-align: center; }
.rfyi-admin-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--rfyi-border);
    flex-wrap: wrap;
}
.rfyi-admin-status { color: var(--rfyi-muted); font-size: .85rem; }
.rfyi-admin-status.ok   { color: var(--rfyi-success); }
.rfyi-admin-status.warn { color: var(--rfyi-dlc); }
.rfyi-admin-logout {
    margin-left: auto;
    color: var(--rfyi-muted);
    text-decoration: none;
    font-size: .85rem;
}
.rfyi-admin-logout:hover { color: var(--rfyi-rust-bright); }

.rfyi-servers-gate-static { position: static; background: transparent; padding: 60px 0; }

@media (max-width: 900px) {
    .rfyi-admin-row { grid-template-columns: 1fr; }
    .rfyi-admin-row-head { display: none; }
    .rfyi-admin-col-active::before,
    .rfyi-admin-col-label::before,
    .rfyi-admin-col-ip::before,
    .rfyi-admin-col-port::before,
    .rfyi-admin-col-url::before {
        content: attr(data-label);
        display: block;
        font-size: .68rem;
        text-transform: uppercase;
        color: var(--rfyi-muted);
        margin-bottom: 2px;
    }
}

/* ---------- Policy / long-form pages ---------- */

.rustfyi-policy section {
    background: var(--rfyi-bg-raised);
    border: 1px solid var(--rfyi-border);
    border-radius: var(--rfyi-radius);
    padding: 20px 24px;
    margin-bottom: 16px;
}
.rustfyi-policy h2 {
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--rfyi-rust-bright);
    margin: 0 0 10px;
    font-family: "Oswald", "Impact", sans-serif;
}
.rustfyi-policy p { color: var(--rfyi-text); line-height: 1.7; margin: 0 0 10px; }
.rustfyi-policy ul { color: var(--rfyi-text); line-height: 1.8; margin: 0 0 10px 20px; }
.rustfyi-policy a {
    color: var(--rfyi-rust-bright);
    text-decoration: underline;
    text-decoration-color: rgba(205, 65, 43, .35);
}
.rustfyi-policy a:hover { text-decoration-color: var(--rfyi-rust-bright); }
.rustfyi-policy strong { color: var(--rfyi-text); }

/* ---------- Footer ---------- */

.rustfyi-footer {
    background: #0b0d0a; border-top: 1px solid var(--rfyi-border);
    padding: 30px 0; margin-top: 60px;
}
.rustfyi-footer .text-light-emphasis {
    color: var(--rfyi-metal) !important; text-decoration: none;
}
.rustfyi-footer .text-light-emphasis:hover { color: var(--rfyi-rust-bright) !important; }

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .rustfyi-sidebar { position: static; max-height: none; margin-bottom: 20px; }
    .rustfyi-hero-title { font-size: 3rem; }
}
@media (max-width: 575px) {
    .rustfyi-hero { padding: 40px 10px 20px; }
    .rustfyi-hero-title { font-size: 2.2rem; }
    .rustfyi-card-count { font-size: 1.8rem; }
    .rustfyi-vpanel-build { font-size: 1.8rem; }
}

/* Hide pagination controls while a search is active on prefabs/items/convars.
   The JS toggles .rfyi-search-active on <body> whenever the search box has
   any text; clearing the box or reloading the page removes the class. */
body.rfyi-search-active .rustfyi-pagination { display: none !important; }

/* ---------------------------------------------------------------------------
   3D prefab viewer — column chip + Bootstrap modal that hosts a three.js
   scene. See js/rustfyi-prefab-viewer.js for the runtime half.
   --------------------------------------------------------------------------- */
.rustfyi-cell-3d { text-align: center; white-space: nowrap; }

.rfyi-prefab-show {
    display: inline-block;
    padding: 2px 10px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #1a1206;
    background: linear-gradient(135deg, #ffd166 0%, #ffb13c 100%);
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.4);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.rfyi-prefab-show:hover,
.rfyi-prefab-show:focus-visible {
    color: #1a1206;
    text-decoration: none;
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 2px 8px rgba(255,177,60,.55);
}

/* 2D icon fallback shown when a prefab has a GLB but no proper textures
   (manifest textured=false). The icon lives at /item-images/<name>.png,
   shortname-indexed; the <img> onerror handler hides it when missing. */
.rfyi-prefab-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: .85;
    border-radius: 4px;
}

.rfyi-prefab-modal .modal-content {
    background: #14100d;
    border-color: #3a2e24;
}
.rfyi-prefab-modal .rfyi-prefab-modal-title {
    margin: 0;
    font-weight: 700;
    letter-spacing: .3px;
}
.rfyi-prefab-modal .rfyi-prefab-modal-path {
    display: block;
    margin-top: 2px;
    word-break: break-all;
}

.rfyi-prefab-viewer-body {
    min-height: 480px;
    padding: 0;
    position: relative;
    background: #0d0a08;
}
.rfyi-prefab-canvas-wrap {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
}
.rfyi-prefab-canvas-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    cursor: grab;
}
.rfyi-prefab-canvas-wrap canvas:active { cursor: grabbing; }

.rfyi-prefab-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cdb597;
    font-size: .9rem;
    letter-spacing: .5px;
    pointer-events: none;
}

.rfyi-prefab-fallback {
    padding: 48px 32px;
    text-align: center;
    color: #cdb597;
}
.rfyi-prefab-fallback-icon {
    font-size: 2.6rem;
    margin-bottom: 12px;
    opacity: .7;
}
.rfyi-prefab-fallback h5 {
    color: #ffd166;
    font-weight: 700;
    margin-bottom: 8px;
}
.rfyi-prefab-fallback code {
    color: #ffb13c;
    word-break: break-all;
}

/* SHOW button in the prefabs table + search results */
.rustfyi-cell-show {
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}
.rustfyi-show-btn {
    display: inline-block;
    padding: 2px 10px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .6px;
    color: #14100d;
    background: linear-gradient(180deg, #ffbc5a, #ff8f2b);
    border: 1px solid #a65a18;
    border-radius: 3px;
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25);
    text-shadow: 0 1px 0 rgba(255,255,255,.15);
    transition: filter .12s ease, transform .12s ease;
}
.rustfyi-show-btn:hover,
.rustfyi-show-btn:focus {
    color: #14100d;
    filter: brightness(1.08);
    text-decoration: none;
}
.rustfyi-show-btn:active {
    transform: translateY(1px);
    filter: brightness(.92);
}

/* Prefab modal polish — pairs with the existing .rfyi-prefab-* styles. */
.rfyi-prefab-modal .modal-header {
    border-bottom: 1px solid #3a2e24;
    padding: 12px 20px;
}
.rfyi-prefab-modal .modal-footer {
    border-top: 1px solid #3a2e24;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.rfyi-prefab-modal .rfyi-prefab-modal-path {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rfyi-prefab-modal .rfyi-prefab-close-btn {
    flex: 0 0 auto;
    padding: 4px 16px;
    font-size: .78rem;
}
.rfyi-prefab-modal .rfyi-prefab-modal-path {
    font-size: .8rem;
    color: #8c7a65 !important;
}
.rfyi-prefab-modal .btn-close {
    filter: invert(1) grayscale(1);
    opacity: .55;
}
.rfyi-prefab-modal .btn-close:hover {
    opacity: .9;
}
