/* Shared components retain the original desktop palette and proportions. */
/* Text surfaces grow with wrapped links instead of relying on the artwork. */
.topbar a { background: #202622; border-radius: 5px; padding: 5px 10px; }
@media (min-width: 641px) {
    #site-navigation {
        display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
        box-sizing: border-box; width: 100%; padding: 6px;
        background: #242a28; border: 1px solid #65563c; border-radius: 8px;
        box-shadow: 0 3px 12px #0005;
    }
    #site-navigation li { display: block; min-width: 0; }
    #site-navigation li a {
        display: flex; align-items: center; justify-content: center;
        box-sizing: border-box; min-height: 44px; padding: 10px 18px;
        line-height: 1.4; overflow-wrap: anywhere; border-radius: 5px;
    }
    #site-navigation li a:hover { background: #363d36; color: #f5d18e; }
}
@media (min-width: 1201px) {
    .left-menu { background: none; align-self: flex-start; }
    .left-menu-pos {
        box-sizing: border-box; width: 180px; margin: 16px 0 16px 51px;
        background: #202622; border: 1px solid #65563c; border-radius: 9px;
        box-shadow: 0 3px 12px #0003;
    }
    .left-menu > div:last-child:not(.left-menu-pos) { display: none; }
    .desktop-categories li:has(> img) { display: none; }
    .desktop-categories li + li { border-top: 1px solid #ffffff12; }
    .left-menu-pos .desktop-categories a {
        box-sizing: border-box; display: flex; align-items: center;
        min-height: 44px; padding: 11px 14px !important; line-height: 1.45;
        font-size: 14px; color: #e0e5df; overflow-wrap: anywhere;
    }
    .left-menu-pos .desktop-categories li:first-child a {
        font-size: 18px !important; font-weight: 700; color: #f0cb89;
        background: #30372e; border-radius: 8px 8px 0 0;
    }
    .left-menu-pos .desktop-categories a:hover { background: #363d36; color: #f5d18e; }
    .left-menu-pos .desktop-categories li:last-child a { border-radius: 0 0 8px 8px; }
    .wrapper { background: #252827; border-radius: 8px; box-shadow: 0 4px 20px #0004; }
    .topnamec { height: auto; min-height: 30px; }
    .topnamec :is(h1,h2,h3) { padding-bottom: 6px; overflow-wrap: anywhere; }
    body {
        background-color: #171918;
        background-image: linear-gradient(180deg, rgba(23,25,24,.15), rgba(23,25,24,.1) 500px, #171918 1400px), url(../images/desktop-mmorpg-bg-v1.webp);
        background-position: center top;
        background-size: 100% 1400px, max(100%, 1920px) auto;
        background-repeat: no-repeat;
    }
}
.mobile-menu-toggle, .mobile-categories { display: none; }
.server-card { display: grid; grid-template-columns: 28px minmax(0, 1fr) 130px; gap: 12px; padding: 14px 10px; margin-bottom: 16px; border-radius: 5px; background: #2e2f2f; }
.server-card.is-premium { background: #2a3e5e; }
.server-rank { font-size: 16px; font-weight: 700; align-self: center; text-align: center; }
.server-body { min-width: 0; }
.server-banner { display: block; width: 468px; max-width: 100%; height: auto; margin-bottom: 10px; }
.server-title { display: inline-block; font-size: 15px; font-weight: 700; line-height: 1.4; }
.server-description { margin: 4px 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.server-meta { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.server-premium { color: #f5d88e; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.server-stats { display: flex; gap: 22px; text-align: center; }
.server-stat { display: flex; flex-direction: column; gap: 5px; }
.server-stat small { color: #f4bd6b; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.server-stat:last-child small { color: #d88787; }
.server-details { padding: 6px 10px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.listing-intro { margin: 20px 0; color: #d5dcd6; line-height: 1.6; }
.recent-sites { display: grid; gap: 16px; margin-top: 24px; }
.recent-site { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 24px; padding: 22px; background: linear-gradient(135deg, #2b342d, #222a25); border: 1px solid #4b574a; border-radius: 12px; box-shadow: 0 4px 12px #0002; }
.recent-site:hover, .recent-site:focus-within { border-color: #a18a5c; }
.recent-site-title a { color: #edc983; text-decoration: none; }
.recent-site-title a:hover { color: #ffe3ab; text-decoration: underline; text-underline-offset: 4px; }
.recent-site-body { min-width: 0; overflow-wrap: anywhere; }
.recent-site-title { margin: 0 0 8px; font-size: 17px; line-height: 1.4; text-transform: none; }
.recent-site-description { margin: 0; color: #c8cec9; font-size: 14px; line-height: 1.65; }
.recent-site-meta { margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding-left: 20px; border-left: 1px solid #ffffff16; font-size: 13px; }
.recent-site-meta dt { color: #adbda9; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.recent-site-meta > div:first-child dd { color: #f0cf8e; font-size: 20px; font-weight: 700; }
.recent-site-meta dd { margin: 2px 0 0; color: #d5dcd6; overflow-wrap: anywhere; }
.topnamec h1 { margin: 0; padding: 5px 0 0 30px; color: #fff; font-size: 18px; line-height: 1.2; }
.server-detail-card { grid-template-columns: minmax(0, 1fr) 130px; }
.details-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 20px 0; }
.details-tabs a { display: flex !important; align-items: center; min-height: 44px; margin-top: 0 !important; border-radius: 5px; }
:where(a, button, input, select, textarea):focus-visible { outline: 2px solid #f9ae2e; outline-offset: 3px; }

@media (max-width: 1200px) {
    .page-content:has(> .recent-sites) { padding: 18px; background: #1c231feb; border: 1px solid #3c473d; border-radius: 16px; box-shadow: 0 8px 24px #0003; }
    .page-content:has(> .recent-sites) .topnamec { background: #303a31; border-left-color: #d7b675; }
    .recent-site { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px; }
    .recent-site-meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 28px; border-left: 0; border-top: 1px solid #ffffff19; padding: 14px 0 0; }
    .recent-sites { margin-top: 18px; gap: 14px; }
    html { scroll-padding-top: 16px; }
    body {
        font-size: 15px; line-height: 1.5; overflow-x: visible;
        background-color: #171918;
        background-image: linear-gradient(180deg, rgba(23,25,24,.12), rgba(23,25,24,.35) 260px, #171918 900px), url(../images/mobile-tablet-bg-v1.webp);
        background-size: 100% 900px, 100% auto;
        background-position: center top;
        background-repeat: no-repeat;
    }
    .topbar a, .header-menu li a { text-shadow: 0 1px 4px #000, 0 0 12px #000; }
    *, *::before, *::after { box-sizing: border-box; }
    .topbar, .header-menu, .wrapper, .footer .cont-holder { width: calc(100% - 40px); max-width: 960px; }
    .topbar { height: auto; min-height: 30px; }
    .topbar a { float: none; display: block; margin: 8px 0 0; padding: 0; text-align: right; white-space: normal; }
    .header-menu { padding: 4px 0 18px; }
    .logo img { width: 290px; max-width: 70vw; height: auto; }
    .header-menu ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
    .header-menu li { display: block; }
    .header-menu li a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; font-size: 14px; }
    .wrapper { background: none; }
    .content-cont { display: block; min-height: 0 !important; }
    .left-menu, .left-menu-pos { width: 100%; margin: 0; background: none; }
    .desktop-categories, .left-menu > div:last-child:not(.left-menu-pos) { display: none; }
    .mobile-categories { display: block; padding: 18px; margin: 0 0 20px; border: 1px solid #414744; border-radius: 12px; background: #242a28; }
    .mobile-categories label { display: block; color: #c8cdc7; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
    .mobile-category-controls { display: flex; gap: 10px; margin-top: 8px; }
    .mobile-category-controls select { flex: 1; min-width: 0; width: auto; margin: 0; border: 1px solid #525a55; border-radius: 6px; background: #191e1b; color: #fff; font-size: 16px; }
    .mobile-category-controls button { flex: 0 0 auto; width: auto; margin: 0; border-radius: 6px; background: #e8b65d; color: #211d14; font-size: 14px; font-weight: 700; }
    .content { display: flex; flex-direction: column; width: 100% !important; min-width: 0; padding: 0 !important; }
    .page-content { order: 2; margin-top: 16px !important; min-width: 0; }
    .content > .sponsored-label { order: 0; margin-bottom: 10px; font-size: 11px !important; letter-spacing: .14em; color: #a4aba6 !important; }
    .sponsor-banners { order: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
    .sponsor-placement { width: 100% !important; max-width: 728px; height: auto !important; line-height: 0; }
    .sponsor-placement img { display: block; max-width: 100%; height: auto; margin: auto; border-radius: 5px; }
    .sponsor-banners > div:empty { display: none; }
    .sponsor-placement.is-placeholder, .inline-ad-placeholder, .inline-ad-placeholder + br { display: none; }
    .content:not(:has(.sponsor-placement:not(.is-placeholder))) > .sponsored-label { display: none; }
    .side-ad { order: 3; position: static !important; align-self: center; float: none !important; width: 160px !important; height: auto !important; margin: 20px auto !important; }
    .side-ad.is-placeholder { display: none; }
    .topnamec { height: auto; width: 100%; margin: 0; padding: 15px 18px; background: #652e30; border-left: 3px solid #ecae65; border-radius: 0 9px 9px 0; }
    .topnamec :is(h1,h2,h3) { margin: 0; padding: 0 !important; font-size: 18px; line-height: 1.4; text-transform: none; }
    .topnamec i { font-style: normal; }
    .content img { max-width: 100%; }
    .content img:not(.imgytpl) { height: auto; }
    .content iframe { max-width: 100%; }
    .content iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 0 !important; }
    .content :is(form,textarea,input,select) { max-width: 100%; }
    .content :is(input[type="text"], input[type="email"], input[type="password"], input[type="url"], select, textarea) { width: 100%; font-size: 16px; border-radius: 5px; min-height: 44px; padding: 12px; }
    .content button { min-height: 44px; font-size: 15px; border-radius: 5px; white-space: normal; }
    .content input[type="file"] { width: 100%; font-size: 14px; }
    .content label { line-height: 1.6; }
    .content .container { width: 100%; }
    .content div[style*="width:"] { max-width: 100%; }
    .content div[style*="margin-left:"] { margin-left: 0 !important; }
    .content div[style*="margin-right:"] { margin-right: 0 !important; }
    .content table { max-width: 100%; width: 100%; margin-left: 0; margin-right: 0; }
    .content td { overflow-wrap: anywhere; }
    .page-content { overflow-wrap: anywhere; }
    .content .imgytpl { display: none; }
    .content :is(pre,code) { white-space: pre-wrap; overflow-wrap: anywhere; }
    .table-scroll table { min-width: 600px; }
    #tabs { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; height: auto; padding: 0 0 12px; margin: 0 0 12px; }
    #tabs li { float: none !important; margin: 0; }
    #tabs li a, #tabs li button { display: flex; align-items: center; min-height: 44px; margin: 0; padding: 10px 12px; border-radius: 6px; font-size: 13px; }
    #tabs li a.inactive { color: #ffca74; background: #464333; padding: 10px 12px; }
    .pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
    .pagination > li > a { display: flex; align-items: center; min-height: 44px; margin: 0; border-radius: 5px; }
    .footer { min-width: 0; height: auto; margin-top: 30px; overflow: visible; }
    .footer :is(#top-container,#mid-container,#bot-container) { height: auto; min-height: 48px; }
    .footer #top-container .cont-holder { display: flex; justify-content: space-between; align-items: center; }
    #top-container p, #top-container span { float: none; height: auto; margin: 0; padding: 12px 0; }
    .footer-cats-head { display: flex; flex-wrap: wrap; gap: 4px 16px; width: 100%; margin: 0; padding: 16px 0; }
    .footer-cats-head a { display: flex; align-items: center; min-height: 44px; float: none !important; margin: 0; color: #b6b9b5; }
    #bot-container .cont-holder { padding: 0 0 20px; }
    #bot-container span { display: block; padding: 12px 0 0; line-height: 1.6; color: #a4a9a4; }
    .cookiealert { padding: 12px; font-size: 13px; line-height: 1.5; }
    .cookiealert button { width: auto; min-height: 44px; margin: 8px; white-space: normal; }
}

@media (max-width: 640px) {
    .topbar, .header-menu, .wrapper, .footer .cont-holder { width: calc(100% - 24px); }
    body {
        background-image: linear-gradient(180deg, rgba(23,25,24,.08), rgba(23,25,24,.25) 180px, #171918 650px), url(../images/mobile-tablet-bg-v1.webp);
        background-size: 100% 650px, 100% auto;
    }
    .topbar a { font-size: 11px; text-align: center; color: #b8c0b9; }
    .header-menu { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 0 0 10px; }
    .logo img { width: 210px; max-width: 100%; }
    .header-menu > div[style] { display: none; }
    .header-menu > center { grid-column: 1 / -1; }
    .navigation-ready .mobile-menu-toggle { display: inline-flex; align-items: center; gap: 8px; width: auto; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid #67573b; border-radius: 7px; background: #272821; color: #f5d18e; font-size: 14px; }
    .navigation-ready #site-navigation { display: none; }
    .navigation-ready #site-navigation.is-open { display: grid; }
    #site-navigation { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; padding: 8px; background: #252a27; border: 1px solid #424941; border-radius: 8px; }
    .header-menu li a { padding: 10px; font-size: 13px; text-align: left; }
    .mobile-categories { margin-bottom: 16px; padding: 14px; }
    .mobile-category-controls { gap: 8px; }
    .mobile-category-controls button { padding: 10px 12px; }
    .server-card { position: relative; grid-template-columns: 1fr; gap: 12px; padding: 16px; border: 1px solid #444c46; border-radius: 12px; background: #252c28; }
    .server-card.is-premium { background: #26374a; border-color: #8f7951; }
    .server-detail-card .server-meta { justify-content: flex-start; }
    .server-rank { justify-self: start; align-self: start; border-radius: 5px; padding: 3px 9px; background: #141b17; color: #c5cfc7; font-size: 12px; }
    .server-rank::before { content: '#'; }
    .server-title { font-size: 19px; color: #f4c171; }
    .server-description { color: #d5dcd6; font-size: 14px; line-height: 1.65; }
    .server-banner { width: 100%; margin-bottom: 12px; border-radius: 4px; }
    .server-meta { flex-direction: row; justify-content: space-between; gap: 12px; border-top: 1px solid #ffffff19; padding-top: 12px; }
    .server-premium { position: absolute; top: 20px; right: 16px; }
    .server-stats { gap: 24px; text-align: left; }
    .server-stat { flex-direction: column-reverse; gap: 1px; }
    .server-stat strong { color: #f1f3ee; font-size: 17px; }
    .server-stat small { font-size: 10px; }
    .server-details { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; background: #e4bb70; color: #211f17; border-radius: 6px; font-size: 14px; font-weight: 700; }
    .content div[style*="width:50%"] { float: none !important; width: 100% !important; }
    .content > .page-content > div[style*="width:"] { width: 100% !important; }
    .content :is(a,span)[style*="width:"] { max-width: 100%; }
    .content a[style*="display: block"] { width: auto !important; }
    .content table:not(.table-scroll table), .content table:not(.table-scroll table) > tbody, .content table:not(.table-scroll table) > tbody > tr { display: block; width: 100%; }
    .content table:not(.table-scroll table) > tbody > tr > td { display: block; width: 100% !important; max-width: 100%; padding: 10px !important; }
    .content div[style*="float:"] { max-width: 100%; }
    .content .account-stats { position: static !important; display: flex !important; flex-wrap: wrap; width: 100% !important; gap: 16px; padding: 14px 0 0 !important; text-align: left !important; }
    .content .account-stats > span { margin: 0 !important; }
    .content .account-actions { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px; }
    .content .account-actions > span { float: none !important; display: inline-flex; align-items: center; margin: 0 !important; padding: 10px 8px !important; min-height: 44px; }
    .content .account-actions > span:first-child { width: 100%; padding-left: 0 !important; }
    .content .account-actions > span:not(:first-child) { border: 1px solid #ffffff24; border-radius: 6px; }
    .content .account-actions img { margin: 0 !important; }
    .content span[style*="margin-left:"][style*="transform:"] { display: none; }
    .content button[id^="copyButton"] { width: 100% !important; float: none !important; }
    .content textarea[id^="copyTarget"] { width: 100% !important; float: none !important; min-height: 64px; }
    .content div[style*="height:350px"] { height: auto !important; min-height: 200px; }
    .content img[width="335"], .content img[width="500"] { width: 100%; margin: 0 !important; }
    .content .imgytpl { display: none; }
    .content :is(.mce-tinymce,.mce-container,.mce-container-body) { max-width: 100%; }
    .content .mce-toolbar-grp { overflow-x: auto; }
    .content .g-recaptcha { max-width: 100%; overflow-x: auto; }
    #tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 12px; }
    #tabs li { flex-shrink: 0; }
    .topnamec :is(h1,h2,h3) { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    a, button { transition: none; }
}

/* Consistent page surfaces and readable account forms. */
.login-panel { box-sizing: border-box; width: 100%; max-width: 460px; margin: 28px auto; padding: 28px; background: #1e2422; border: 1px solid #404840; border-radius: 14px; box-shadow: 0 12px 30px #0002; }
.login-intro { margin: 0 0 24px; color: #bfc8c0; font-size: 14px; line-height: 1.6; }
.login-form label { display: block; margin: 0 0 20px; color: #e0e5df; font-size: 14px; line-height: 1.5; }
.content .login-form input:is([type="email"],[type="password"]) { box-sizing: border-box; display: block; width: 100%; max-width: 100%; min-height: 48px; margin: 8px 0 0; padding: 12px 14px; border: 1px solid #59645a; border-radius: 7px; background: #141a17; color: #f3f5ef; font-size: 16px; }
.content .login-form button { box-sizing: border-box; width: 100%; min-height: 48px; margin: 4px 0 18px; padding: 12px; background: #dfbd78; border: 1px solid #e8cb90; border-radius: 7px; color: #211e16; font-size: 15px; font-weight: 700; }
.login-form > a { display: inline-block; padding: 8px 0; color: #e6c78a; font-size: 14px; }
@media (min-width: 1201px) {
    .content-cont { min-height: 0 !important; align-items: stretch; }
    .left-menu { flex: 0 0 236px; width: 236px; margin: 0; }
    .left-menu-pos { width: 196px; margin: 24px 20px; background: #1d2420; border-color: #3e493f; box-shadow: none; }
    .left-menu-pos .desktop-categories a { padding: 12px 15px !important; color: #cbd5cc; }
    .left-menu-pos .desktop-categories li:first-child a { background: #2c362c; color: #edca86; letter-spacing: .02em; }
    .content { flex: 1; min-width: 0; width: auto !important; box-sizing: border-box; padding: 24px !important; }
    .page-content { margin-top: 0 !important; }
    .topnamec { box-sizing: border-box; width: 100%; margin: 0; padding: 16px 20px; background: #303a31; border-left: 3px solid #d7b675; border-radius: 0 9px 9px 0; }
    .topnamec :is(h1,h2,h3) { margin: 0; padding: 0 !important; color: #f0e8d6; font-size: 20px; line-height: 1.4; text-transform: none; }
    .content .login-panel { margin: 28px auto 36px; }
}
@media (max-width: 640px) {
    .login-panel { padding: 20px; margin: 20px auto; }
}
