/*
 * Varnyra Wiki Skin
 * Author: Marciismx
 * Website: https://wiki.varnyra.com
 * Description: Custom fantasy theme for the Varnyra Minecraft MMO-RPG wiki.
 */

/* ------------------------------
   Base
------------------------------ */

html,
body {
    margin: 0;
    min-height: 100%;
    background: #05070d;
    color: #f5efe1;
    font-family: Georgia, "Times New Roman", serif;
}

body {
    background:
        radial-gradient(circle at top right, rgba(104, 36, 145, 0.22), transparent 38%),
        radial-gradient(circle at top left, rgba(255, 174, 66, 0.10), transparent 32%),
        linear-gradient(180deg, #05070d 0%, #080b12 100%);
}

.varnyra-shell a {
    color: #c084fc;
    text-decoration: none;
}

.varnyra-shell a:hover {
    color: #fbbf24;
}

.printfooter,
#catlinks,
.mw-hidden-catlinks,
.mw-normal-catlinks {
    display: none !important;
}

/* ------------------------------
   Shell / Layout
------------------------------ */

.varnyra-shell {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    min-height: 100vh;
}

.varnyra-main {
    min-width: 0;
    padding: 22px 34px 28px;
    overflow-x: hidden;
}

/* ------------------------------
   Sidebar
------------------------------ */

.varnyra-sidebar {
    width: 310px;
    box-sizing: border-box;
    padding: 26px 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(5, 7, 13, 0.96), rgba(3, 5, 10, 0.98));
    box-shadow: inset -1px 0 0 rgba(251, 191, 36, 0.05);
}

.varnyra-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.12);
}

.varnyra-logo {
    width: 62px;
    height: auto;
    image-rendering: pixelated;
}

.varnyra-brand-title {
    color: #fbbf24;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1;
    text-transform: uppercase;
}

.varnyra-brand-subtitle {
    color: #c084fc;
    font-size: 15px;
    letter-spacing: 6px;
    text-transform: uppercase;
    text-align: center;
    margin-top: 4px;
}

.varnyra-menu {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    padding: 12px 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.18);
}

.varnyra-menu-section {
    position: relative;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.varnyra-menu-section:last-child {
    border-bottom: none;
}

.varnyra-menu-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fbbf24;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.12);
}

.varnyra-menu a {
    position: relative;
    display: block;
    padding-left: 28px;
    color: #fff7e6;
    font-size: 15px;
    line-height: 1.75;
    opacity: 0.92;
    transition: 0.15s ease;
}

.varnyra-menu a::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(192, 132, 252, 0.55);
    transform: translateY(-50%);
    opacity: 0;
}

.varnyra-menu a:hover {
    color: #fbbf24;
    padding-left: 32px;
}

.varnyra-menu a:hover::before {
    opacity: 1;
}

/* ------------------------------
   Topbar
------------------------------ */

.varnyra-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 58px;
    max-width: 1380px;
    margin: 0 auto 28px;
}

.varnyra-search {
    display: flex;
    align-items: center;
    width: min(520px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.02),
        0 0 22px rgba(147, 51, 234, 0.08);
}

.varnyra-search:focus-within {
    border-color: rgba(251, 191, 36, 0.38);
    box-shadow:
        0 0 0 2px rgba(251, 191, 36, 0.08),
        0 0 26px rgba(147, 51, 234, 0.14);
}

.varnyra-search input {
    flex: 1;
    padding: 16px 18px;
    background: transparent;
    border: none;
    color: #f5efe1;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    outline: none;
}

.varnyra-search input::placeholder {
    color: rgba(245, 239, 225, 0.55);
}

.varnyra-search button {
    padding: 14px 18px;
    background: transparent;
    border: none;
    color: #fbbf24;
    font-size: 22px;
    cursor: pointer;
    transition: 0.15s ease;
}

.varnyra-search button:hover {
    color: #fff8e7;
    transform: scale(1.08);
}

.varnyra-quicklinks {
    display: flex;
    gap: 24px;
    margin-left: auto;
    padding: 10px 14px;
    border-radius: 999px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.015);
}

.varnyra-quicklinks a {
    color: #fbbf24;
    font-size: 15px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.12);
}

.varnyra-quicklinks a:hover {
    color: #c084fc;
}

/* ------------------------------
   Page Container
------------------------------ */

.varnyra-page {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 1440px;
    min-height: 720px;
    margin-left: auto;
    margin-right: auto;
    padding: 34px 48px 56px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 10px;
    background:
        radial-gradient(circle at top right, rgba(147, 51, 234, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(10, 14, 22, 0.94), rgba(4, 7, 12, 0.96));
    box-shadow:
        0 0 46px rgba(0, 0, 0, 0.38),
        inset 0 0 38px rgba(255, 255, 255, 0.018);
    font-size: 16px;
}

.varnyra-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 10px;
    background:
        linear-gradient(90deg, rgba(251, 191, 36, 0.06), transparent 18%, transparent 82%, rgba(168, 85, 247, 0.06));
}

.varnyra-page > * {
    position: relative;
    z-index: 1;
}

.varnyra-page h1,
.varnyra-page .firstHeading {
    color: #fff8e7;
    font-size: 52px;
    line-height: 1.1;
    margin: 0 0 18px;
    font-weight: 700;
}

.varnyra-page h2 {
    color: #fbbf24;
    font-size: 24px;
    font-variant: small-caps;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.22);
    padding-bottom: 8px;
    margin-top: 32px;
}

.varnyra-page p,
.varnyra-page li {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
}

.varnyra-footer {
    display: flex;
    justify-content: space-between;
    color: rgba(245, 239, 225, 0.65);
    padding: 22px 4px;
    font-size: 14px;
}

/* ------------------------------
   Adminbar + Mapping
------------------------------ */

.varnyra-adminbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;

    min-height: 22px;
    margin: 0 0 18px;
    padding: 4px 8px;

    border-radius: 2px;
    background: rgba(0, 0, 0, 0.38);
    border-bottom: 1px solid rgba(168, 85, 247, 0.10);
    box-shadow: none;
}

.varnyra-adminbar-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.varnyra-adminbar-right {
    display: none;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
    margin-left: 18px;
}

.varnyra-adminbar.is-admin .varnyra-adminbar-right {
    display: flex;
}

/* When the user is not an admin, keep only mapping visible and remove the empty admin panel look. */
.varnyra-adminbar:not(.is-admin) {
    background: transparent;
    border-bottom: none;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

.varnyra-adminbar-label,
.varnyra-adminbar-title {
    display: none !important;
}

.varnyra-adminbar-right a {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border: 1px solid rgba(225, 29, 72, 0.28);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    color: #fda4af;
    font-size: 10px;
    line-height: 1;
    opacity: 0.76;
}

.varnyra-adminbar-right a:hover {
    border-color: rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.06);
    color: #fbbf24;
    opacity: 1;
    transform: translateY(-1px);
}

.vy-breadcrumb-map {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.vy-breadcrumb-path {
    display: inline-block;
    color: #d8b4fe;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vy-breadcrumb-path a {
    color: #d8b4fe;
}

.vy-breadcrumb-path a:hover {
    color: #fbbf24;
}

/* Hide older MediaWiki page tools if still present */
.varnyra-page-tools {
    display: none !important;
}

/* ------------------------------
   Codex Page Layout
------------------------------ */

.vy-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 30px;
    align-items: start;
}

.vy-main-column {
    min-width: 0;
}

.vy-side-column {
    position: sticky;
    top: 24px;
}

.vy-entry-title {
    color: #fff8e7;
    font-size: 58px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1;
    margin: 0 0 16px;
    text-shadow: 0 0 18px rgba(251, 191, 36, 0.12);
}

.vy-intro {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 5px solid #a855f7;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 22px;
    background:
        linear-gradient(90deg, rgba(168, 85, 247, 0.08), rgba(255, 255, 255, 0.018));
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.015);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
}

.vy-section-title {
    color: #fbbf24;
    font-size: 25px;
    font-weight: 700;
    font-variant: small-caps;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.22);
    padding-bottom: 8px;
    margin-top: 26px;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.14);
}

