/* =====================================================
   Pegaz-OTS — Red Dark Fantasy Theme Override
   ===================================================== */

/* ========== BASE / FIX CUTOFF ========== */
html, body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
}

/* Bodycontainer was display:table which cuts off flex children */
#Bodycontainer {
    display: block !important;
    height: auto !important;
}

/* ArtworkHelper must grow with content, not clip it */
#ArtworkHelper {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
}

/* ContentRow must grow to tallest column */
#ContentRow {
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 40px !important;
}

/* Footer must sit below content, not overlap */
#Footer {
    position: relative !important;
    clear: both !important;
    width: 100% !important;
    padding: 20px 0 30px !important;
}

/* ========== TOP NAVBAR ========== */
.tnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 44px;
}

.tnav-fixed {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, #1e0404 0%, #120303 60%, #0e0202 100%);
    border-bottom: 2px solid #5a0000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.9), 0 3px 0 #3a0000;
    padding: 0 20px;
}

.tnav-logo {
    width: 36px;
    height: 36px;
    background-image: url('../images/header/logo_pegaz.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 14px;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.9));
}

.tnav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}

.tnav-menu a {
    display: inline-block;
    padding: 6px 13px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: #ccbbbb !important;
    text-decoration: none !important;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border-radius: 2px;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}

.tnav-menu a:hover {
    background: rgba(100, 8, 8, 0.75) !important;
    color: #ffffff !important;
}

.tnav-menu a.red {
    color: #ff6644 !important;
}
.tnav-menu a.red:hover {
    background: rgba(140, 20, 0, 0.75) !important;
    color: #ffaa88 !important;
}

/* Language switcher */
.tnav-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 14px;
}

.tnav-lang a,
.tnav-lang span {
    font-family: Verdana, Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
    color: #997777 !important;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    transition: color 0.12s;
}

.tnav-lang a:hover {
    color: #ffffff !important;
}

.tnav-lang a.tnav-lang-active {
    color: #ff8866 !important;
}

.tnav-lang span {
    color: #553333 !important;
}

/* Push whole page down so navbar doesn't overlap content */
#ArtworkHelper {
    margin-top: 44px !important;
}

/* ========== LOGO ========== */
#ContentRow {
    top: 160px !important;
}

#LeftArtwork {
    height: 160px !important;
    width: 160px !important;
    top: -160px !important;
    left: 0px !important;
}

#LeftArtwork #TibiaLogoArtworkTop {
    position: absolute !important;
    top: 0px !important;
    left: -5px !important;
    width: 165px !important;
    height: 155px !important;
    object-fit: contain;
    mix-blend-mode: multiply;
    filter: drop-shadow(0 3px 10px rgba(0,0,0,0.9)) brightness(1.05);
    cursor: pointer;
}

/* ========== BODY / BACKGROUND ========== */
body {
    background-image: url('../images/header/tlo.png') !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-color: #050005 !important;
}
#ArtworkHelper {
    background-image: none !important;
    background-color: transparent !important;
}

/* ========== UNIFIED LAYOUT PANEL ========== */
#Bodycontainer {
    max-width: 1320px !important;
    min-width: 1000px !important;
    background-color: rgba(4, 0, 6, 0.62) !important;
    box-shadow: 0 0 0 1px rgba(100, 0, 0, 0.2),
                0 0 80px rgba(0, 0, 0, 0.9) !important;
    display: block !important;
}

/* Replace absolute positioning with flexbox — fixes column overflow */
#ContentRow {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    position: relative !important;
    background: rgba(2, 0, 4, 0.42) !important;
    padding-top: 0 !important;
}

/* Left menu — flex item, fixed width */
#MenuColumn {
    position: static !important;
    flex: 0 0 234px !important;
    width: 234px !important;
    min-width: 234px !important;
    max-width: 234px !important;
    margin: 0 0 0 8px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    align-self: flex-start !important;
}

/* Center content — flex grows to fill remaining space */
#ContentColumn {
    flex: 1 1 auto !important;
    position: static !important;
    margin: 0 8px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Right sidebar — flex item, fixed width */
#ThemeboxesColumn {
    position: static !important;
    flex: 0 0 234px !important;
    width: 234px !important;
    min-width: 234px !important;
    max-width: 234px !important;
    margin: 0 8px 0 0 !important;
    padding: 0 !important;
    text-align: left !important;
    box-sizing: border-box !important;
    align-self: flex-start !important;
}

/* Right column boxes fill full column width */
.ots-box,
.rank, .searchchar, .Themebox {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Left column boxes fill full column width */
#ShadowLoginbox {
    position: static !important;
    width: 100% !important;
    left: auto !important;
    box-sizing: border-box !important;
}

#MenuColumn .SmallMenuBox {
    width: 100% !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
}

/* LeftArtwork logo — sits above the flex row */
#LeftArtwork {
    position: absolute !important;
}

/* Content box — darker background so it stands out from tlo.png */
.Content .BoxContent {
    background-color: rgba(10, 1, 1, 0.82) !important;
    padding: 12px 16px !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}

/* Global font size bump — all content text larger */
.Content,
.Content td,
.Content th,
.Content p,
.Content span,
.Content li,
.Content div {
    font-size: 13px !important;
    line-height: 1.55 !important;
}

/* Table cells — more breathing room */
.Content .TableContentContainer td,
.Content .TableContentContainer th,
.Content .BoxContent td,
.Content .BoxContent th {
    padding: 7px 10px !important;
    font-size: 13px !important;
}

/* News headline area */
.Content .Box {
    background-color: rgba(10, 1, 1, 0.75) !important;
}

/* Statusbar font */
.InfoBar, .InfoBar a, .InfoBarSmallElement {
    font-size: 12px !important;
}

/* ========== FOOTER ========== */
#Footer { color: #aa5555; }
#Footer a:link, #Footer a:visited, #Footer a:focus,
#Footer a:active, #Footer a:hover { color: #aa5555; }

/* ========== ONLINE COUNT ========== */
#RightArtwork #PlayersOnline {
    color: #ff4444;
    border-bottom: 1px solid #3a0000;
}

