@font-face {
    font-family: 'Mojangles';
    src: url('../fonts/Monocraft.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Mojangles';
    src: url('../fonts/Monocraft-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Mojangles';
    src: url('../fonts/Monocraft-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Mojangles';
    src: url('../fonts/Monocraft-Bold-Italic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}

:root {
    --mc-text-yellow: #e5b567;
    --mc-text-cyan: #66c2d0;
    --mc-text-white: #f0e6d2;
    --mc-text-gray: #8899a6;
    --mc-text-dark-gray: #4f5b66;

    --border-circuit: #3db8c2;
    --accent-red: #d9384a;

    --border-cyan: #1c2a3a;
    --border-cyan-light: var(--mc-text-cyan);
    --text-muted: var(--mc-text-gray);
    --text-primary: var(--mc-text-white);
    --bg-panel-inset: #0d111a;
    --border-dark: #16202e;
    --accent-gold: var(--mc-text-yellow);
    --accent-red-bright: #ff6b7a;
}

* {
    box-sizing: border-box;
    image-rendering: pixelated;
    image-rendering: crisp-edges;

    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

body {
    background-color: #0b0e14;
    color: var(--mc-text-white);
    font-family: 'Mojangles', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.3px;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-rendering: geometricPrecision;
}

.mc-panel-dark,
.editor-card,
.history-card,
.infobox {
    background-color: #121824 !important;
    border: 3px solid #000000 !important;
    box-shadow:
        inset 3px 3px 0px #1e283c,
        inset -3px -3px 0px #080b10,
        0px 4px 0px rgba(0, 0, 0, 0.8) !important;
    color: var(--mc-text-white);
    padding: 12px;
}

.mc-inset-box,
.obtaining-card {
    background-color: #0d111a !important;
    border: 2px solid #000000 !important;
    box-shadow:
        inset 2px 2px 0px #000000,
        inset -2px -2px 0px #172030 !important;
    outline: 2px solid #1a3a5c !important;
    outline-offset: -4px !important;
    padding: 10px;
}

.mc-slot,
.infobox-slot {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-btn {
    display: inline-block;
    background-color: #121824 !important;
    border: 2px solid #000000 !important;
    box-shadow:
        inset 2px 2px 0px #1e283c,
        inset -2px -2px 0px #080b10 !important;
    color: var(--mc-text-white) !important;
    text-shadow: 1px 1px 0px #000000;
    font-family: 'Mojangles', monospace;
    font-size: 11px;
    padding: 8px 12px;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.mc-btn:hover {
    background-color: #1a2334 !important;
    color: var(--mc-text-yellow) !important;
    border-color: #2b5b88 !important;
}

.mc-btn:active {
    box-shadow:
        inset 2px 2px 0px #101217,
        inset -2px -2px 0px #2a2d38 !important;
}

.mc-btn-add {
    background-color: #1b4d24 !important;
    box-shadow: inset 2px 2px 0px #2b7a3a, inset -2px -2px 0px #0e2913 !important;
    color: #a3ffa3 !important;
}

.mc-btn-add:hover {
    background-color: #24632f !important;
    color: #ffffff !important;
}

.mc-btn-danger {
    background-color: #581616 !important;
    box-shadow: inset 2px 2px 0px #832424, inset -2px -2px 0px #2e0a0a !important;
    color: #ffaaaa !important;
}

.mc-btn-danger:hover {
    background-color: #721e1e !important;
    color: #ffffff !important;
}

.mc-input,
.mc-textarea,
.mc-select {
    background-color: #0d111a !important;
    border: 2px solid #000000 !important;
    box-shadow: inset 2px 2px 0px #000000, inset -2px -2px 0px #172030 !important;
    color: var(--mc-text-cyan) !important;
    padding: 8px 10px;
    font-family: 'Mojangles', monospace;
    font-size: 11px;
}

.mc-input:focus,
.mc-textarea:focus,
.mc-select:focus {
    outline: 2px solid var(--mc-text-yellow) !important;
    outline-offset: -2px;
}

.mc-input,
.mc-textarea {
    width: 100%;
}

.global-topbar {
    background-color: #1a1c23;
    border-bottom: 3px solid #000000;
    box-shadow:
        inset 0px -3px 0px #101217,
        inset 0px 3px 0px #2a2d38;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-logo {
    color: var(--mc-text-cyan);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 0px #000000;
    text-decoration: none;
}

/* Mobile nav toggle button (burger icon) - hidden on desktop, shown ≤768px */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--mc-text-cyan);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav-toggle[aria-expanded="true"] .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle[aria-expanded="true"] .burger-line:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle[aria-expanded="true"] .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Overlay behind the sliding sidebar - hidden until toggled open */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1050;
}

.mobile-nav-overlay.active {
    display: block;
}

.search-container {
    position: relative;
    width: 400px;
    max-width: 100%;
}

.search-input {
    width: 100%;
    background-color: #12141a;
    border: 2px solid #000000;
    box-shadow:
        inset 2px 2px 0px #000000,
        inset -2px -2px 0px #1e222d;
    outline: 2px solid #283445;
    outline-offset: -4px;
    color: var(--mc-text-cyan);
    padding: 8px 12px;
    font-family: 'Mojangles', monospace;
    font-size: 11px;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a1c23;
    border: 2px solid #000000;
    box-shadow:
        inset 2px 2px 0px #2a2d38,
        inset -2px -2px 0px #101217,
        0px 6px 12px rgba(0, 0, 0, 0.9);
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
    margin-top: 4px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--mc-text-white);
    border-bottom: 1px solid #12141a;
    font-size: 11px;
    text-decoration: none;
}

.search-result-item:hover {
    background-color: #242731;
    color: var(--mc-text-yellow);
}

.page-wrapper {
    display: flex;
    flex: 1;
    width: 100%;
    margin: 0;
    padding: 16px 24px 16px 12px;
    gap: 16px;
}

/* Sidebar for desktop */
.left-menu-sidebar {
    width: 190px;
    align-self: flex-start;
    position: sticky;
    top: 65px;
    flex-shrink: 0;
}

.left-menu-title {
    color: var(--mc-text-cyan);
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 8px;
    text-shadow: 1px 1px 0px #000000;
}

.left-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.left-menu-list li {
    margin-bottom: 6px;
}

.left-menu-list .mc-btn {
    width: 100%;
    text-align: left;
}

.content-area {
    flex: 1;
    min-width: 0;
}

#wiki-hover-card {
    position: absolute;
    display: none;
    background-color: #0c1018;
    border: 2px solid #1a2a3e;
    outline: 2px solid #0c1018;
    box-shadow:
        inset 0 0 0 2px #1a365d,
        0 8px 16px rgba(0, 0, 0, 0.9);
    padding: 10px;
    z-index: 9999;
    pointer-events: none;
    max-width: 320px;
    font-family: 'Mojangles', 'Courier New', monospace;
}

.mc-tooltip-title {
    color: var(--mc-text-cyan);
    font-weight: bold;
    font-size: 11px;
    text-shadow: 1px 1px 0px #000;
}

.mc-tooltip-type {
    color: var(--mc-text-yellow);
    font-size: 12px;
    text-shadow: 1px 1px 0px #000;
    margin-top: 2px;
}

.mc-tooltip-desc {
    color: var(--mc-text-white);
    font-size: 12px;
    margin-top: 8px;
    line-height: 1.4;
    text-shadow: 1px 1px 0px #000;
}

.wiki-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 16px;
    padding-bottom: 120px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.section-header {
    font-size: 18px;
    color: var(--mc-text-cyan);
    border-bottom: 2px solid #1c2a3a;
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 4px;
    text-shadow: 1px 1px 0px #000;
}

.subsection-header {
    font-size: 13px;
    color: var(--mc-text-gray);
    margin-top: 12px;
    margin-bottom: 6px;
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.infobox {
    width: 260px;
    padding: 0 !important;
    font-size: 11px;
    align-self: flex-start;
}

.infobox-title {
    background-color: #0c1018;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    padding: 8px;
    color: var(--mc-text-cyan);
    border-bottom: 2px solid #000;
    text-shadow: 1px 1px 0px #000;
}

.theme-magic .infobox-title {
    color: #c084fc;
}

.theme-battlewill .infobox-title {
    color: #f87171;
}

.infobox-image {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px;
    background-color: #080a0f;
}

.infobox-slot {
    width: 100% !important;
    height: auto !important;
    min-height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
}

.infobox-slot img {
    max-width: 100% !important;
    max-height: 220px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.infobox-header {
    background-color: #0c1018;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    text-align: center;
    font-weight: bold;
    padding: 4px;
    color: var(--mc-text-gray);
    font-size: 11px;
    letter-spacing: 0.5px;
}

.infobox-data {
    width: 100%;
    border-collapse: collapse;
}

.infobox-data td {
    padding: 6px 8px;
    border-bottom: 1px solid #16202e;
    vertical-align: top;
}

.infobox-data tr td:first-child {
    font-weight: bold;
    text-align: right;
    width: 42%;
    color: var(--mc-text-white);
}

.hub-container {
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
    padding: 24px !important;
}

.hub-title {
    color: var(--mc-text-cyan);
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 0px #000;
    margin-top: 0;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.hub-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.mc-hub-btn {
    flex: 1;
    min-width: 200px;
    padding: 20px 16px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--mc-text-white) !important;
    font-weight: bold;
    font-size: 14px !important;
    text-decoration: none;
    text-shadow: 1px 1px 0px #000;
}

.mc-hub-btn:hover {
    color: var(--mc-text-yellow) !important;
}

.hub-slot {
    width: 64px;
    height: 64px;
}

.hub-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.catalog-container {
    width: 100%;
    margin: 0;
}

.header-bar {
    border-bottom: 2px solid #1c2a3a;
    padding-bottom: 6px;
    margin-bottom: 16px;
}

.header-title {
    font-size: 22px;
    color: var(--mc-text-cyan);
    margin: 0;
    text-shadow: 1px 1px 0px #000;
}

.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 24px;
    padding: 12px;
    align-items: center;
}

.filter-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 12px !important;
    font-size: 15px !important;
    letter-spacing: 0.5px;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn.active {
    background-color: #1e283c !important;
    color: var(--mc-text-yellow) !important;
    border-color: var(--mc-text-yellow) !important;
    box-shadow: inset 2px 2px 0px #2c3c5a, inset -2px -2px 0px #0e141f, 0 0 10px rgba(229, 181, 103, 0.5) !important;
}

.filter-slot {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.filter-btn-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.item-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px !important;
    text-decoration: none;
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.item-card:hover {
    background-color: #1a2334 !important;
    border-color: #2b5b88 !important;
    transform: translateY(-2px);
}

.card-slot {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.item-icon {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.item-name {
    font-size: 11px;
    font-weight: bold;
    color: #a855f7;
    text-shadow: 1px 1px 0px #000;
}

.item-card:hover .item-name {
    color: var(--mc-text-yellow);
}

.empty-msg {
    color: var(--mc-text-gray);
    font-style: italic;
    padding: 20px;
    text-align: center;
}

.formatting-help {
    font-size: 11px;
    color: var(--mc-text-gray);
    background: #0d111a;
    padding: 6px 8px;
    border: 1px dashed #1a3a5c;
    margin-bottom: 6px;
}

.title-input {
    font-size: 16px;
    font-weight: bold;
    color: var(--mc-text-cyan);
}

.title-sidebar-input {
    text-align: center;
    font-weight: bold;
    color: var(--mc-text-cyan);
    background: transparent;
    border: none;
    box-shadow: none !important;
}

.editor-card {
    padding: 10px;
    margin-bottom: 10px;
}

.editor-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    align-items: center;
}

.mc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--mc-text-white);
    user-select: none;
}

.obtaining-card {
    padding: 6px !important;
    margin-bottom: 6px;
}

.action-bar {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 2px solid #1c2a3a;
}

.category-header-tag {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--mc-text-gray);
    margin-bottom: 2px;
}

.skill-title {
    font-size: 18px;
    padding-bottom: 4px;
    margin-top: 0;
    margin-bottom: 12px;
    text-shadow: 1px 1px #000;
}

.desc-box {
    line-height: 1.5;
    margin-bottom: 16px;
    font-size: 11px;
}

.ability-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.ability-card {
    background-color: #0d111a;
    border: 1px solid #1c2636;
    padding: 10px 14px;
}

.ability-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ability-type-tag {
    font-size: 10px;
    font-weight: bold;
    color: var(--mc-text-gray);
    letter-spacing: 0.5px;
}

.ability-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--mc-text-white);
}

.ability-card-body {
    font-size: 11px;
    line-height: 1.4;
    color: var(--mc-text-white);
}

.ability-substeps {
    margin-top: 6px;
    padding-left: 8px;
    border-left: 1px solid #1c2636;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.substep-item {
    font-size: 12px;
    color: var(--mc-text-gray);
}

.substep-label {
    color: var(--mc-text-white);
}

.theme-skill .skill-title,
.theme-skill .section-header {
    color: #38bdf8;
    border-bottom-color: #1e3a5f;
}

.theme-skill .ability-card {
    border-left: 3px solid #0284c7;
}

.theme-magic .skill-title,
.theme-magic .section-header {
    color: #c084fc;
    border-bottom-color: #3b1d5a;
}

.theme-magic .ability-card {
    border-left: 3px solid #9333ea;
}

.theme-battlewill .skill-title,
.theme-battlewill .section-header {
    color: #f87171;
    border-bottom-color: #5c1d1d;
}

.theme-battlewill .ability-card {
    border-left: 3px solid #dc2626;
}

.mc-collapsible-menu {
    margin-top: 30px;
    background-color: #0d111a;
    border: 2px solid #1a2a3e;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.collapsible-header {
    background-color: #1a365d;
    color: #ffffff;
    padding: 8px 12px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    user-select: none;
    text-shadow: 1px 1px #000;
}

.theme-magic .collapsible-header {
    background-color: #3b1d5a;
}

.theme-battlewill .collapsible-header {
    background-color: #5c1d1d;
}

.collapsible-header::-webkit-details-marker {
    display: none;
}

.header-title {
    margin: 0 auto;
    padding-left: 12px;
}

.toggle-icon {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.mc-collapsible-menu[open] .toggle-icon {
    transform: rotate(0deg);
}

.mc-collapsible-menu:not([open]) .toggle-icon {
    transform: rotate(180deg);
}

.collapsible-body {
    border-top: 2px solid #1a2a3e;
}

.type-nav-row {
    display: flex;
    border-bottom: 1px solid #16202e;
    font-size: 12px;
}

.type-nav-row:last-child {
    border-bottom: none;
}

.type-nav-label {
    width: 140px;
    background-color: #111622;
    padding: 8px 10px;
    font-weight: bold;
    color: #ffffff;
    border-right: 1px solid #16202e;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.type-nav-links {
    padding: 8px 10px;
    line-height: 1.8;
    flex: 1;
    background-color: #0b0e14;
}

.current-skill-link {
    color: var(--mc-text-yellow);
    font-weight: bold;
}

.nav-separator {
    color: #2c3a4e;
    margin: 0 4px;
}

.wiki-link {
    color: var(--mc-text-cyan);
    text-decoration: none;
}

.wiki-link:hover {
    text-decoration: underline;
    color: var(--mc-text-yellow);
}

.history-container {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 120px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-cyan);
    padding-bottom: 6px;
    margin-bottom: 16px;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-card {
    padding: 12px;
    margin-bottom: 10px;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-dark);
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.radio-selector-group {
    display: flex;
    gap: 10px;
    background: var(--bg-panel-inset);
    padding: 4px 8px;
    border: 1px solid var(--border-cyan);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.radio-label span {
    font-weight: bold;
}

.radio-label:hover {
    color: var(--text-primary);
}

.history-date {
    color: var(--accent-gold);
    font-weight: bold;
}

.history-id {
    color: var(--text-muted);
}

.history-description {
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-primary);
}

.no-history {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.diff-box {
    border: 2px solid var(--border-cyan);
    padding: 12px;
    margin-bottom: 16px;
    font-size: 13px;
}

ins.diff-add {
    background-color: rgba(61, 184, 194, 0.25) !important;
    color: var(--border-cyan-light) !important;
    border: 1px solid var(--border-cyan) !important;
    text-decoration: none;
    padding: 1px 3px;
}

del.diff-del {
    background-color: rgba(217, 56, 74, 0.25) !important;
    color: var(--accent-red-bright) !important;
    border: 1px solid var(--accent-red) !important;
    text-decoration: line-through;
    padding: 1px 3px;
}

.account-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
}

.profile-card {
    padding: 15px;
    margin-bottom: 20px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0, 255, 255, 0.2);
    font-size: 13px;
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-label {
    color: var(--mc-text-gray, #aaa);
    font-weight: bold;
}

.profile-value {
    color: #fff;
    font-weight: bold;
}

.form-card {
    padding: 15px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--mc-text-gray, #aaa);
    font-weight: bold;
    margin-bottom: 4px;
}

.alert-box {
    padding: 10px 14px;
    font-size: 12px;
    margin-bottom: 15px;
    border-radius: 3px;
}

.alert-box.success {
    background: rgba(0, 255, 0, 0.15);
    border: 1px solid #00ff00;
    color: #00ff00;
}

.alert-box.error {
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid #ff5555;
    color: #ff5555;
}

.admin-page-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 1100px;
}

.admin-section {
    padding: 18px;
    width: 100%;
    box-sizing: border-box;
}

.admin-table th,
.admin-table td {
    padding: 10px 8px;
    vertical-align: middle;
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.subfilter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    align-items: center;
}

.subfilter-label {
    font-size: 13px;
    font-weight: bold;
    color: var(--mc-text-purple, #c084fc);
    margin-right: 5px;
}

.subfilter-btn {
    padding: 6px 12px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid var(--border-purple, #c084fc);
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
}

.subfilter-btn.active,
.subfilter-btn:hover {
    background: var(--mc-text-purple, #c084fc);
    color: #000;
    font-weight: bold;
}

.item-badge {
    font-size: 11px;
    padding: 3px 6px;
    background: rgba(0, 255, 255, 0.15);
    border: 1px solid var(--border-purple, #c084fc);
    border-radius: 3px;
    color: #fff;
    margin-top: 4px;
}

.wiki-autocomplete-dropdown {
    position: absolute;
    background: #111e2b;
    border: 1px solid var(--border-cyan, #00ffff);
    max-height: 150px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.wiki-autocomplete-item {
    padding: 8px 12px;
    font-size: 13px;
    color: #fff;
    cursor: pointer;
}

.wiki-autocomplete-item:hover {
    background: #1a3a5c;
    color: #00ffff;
}

ul.wiki-list {
    margin: 8px 0 8px 20px;
    padding-left: 0;
    list-style-type: disc;
}

ul.wiki-list li {
    margin-bottom: 6px;
    line-height: 1.5;
}

ul.wiki-list li:last-child {
    margin-bottom: 0;
}
/* =========================================================
   RESPONSIVE — TABLET (≤768px)
   ========================================================= */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }

    .global-topbar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 12px;
    }

    .search-container {
        width: 100%;
        order: 3;
    }

    .page-wrapper {
        flex-direction: column;
        padding: 12px;
        gap: 12px;
    }

    /* Show the burger button on mobile */
    .mobile-nav-toggle {
        display: flex;
    }

    /* Sidebar becomes a fixed off-canvas drawer, hidden until toggled open */
    .left-menu-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        max-width: 85%;
        height: 100vh;
        z-index: 1100;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
        margin: 0;
    }

    .left-menu-sidebar.mobile-open {
        transform: translateX(0);
    }

    .wiki-container {
        flex-direction: column;
        padding-bottom: 60px;
    }

    .infobox {
        width: 100%;
    }

    .item-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .type-nav-row {
        flex-direction: column;
    }

    .type-nav-label {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #16202e;
    }

    .admin-table-wrapper,
    .catalog-container {
        overflow-x: auto;
    }

    .history-header,
    .profile-row,
    .flex-header {
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* =========================================================
   RESPONSIVE — PHONE (≤480px)
   ========================================================= */
@media (max-width: 480px) {
    body {
        font-size: 15px;
        letter-spacing: 0.2px;
    }

    .global-topbar {
        padding: 8px 10px;
    }

    .brand-logo {
        font-size: 14px;
    }

    .page-wrapper {
        padding: 10px;
        gap: 10px;
    }

    /* Prevent iOS auto-zoom on focus (needs >=16px) */
    .mc-input,
    .mc-textarea,
    .mc-select,
    .search-input {
        font-size: 16px;
        padding: 12px 12px;
    }

    /* Bigger touch targets everywhere */
    .mc-btn {
        padding: 14px 16px;
        font-size: 14px;
    }

    .left-menu-title {
        font-size: 14px;
    }

    .left-menu-list .mc-btn {
        padding: 14px;
        font-size: 14px;
    }

    details.mobile-menu-toggle summary {
        font-size: 14px;
        padding: 12px 14px;
    }

    .hub-grid {
        flex-direction: column;
    }

    .mc-hub-btn {
        min-width: 100%;
        font-size: 15px !important;
    }

    .item-grid {
        grid-template-columns: 1fr;
    }

    .item-name {
        font-size: 13px;
    }

    .filter-bar {
        padding: 8px;
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: visible;
        align-items: stretch;
    }

    .filter-btn {
        padding: 12px 16px 12px 12px !important;
        font-size: 14px !important;
        width: 100%;
        white-space: normal;
    }

    .section-header {
        font-size: 17px;
    }

    .subsection-header {
        font-size: 15px;
    }

    .skill-title,
    .hub-title,
    .header-title {
        font-size: 17px;
    }

    .desc-box,
    .ability-card-body,
    .history-description {
        font-size: 13px;
    }

    /* Infobox moves ABOVE the main content on phones */
    .wiki-container {
        flex-direction: column;
    }

    .infobox {
        order: -1;
        width: 100%;
        margin-bottom: 14px;
        font-size: 13px;
    }

    .infobox-title {
        font-size: 13px;
    }

    .infobox-data td {
        font-size: 13px;
        padding: 8px;
    }

    .account-container {
        margin: 12px auto;
        padding: 10px;
    }

    .profile-row,
    .profile-label,
    .profile-value {
        font-size: 14px;
    }

    .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .diff-box,
    .obtaining-card,
    .ability-card {
        padding: 10px 12px;
        font-size: 13px;
    }

    .ability-title {
        font-size: 15px;
    }

    .type-nav-label,
    .type-nav-links {
        font-size: 13px;
    }
}