.vy-stat-table {
    margin-top: 8px;
}

.vy-stat-row {
    display: grid;
    grid-template-columns: 38px minmax(140px, 1fr) 1fr;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 16px;
}

.vy-stat-icon {
    text-align: center;
}

.vy-stat-label,
.vy-stat-value {
    font-weight: 400;
}

.vy-stat-label {
    color: #f5efe1;
}

.vy-stat-value {
    color: #ffffff;
}

/* ------------------------------
   Drop Cards
------------------------------ */

.vy-drops {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.vy-drop-card {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background:
        radial-gradient(circle at center 18%, rgba(251, 191, 36, 0.06), transparent 42%),
        rgba(255, 255, 255, 0.025);
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.vy-drop-card:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 191, 36, 0.38);
    background:
        radial-gradient(circle at center 18%, rgba(251, 191, 36, 0.10), transparent 44%),
        rgba(255, 255, 255, 0.04);
}

.vy-drop-card img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    image-rendering: pixelated;
    margin-bottom: 8px;
}

.vy-drop-name {
    margin-top: 8px;
    color: #fff8e7;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.vy-drop-chance {
    color: #fbbf24;
    font-size: 14px;
    opacity: 0.92;
}

.vy-note {
    margin-top: 18px;
    padding: 14px 18px;
    border-left: 5px solid #9333ea;
    border-radius: 6px;
    background: rgba(147, 51, 234, 0.10);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}

/* ------------------------------
   Right Codex Panel
------------------------------ */

.vy-codex {
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(251, 191, 36, 0.52);
    border-radius: 6px;
    background:
        radial-gradient(circle at center 30%, rgba(147, 51, 234, 0.28), transparent 42%),
        radial-gradient(circle at bottom center, rgba(251, 191, 36, 0.08), transparent 40%),
        linear-gradient(180deg, rgba(20, 12, 32, 0.98), rgba(5, 5, 10, 0.98));
    box-shadow:
        0 0 32px rgba(147, 51, 234, 0.14),
        inset 0 0 26px rgba(255, 255, 255, 0.025);
}

.vy-codex::before,
.vy-codex::after {
    content: "◆";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #a855f7;
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.65);
    font-size: 20px;
    line-height: 1;
}

.vy-codex::before {
    top: -11px;
}

.vy-codex::after {
    bottom: -11px;
}

.vy-codex-titlebar {
    text-align: center;
    color: #fbbf24;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 7px;
    text-transform: uppercase;
    margin: 2px 0 10px;
    padding-top: 4px;
    text-shadow: 0 0 14px rgba(251, 191, 36, 0.18);
}

.vy-codex-type {
    text-align: center;
    color: #d8b4fe;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.vy-codex-name {
    text-align: center;
    color: #fff8e7;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 0 18px rgba(251, 191, 36, 0.12);
}

.vy-codex-image {
    text-align: center;
    padding: 18px;
    margin-bottom: 14px;
    border-radius: 8px;
    background:
        radial-gradient(circle at center, rgba(168, 85, 247, 0.16), transparent 58%);
}

.vy-codex-image img {
    max-width: 170px;
    height: auto;
    image-rendering: pixelated;
}

.vy-codex-row {
    display: grid;
    grid-template-columns: 44% 56%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    background: rgba(255, 255, 255, 0.018);
}

.vy-codex-row:last-of-type {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vy-codex-key,
.vy-codex-value {
    padding: 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: anywhere;
}

.vy-codex-key {
    color: #fff7e6;
    background: rgba(255, 255, 255, 0.025);
}

.vy-codex-value {
    color: #f8fafc;
}

.vy-codex-quote {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    margin: 22px 0 4px;
    padding: 0 14px;
    color: #d8b4fe;
    text-align: center;
    font-style: italic;
}

.vy-codex-quote span {
    display: block;
    max-width: 250px;
    width: 100%;
    margin: 0 auto;
    color: #d8b4fe;
    font-style: italic;
    font-size: 14px;
    line-height: 1.55;
    white-space: normal !important;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

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

@media screen and (max-width: 1100px) {
    .varnyra-shell {
        grid-template-columns: 1fr;
    }

    .varnyra-sidebar {
        width: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .varnyra-topbar,
    .varnyra-quicklinks {
        flex-wrap: wrap;
    }

    .vy-layout {
        grid-template-columns: 1fr;
    }

    .vy-side-column {
        position: static;
    }

    .vy-drops {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 640px) {
    .varnyra-main {
        padding: 18px;
    }

    .varnyra-page {
        padding: 24px 18px;
    }

    .varnyra-topbar {
        height: auto;
    }

    .varnyra-adminbar {
        grid-template-columns: 1fr;
    }

    .varnyra-adminbar-right {
        justify-content: flex-start;
        margin-left: 0;
        flex-wrap: wrap;
    }

    .vy-entry-title {
        font-size: 44px;
    }

    .vy-drops {
        grid-template-columns: 1fr;
    }
}


/* ------------------------------
   Varnyra data tables
------------------------------ */

.vy-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 18px 0 28px;
    overflow: hidden;

    background:
        radial-gradient(circle at top left, rgba(168, 85, 247, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(10, 14, 22, 0.92), rgba(5, 8, 14, 0.96));

    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 8px;

    box-shadow:
        0 0 24px rgba(0, 0, 0, 0.28),
        inset 0 0 22px rgba(255, 255, 255, 0.015);
}

.vy-table th {
    padding: 12px 14px;

    background:
        linear-gradient(180deg, rgba(20, 12, 32, 0.95), rgba(9, 10, 18, 0.98));

    color: #fbbf24;
    border-right: 1px solid rgba(251, 191, 36, 0.16);
    border-bottom: 1px solid rgba(251, 191, 36, 0.26);

    font-size: 13px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-variant: small-caps;
}

.vy-table th:last-child {
    border-right: none;
}

.vy-table td {
    padding: 11px 14px;

    color: #fff7e6;
    border-right: 1px solid rgba(148, 163, 184, 0.10);
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);

    font-size: 14px;
    line-height: 1.35;
}

.vy-table td:last-child {
    border-right: none;
}

.vy-table tr:last-child td {
    border-bottom: none;
}

.vy-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.018);
}

.vy-table tr:nth-child(odd) td {
    background: rgba(0, 0, 0, 0.10);
}

.vy-table tr:hover td {
    background: rgba(168, 85, 247, 0.08);
}

.vy-table .vy-muted {
    color: #94a3b8;
}

.vy-table .vy-reward-green {
    color: #22c55e;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.18);
}

.vy-table .vy-reward-orange {
    color: #fb923c;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(251, 146, 60, 0.18);
}

.vy-table .vy-reward-blue {
    color: #67e8f9;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(103, 232, 249, 0.18);
}

.vy-table .vy-reward-purple {
    color: #d8b4fe;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(216, 180, 254, 0.18);
}

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

.varnyra-search-wrap {
    position: relative;
    width: min(520px, 100%);
}

.varnyra-search-wrap .varnyra-search {
    width: 100%;
}

.varnyra-search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 100;

    padding: 7px;
    border: 1px solid rgba(168, 85, 247, 0.32);
    border-radius: 10px;

    background:
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 42%),
        linear-gradient(180deg, rgba(8, 10, 18, 0.98), rgba(4, 6, 12, 0.98));

    box-shadow:
        0 18px 38px rgba(0, 0, 0, 0.48),
        inset 0 0 18px rgba(255, 255, 255, 0.018);
}

.varnyra-search-suggestions.is-visible {
    display: block;
}

.varnyra-search-suggestions a,
.varnyra-search-suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 9px 12px;
    border-radius: 7px;

    color: #f5efe1;
    font-size: 14px;
    line-height: 1.2;
}

.varnyra-search-suggestions a:hover {
    background: rgba(168, 85, 247, 0.14);
    color: #fbbf24;
}

.varnyra-search-suggestion-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.varnyra-search-suggestion-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    image-rendering: pixelated;
    flex: 0 0 auto;

    border-radius: 4px;
    opacity: 0.9;
}
/* ------------------------------
   Account widget
------------------------------ */