/* ====================================================
   SPRITE RECOLORING — filter only on frame divs.
   We do NOT filter parent containers (they contain
   outfit images, character images etc).
   filter: hue-rotate(-30deg) shifts gold→red;
           saturate(2) intensifies; brightness(0.5) darkens.
   ==================================================== */

/* Login box frame sprites */
#LoginTop,
#LoginBottom,
#BorderLeft.LoginBorder,
#BorderRight.LoginBorder {
    filter: hue-rotate(-30deg) saturate(2.2) brightness(0.45) sepia(0.4);
}

/* Download box frame sprites */
.SmallBoxTop, .SmallBoxBottom,
.SmallMenuBox .SmallBoxBorder {
    filter: hue-rotate(-30deg) saturate(2.2) brightness(0.45) sepia(0.4);
}

/* Login/Download button backgrounds — recolor but restore any img inside */
#LoginButtonContainer,
.SmallBoxButtonContainer {
    filter: hue-rotate(-30deg) saturate(2) brightness(0.5);
}
#LoginButtonContainer img,
.SmallBoxButtonContainer img,
.MediumButtonText {
    filter: none;
}

/* Menu top/bottom frame */
#MenuTop, #MenuBottom {
    filter: hue-rotate(-30deg) saturate(2.2) brightness(0.45) sepia(0.4);
}

/* ========== MENU CATEGORY HEADERS — replace GIF sprites with CSS ========== */
.menuitem {
    width: auto !important;
}

