/* Oldrune classic website skin (2007/2008 RuneScape homepage style).
   Loaded on every website page after the page's own styles (see web.ts withClassicSkin),
   so it only restyles: stone wall + chains, black boxes, green links, parchment scroll. */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Cinzel+Decorative:wght@700&display=swap');

:root {
    --cl-text: #e9e4d4;
    --cl-muted: #b9b29b;
    --cl-link: #c6dc58;
    --cl-link-hover: #ffffff;
    --cl-title: #ffffff;
    --cl-gold: #ffb83f;
    --cl-orange: #ff981f;
    --cl-yellow: #ffff00;
    --cl-box: rgba(0, 0, 0, .82);
    --cl-box-border: #5c533f;
    --cl-parch: #e7d4a3;
    --cl-ink: #2b1d0e;
}

html { background: #000; }
body {
    background: url(/classic/chain_l.png) left top repeat-y, url(/classic/chain_r.png) right top repeat-y, #120f0b url(/classic/wall.jpg) repeat !important;
    color: var(--cl-text) !important;
    font-family: Verdana, Tahoma, Arial, sans-serif !important;
    padding: 0 44px !important;
    min-height: 100vh;
}
@media (max-width: 700px) {
    html, body { overflow-x: hidden; }
    /* wide tables (wiki, slayer guide) scroll sideways inside their own box; cards never wider than the screen */
    .section table, .section-body table { display: block; overflow-x: auto; max-width: 100%; }
    .card, .info-card, .master-card, .chest-card { max-width: 100%; box-sizing: border-box; }
    .cards { grid-template-columns: 1fr !important; }
    body { padding: 0 16px !important; background: #120f0b url(/classic/wall.jpg) repeat !important; }
}
a { color: var(--cl-link); }
a:hover { color: var(--cl-link-hover); }

/* ---------------------------------------------------------------- header */
#cl-header { max-width: 1040px; margin: 0 auto; padding: 14px 0 6px; text-align: center; position: relative; }
#cl-header .cl-banner { display: flex; align-items: flex-end; justify-content: center; gap: 4px; min-height: 150px; }
#cl-header .cl-mon { height: 120px; image-rendering: auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .8)); flex: 0 1 auto; min-width: 0; object-fit: contain; }
#cl-header .cl-mon.big { height: 150px; }
#cl-header .cl-logo {
    font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif; font-weight: 700; font-size: 74px; line-height: 1; letter-spacing: 3px;
    text-decoration: none; padding: 0 10px 10px; white-space: nowrap;
    background: linear-gradient(180deg, #f2f2f2 0%, #b9bcc0 38%, #7d8187 55%, #c9ccd0 78%, #8a8e94 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    -webkit-text-stroke: 1.5px #1a1a1a;
    filter: drop-shadow(3px 3px 0 #000) drop-shadow(0 0 14px rgba(0, 0, 0, .9));
}
#cl-header .cl-logo span { background: linear-gradient(180deg, #ffe08a 0%, #ffb83f 45%, #c26a10 100%); -webkit-background-clip: text; background-clip: text; }
#cl-header .cl-online { font-size: 13px; color: #fff; text-shadow: 1px 1px 0 #000; margin-top: 4px; }
#cl-header .cl-online b { color: var(--cl-yellow); }
@media (max-width: 700px) {
    #cl-header .cl-mon { display: none; }
    #cl-header .cl-logo { font-size: 44px; }
    #cl-header .cl-banner { min-height: 0; padding-top: 8px; }
}

/* the old top bar becomes a classic link bar under the logo */
.topbar {
    position: static !important; max-width: 1040px; margin: 6px auto 14px !important; height: auto !important; min-height: 0 !important;
    background: var(--cl-box) !important; border: 1px solid var(--cl-box-border) !important; outline: 1px solid #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .6) !important; border-radius: 0 !important;
    padding: 6px 12px !important; display: flex !important; justify-content: center; flex-wrap: wrap;
}
.topbar .topbar-logo { display: none !important; }
.topbar-nav { margin: 0 !important; flex-wrap: wrap; justify-content: center; gap: 2px !important; }
.topbar-nav a {
    color: var(--cl-link) !important; font-weight: 700 !important; font-size: 13px !important; background: none !important;
    border: 1px solid transparent !important; box-shadow: none !important; padding: 4px 12px !important; text-decoration: none;
}
.topbar-nav a:hover { color: #fff !important; text-decoration: underline; }
.topbar-nav a.active { color: #fff !important; }

/* ---------------------------------------------------------------- boxes */
.main, .section, .content, .container { max-width: 1040px; }
.card, .sidebar, .table-wrap, .profile-header, .skill-card, .reward-tier, .username-box, .rewards, .player-search, .empty,
.stats-bar, .toc, .section, .info-card, .master-card, .chest-card, .tier-block, .diff-block, .cl-box {
    background: var(--cl-box) !important; border: 1px solid var(--cl-box-border) !important; outline: 1px solid #000;
    border-radius: 0 !important; box-shadow: 0 4px 14px rgba(0, 0, 0, .55) !important; color: var(--cl-text);
}
.card:hover, .skill-card:hover { transform: none !important; border-color: #8a7d5e !important; }
h1, h2, h3, .page-title, .section-title, .subsection-title, .sidebar-title, .rewards-title, .tier-title, .diff-title {
    font-family: 'Cinzel', Georgia, serif !important; color: var(--cl-title) !important; text-shadow: 1px 1px 0 #000 !important;
}
h1, .page-title { color: var(--cl-gold) !important; }
.subtitle, .page-sub, .page-subtitle, .tip, .note, .dim { color: var(--cl-muted) !important; }
.card h3, .sc-name, .card-name, .tier-label, .subsection-title { color: var(--cl-orange) !important; }
.stat-value, .pstat-value, .sc-level, .col-level, .medal, .val { color: var(--cl-yellow) !important; }
table { border-collapse: collapse; }
thead tr, th { background: #1c1813 !important; }
th { color: var(--cl-gold) !important; border-bottom: 1px solid var(--cl-box-border) !important; }
td { border-bottom: 1px solid #2a251c !important; }
tr:hover td { background: rgba(198, 220, 88, .07) !important; }
.footer { background: transparent !important; border: 0 !important; color: var(--cl-muted) !important; text-shadow: 1px 1px 0 #000; }
.footer a { color: var(--cl-link) !important; }

/* buttons: the grey stone buttons of the old site */
.btn, .btn-primary, .btn-secondary, .vote-btn, .player-search button, .cl-btn {
    background: linear-gradient(180deg, #8c8c8c 0%, #6f6f6f 45%, #5a5a5a 100%) !important; color: #fff !important;
    border: 2px solid #000 !important; outline: 1px solid #9b9b9b; outline-offset: -4px; border-radius: 0 !important;
    box-shadow: inset 2px 2px 0 #b5b5b5, inset -2px -2px 0 #3c3c3c, 0 4px 10px rgba(0, 0, 0, .6) !important;
    text-shadow: 1px 1px 0 #000 !important; font-family: Verdana, Tahoma, sans-serif; font-weight: 700; text-decoration: none;
}
.btn:hover, .btn-primary:hover, .btn-secondary:hover, .vote-btn:hover, .player-search button:hover, .cl-btn:hover {
    background: linear-gradient(180deg, #9d9d9d 0%, #7e7e7e 45%, #666 100%) !important; color: var(--cl-yellow) !important; transform: none !important;
}
input, select { border-radius: 0 !important; }

/* ---------------------------------------------------------------- parchment scroll (used on the homepage) */
.cl-scroll { position: relative; margin: 26px 6px 10px; }
.cl-scroll::before, .cl-scroll::after {
    content: ''; position: absolute; left: -12px; right: -12px; height: 26px; border-radius: 13px; z-index: 1;
    background: linear-gradient(180deg, #8a6a3a 0%, #e9d6a6 30%, #f5e7c2 50%, #c9a96a 75%, #6d5128 100%);
    box-shadow: 0 3px 6px rgba(0, 0, 0, .6);
}
.cl-scroll::before { top: -14px; }
.cl-scroll::after { bottom: -14px; }
.cl-scroll-body {
    position: relative; color: var(--cl-ink); padding: 30px 30px 26px; font-size: 12px; line-height: 1.5;
    background: radial-gradient(ellipse at 50% 40%, #f3e4bb 0%, #e5cf98 60%, #cdb276 100%);
    box-shadow: inset 0 0 40px rgba(110, 75, 25, .45);
}
.cl-scroll-body h2 {
    font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif !important; color: #3a2510 !important; text-shadow: 1px 1px 0 rgba(255, 255, 255, .4) !important;
    text-align: center; font-size: 30px; margin: 4px 0 18px; letter-spacing: 1px;
}
.cl-scroll-body a { color: #5a2d00; font-weight: 700; }
.cl-scroll-body a:hover { color: #000; }

/* hiscores: keep the skill list + table inside the centred column */
.layout { max-width: 1040px; margin: 0 auto 30px; min-height: 0 !important; gap: 16px !important; align-items: flex-start; }
.layout .sidebar { align-self: flex-start; }

/* hiscores: the name cell was display:flex, so in the taller top-3 rows (medals) its bottom line sat higher than
   the rest of the row - keep it a real table cell */
td.col-name { display: table-cell !important; }
td.col-name > * { vertical-align: middle; }
td.col-name img, td.col-name svg { margin-right: 6px; }

/* hiscores on phones: skill list on top (wrapping), table full width and scrollable sideways if needed */
@media (max-width: 820px) {
    .layout { flex-direction: column; gap: 10px !important; }
    .layout .sidebar { width: auto !important; display: flex; flex-wrap: wrap; gap: 2px 4px; padding: 10px !important; }
    .layout .sidebar .sidebar-title { width: 100%; padding: 6px 4px 4px !important; }
    .layout .skill-link { padding: 4px 8px !important; font-size: 12px !important; border-left: 0 !important; border-bottom: 2px solid transparent; }
    .layout .skill-link.active { border-bottom-color: var(--cl-orange); }
    .layout .main { padding: 0 !important; width: 100%; }
    .layout .table-wrap { overflow-x: auto; }
    /* mode buttons (Overall / Ironman / ...) wrap instead of sticking out past the screen edge */
    .mode-tabs { flex-wrap: wrap; }
    .mode-tab { padding: 6px 10px !important; font-size: 12px !important; }
    /* the long skill/boss list scrolls inside its own box, so the table isn't miles down the page */
    .layout .sidebar { max-height: 210px; overflow-y: auto; }
    .layout td, .layout th { padding: 8px 8px !important; }
}

/* site menu: Guides dropdown (built by classic.js) */
.topbar-nav { display: flex !important; align-items: center; }
.cl-dd { position: relative; display: inline-block; }
.cl-dd-arrow { font-size: 10px; }
.cl-dd-menu {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 60; min-width: 180px;
    background: rgba(0, 0, 0, .95); border: 1px solid var(--cl-box-border); outline: 1px solid #000; box-shadow: 0 6px 14px rgba(0, 0, 0, .7);
    padding: 4px 0; text-align: left;
}
.cl-dd:hover .cl-dd-menu, .cl-dd.open .cl-dd-menu, .cl-dd:focus-within .cl-dd-menu { display: block; }
.cl-dd-menu a { display: block; white-space: nowrap; padding: 6px 14px !important; }