.varnyra-account {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
}

.varnyra-account-head {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    image-rendering: pixelated;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(0, 0, 0, 0.35);
}

.varnyra-account-login {
    display: inline-flex;
    align-items: center;
    color: #fbbf24;
    font-size: 15px;
    font-weight: 700;
}

.varnyra-account-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: #fbbf24;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.varnyra-account-button:hover,
.varnyra-account-login:hover {
    color: #c084fc;
}

.varnyra-account-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 120;
    min-width: 210px;
    padding: 8px;
    border: 1px solid rgba(168, 85, 247, 0.30);
    border-radius: 10px;
    background:
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 42%),
        linear-gradient(180deg, rgba(8, 10, 18, 0.98), rgba(4, 6, 12, 0.98));
    box-shadow:
        0 18px 38px rgba(0, 0, 0, 0.48),
        inset 0 0 18px rgba(255, 255, 255, 0.018);
}

.varnyra-account-menu.is-visible {
    display: block;
}

.varnyra-account-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 7px;
    color: #f5efe1;
    font-size: 14px;
}

.varnyra-account-menu a:hover {
    background: rgba(168, 85, 247, 0.14);
    color: #fbbf24;
}

@media screen and (max-width: 900px) {
    .varnyra-quicklinks {
        gap: 12px;
    }

    .varnyra-account-login,
    .varnyra-account-button {
        font-size: 14px;
    }
}

/* ------------------------------
   MediaWiki 1.46 system UI - stable Citizen-like Varnyra layer
   Preferences / Special pages / Edit / History / Upload
------------------------------ */

/* System pages should use a clean UI font, not the fantasy article font. */
.mw-special-Preferences .varnyra-page,
.mw-special-Recentchanges .varnyra-page,
.mw-special-Upload .varnyra-page,
.action-edit .varnyra-page,
.action-history .varnyra-page {
    color: #d7e0ee;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.mw-special-Preferences .varnyra-page *,
.mw-special-Recentchanges .varnyra-page *,
.mw-special-Upload .varnyra-page *,
.action-edit .varnyra-page *,
.action-history .varnyra-page * {
    font-family: inherit !important;
}

/* Keep fantasy article styling away from MediaWiki controls. */
.mw-special-Preferences .varnyra-page p,
.mw-special-Preferences .varnyra-page li,
.mw-special-Recentchanges .varnyra-page p,
.mw-special-Recentchanges .varnyra-page li,
.mw-special-Upload .varnyra-page p,
.mw-special-Upload .varnyra-page li,
.action-edit .varnyra-page p,
.action-edit .varnyra-page li,
.action-history .varnyra-page p,
.action-history .varnyra-page li {
    font-size: 14px;
    line-height: 1.5;
}

/* General system UI colors. */
.varnyra-page .mw-body-content,
.varnyra-page .mw-htmlform,
.varnyra-page .mw-htmlform-ooui,
.varnyra-page .mw-specialpage-summary,
.varnyra-page .oo-ui-widget,
.varnyra-page .oo-ui-layout,
.varnyra-page .cdx-card,
.varnyra-page .cdx-field {
    color: #d7e0ee;
}

.varnyra-page a,
.varnyra-page .mw-body-content a {
    color: #c084fc;
}

.varnyra-page a:hover,
.varnyra-page .mw-body-content a:hover {
    color: #fbbf24;
}

/* Clean inputs/buttons for MediaWiki system pages. */
.varnyra-page input:not([type="checkbox"]):not([type="radio"]),
.varnyra-page textarea,
.varnyra-page select,
.varnyra-page .oo-ui-inputWidget-input,
.varnyra-page .oo-ui-dropdownWidget-handle,
.varnyra-page .cdx-text-input__input,
.varnyra-page .cdx-select-vue__handle {
    box-sizing: border-box !important;
    background: #0b111b !important;
    color: #e5edf7 !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.varnyra-page input:not([type="checkbox"]):not([type="radio"]):focus,
.varnyra-page textarea:focus,
.varnyra-page select:focus,
.varnyra-page .oo-ui-inputWidget-input:focus {
    border-color: rgba(251, 191, 36, 0.55) !important;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.10) !important;
    outline: none !important;
}

.varnyra-page button,
.varnyra-page input[type="submit"],
.varnyra-page input[type="button"],
.varnyra-page .oo-ui-buttonElement-button,
.varnyra-page .cdx-button {
    background: #101827 !important;
    color: #e5edf7 !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    font-weight: 650 !important;
    cursor: pointer;
}

.varnyra-page button:hover,
.varnyra-page input[type="submit"]:hover,
.varnyra-page input[type="button"]:hover,
.varnyra-page .oo-ui-buttonElement-button:hover,
.varnyra-page .cdx-button:hover {
    background: rgba(251, 191, 36, 0.12) !important;
    color: #fbbf24 !important;
    border-color: rgba(251, 191, 36, 0.45) !important;
}

.varnyra-page input[type="checkbox"],
.varnyra-page input[type="radio"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    margin: 0 7px 0 0;
    vertical-align: -3px;
    accent-color: #7c3aed;
}

/* OOUI creates its own checkbox/radio visual layer.
   Keep the real input clickable but visually hidden, otherwise a double checkbox appears. */
.varnyra-page .oo-ui-checkboxInputWidget input[type="checkbox"],
.varnyra-page .oo-ui-radioInputWidget input[type="radio"] {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    opacity: 0;
    z-index: 2;
    cursor: pointer;
    accent-color: #7c3aed;
}

.varnyra-page label {
    color: #d7e0ee;
}

/* --------------------------------------------------
   Preferences: Citizen-like layout without breaking OOUI tabs
-------------------------------------------------- */

.mw-special-Preferences .varnyra-page {
    overflow-x: auto;
}

.mw-special-Preferences .varnyra-page #preferences {
    max-width: 1220px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: 0;
    color: #d7e0ee;
}

/* Critical: hide inactive preference tab panels so empty boxes/columns do not show. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout[aria-hidden="true"],
.mw-special-Preferences .varnyra-page #preferences .oo-ui-bookletLayout-stackLayout > .oo-ui-tabPanelLayout:not(.oo-ui-tabPanelLayout-active),
.mw-special-Preferences .varnyra-page #preferences .oo-ui-bookletLayout-stackLayout > .oo-ui-panelLayout[aria-hidden="true"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout-active,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout[aria-hidden="false"] {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Preferences search. */
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-search,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-searchInputWidget {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 12px;
}

.mw-special-Preferences .varnyra-page #preferences .mw-prefs-search .oo-ui-inputWidget-input,
.mw-special-Preferences .varnyra-page #preferences input[type="search"] {
    width: 100%;
    height: 34px;
    background: #060a11;
    color: #d7e0ee;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 4px;
}

/* Top tabs like Citizen. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-menuLayout-menu,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabSelectWidget,
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 0 8px;
    background: #0b111d;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabOptionWidget {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #9fb0c8;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabOptionWidget:hover {
    color: #fbbf24;
    background: rgba(255, 255, 255, 0.035);
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabOptionWidget-selected,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-optionWidget-selected {
    color: #f8fafc;
    background: #05070d;
}

/* Only the actual content wrapper gets a panel. Do not panel every OOUI child. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-menuLayout-content,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-bookletLayout-stackLayout,
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-tabs-wrapper {
    width: 100%;
    background: rgba(3, 7, 14, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-top: 0;
    border-radius: 0 0 6px 6px;
    color: #d7e0ee;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-pageLayout {
    width: 100%;
    box-sizing: border-box;
    padding: 28px 34px;
    background: transparent;
    border: 0;
    color: #d7e0ee;
}

/* Preference sections: only subtle separators, no nested boxes. */
.mw-special-Preferences .varnyra-page #preferences fieldset,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldsetLayout {
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 0;
    padding: 0 0 26px;
    margin: 0 0 28px;
}

.mw-special-Preferences .varnyra-page #preferences fieldset:last-child,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldsetLayout:last-child {
    border-bottom: 0;
}