.MenuButton {
    width: auto !important;
    background-image: none !important;
    background: linear-gradient(to bottom, #5a0000 0%, #3a0000 60%, #2a0000 100%) !important;
    border-top: 1px solid #6a1010 !important;
    border-bottom: 1px solid #4a0808 !important;
    margin-top: 3px !important;
    box-sizing: border-box !important;
}

.MenuButton > div,
.MenuButton > div:first-child {
    background-image: none !important;
    filter: none !important;
    display: flex !important;
    align-items: center !important;
    height: 28px !important;
    padding: 0 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Hide icon GIFs, green lights, hover-overlay */
.MenuButton .Icon,
.MenuButton .Lights,
.MenuButton .light_lu,
.MenuButton .light_ld,
.MenuButton .light_ru,
.MenuButton .Button {
    display: none !important;
}

/* Label — hide GIF background, show text via ::after */
.MenuButton .Label {
    background-image: none !important;
    flex: 1 !important;
    width: auto !important;
    height: auto !important;
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: bold !important;
    color: #ffd5b0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-shadow: 1px 1px 2px #000 !important;
}

#news_Label::after          { content: "News"; }
#account_Label::after       { content: "Account"; }
#community_Label::after     { content: "Community"; }
#library_Label::after       { content: "Library"; }
#systems_Label::after       { content: "Systems"; }
#shops_Label::after         { content: "Shop"; }
#forum_Label::after         { content: "Forum"; }
#charactertrade_Label::after { content: "Trade"; }

/* Extend toggle arrow — replace GIF with CSS */
.MenuButton .Extend {
    background-image: none !important;
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    color: #cc4422 !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.MenuButton .Extend::after { content: "▸"; }

.MenuButton:hover > div {
    background: linear-gradient(to bottom, #7a0000 0%, #5a0000 60%, #3a0000 100%) !important;
}

/* ========== DOWNLOAD BOX — replace chain sprites with CSS ========== */
#DownloadBox {
    position: static !important;
    width: auto !important;
    border: 1px solid #6a1010 !important;
    border-radius: 2px !important;
    background-color: #120303 !important;
    overflow: visible !important;
    margin-bottom: 8px !important;
    box-sizing: border-box !important;
}

.SmallMenuBox {
    position: static !important;
    width: auto !important;
    box-sizing: border-box !important;
}

.SmallBoxTop,
.SmallBoxBottom {
    display: none !important;
}

.SmallMenuBox .SmallBoxBorder {
    display: none !important;
}

.SmallBoxButtonContainer {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    background-image: none !important;
    background-color: #120303 !important;
    filter: none !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    left: auto !important;
}

#PlayNowContainer {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
}

.MediumButtonBackground {
    position: static !important;
    background-image: none !important;
    background: linear-gradient(to bottom, #5a0000 0%, #3a0000 100%) !important;
    border: 1px solid #8b1010 !important;
    border-radius: 3px !important;
    height: 34px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: background 0.15s !important;
}

.MediumButtonBackground:hover {
    background: linear-gradient(to bottom, #7a0000 0%, #5a0000 100%) !important;
}

.MediumButtonOver {
    display: none !important;
}

.MediumButtonText {
    filter: none !important;
    height: 18px !important;
    width: auto !important;
    object-fit: contain !important;
    position: static !important;
}

/* Submenu left/right chain divs */
.LeftChain, .RightChain {
    filter: hue-rotate(-30deg) saturate(1.8) brightness(0.4);
}

/* Content box corner + border_1 divs (sprite frames, no children) */
.Content .Corner-tl,
.Content .Corner-tr,
.Content .Corner-bl,
.Content .Corner-br {
    filter: hue-rotate(-30deg) saturate(2.2) brightness(0.45);
}
.Content .Border_1 {
    filter: hue-rotate(-30deg) saturate(2.2) brightness(0.45);
}
.Content .BorderTitleText {
    filter: hue-rotate(-30deg) saturate(2.5) brightness(0.45);
}

/* Table caption decoration spans */
.CaptionContainer .CaptionBorderTop,
.CaptionContainer .CaptionBorderBottom,
.CaptionContainer .CaptionVerticalLeft,
.CaptionContainer .CaptionVerticalRight,
.CaptionContainer .CaptionEdgeLeftTop,
.CaptionContainer .CaptionEdgeRightTop,
.CaptionContainer .CaptionEdgeLeftBottom,
.CaptionContainer .CaptionEdgeRightBottom {
    filter: hue-rotate(-30deg) saturate(2) brightness(0.45);
}

/* ========== SUBMENU ========== */
.Submenu {
    width: auto !important;
    background-color: #0e0101 !important;
    border-left: 1px solid #5a0000 !important;
    border-right: 1px solid #5a0000 !important;
    border-bottom: 1px solid #5a0000 !important;
    margin-right: 0 !important;
}
.Submenuitem {
    display: block !important;
    position: relative !important;
}
.SubmenuitemLabel {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    width: auto !important;
    border-bottom: 1px solid #2a0808 !important;
    padding: 6px 10px 6px 12px !important;
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
}
.LeftChain, .RightChain {
    display: none !important;
}
.ActiveSubmenuItemIcon {
    display: none !important;
}
.Submenu a:link    { display: block; color: #e8c0b0; text-decoration: none; }
.Submenu a:visited { color: #e8c0b0; text-decoration: none; }
.Submenu a:focus   { color: #e8c0b0; text-decoration: none; }
.Submenu a:active  { color: #ffffff; }
.Submenu a:hover   { color: #ff6644; }

/* ========== CONTENT BOX ========== */
.Content .Box {
    color: #e8d0c0 !important;
    border-left: 2px solid #5a0000 !important;
    border-right: 2px solid #5a0000 !important;
    background-color: #120303 !important;
}
.Content .BoxContent {
    background-color: #120303 !important;
    color: #e8d0c0 !important;
    background-image: none !important;
}
.Content .BoxContent td,
.Content .BoxContent p,
.Content .BoxContent span,
.Content .BoxContent li,
.Content .BoxContent b,
.Content .BoxContent strong,
.Content .BoxContent small {
    color: #e8d0c0 !important;
}

/* Content links */
.Content a { color: #cc4422 !important; font-weight: bold; }
.Content a:hover { color: #ff7755 !important; text-decoration: underline; }

/* Content table headers */
.Content th {
    background-color: #3a0000 !important;
    color: #ffddcc !important;
}

/* Borders */
.Content .Border_2 { background-color: #5a0000 !important; }
.Content .Border_3 {
    border-top: 1px solid #5a0000 !important;
    border-bottom: 1px solid #5a0000 !important;
}

/* ========== ALL TABLE CONTAINERS ========== */
.TableContainer { border: 1px solid #5a0000 !important; }
.TableContainer .Odd  { background-color: #1c0808 !important; }
.TableContainer .Even { background-color: #260e0e !important; }

/* Caption header */
.TableContainer .CaptionContainer,
.TableContainer .CaptionContainer .CaptionInnerContainer {
    background-color: #3a0000 !important;
}
.TableContainer .CaptionContainer .Text { color: #ffddcc !important; }

/* Inner tables */
.TableContentContainer {
    background-color: #120303 !important;
    border: 1px solid #5a0000 !important;
    box-shadow: 3px 3px 4px #3a0000 !important;
}
.InnerTableContainer .TableContentContainer {
    box-shadow: 3px 3px 4px #5a0000 !important;
}
.TableContainer .Table1,
.TableContainer .Table2,
.TableContainer .Table3,
.TableContainer .Table4,
.TableContainer .Table5 {
    background-color: #1c0808 !important;
    border: 2px solid #5a0000 !important;
}

/* Legacy inline bgcolor attributes */
[bgcolor="#D4C0A1"], [bgcolor="#d4c0a1"],
[bgcolor="#F1E0C6"], [bgcolor="#f1e0c6"],
[bgcolor="#505050"] {
    background-color: #1c0808 !important;
    color: #e8d0c0 !important;
}

/* Inline style overrides */
tr[style*="#D4C0A1"], tr[style*="#d4c0a1"],
div[style*="background-color: #d4c0a1"],
div[style*="background-color:#d4c0a1"] {
    background-color: #120303 !important;
}

/* Border color for inline TableContent */
.TableContent td { border-color: #3a1010 !important; }
.TableContainer .Table2 .InnerTableContainer td,
.TableContainer .Table3 .TableContent td,
.TableContainer .Table3 .TableContentAndRightShadow td {
    border: 1px solid #3a1010 !important;
}

/* LabelH */
.LabelH, .LabelH td { background-color: #260e0e !important; }

/* ========== MYAAC-TABLE (online, highscores, etc.) ========== */
.myaac-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
}
.myaac-table thead tr td,
.myaac-table thead tr th {
    background: linear-gradient(to bottom, #3a0000, #280000) !important;
    color: #ddaa88 !important;
    padding: 7px 10px !important;
    border-bottom: 1px solid #5a0000 !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.myaac-table tbody tr:nth-child(odd) td {
    background-color: #1a0606 !important;
    color: #c8b090 !important;
    padding: 6px 10px !important;
    border-bottom: 1px solid #2a0808 !important;
}
.myaac-table tbody tr:nth-child(even) td {
    background-color: #220a0a !important;
    color: #c8b090 !important;
    padding: 6px 10px !important;
    border-bottom: 1px solid #2a0808 !important;
}
.myaac-table tbody tr:hover td {
    background-color: #3a1010 !important;
    color: #ffddcc !important;
}
.myaac-table tfoot tr td {
    background-color: #280000 !important;
    color: #aa8866 !important;
    padding: 6px 10px !important;
}
.myaac-table a { color: #ff8866 !important; }
.myaac-table a:hover { color: #ffddcc !important; }

/* LabelV150 (World Information labels) */
.LabelV150 { color: #ddaa88 !important; font-weight: bold; width: 160px; }

/* inline style overrides for online/world info table */
table[width="100%"] td.LabelV150 { background: transparent !important; }

/* SmallBox messages */
.SmallBox .ErrorMessage {
    background-color: #2e0505 !important;
    color: #ff6644 !important;
}
.SmallBox .Message {
    background-color: #120303 !important;
    color: #e8d0c0 !important;
}

/* Statusbar */
#statusbar { background-color: #120303 !important; }

/* Odd/Even in BoxContent */
.Content .BoxContent .Odd  { background-color: #1c0808 !important; }
.Content .BoxContent .Even { background-color: #260e0e !important; }

/* Button text */
.BigButtonText { color: #ffddcc !important; }

/* ========== HELPER DIV ========== */
#HelperDivContainer {
    color: #e8d0c0 !important;
    background-color: #120303 !important;
    border: 1px double #8b0000 !important;
}

/* ========== ff_ UTILITY CLASSES ========== */
.Content .BoxContent .ff_info,
.Content .BoxContent .ff_infotext,
.Content .BoxContent .ff_smallinfo,
.Content .BoxContent .ff_large,
.Content .BoxContent .ff_pagetext,
.Content .BoxContent .ff_whitelarge,
.Content .BoxContent .ff_white {
    color: #e8d0c0 !important;
}
.Content .BoxContent .ff_pagetextgrey { color: #aa8880 !important; }
.Content .BoxContent .ff_correct      { color: #ff4444 !important; }
.Content .BoxContent .ff_pagetextred  { color: #ff6644 !important; }

/* ========== INPUT FIELDS ========== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    background-color: #1a0505 !important;
    color: #e8d0c0 !important;
    border: 1px solid #5a0000 !important;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    border-color: #cc2200 !important;
    outline: none !important;
    box-shadow: 0 0 4px #cc2200 !important;
}

/* ========== LOGIN/CREATE ACCOUNT SECTION ========== */
#LoginCreateAccountBox,
#LoginCreateAccountBox p,
#LoginCreateAccountBox b { color: #e8d0c0 !important; }

/* ========== RIGHT COLUMN BOXES — do NOT filter ========== */
#ThemeboxesColumn img,
#ThemeboxesColumn .rank_outfit,
#Themeboxes img,
.Themebox img {
    filter: none !important;
}

/* ========== SHADOW-STYLE LOGIN BOX ========== */
#ShadowLoginbox {
    position: relative;
    left: 5px;
    top: 8px;
    width: 168px;
    margin-bottom: 14px;
    background-color: rgba(8, 2, 2, 0.78);
    border: 1px solid rgba(120, 30, 30, 0.55);
    border-radius: 4px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.7), inset 0 0 1px rgba(255,100,100,0.08);
    overflow: hidden;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.slb-header {
    background: rgba(80, 0, 0, 0.55);
    border-bottom: 1px solid rgba(150, 30, 30, 0.4);
    color: #ffffff;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 8px 10px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

.slb-body {
    padding: 10px 10px 10px;
}

.slb-label {
    display: block;
    font-family: Verdana, Arial, sans-serif;
    font-size: 10px;
    color: #dddddd;
    margin-bottom: 3px;
    margin-top: 8px;
    font-weight: bold;
}
.slb-label:first-child { margin-top: 0; }

.slb-input {
    display: block;
    width: 100%;
    background-color: rgba(15, 5, 5, 0.85) !important;
    border: 1px solid rgba(100, 20, 20, 0.7) !important;
    border-radius: 3px !important;
    color: #bbbbbb !important;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    padding: 6px 8px;
    box-sizing: border-box;
    outline: none;
}
.slb-input:focus {
    border-color: #aa2200 !important;
    box-shadow: 0 0 6px rgba(170,34,0,0.4) !important;
    color: #eeeeee !important;
}
.slb-input::placeholder { color: #555 !important; }

.slb-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 7px 0;
    background: rgba(40, 10, 10, 0.8);
    border: 1px solid rgba(120, 30, 30, 0.5);
    border-radius: 3px;
    color: #cccccc;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    font-weight: normal;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.slb-btn:hover {
    background: rgba(100, 15, 15, 0.85) !important;
    color: #ffffff !important;
    border-color: rgba(180, 50, 50, 0.7) !important;
    text-decoration: none !important;
}

.slb-link {
    display: block;
    margin-top: 7px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 10px;
    color: #cc4422 !important;
    text-decoration: none;
    font-weight: normal !important;
}
.slb-link:hover {
    color: #ff6644 !important;
    text-decoration: underline !important;
}

.slb-logged {
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    color: #cccccc;
    margin-bottom: 8px;
}
.slb-logged b { color: #ffffff; }

/* ========== UNIFIED BOX STYLE (right column) ========== */
/*
  All right-column boxes use .ots-box wrapper.
  Removes tibiacom PNG sprites, replaces with CSS borders.
*/
.ots-box {
    width: 180px;
    margin-bottom: 12px;
    border: 1px solid #6a1010;
    box-shadow: 0 0 8px rgba(160, 0, 0, 0.35), inset 0 0 4px rgba(0,0,0,0.6);
    background-color: #120303;
    border-radius: 2px;
    overflow: hidden;
}

.ots-box-header {
    background: linear-gradient(to bottom, #5a0000 0%, #3a0000 60%, #2a0000 100%);
    border-bottom: 1px solid #8b1010;
    color: #ffd5b0;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    padding: 7px 5px 6px;
    text-shadow: 1px 1px 2px #000;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ots-box-content {
    padding: 8px 10px;
    background-color: #120303;
}

.ots-box-footer {
    height: 4px;
    background: linear-gradient(to bottom, #2a0000, #180000);
    border-top: 1px solid #4a0808;
}

/* ---- Existing boxes: reuse header/content/footer pattern ---- */
/* rank box (highscores) */
.rank { width: 180px; }
.rank_header {
    background: linear-gradient(to bottom, #5a0000 0%, #3a0000 60%, #2a0000 100%) !important;
    background-image: none !important;
    border-bottom: 1px solid #8b1010;
    color: #ffd5b0 !important;
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: bold !important;
    text-align: center;
    height: auto !important;
    padding: 7px 5px 6px !important;
    line-height: 1.4 !important;
    text-shadow: 1px 1px 2px #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rank_content {
    background-image: none !important;
    background-color: #120303 !important;
    padding: 6px 8px !important;
    width: auto !important;
}
.rank_bottom {
    background-image: none !important;
    background-color: #180000 !important;
    border-top: 1px solid #4a0808;
    height: 6px !important;
    margin-top: 0 !important;
}
.rank_player { color: #e8d0c0 !important; }
.rank_text small { color: #aa8880 !important; }
.rank_text a { color: #cc4422 !important; text-decoration: none; }
.rank_text a:hover { color: #ff7755 !important; }
.rank_button {
    background: linear-gradient(to bottom, #3a0000, #220000) !important;
    background-image: none !important;
    border: 1px solid #5a0000 !important;
    color: #ffddcc !important;
    width: 148px !important;
    height: 28px !important;
    border-radius: 2px;
    cursor: pointer;
    font-size: 11px !important;
    margin-bottom: 6px;
}
.rank_button:hover {
    background: linear-gradient(to bottom, #5a0000, #3a0000) !important;
    color: #fff !important;
}

/* searchchar box */
.searchchar { width: 180px; }
.searchchar_header {
    background: linear-gradient(to bottom, #5a0000 0%, #3a0000 60%, #2a0000 100%) !important;
    background-image: none !important;
    border-bottom: 1px solid #8b1010;
    color: #ffd5b0 !important;
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: bold !important;
    text-align: center;
    height: auto !important;
    padding: 7px 5px 6px !important;
    line-height: 1.4 !important;
    text-shadow: 1px 1px 2px #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.searchchar_content {
    background-image: none !important;
    background-color: #120303 !important;
    padding: 8px 8px !important;
    width: auto !important;
    height: auto !important;
}
.searchchar_bottom {
    background-image: none !important;
    background-color: #180000 !important;
    border-top: 1px solid #4a0808;
    height: 6px !important;
    margin-top: 0 !important;
}
.searchchar_input {
    background-color: #1a0505 !important;
    color: #e8d0c0 !important;
    border: 1px solid #5a0000 !important;
    border-radius: 2px !important;
}
.searchchar_input::placeholder { color: #776060 !important; }
.searchchar_button {
    background: linear-gradient(to bottom, #3a0000, #220000) !important;
    background-image: none !important;
    border: 1px solid #5a0000 !important;
    color: #ffddcc !important;
    width: 100% !important;
    height: 28px !important;
    border-radius: 2px;
    cursor: pointer;
    font-size: 11px !important;
    margin-top: 6px !important;
}
.searchchar_button:hover {
    background: linear-gradient(to bottom, #5a0000, #3a0000) !important;
    color: #fff !important;
}

/* donate box */
.Themebox {
    border: 1px solid #6a1010 !important;
    box-shadow: 0 0 8px rgba(160, 0, 0, 0.35) !important;
    background-color: #120303 !important;
    border-radius: 2px !important;
    overflow: hidden !important;
}
.header_themebox {
    background: linear-gradient(to bottom, #5a0000 0%, #3a0000 60%, #2a0000 100%) !important;
    background-image: none !important;
    border-bottom: 1px solid #8b1010;
    height: auto !important;
    padding: 6px 0 !important;
    position: relative !important;
    z-index: 2 !important;
}
.title_themebox_donate {
    color: #ffd5b0 !important;
    text-shadow: 1px 1px 2px #000 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.yellow_themebox_donate { color: #ffd5b0 !important; text-shadow: 1px 1px 2px #000 !important; }
.bg_themebox_donate {
    background-color: #3a0000 !important;
    border-bottom: 1px solid #5a0000;
}
.content_themebox {
    background-color: #120303 !important;
    background-image: none !important;
}

/* ========== HIGHSCORES BOX ========== */
/* remove old rank_* rules since rank.php is now rewritten */
.rank_header, .rank_content, .rank_bottom,
.rank_player, .rank_outfit, .rank_text, .rank_button { display: none !important; }

.hs-content { padding: 6px 8px 4px !important; }

.hs-player {
    display: flex;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #2a0808;
    gap: 8px;
}
.hs-player:last-of-type { border-bottom: none; }

.hs-outfit {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-size: 64px 64px;
    background-position: center center;
    background-repeat: no-repeat;
    image-rendering: pixelated;
}

.hs-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.hs-info a {
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 11px !important;
    color: #cc4422 !important;
    text-decoration: none !important;
    font-weight: bold !important;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hs-info a:hover { color: #ff7755 !important; }

.hs-sub {
    font-family: Verdana, Arial, sans-serif;
    font-size: 9px !important;
    color: #887060 !important;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hs-btn {
    display: block;
    margin: 8px 0 4px;
    padding: 5px 0;
    text-align: center;
    background: linear-gradient(to bottom, #3a0000, #220000);
    border: 1px solid #5a0000;
    border-radius: 2px;
    color: #ffddcc !important;
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: normal !important;
    text-decoration: none !important;
    cursor: pointer;
}
.hs-btn:hover {
    background: linear-gradient(to bottom, #5a0000, #3a0000) !important;
    color: #fff !important;
}

/* ========== SERVER STATUS BOX ========== */
.ss-box {}

.ss-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 7px 10px 6px !important;
}

.ss-clock {
    font-size: 10px;
    color: #ff9977;
    font-family: monospace;
    letter-spacing: 1px;
    font-weight: normal;
    text-transform: none;
}

.ss-content {
    padding: 8px 10px 4px !important;
}

.ss-row {
    font-family: Verdana, Arial, sans-serif;
    font-size: 10px;
    color: #c8b0a0;
    padding: 3px 0;
    border-bottom: 1px solid #2a0808;
}
.ss-row:last-of-type {
    border-bottom: none;
}
.ss-row b {
    color: #ffddcc;
}

.ss-online {
    color: #55ee77;
    font-weight: bold;
}
.ss-offline {
    color: #ff4444;
    font-weight: bold;
}

.ss-more {
    margin-top: 6px;
    padding-top: 4px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 10px;
}
.ss-more a {
    color: #cc4422 !important;
    text-decoration: none;
    font-weight: normal !important;
}
.ss-more a:hover {
    color: #ff7755 !important;
    text-decoration: underline;
}

/* ========== EVENTS BOX ========== */
/* #Themeboxes div sets font-size:10pt on all children — override explicitly */
.ots-box-content { font-size: 11px !important; }
.ots-box * { box-sizing: border-box; }

.ev_item {
    border-bottom: 1px solid #3a0000;
    padding: 5px 0;
    text-align: left !important;
}
.ev_item:last-child { border-bottom: none; }
.ev_title {
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: bold;
    color: #ffddcc !important;
    margin-bottom: 2px;
    text-align: left !important;
}
.ev_date {
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 10px !important;
    color: #cc6655 !important;
    margin-bottom: 3px;
    text-align: left !important;
}
.ev_desc {
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 10px !important;
    color: #aa8880 !important;
    line-height: 1.4;
    text-align: left !important;
}
.ev_repeat {
    background-color: #3a0000;
    color: #ff9977;
    font-size: 8px !important;
    padding: 1px 3px;
    border-radius: 2px;
    border: 1px solid #5a0000;
    vertical-align: middle;
}
.ev_empty {
    color: #776060 !important;
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 10px !important;
    text-align: center;
    padding: 8px 0;
}

/* server status rows also inherit 10pt — fix */
.ss-row, .ss-row b, .ss-more, .ss-more a {
    font-size: 10px !important;
    text-align: left !important;
}

/* ========== NEWS TICKER ========== */
#NewsTicker {
    border: 1px solid #6a1010;
    border-radius: 3px;
    background-color: rgba(10,1,1,0.85);
    box-shadow: 0 0 12px rgba(120,0,0,0.3);
    margin-bottom: 14px;
    overflow: hidden;
}

.nt-header {
    background: linear-gradient(to bottom, #5a0000 0%, #3a0000 60%, #2a0000 100%);
    border-bottom: 1px solid #8b1010;
    color: #ffd5b0;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px #000;
    padding: 8px 10px;
}

.nt-body { padding: 0; }

.nt-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid #2a0808;
    cursor: pointer;
    transition: background 0.12s;
}
.nt-row:last-child { border-bottom: none; }
.nt-odd  { background-color: #120303; }
.nt-even { background-color: #180505; }
.nt-row:hover { background-color: #240808 !important; }

.nt-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.nt-date {
    flex-shrink: 0;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    color: #cc6655;
    white-space: nowrap;
}

.nt-text {
    flex: 1;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    color: #e8d0c0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nt-full { white-space: normal; }

.nt-toggle {
    flex-shrink: 0;
    color: #cc4422;
    font-size: 10px;
}

.nt-admin {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
}
.nt-admin a {
    color: #cc4422 !important;
    text-decoration: none !important;
    font-size: 12px;
}
.nt-admin a:hover { color: #ff7755 !important; }

/* ========== BACK TO TOP BUTTON ========== */
#BackToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9997;
    width: 40px;
    height: 40px;
    background: linear-gradient(to bottom, #5a0000, #2a0000);
    border: 1px solid #8b1010;
    border-radius: 4px;
    color: #ffd5b0;
    font-size: 24px;
    line-height: 38px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.7);
    transition: background 0.15s;
}
#BackToTop:hover {
    background: linear-gradient(to bottom, #7a0000, #4a0000);
    color: #fff;
}

/* ========== HIDE TEMPLATE SWITCHER ========== */
/* Visible only to logged-in admins, ruins layout for regular users */
#Themeboxes > span,
#Themeboxes > br,
#Themeboxes form select,
#Themeboxes form {
    display: none !important;
}

/* ========== FIX HELPER DIV / TOOLTIP OVERFLOW ========== */
/* Prevents "Castle War" and other tooltips from overflowing right edge */
#HelperDivContainer {
    max-width: 260px !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    z-index: 9998 !important;
}

/* Prevent any absolutely-positioned submenu from overflowing viewport */
.Submenu {
    max-width: calc(100vw - 20px) !important;
    overflow: hidden !important;
}

/* =====================================================
   RWD — Responsive breakpoints
   ===================================================== */

/* ========== HAMBURGER BUTTON (hidden on desktop) ========== */
.tnav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid #5a0000;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}
.tnav-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #ccbbbb;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
.tnav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tnav-hamburger.open span:nth-child(2) { opacity: 0; }
.tnav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========== MOBILE DRAWER ========== */
.tnav-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
}
.tnav-mobile-overlay.open { display: block; }

.tnav-mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100%;
    background: linear-gradient(to bottom, #1a0303 0%, #0e0101 100%);
    border-left: 2px solid #5a0000;
    box-shadow: -4px 0 20px rgba(0,0,0,0.9);
    z-index: 10001;
    overflow-y: auto;
    padding: 0 0 30px;
    transition: right 0.25s ease;
}
.tnav-mobile-drawer.open { right: 0; }

.tnav-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #3a0000;
    background: rgba(0,0,0,0.3);
}

.tnav-close {
    background: none;
    border: 1px solid #5a0000;
    color: #ccbbbb;
    font-size: 16px;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tnav-close:hover { background: rgba(90,0,0,0.5); color: #fff; }

.tnav-mobile-drawer a {
    display: block;
    padding: 14px 20px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 13px;
    font-weight: bold;
    color: #ccbbbb !important;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(90,0,0,0.35);
    transition: background 0.1s, color 0.1s;
}
.tnav-mobile-drawer a:hover { background: rgba(90,0,0,0.4); color: #fff !important; }
.tnav-mobile-drawer a.red { color: #ff6644 !important; }

.tnav-mobile-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    border-top: 1px solid #3a0000;
    margin-top: auto;
}
.tnav-mobile-lang a { color: #997777 !important; text-decoration: none !important; padding: 10px 8px !important; min-height: 36px; display: inline-flex !important; align-items: center !important; border: none !important; background: none !important; text-transform: none !important; }
.tnav-mobile-lang a:hover { color: #fff !important; background: none !important; }
.tnav-mobile-lang a.tnav-lang-active { color: #ff8866 !important; }
.tnav-mobile-lang span { color: #553333 !important; }

/* Prevent body scroll when drawer open */
body.tnav-open { overflow: hidden; }

/* ========== MOBILE DRAWER — LOGIN + FULL MENU ========== */
.tnav-drawer-login {
    padding: 14px 16px 10px;
    border-bottom: 2px solid #3a0000;
    background: rgba(0,0,0,0.25);
}
.tnav-drawer-logged {
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    color: #ccbbbb;
    margin-bottom: 8px;
}
.tnav-drawer-logged b { color: #ffd5b0; }
.tnav-drawer-label {
    display: block;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    color: #ccbbbb;
    font-weight: bold;
    margin-bottom: 3px;
    margin-top: 7px;
}
.tnav-drawer-input {
    display: block;
    width: 100%;
    background: #1a0505 !important;
    border: 1px solid #5a0000 !important;
    border-radius: 3px;
    color: #e8d0c0 !important;
    font-family: Verdana, Arial, sans-serif;
    font-size: 14px; /* 14px prevents iOS auto-zoom */
    padding: 7px 9px;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
}
.tnav-drawer-input:focus { border-color: #aa2200 !important; }
.tnav-drawer-input::placeholder { color: #664444 !important; }
.tnav-drawer-btn {
    display: block;
    width: 100%;
    margin-top: 9px;
    padding: 13px 0;
    min-height: 44px;
    background: linear-gradient(to bottom, #5a0000, #3a0000);
    border: 1px solid #7a1010;
    border-radius: 3px;
    color: #ffccaa !important;
    font-family: Verdana, Arial, sans-serif;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tnav-drawer-btn:hover { background: linear-gradient(to bottom, #7a0000, #5a0000); color: #fff !important; border: none !important; }
.tnav-drawer-btn-logout {
    background: linear-gradient(to bottom, #2a0808, #1a0404) !important;
    border-color: #4a1010 !important;
    color: #aa7777 !important;
    margin-top: 5px !important;
}
.tnav-drawer-btn-logout:hover { background: linear-gradient(to bottom, #4a1010, #2a0808) !important; color: #ffccaa !important; }
.tnav-drawer-link {
    display: flex !important;
    align-items: center !important;
    margin-top: 6px;
    min-height: 36px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    color: #cc4422 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    padding: 8px 0 !important;
    border: none !important;
    background: none !important;
}
.tnav-drawer-link:hover { color: #ff6644 !important; text-decoration: underline !important; background: none !important; }

/* Drawer full menu */
.tnav-drawer-menu { padding-bottom: 8px; }
.tnav-drawer-cat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 18px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 13px;
    font-weight: bold;
    color: #ffccaa !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(90,0,0,0.4);
    cursor: pointer;
    background: rgba(0,0,0,0.15);
    transition: background 0.1s;
    user-select: none;
}
.tnav-drawer-cat:hover { background: rgba(90,0,0,0.3); }
.tnav-drawer-caret { font-size: 9px; color: #664444; }
.tnav-drawer-submenu { display: none; background: rgba(0,0,0,0.2); }
.tnav-drawer-submenu.open { display: block; }
.tnav-drawer-submenu a {
    display: block !important;
    padding: 11px 18px 11px 28px !important;
    font-family: Verdana, Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: normal !important;
    color: #ccbbbb !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    border-bottom: 1px solid rgba(60,0,0,0.3) !important;
    transition: background 0.1s, color 0.1s !important;
}
.tnav-drawer-submenu a:hover { background: rgba(90,0,0,0.4) !important; color: #fff !important; }

/* ========== TABLET: 1200px — shrink columns ========== */
@media (max-width: 1200px) {
    #Bodycontainer {
        max-width: 100% !important;
        min-width: 0 !important;
    }
    #MenuColumn {
        flex: 0 0 190px !important;
        width: 190px !important;
        min-width: 190px !important;
        max-width: 190px !important;
    }
    #ThemeboxesColumn {
        flex: 0 0 190px !important;
        width: 190px !important;
        min-width: 190px !important;
        max-width: 190px !important;
    }
    .tnav-fixed { padding: 0 10px !important; }
    .tnav-menu a {
        padding: 6px 8px !important;
        font-size: 10px !important;
    }
}

/* ========== MOBILE: 900px — hamburger + single column ========== */
@media (max-width: 900px) {
    /* Show hamburger, hide desktop nav */
    .tnav-hamburger { display: flex !important; }
    .tnav-menu { display: none !important; }
    .tnav-lang { display: none !important; }

    /* Fix .Title (absolute-positioned page headline) — pull it out of flow, show above content */
    .Content .Box { position: relative !important; padding-top: 0 !important; }
    .Content .Title {
        position: static !important;
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto 0 !important;
        padding: 4px 0 0 !important;
        text-align: center !important;
    }
    .Content .BorderTitleText { height: 0 !important; overflow: hidden !important; }
    .Content .Border_1:first-child { display: none !important; }
    .Content .Corner-tl, .Content .Corner-tr { display: none !important; }

    /* Navbar stays slim single line */
    .tnav { height: 48px !important; }
    .tnav-fixed {
        height: 48px !important;
        padding: 0 12px !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }
    #ArtworkHelper {
        margin-top: 48px !important;
        min-width: 0 !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Kill desktop logo offset — no absolute top offset on mobile */
    #ContentRow {
        display: block !important;
        top: 0 !important;
        position: relative !important;
        padding: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #Bodycontainer {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Hide left sidebar — navigation via hamburger */
    #MenuColumn { display: none !important; }

    /* Hide desktop logo art */
    #LeftArtwork { display: none !important; }
    #RightArtwork { display: none !important; }

    /* Full-width content */
    #ContentColumn {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin: 0 !important;
        padding: 0 8px !important;
        box-sizing: border-box !important;
    }

    /* Right sidebar — horizontal row of boxes below content */
    #ThemeboxesColumn {
        position: static !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 8px !important;
        box-sizing: border-box !important;
    }
    #ThemeboxesColumn > *,
    #Themeboxes > * {
        flex: 0 0 auto !important;
        width: calc(50% - 8px) !important;
        min-width: 140px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    #Themeboxes {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
        width: 100% !important;
    }

    /* Login box in MenuColumn — now hidden, but login is in drawer */
    #ShadowLoginbox {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 8px 0 !important;
    }

    /* Responsive tables — scroll horizontally */
    .Content,
    .Content .BoxContent,
    .BoxContent,
    .TableContentContainer,
    .InnerTableContainer {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-width: 100% !important;
    }
    table {
        min-width: 0 !important;
    }

    /* Themebox max width */
    .ots-box, .rank, .searchchar, .Themebox {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Status bar compact */
    .InfoBar { font-size: 9px !important; }
    .InfoBarBigLogo { width: 12px !important; height: 12px !important; }

    /* General text/padding reset for small screens */
    .Box, .TableContainer { margin: 4px 0 !important; }
    .BoxContent { padding: 6px !important; }

    /* Login form — collapse two-column table to single column */
    #LoginFormButtonCell {
        display: block !important;
        width: 100% !important;
    }
    #LoginFormButtonCell table {
        width: 100% !important;
        float: none !important;
    }
    #LoginFormButtonCell div {
        float: none !important;
        width: 100% !important;
        text-align: center !important;
        font-size: 12px !important;
    }
    /* Reset floats on login inner tables */
    .TableContent table[style*="float: left"],
    .TableContent table[style*="float:left"] {
        float: none !important;
        width: 100% !important;
    }
    /* Ensure login inputs are visible */
    .TableContent input[type="text"],
    .TableContent input[type="password"] {
        background-color: #1a0505 !important;
        color: #e8d0c0 !important;
        border: 1px solid #5a0000 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 6px 8px !important;
    }
    /* LabelV nowrap fix on narrow screens */
    .LabelV { white-space: normal !important; }
}

/* ========== PHONE: 600px — tighter spacing ========== */
@media (max-width: 600px) {
    .Content .BoxContent td,
    .Content .BoxContent th,
    .TableContent td {
        font-size: 11px !important;
        padding: 3px 4px !important;
    }
    .slb-input { font-size: 14px !important; } /* prevent iOS zoom */
    .Content .Box { margin: 3px !important; }
    #ThemeboxesColumn > * { max-width: 100% !important; }
    .tnav-logo { width: 28px !important; height: 28px !important; }

    /* Content padding */
    .Content .BoxContent { padding: 6px !important; }
}

/* ========== PHONE: 400px — minimal ========== */
@media (max-width: 400px) {
    .tnav-logo { display: none !important; }
    .Content,
    .Content td,
    .Content th {
        font-size: 11px !important;
    }
    .slb-body { padding: 8px !important; }
}

/* ========== MENU ITEM ICONS (Font Awesome) ========== */
.SubmenuitemLabel::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome;
    font-weight: 900;
    font-size: 11px;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
    color: #885533;
    transition: color 0.12s;
}
.Submenuitem:hover .SubmenuitemLabel::before { color: #ff8844; }

/* — News — */
#submenu_news               .SubmenuitemLabel::before { content: "\f1ea"; } /* newspaper */
#submenu_newsarchive        .SubmenuitemLabel::before { content: "\f187"; } /* archive */
#submenu_change-log         .SubmenuitemLabel::before { content: "\f0cb"; } /* list-ol */

/* — Account — */
#submenu_accountmanage      .SubmenuitemLabel::before { content: "\f4ff"; } /* id-card */
#submenu_accountcreate      .SubmenuitemLabel::before { content: "\f234"; } /* user-plus */
#submenu_accountlost        .SubmenuitemLabel::before { content: "\f059"; } /* question-circle */
#submenu_rules              .SubmenuitemLabel::before { content: "\f0e3"; } /* gavel */
#submenu_downloads          .SubmenuitemLabel::before { content: "\f019"; } /* download */

/* — Community — */
#submenu_characters         .SubmenuitemLabel::before { content: "\f007"; } /* user */
#submenu_online             .SubmenuitemLabel::before { content: "\f0ac"; } /* globe */
#submenu_highscores         .SubmenuitemLabel::before { content: "\f091"; } /* trophy */
#submenu_last-kills         .SubmenuitemLabel::before { content: "\f54c"; } /* skull */
#submenu_fragger            .SubmenuitemLabel::before { content: "\f714"; } /* skull-crossbones */
#submenu_zombie-events      .SubmenuitemLabel::before { content: "\f54b"; } /* skull (alt) */
#submenu_houses             .SubmenuitemLabel::before { content: "\f015"; } /* home */
#submenu_guilds             .SubmenuitemLabel::before { content: "\f0c0"; } /* users */
#submenu_bans               .SubmenuitemLabel::before { content: "\f05e"; } /* ban */
#submenu_forum              .SubmenuitemLabel::before { content: "\f086"; } /* comments */
#submenu_team               .SubmenuitemLabel::before { content: "\f3ed"; } /* shield-alt */

/* — Library — */
#submenu_ots-info           .SubmenuitemLabel::before { content: "\f05a"; } /* info-circle */
#submenu_monsters           .SubmenuitemLabel::before { content: "\f6d7"; } /* dragon */
#submenu_spells             .SubmenuitemLabel::before { content: "\f72b"; } /* hat-wizard */
#submenu_commands           .SubmenuitemLabel::before { content: "\f120"; } /* terminal */
#submenu_exp-stages         .SubmenuitemLabel::before { content: "\f201"; } /* chart-line */
#submenu_exp-table          .SubmenuitemLabel::before { content: "\f0ce"; } /* table */
#submenu_faq                .SubmenuitemLabel::before { content: "\f059"; } /* question-circle */
#submenu_besthit            .SubmenuitemLabel::before { content: "\f6e3"; } /* bolt-lightning / fist */
#submenu_castlewar          .SubmenuitemLabel::before { content: "\f2bb"; } /* chess-rook */

/* — Systems — */
#submenu_mystery-box        .SubmenuitemLabel::before { content: "\f466"; } /* gift */
#submenu_crystal-equipment  .SubmenuitemLabel::before { content: "\f3a5"; } /* gem */
#submenu_cast               .SubmenuitemLabel::before { content: "\f03d"; } /* video */
#submenu_umbral             .SubmenuitemLabel::before { content: "\f6be"; } /* khanda / sword */
#submenu_upgrade-system     .SubmenuitemLabel::before { content: "\f0ad"; } /* wrench */
#submenu_reward-system      .SubmenuitemLabel::before { content: "\f559"; } /* award */
#submenu_casino             .SubmenuitemLabel::before { content: "\f522"; } /* dice */
#submenu_vip-quest          .SubmenuitemLabel::before { content: "\f6cf"; } /* dungeon */
#submenu_vocations          .SubmenuitemLabel::before { content: "\f6e8"; } /* jedi */
#submenu_sms-shop           .SubmenuitemLabel::before { content: "\f3cd"; } /* mobile-alt */

/* — Shop — */
#submenu_points             .SubmenuitemLabel::before { content: "\f555"; } /* coins */
#submenu_gifts              .SubmenuitemLabel::before { content: "\f290"; } /* shopping-bag */
#submenu_giftshistory       .SubmenuitemLabel::before { content: "\f1da"; } /* history */