/* Section headings. */
.mw-special-Preferences .varnyra-page #preferences legend,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldsetLayout-header,
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-section-fieldset > legend {
    display: block;
    width: auto;
    padding: 0;
    margin: 0 0 14px;
    background: transparent;
    border: 0;
    color: #93a9c8;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.35;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldsetLayout-header .oo-ui-labelElement-label {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    background: transparent;
    border: 0;
}

/* Field rows. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldLayout,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLInfoField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLTextField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLSelectField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLCheckField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLRadioField {
    margin: 0 0 14px;
    padding: 0;
    background: transparent;
    border: 0;
    color: #d7e0ee;
}

.mw-special-Preferences .varnyra-page #preferences label,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-labelElement-label,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-label,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldLayout-header {
    color: #d7e0ee;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: 0;
    padding: 0;
}

/* Form values / input width. */
.mw-special-Preferences .varnyra-page #preferences input:not([type="checkbox"]):not([type="radio"]),
.mw-special-Preferences .varnyra-page #preferences textarea,
.mw-special-Preferences .varnyra-page #preferences select,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-inputWidget-input,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-dropdownWidget-handle {
    width: min(620px, 100%);
    max-width: 100%;
}

/* Check/radio options as clean vertical lists. */

/* Disabled checkbox/radio state: make locked settings very obvious. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled.oo-ui-checkboxInputWidget,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled.oo-ui-radioInputWidget {
    opacity: 1 !important;
    cursor: not-allowed;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled.oo-ui-checkboxInputWidget input[type="checkbox"],
.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled.oo-ui-radioInputWidget input[type="radio"] {
    cursor: not-allowed;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled .oo-ui-checkboxInputWidget-checkIcon,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled .oo-ui-radioInputWidget-checkIcon,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-checkboxInputWidget.oo-ui-widget-disabled .oo-ui-checkboxInputWidget-checkIcon,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-radioInputWidget.oo-ui-widget-disabled .oo-ui-radioInputWidget-checkIcon {
    border-color: rgba(148, 163, 184, 0.26) !important;
    background:
        repeating-linear-gradient(135deg, rgba(148, 163, 184, 0.10) 0, rgba(148, 163, 184, 0.10) 3px, rgba(15, 23, 42, 0.95) 3px, rgba(15, 23, 42, 0.95) 6px) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35) !important;
    filter: grayscale(0.75);
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled input[type="checkbox"]:checked + .oo-ui-checkboxInputWidget-checkIcon,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled input[type="radio"]:checked + .oo-ui-radioInputWidget-checkIcon,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-checkboxInputWidget.oo-ui-widget-disabled input[type="checkbox"]:checked + .oo-ui-checkboxInputWidget-checkIcon,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-radioInputWidget.oo-ui-widget-disabled input[type="radio"]:checked + .oo-ui-radioInputWidget-checkIcon {
    border-color: rgba(251, 191, 36, 0.38) !important;
    background:
        linear-gradient(180deg, rgba(100, 116, 139, 0.55), rgba(51, 65, 85, 0.74)),
        repeating-linear-gradient(135deg, rgba(251, 191, 36, 0.18) 0, rgba(251, 191, 36, 0.18) 3px, rgba(15, 23, 42, 0.88) 3px, rgba(15, 23, 42, 0.88) 6px) !important;
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.10) !important;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled + label,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled ~ .oo-ui-labelElement-label,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-checkboxMultioptionWidget.oo-ui-widget-disabled .oo-ui-labelElement-label,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-radioOptionWidget.oo-ui-widget-disabled .oo-ui-labelElement-label {
    color: #728198 !important;
    font-style: italic;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-checkboxMultioptionWidget,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-radioOptionWidget,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLCheckField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLRadioField {
    display: block;
    margin: 8px 0;
}

/* Help text. */
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-help,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-tip,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldLayout-help,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldLayout-messages,
.mw-special-Preferences .varnyra-page #preferences .htmlform-tip {
    display: block;
    margin-top: 3px;
    color: #8aa0bd;
    font-size: 12.5px;
    line-height: 1.4;
    background: transparent;
    border: 0;
}

/* Save row. */
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-submit-buttons,
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-buttons,
.mw-special-Preferences .varnyra-page form#mw-prefs-form .mw-htmlform-submit-buttons {
    margin-top: 18px;
    padding: 14px 0 0;
    background: transparent;
    border: 0;
}

/* Message boxes in preferences. */
.mw-special-Preferences .varnyra-page #preferences .mw-message-box,
.mw-special-Preferences .varnyra-page #preferences .warningbox,
.mw-special-Preferences .varnyra-page #preferences .errorbox,
.mw-special-Preferences .varnyra-page #preferences .successbox,
.mw-special-Preferences .varnyra-page #preferences .cdx-message {
    max-width: 620px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.22);
    color: #dbe4f0;
    border-radius: 4px;
}

/* Search result highlight. */
.mw-special-Preferences .varnyra-page #preferences mark,
.mw-special-Preferences .varnyra-page #preferences .searchmatch {
    background: rgba(251, 191, 36, 0.20);
    color: #f8fafc;
    border-radius: 3px;
    padding: 0 2px;
}



/* Preferences: links and member group highlights.
   Keep this narrow: only links inside Special:Preferences are affected. */
.mw-special-Preferences .varnyra-page #preferences a {
    color: #f8fafc;
    font-weight: 800;
    text-decoration: none;
    text-shadow: none;
}

.mw-special-Preferences .varnyra-page #preferences a:hover {
    color: #fbbf24;
    text-decoration: none;
}

/* Admin groups: red. */
.mw-special-Preferences .varnyra-page #preferences a.new[href*="Varnyra:Administrators"],
.mw-special-Preferences .varnyra-page #preferences a.new[href*="Varnyra:Interface_administrators"] {
    color: #fb7185;
    font-weight: 900;
    text-shadow: 0 0 8px rgba(251, 113, 133, 0.22);
}

/* Moderator groups: blue, for when these groups are added later. */
.mw-special-Preferences .varnyra-page #preferences a.new[href*="Varnyra:Moderators"],
.mw-special-Preferences .varnyra-page #preferences a.new[href*="Varnyra:Mods"],
.mw-special-Preferences .varnyra-page #preferences a[href*="Varnyra:Moderators"],
.mw-special-Preferences .varnyra-page #preferences a[href*="Varnyra:Mods"] {
    color: #60a5fa;
    font-weight: 900;
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.22);
}

/* Preferences: normal displayed values should be readable, not purple accent. */
.mw-special-Preferences .varnyra-page #preferences .mw-input,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldLayout-field,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-flatlist-item {
    color: #f8fafc;
}

/* OOUI menus/dropdowns. */
.varnyra-page .oo-ui-menuSelectWidget,
.varnyra-page .oo-ui-popupWidget-popup,
.varnyra-page .oo-ui-menuOptionWidget,
.varnyra-page .oo-ui-optionWidget,
.varnyra-page .cdx-menu,
.varnyra-page .cdx-menu-item {
    background: #0b111b !important;
    color: #d7e0ee !important;
    border-color: rgba(148, 163, 184, 0.20) !important;
}

.varnyra-page .oo-ui-optionWidget-highlighted,
.varnyra-page .oo-ui-menuOptionWidget-highlighted,
.varnyra-page .cdx-menu-item--highlighted {
    background: rgba(124, 58, 237, 0.20) !important;
    color: #f8fafc !important;
}

/* Recent changes / history. */
.varnyra-page .mw-changeslist,
.varnyra-page #pagehistory {
    max-width: 100%;
    overflow-x: auto;
}

.varnyra-page .mw-changeslist-line,
.varnyra-page #pagehistory li {
    padding: 6px 8px !important;
    border-radius: 5px !important;
}

.varnyra-page .mw-changeslist-line:hover,
.varnyra-page #pagehistory li:hover,
.varnyra-page #pagehistory li.selected {
    background: rgba(124, 58, 237, 0.10) !important;
}

.varnyra-page .mw-changeslist-date {
    color: #fbbf24 !important;
    font-size: 16px !important;
    margin-top: 18px !important;
}

.varnyra-page .mw-plusminus-pos { color: #22c55e !important; }
.varnyra-page .mw-plusminus-neg { color: #fb7185 !important; }
.varnyra-page .mw-plusminus-null { color: #94a3b8 !important; }

/* Edit page. */
.varnyra-page #wpTextbox1,
.varnyra-page .wikiEditor-ui textarea,
.varnyra-page .mw-editfont-monospace {
    width: 100% !important;
    min-height: 470px !important;
    box-sizing: border-box !important;
    background: #05080f !important;
    color: #e5e7eb !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 4px !important;
    font-family: Consolas, "Courier New", monospace !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.varnyra-page .editOptions,
.varnyra-page .wikiEditor-ui,
.varnyra-page .wikiEditor-ui-toolbar,
.varnyra-page .wikiEditor-ui-controls,
.varnyra-page .mw-editTools,
.varnyra-page .templatesUsed,
.varnyra-page .hiddencats,
.varnyra-page .limitreport,
.varnyra-page .mw-upload-form,
.varnyra-page fieldset:not(#preferences fieldset) {
    background: rgba(3, 7, 14, 0.70) !important;
    color: #d7e0ee !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}

.varnyra-footer {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}


/* ------------------------------
   Varnyra system pages polish - skin fit
   Preferences layout is now stable; this layer only improves visual style.
------------------------------ */

/* Give system pages a cleaner, readable UI inside the fantasy frame. */
.varnyra-page .mw-body-content,
.varnyra-page .mw-parser-output,
.mw-special-Preferences .varnyra-page #preferences,
.mw-special-Preferences .varnyra-page #mw-prefs-form {
    font-family: Arial, Helvetica, sans-serif !important;
    color: #dbe4f0 !important;
}

/* Keep normal article/game content in the Varnyra serif style. */
.varnyra-page .vy-layout,
.varnyra-page .vy-codex,
.varnyra-page .vy-table,
.varnyra-page .vy-note,
.varnyra-page .vy-intro {
    font-family: Georgia, "Times New Roman", serif !important;
}

/* Preferences main frame: dark, subtle purple/gold, no heavy box-in-box. */
.mw-special-Preferences .varnyra-page #preferences {
    border: 1px solid rgba(168, 85, 247, 0.24) !important;
    border-radius: 10px !important;
    background:
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(5, 8, 14, 0.92), rgba(3, 6, 12, 0.96)) !important;
    overflow: hidden !important;
}

.mw-special-Preferences .varnyra-page #preferences {
    max-width: 1120px;
    margin: 8px 0 0;
    padding: 0 0 18px;
    box-shadow:
        0 0 28px rgba(0, 0, 0, 0.22),
        inset 0 0 28px rgba(255, 255, 255, 0.012);
}

/* Preference search. */
.mw-special-Preferences .varnyra-page .mw-prefs-search,
.mw-special-Preferences .varnyra-page #preferences-search {
    max-width: 1120px !important;
}

.mw-special-Preferences .varnyra-page .mw-prefs-search input,
.mw-special-Preferences .varnyra-page #preferences-search,
.mw-special-Preferences .varnyra-page .mw-prefs-search .oo-ui-inputWidget-input {
    height: 34px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid rgba(251, 191, 36, 0.25) !important;
    color: #f8fafc !important;
    padding-left: 36px !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015) !important;
}

/* Top tabs: Citizen-like structure, Varnyra colors. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabSelectWidget,
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-tabs > ul,
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-tabs-wrapper > ul,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-menuLayout-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: stretch;
    padding: 0 12px;
    margin: 0;
    background: linear-gradient(180deg, rgba(15, 20, 33, 0.92), rgba(8, 12, 22, 0.92));
    border-bottom: 1px solid rgba(251, 191, 36, 0.16);
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabOptionWidget {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    margin: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    color: #b9c7dc !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabOptionWidget-selected,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-optionWidget-selected {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.10), rgba(168, 85, 247, 0.10)) !important;
    color: #fbbf24 !important;
    box-shadow: inset 0 -2px 0 rgba(251, 191, 36, 0.72);
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabOptionWidget:hover {
    color: #fff8e7 !important;
    background: rgba(168, 85, 247, 0.10) !important;
}


/* Content panel. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout,
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-tabs > div {
    background: transparent;
}

.mw-special-Preferences .varnyra-page #preferences .mw-prefs-section-fieldset,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldsetLayout {
    background: transparent !important;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout:not([aria-hidden="true"]),
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-tabs > div:not([hidden]) {
    padding: 26px 30px 32px !important;
}

/* Section blocks: subtle separator, not a boxed cage. */
.mw-special-Preferences .varnyra-page #preferences fieldset,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldsetLayout-group {
    margin: 0 0 30px;
    padding: 0 0 26px;
    border: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.mw-special-Preferences .varnyra-page #preferences fieldset:last-child,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldsetLayout-group:last-child {
    border-bottom: 0 !important;
    margin-bottom: 0;
}

/* Section titles: gold, Varnyra feel, but compact. */
.mw-special-Preferences .varnyra-page #preferences h2,
.mw-special-Preferences .varnyra-page #preferences h3,
.mw-special-Preferences .varnyra-page #preferences legend,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldsetLayout-header {
    display: block;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fbbf24;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.2px;
    line-height: 1.25;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.12);
}

.mw-special-Preferences .varnyra-page #preferences h3,
.mw-special-Preferences .varnyra-page #preferences legend,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldsetLayout-header {
    font-size: 15px;
    color: #e8c66b;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldsetLayout-header .oo-ui-labelElement-label {
    color: inherit !important;
    font: inherit !important;
    background: transparent;
    border: 0;
    padding: 0;
}

/* Labels and values: clean two-column where MediaWiki provides rows. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldLayout,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLInfoField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLTextField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLSelectField {
    max-width: 920px;
    margin: 0 0 13px;
    padding: 0;
    background: transparent;
    border: 0;
}

.mw-special-Preferences .varnyra-page #preferences .mw-label,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldLayout-header,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-label {
    color: #a9bbd5;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.mw-special-Preferences .varnyra-page #preferences .mw-input,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldLayout-field {
    color: #e9eef8;
    font-size: 13px;
    line-height: 1.45;
}

/* Inputs/selects. */
.mw-special-Preferences .varnyra-page #preferences input:not([type="checkbox"]):not([type="radio"]),
.mw-special-Preferences .varnyra-page #preferences textarea,
.mw-special-Preferences .varnyra-page #preferences select,
.varnyra-page .oo-ui-inputWidget-input,
.varnyra-page .oo-ui-dropdownWidget-handle {
    min-height: 32px !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    color: #f8fafc !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.012) !important;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-inputWidget-input,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-dropdownWidget-handle {
    min-height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.012);
}

.mw-special-Preferences .varnyra-page #preferences input:focus,
.mw-special-Preferences .varnyra-page #preferences textarea:focus,
.mw-special-Preferences .varnyra-page #preferences select:focus,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-inputWidget-input:focus {
    border-color: rgba(251, 191, 36, 0.56);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.10);
    outline: none;
}

/* Checkbox/radio options.
   MediaWiki OOUI uses a hidden real input + a visual checkIcon.
   Do not make the hidden input visible, otherwise checked items show two boxes. */
.mw-special-Preferences .varnyra-page #preferences input[type="checkbox"],
.mw-special-Preferences .varnyra-page #preferences input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0 8px 0 0;
    vertical-align: -3px;
    accent-color: #a855f7;
}

/* Hide only the real OOUI input layer; keep it clickable. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-checkboxInputWidget input[type="checkbox"],
.mw-special-Preferences .varnyra-page #preferences .oo-ui-radioInputWidget input[type="radio"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    opacity: 0;
    z-index: 2;
    cursor: pointer;
}

/* Single visible OOUI checkbox/radio skin. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-checkboxInputWidget,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-radioInputWidget {
    position: relative;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin-right: 8px;
    vertical-align: -4px;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-checkboxInputWidget-checkIcon,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-radioInputWidget-checkIcon {
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.46);
    background: rgba(7, 11, 19, 0.98);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-radioInputWidget-checkIcon {
    border-radius: 50%;
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-checkboxInputWidget input[type="checkbox"]:checked + .oo-ui-checkboxInputWidget-checkIcon,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-radioInputWidget input[type="radio"]:checked + .oo-ui-radioInputWidget-checkIcon {
    border-color: rgba(251, 191, 36, 0.72);
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.92), rgba(88, 28, 135, 0.94));
    box-shadow:
        0 0 0 1px rgba(251, 191, 36, 0.20),
        0 0 10px rgba(168, 85, 247, 0.25);
}

.mw-special-Preferences .varnyra-page #preferences .oo-ui-checkboxMultioptionWidget,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-radioOptionWidget,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLCheckField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLRadioField {
    margin: 8px 0;
    color: #dbe4f0;
}

.mw-special-Preferences .varnyra-page #preferences label,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-labelElement-label {
    color: #dbe4f0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

/* Help text and muted text. */
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-help,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-tip,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldLayout-help,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldLayout-messages,
.mw-special-Preferences .varnyra-page #preferences .htmlform-tip,
.mw-special-Preferences .varnyra-page #preferences .mw-help-field-hint {
    color: #8da2bf;
    font-size: 12.5px;
    line-height: 1.45;
    background: transparent;
    border: 0;
}

/* Buttons: readable and Varnyra-style without oversized fantasy boxes. */
.varnyra-page .oo-ui-buttonElement-button,
.varnyra-page button,
.varnyra-page input[type="submit"],
.varnyra-page input[type="button"],
.mw-special-Preferences .varnyra-page #preferences .oo-ui-buttonElement-button,
.mw-special-Preferences .varnyra-page #preferences button,
.mw-special-Preferences .varnyra-page #preferences input[type="submit"],
.mw-special-Preferences .varnyra-page #preferences input[type="button"] {
    min-height: 30px !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.13), rgba(116, 62, 22, 0.22)) !important;
    border: 1px solid rgba(251, 191, 36, 0.34) !important;
    color: #f8d879 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}

.varnyra-page .oo-ui-buttonElement-button:hover,
.varnyra-page button:hover,
.varnyra-page input[type="submit"]:hover,
.varnyra-page input[type="button"]:hover {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.20), rgba(168, 85, 247, 0.18)) !important;
    border-color: rgba(251, 191, 36, 0.58) !important;
    color: #fff8e7 !important;
}

/* Save row. */
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-submit-buttons,
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-buttons,
.mw-special-Preferences .varnyra-page form#mw-prefs-form .mw-htmlform-submit-buttons {
    margin-top: 14px;
    padding: 16px 30px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(5, 8, 14, 0.58);
}

/* Warning/info cards. */
.mw-special-Preferences .varnyra-page #preferences .mw-message-box,
.mw-special-Preferences .varnyra-page #preferences .warningbox,
.mw-special-Preferences .varnyra-page #preferences .errorbox,
.mw-special-Preferences .varnyra-page #preferences .successbox,
.mw-special-Preferences .varnyra-page #preferences .cdx-message {
    padding: 10px 12px;
    max-width: 680px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.22);
    color: #dbe4f0;
}

/* Disabled controls. */
.mw-special-Preferences .varnyra-page #preferences input:disabled,
.mw-special-Preferences .varnyra-page #preferences textarea:disabled,
.mw-special-Preferences .varnyra-page #preferences select:disabled,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-widget-disabled .oo-ui-inputWidget-input {
    opacity: 0.62;
    color: #71839d;
    background: rgba(255, 255, 255, 0.028);
}

/* ------------------------------
   Preferences final cleanup v3
   Keep the working layout, remove double frame and repeated tab title
------------------------------ */

/* Keep one clean outer preferences panel only. */
.mw-special-Preferences .varnyra-page #preferences {
    border: 1px solid rgba(168, 85, 247, 0.36) !important;
    border-radius: 8px !important;
    background:
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(7, 11, 19, 0.96), rgba(3, 7, 13, 0.98)) !important;
    overflow: hidden !important;
}

/* Remove the extra inner/double borders that made the left side look doubled. */
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-tabs-wrapper,
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-tabs,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-indexLayout,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-menuLayout,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-menuLayout-content,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-bookletLayout,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-bookletLayout-stackLayout,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-stackLayout,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-panelLayout,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-pageLayout,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout {
    border-left: 0;
    border-right: 0;
    box-shadow: none;
}

/* The tab bar may keep only a subtle bottom line. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-menuLayout-menu,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabSelectWidget,
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-tabs > ul,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-indexLayout-tabPanel {
    border: 0;
    border-bottom: 1px solid rgba(251, 191, 36, 0.20);
    background: rgba(9, 13, 23, 0.62);
}

/* Hide the repeated active tab title: User profile / Appearance / Editing / Recent changes / Watchlist / Search.
   The tab already shows this, so only the real section titles remain. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout > h1:first-child,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout > h2:first-child,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout > h3:first-child,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-pageLayout > h1:first-child,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-pageLayout > h2:first-child,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-pageLayout > h3:first-child,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout > .mw-heading:first-child,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout > .mw-heading2:first-child,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-pageLayout > .mw-heading:first-child,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-pageLayout > .mw-heading2:first-child {
    display: none !important;
}

/* If MediaWiki renders that repeated title as a legend/OOUI header, remove the visible box styling. */
.mw-special-Preferences .varnyra-page #preferences legend,
.mw-special-Preferences .varnyra-page #preferences legend > span,
.mw-special-Preferences .varnyra-page #preferences .mw-headline,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-labelElement-label {
    outline: 0;
    box-shadow: none;
    text-decoration: none;
}

/* Real section headings: clean Varnyra style, no white outline box. */
.mw-special-Preferences .varnyra-page #preferences h3,
.mw-special-Preferences .varnyra-page #preferences fieldset > legend,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldsetLayout-header {
    border: 0 !important;
    background: transparent !important;
    color: #fbbf24 !important;
    padding: 0 0 8px !important;
    margin: 30px 0 16px !important;
    border-bottom: 1px solid rgba(251, 191, 36, 0.18) !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    width: 100% !important;
}

/* First real section should not start too low after hiding the repeated title. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout > fieldset:first-of-type > legend,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-pageLayout > fieldset:first-of-type > legend,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout > .oo-ui-fieldsetLayout:first-of-type > .oo-ui-fieldsetLayout-header,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-pageLayout > .oo-ui-fieldsetLayout:first-of-type > .oo-ui-fieldsetLayout-header {
    margin-top: 0 !important;
}

/* Content spacing: wider and calmer, Citizen-like. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-tabPanelLayout,
.mw-special-Preferences .varnyra-page #preferences .oo-ui-pageLayout {
    padding: 34px 48px 44px !important;
    background: transparent !important;
}

/* Make form rows more readable without creating extra boxes. */
.mw-special-Preferences .varnyra-page #preferences .oo-ui-fieldLayout,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLInfoField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLTextField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLSelectField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLCheckField,
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-field-HTMLRadioField {
    max-width: 900px !important;
}

/* Save area should be part of the single panel, not a second boxed frame. */
.mw-special-Preferences .varnyra-page #preferences .mw-htmlform-submit-buttons,
.mw-special-Preferences .varnyra-page #preferences .mw-prefs-buttons,
.mw-special-Preferences .varnyra-page form#mw-prefs-form .mw-htmlform-submit-buttons {
    margin: 0 !important;
    padding: 18px 48px !important;
    border: 0 !important;
    border-top: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 0 !important;
    background: rgba(4, 8, 14, 0.72) !important;
}

/* ------------------------------
   Varnyra System UI v4
   Watchlist / Recent changes filters / Contributions polish
   Keeps Preferences stable.
------------------------------ */

/* Shared system-page cards */
.varnyra-page .mw-changeslist-legend,
.varnyra-page .mw-recentchanges-toplinks,
.varnyra-page .mw-contributions-form,
.varnyra-page .mw-contributions-form .mw-htmlform,
.varnyra-page .mw-warning-with-logexcerpt,
.varnyra-page .mw-watchlist-resetbutton,
.varnyra-page .mw-watchlist-toollinks,
.varnyra-page .mw-watchlist-form,
.varnyra-page .mw-special-Watchlist .mw-htmlform,
.varnyra-page .mw-special-Contributions .mw-htmlform,
.varnyra-page .mw-spcontent form,
.varnyra-page .mw-parser-output fieldset,
.varnyra-page fieldset {
    background: rgba(6, 10, 18, 0.82) !important;
    color: #eaf2ff !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

/* Prevent MediaWiki white filter panels on Watchlist / RecentChanges */
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget,
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget-bottom,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget.oo-ui-widget-enabled,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget-wrapper-content-title,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget-views-select-widget,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget-views-select-widget.oo-ui-widget,
.varnyra-page .mw-rcfilters-ui-viewSwitchWidget,
.varnyra-page .mw-rcfilters-ui-liveUpdateButtonWidget,
.varnyra-page .mw-rcfilters-ui-savedLinksListWidget,
.varnyra-page .mw-rcfilters-ui-filterMenuPopupButtonWidget,
.varnyra-page .mw-rcfilters-ui-menuSelectWidget,
.varnyra-page .mw-rcfilters-ui-menuSelectWidget-footer,
.varnyra-page .mw-rcfilters-ui-filterMenuHeaderWidget,
.varnyra-page .mw-rcfilters-ui-itemMenuOptionWidget,
.varnyra-page .mw-rcfilters-ui-changesLimitAndDateButtonWidget,
.varnyra-page .mw-rcfilters-ui-watchlistTopSectionWidget {
    background: rgba(7, 11, 20, 0.94) !important;
    color: #eaf2ff !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
    box-shadow: none !important;
}

/* The active filters box was still white */
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget .oo-ui-tagMultiselectWidget-handle,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget.oo-ui-widget-enabled .oo-ui-tagMultiselectWidget-handle,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget.oo-ui-widget-enabled .oo-ui-tagItemWidget,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget.oo-ui-widget-enabled .oo-ui-tagItemWidget.oo-ui-widget-enabled,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget-input,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget-input input {
    background: rgba(9, 14, 24, 0.98) !important;
    color: #eaf2ff !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
}

.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget.oo-ui-widget-enabled .oo-ui-tagItemWidget,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget.oo-ui-widget-enabled .oo-ui-tagItemWidget.oo-ui-widget-enabled {
    border: 1px solid rgba(251, 191, 36, 0.24) !important;
    border-radius: 999px !important;
}

/* Hide / saved filters / namespaces / tags buttons */
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget a,
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget button,
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget .oo-ui-buttonElement-button,
.varnyra-page .mw-rcfilters-ui-changesLimitAndDateButtonWidget .oo-ui-buttonElement-button,
.varnyra-page .mw-rcfilters-ui-savedLinksListWidget .oo-ui-buttonElement-button,
.varnyra-page .mw-rcfilters-ui-filterMenuPopupButtonWidget .oo-ui-buttonElement-button,
.varnyra-page .mw-watchlist-resetbutton input,
.varnyra-page .mw-watchlist-toollinks a,
.varnyra-page .mw-contributions-form input[type="submit"],
.varnyra-page .mw-contributions-form button {
    background: rgba(251, 191, 36, 0.10) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.32) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}

.varnyra-page .mw-rcfilters-ui-filterWrapperWidget a:hover,
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget button:hover,
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget .oo-ui-buttonElement-button:hover,
.varnyra-page .mw-contributions-form input[type="submit"]:hover {
    background: rgba(251, 191, 36, 0.18) !important;
    border-color: rgba(251, 191, 36, 0.55) !important;
    color: #fff8e7 !important;
}

/* Watchlist / RecentChanges list text */
.varnyra-page .mw-changeslist,
.varnyra-page .mw-changeslist-line,
.varnyra-page .mw-changeslist-line-inner,
.varnyra-page .mw-changeslist-line-inner-articleLink,
.varnyra-page .mw-changeslist-date,
.varnyra-page .mw-changeslist-separator,
.varnyra-page .mw-special-Watchlist,
.varnyra-page .mw-special-Recentchanges {
    background: transparent !important;
    color: #eaf2ff !important;
}

.varnyra-page .mw-changeslist-line {
    padding: 5px 8px !important;
    border-radius: 6px !important;
}

.varnyra-page .mw-changeslist-line:hover {
    background: rgba(168, 85, 247, 0.09) !important;
}

.varnyra-page .mw-changeslist-date {
    display: block !important;
    margin: 24px 0 8px !important;
    color: #fbbf24 !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

.varnyra-page .mw-plusminus-pos { color: #22c55e !important; }
.varnyra-page .mw-plusminus-neg { color: #fb7185 !important; }
.varnyra-page .mw-plusminus-null { color: #94a3b8 !important; }

/* Watchlist abbreviations legend */
.varnyra-page .mw-changeslist-legend {
    float: right;
    max-width: 340px;
    padding: 12px 14px !important;
    margin: 0 0 16px 22px !important;
    background: rgba(8, 12, 20, 0.94) !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    border-radius: 8px !important;
}

.varnyra-page .mw-changeslist-legend dt,
.varnyra-page .mw-changeslist-legend dd,
.varnyra-page .mw-changeslist-legend li {
    color: rgba(234, 242, 255, 0.72) !important;
}

/* Contributions page */
.varnyra-page.mw-special-Contributions,
.varnyra-page .mw-special-Contributions,
.varnyra-page .mw-contributions-form,
.varnyra-page #mw-contributions-form,
.varnyra-page #mw-content-text .mw-contributions-form {
    background: rgba(6, 10, 18, 0.84) !important;
    color: #eaf2ff !important;
}

.varnyra-page .mw-contributions-form {
    padding: 18px 20px !important;
    margin-bottom: 24px !important;
}

.varnyra-page .mw-contributions-form fieldset {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

.varnyra-page .mw-contributions-form legend {
    display: block !important;
    margin: 0 0 18px !important;
    padding: 0 0 10px !important;
    border: none !important;
    border-bottom: 1px solid rgba(251, 191, 36, 0.18) !important;
    color: #fbbf24 !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

.varnyra-page .mw-contributions-form label,
.varnyra-page .mw-contributions-form .oo-ui-labelElement-label {
    color: #eaf2ff !important;
}

/* Date picker boxes on Contributions were white */
.varnyra-page .mw-contributions-form input,
.varnyra-page .mw-contributions-form select,
.varnyra-page .mw-contributions-form .oo-ui-inputWidget-input,
.varnyra-page .mw-contributions-form .oo-ui-dropdownWidget-handle,
.varnyra-page .mw-contributions-form .mw-widget-dateInputWidget-handle,
.varnyra-page .mw-widget-dateInputWidget-handle,
.varnyra-page .mw-widgets-dateInputWidget-handle,
.varnyra-page .mw-widget-dateInputWidget input,
.varnyra-page .mw-widgets-dateInputWidget input {
    background: rgba(10, 15, 25, 0.96) !important;
    color: #eaf2ff !important;
    border: 1px solid rgba(148, 163, 184, 0.30) !important;
    border-radius: 5px !important;
}

.varnyra-page .mw-contributions-form input::placeholder,
.varnyra-page .mw-widget-dateInputWidget input::placeholder,
.varnyra-page .mw-widgets-dateInputWidget input::placeholder {
    color: rgba(234, 242, 255, 0.46) !important;
}

/* OOUI popups opened from Watchlist/Contributions */
.varnyra-page .oo-ui-popupWidget-popup,
.varnyra-page .oo-ui-menuSelectWidget,
.varnyra-page .oo-ui-menuOptionWidget,
.varnyra-page .oo-ui-optionWidget,
.oo-ui-windowManager-modal > .oo-ui-dialog,
.oo-ui-popupWidget-popup,
.oo-ui-menuSelectWidget,
.oo-ui-menuOptionWidget,
.oo-ui-optionWidget {
    background: #080d17 !important;
    color: #eaf2ff !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
}

.varnyra-page .oo-ui-optionWidget-highlighted,
.varnyra-page .oo-ui-optionWidget-selected,
.oo-ui-optionWidget-highlighted,
.oo-ui-optionWidget-selected {
    background: rgba(168, 85, 247, 0.18) !important;
    color: #fbbf24 !important;
}


/* Preferences language/timezone dropdowns: compact Varnyra menu */
.mw-special-Preferences .oo-ui-dropdownWidget .oo-ui-menuSelectWidget,
.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) {
    width: min(620px, calc(100vw - 120px)) !important;
    max-width: min(620px, calc(100vw - 120px)) !important;
    max-height: 340px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    columns: 1 !important;
    column-count: 1 !important;
    column-width: auto !important;
    background: #080d17 !important;
    color: #eaf2ff !important;
    border: 1px solid rgba(251, 191, 36, 0.24) !important;
    border-radius: 8px !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.58) !important;
    z-index: 9999 !important;
}

.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) .oo-ui-optionWidget,
.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) .oo-ui-menuOptionWidget {
    display: block !important;
    width: 100% !important;
    min-height: 34px !important;
    box-sizing: border-box !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    background: transparent !important;
    color: #eaf2ff !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13) !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
}

.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) .oo-ui-labelElement-label {
    color: #eaf2ff !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    line-height: 1.35 !important;
}

.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) .oo-ui-optionWidget-highlighted,
.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) .oo-ui-menuOptionWidget-highlighted,
.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) .oo-ui-optionWidget-selected {
    background: rgba(168, 85, 247, 0.20) !important;
    color: #fbbf24 !important;
}

.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) .oo-ui-optionWidget-highlighted .oo-ui-labelElement-label,
.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) .oo-ui-menuOptionWidget-highlighted .oo-ui-labelElement-label,
.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) .oo-ui-optionWidget-selected .oo-ui-labelElement-label {
    color: #fbbf24 !important;
}

.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) .oo-ui-indicatorElement-indicator,
.mw-special-Preferences .oo-ui-menuSelectWidget:not(.mw-rcfilters-ui-menuSelectWidget) .oo-ui-iconElement-icon {
    opacity: 1 !important;
    filter: none !important;
}

/* Keep system forms readable on wide pages */
.varnyra-page .mw-contributions-form .oo-ui-fieldLayout,
.varnyra-page .mw-contributions-form .oo-ui-fieldLayout-body,
.varnyra-page .mw-contributions-form .oo-ui-fieldLayout-field,
.varnyra-page .mw-contributions-form .oo-ui-fieldLayout-header,
.varnyra-page .mw-contributions-form .oo-ui-horizontalLayout {
    background: transparent !important;
    color: #eaf2ff !important;
}

/* Remove remaining light Codex/OOUI message surfaces on system pages */
.varnyra-page .cdx-card,
.varnyra-page .cdx-field,
.varnyra-page .cdx-menu,
.varnyra-page .cdx-menu-item,
.varnyra-page .cdx-text-input__input,
.varnyra-page .cdx-select__handle,
.varnyra-page .cdx-button {
    background-color: rgba(8, 12, 20, 0.94) !important;
    color: #eaf2ff !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
}

/* Mobile / narrower screens */
@media screen and (max-width: 900px) {
    .varnyra-page .mw-changeslist-legend {
        float: none;
        max-width: none;
        margin: 14px 0 !important;
    }

    .varnyra-page .mw-rcfilters-ui-filterWrapperWidget {
        overflow-x: auto !important;
    }
}

/* ------------------------------
   Varnyra System UI v5
   Watchlist top filter cleanup
   Keeps Preferences / Contributions stable.
------------------------------ */

/* Watchlist intro/top links should feel like one clean toolbar, not scattered buttons. */
.varnyra-page .mw-watchlist-toollinks {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
    margin: -4px 0 14px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.varnyra-page .mw-watchlist-toollinks a {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 28px !important;
    padding: 5px 10px !important;
    border-radius: 7px !important;
    background: rgba(251, 191, 36, 0.08) !important;
    border: 1px solid rgba(251, 191, 36, 0.24) !important;
    color: #fbbf24 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* Make “mark all changes as seen” a normal compact action. */
.varnyra-page .mw-watchlist-resetbutton {
    display: flex !important;
    justify-content: flex-start !important;
    margin: 12px 0 12px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.varnyra-page .mw-watchlist-resetbutton input {
    min-height: 30px !important;
    padding: 5px 12px !important;
}

/* The RCFilters block is the messy part on Watchlist/RecentChanges: make it a single clean dark panel. */
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget {
    position: relative !important;
    margin: 14px 0 18px !important;
    padding: 12px !important;
    border: 1px solid rgba(148, 163, 184, 0.20) !important;
    border-radius: 10px !important;
    background:
        linear-gradient(180deg, rgba(8, 12, 20, 0.96), rgba(5, 8, 14, 0.96)) !important;
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.012) !important;
}

/* Remove the bright horizontal split lines inside filters. */
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget *,
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget-bottom,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget-views-select-widget {
    border-color: rgba(148, 163, 184, 0.18) !important;
}

/* Active filters text should be subtle, not a big white block. */
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget .mw-rcfilters-ui-filterWrapperWidget-header,
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget .mw-rcfilters-ui-filterWrapperWidget-title,
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget .mw-rcfilters-ui-filterWrapperWidget-filterTagsMultiselectHeader,
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget .mw-rcfilters-ui-filterWrapperWidget-contentTitle {
    background: transparent !important;
    border: none !important;
    color: #fbbf24 !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
}

/* Search/filter input as one full-width row. */
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget.oo-ui-widget-enabled,
.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget .oo-ui-tagMultiselectWidget-handle {
    width: 100% !important;
    min-height: 38px !important;
    border-radius: 8px !important;
    background: rgba(10, 15, 26, 0.96) !important;
    color: #eaf2ff !important;
}

.varnyra-page .mw-rcfilters-ui-filterTagMultiselectWidget-input input {
    min-height: 34px !important;
    padding: 0 10px !important;
    color: #eaf2ff !important;
}

/* Put the filter action buttons in a neat right-aligned row. */
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget-bottom,
.varnyra-page .mw-rcfilters-ui-filterWrapperWidget .mw-rcfilters-ui-filterWrapperWidget-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
    background: transparent !important;
}

.varnyra-page .mw-rcfilters-ui-savedLinksListWidget,
.varnyra-page .mw-rcfilters-ui-filterMenuPopupButtonWidget,
.varnyra-page .mw-rcfilters-ui-changesLimitAndDateButtonWidget,
.varnyra-page .mw-rcfilters-ui-liveUpdateButtonWidget {
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
}

.varnyra-page .mw-rcfilters-ui-savedLinksListWidget .oo-ui-buttonElement-button,
.varnyra-page .mw-rcfilters-ui-filterMenuPopupButtonWidget .oo-ui-buttonElement-button,
.varnyra-page .mw-rcfilters-ui-changesLimitAndDateButtonWidget .oo-ui-buttonElement-button,
.varnyra-page .mw-rcfilters-ui-liveUpdateButtonWidget .oo-ui-buttonElement-button {
    min-height: 30px !important;
    padding: 5px 10px !important;
    border-radius: 7px !important;
}

/* Abbreviations box: keep it readable but less visually noisy. */
.varnyra-page .mw-changeslist-legend {
    max-width: 300px !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    background: rgba(8, 12, 20, 0.90) !important;
    border: 1px solid rgba(148, 163, 184, 0.20) !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
}

/* Give the actual changes list more breathing room below the toolbar. */
.varnyra-page .mw-changeslist {
    margin-top: 18px !important;
}

@media screen and (max-width: 900px) {
    .varnyra-page .mw-watchlist-toollinks,
    .varnyra-page .mw-rcfilters-ui-filterWrapperWidget-bottom,
    .varnyra-page .mw-rcfilters-ui-filterWrapperWidget .mw-rcfilters-ui-filterWrapperWidget-buttons {
        justify-content: flex-start !important;
    }

    .varnyra-page .mw-changeslist-legend {
        max-width: none !important;
        float: none !important;
        margin: 14px 0 !important;
    }
}
