/* DkBattle "Abyss" style for the old (Korean origin) sub-pages opened in the home page iframe.
   Injected by theme/prepend.php (pages with data-nosub keep their own style). Palette = theme/mockups/abyss.html.
   No body min-height: the home page frame measures the body height. */
:root {
  --abyss: #04070c; --ink: #070d16; --ink-2: #0b1522;
  --line: rgba(140, 220, 255, .08); --line-2: rgba(140, 220, 255, .14);
  --text: #d6e6f0; --text-dim: #8098ab; --text-mute: #526577;
  --teal: #3ef0d8; --teal-2: #19b8b0; --cyan: #6cc9ff; --violet: #a07cff; --rust: #d0582f;
  --display: "Oxanium", system-ui, sans-serif; --body: "Sora", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
}
html {
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(12, 34, 54, .9), rgba(12, 34, 54, 0) 60%),
    radial-gradient(700px 500px at 100% 40%, rgba(70, 40, 140, .14), rgba(0, 0, 0, 0) 70%),
    radial-gradient(700px 500px at 0% 80%, rgba(20, 120, 130, .10), rgba(0, 0, 0, 0) 70%),
    linear-gradient(180deg, #06101a 0%, #04070c 45%, #020408 100%) !important;
  background-color: #04070c !important; background-repeat: no-repeat !important;
}
body {
  background: transparent !important; color: var(--text) !important;
  margin: 0 !important; padding: 22px 24px 30px !important;
  font-size: 14px; line-height: 1.6; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
* { font-family: var(--body) !important; }
/* old pages set "* { FONT-SIZE: 8pt }" - lift it to a readable size */
body, td, th, p, div, span, li, a, b { font-size: max(13px, 1em); }
font { color: inherit !important; }
center { text-align: center; }

a, a:visited { color: var(--teal) !important; text-decoration: none !important; transition: color .2s, text-shadow .2s; }
a:hover { color: #eafffb !important; text-shadow: 0 0 14px rgba(62, 240, 216, .7); }

b, strong { color: #eef8ff !important; font-weight: 600 !important; }
h1, h2, h3, h4, .page-header, .page-header b {
  font-family: var(--display) !important; color: #eef8ff !important; letter-spacing: .08em; font-weight: 700 !important;
}
h1 { font-size: 24px; } h2 { font-size: 20px; } h3 { font-size: 17px; } h4 { font-size: 15px; }
.page-header { margin: 0 0 16px; font-size: 20px; text-transform: uppercase; }
.page-header b { font-size: inherit; }

/* tables: glass panels with thin cyan hairlines */
table {
  border-collapse: collapse !important; border-color: var(--line) !important; background: transparent !important;
  max-width: 100%;
}
table[border]:not([border="0"]) {
  border: 0 !important; border-radius: 14px; overflow: hidden;
  background: linear-gradient(165deg, rgba(22, 44, 66, .45) 0%, rgba(9, 17, 28, .7) 45%, rgba(6, 11, 19, .82) 100%) !important;
  box-shadow: inset 0 1px 0 rgba(200, 240, 255, .06), inset 0 0 0 1px var(--line), 0 18px 40px rgba(0, 0, 0, .3);
}
th, td {
  border: 0 !important; border-color: var(--line) !important; background: transparent !important; background-image: none !important;
  color: #cfdfe9 !important; padding: 7px 10px;
}
table[border]:not([border="0"]) td, table[border]:not([border="0"]) th { border-top: 1px solid var(--line) !important; }
/* header rows (first row / bgcolor header cells) */
tr:first-child > th, thead th {
  font-family: var(--mono) !important; font-size: 11px !important; font-weight: 500 !important; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-mute) !important; background: rgba(2, 6, 10, .45) !important; padding: 11px 10px;
}
tr:first-child > th b, thead th b { color: inherit !important; font-weight: 500 !important; }
tbody tr, tr { transition: background .2s; }
table[border]:not([border="0"]) tr:hover > td, table[border]:not([border="0"]) tr:not(:first-child):hover > th { background: rgba(62, 240, 216, .05) !important; }
table[border]:not([border="0"]) tr:not(:first-child) > th { font-weight: 500 !important; }
/* rank number column in the old ranking tables (yellow bgcolor cells) */
th[bgcolor="#FFCD28"], td[bgcolor="#FFCD28"] { font-family: var(--mono) !important; font-size: 12px !important; color: var(--text-mute) !important; }
tr:nth-child(2) > th[bgcolor="#FFCD28"] { color: var(--teal) !important; text-shadow: 0 0 10px var(--teal); }
tr:nth-child(2) > th[bgcolor="#B4FBFF"] { color: #fff !important; }
td:has(> table) { vertical-align: top; }
td.list, .listtitle, td.title { background: transparent !important; }
td.line, tr#tr_color td { height: 1px !important; padding: 0 !important; background: var(--line) !important; }
td.title b { font-family: var(--display) !important; color: var(--teal) !important; }

/* faq answers etc. (inline gray boxes) */
div[id^="div_Schedule"] table {
  margin: 4px 0 10px; border-radius: 12px; overflow: hidden;
  background: rgba(62, 240, 216, .05) !important; box-shadow: inset 3px 0 0 var(--teal), inset 0 0 0 1px var(--line);
}

/* forms */
input, select, textarea {
  background: rgba(2, 6, 10, .6) !important; color: #eaf6ff !important; border: 0 !important; border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line-2); padding: 8px 11px; font-size: 14px; outline: none;
  transition: box-shadow .2s;
}
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 1px rgba(62, 240, 216, .55), 0 0 18px rgba(62, 240, 216, .18); }
select option { background: #0b1522; color: #eaf6ff; }
input[type=checkbox], input[type=radio] { box-shadow: none; padding: 0; accent-color: #3ef0d8; }
input[type=image] { background: transparent !important; box-shadow: none; padding: 0; }
input[type=submit], input[type=button], input[type=reset], button {
  font-family: var(--display) !important; font-weight: 700 !important; letter-spacing: .14em; text-transform: uppercase; font-size: 12px !important;
  color: #021512 !important; border: 0 !important; border-radius: 999px; padding: 9px 20px !important; cursor: pointer;
  background: linear-gradient(120deg, #5ff7e2 0%, #3ef0d8 40%, #7fb6ff 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15), 0 6px 20px rgba(62, 240, 216, .25);
  transition: box-shadow .25s, transform .25s;
}
input[type=submit]:hover, input[type=button]:hover, button:hover {
  transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 0 28px rgba(62, 240, 216, .5);
}

hr { border: 0 !important; height: 1px; background: linear-gradient(90deg, rgba(62, 240, 216, .45), rgba(160, 124, 255, .15) 50%, transparent); margin: 14px 0; }
img { max-width: 100%; height: auto; }
/* old white image menu buttons (guides / server info) -> dark glass look */
img[src*="/images/menu/"] {
  filter: invert(.93) hue-rotate(180deg) saturate(.6) brightness(1.05);
  border-radius: 6px; transition: filter .2s, box-shadow .2s;
}
a:hover img[src*="/images/menu/"] { box-shadow: 0 0 18px rgba(62, 240, 216, .35); }

::selection { background: rgba(62, 240, 216, .3); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #04070c; }
::-webkit-scrollbar-thumb { background: rgba(140, 220, 255, .15); border-radius: 10px; }

@media (max-width: 640px) {
  body { padding: 16px 16px 24px !important; }
  th, td { padding: 6px 7px; }
  /* old side-by-side layout tables (ranking.php) stack on narrow frames */
  table:has(> tbody > tr > td > table), table:has(> tbody > tr > td > table) > tbody,
  table:has(> tbody > tr > td > table) > tbody > tr, td:has(> table) { display: block; width: 100%; }
  td:has(> table) { padding: 0 0 18px; }
  td:has(> table) > table { width: 100%; }
  td:has(> table) > table th, td:has(> table) > table td { padding: 6px 4px; }
  /* race rankings (ranking_s/v/o.php: style="width:768px", 10+ columns): the table scrolls inside itself, not the page */
  table[style*="768px"] { display: block; width: 100% !important; max-width: 100%; overflow-x: auto;
    -webkit-overflow-scrolling: touch; white-space: nowrap; }
  img[width="500"] { width: 100%; height: auto; }
  /* serverstats2.php: castle / bible / sweeper blocks were floated 300-720 px tables */
  div[style*="float:left"], div[style*="float: left"] { float: none !important; width: 100%; }
  table[width="720"], table[width="300"] { width: 100% !important; max-width: 100%; }
  table[width="720"] img, table[width="300"] img { max-width: 100%; height: auto; }
  table { max-width: 100%; }
  /* ranking.php top-10 boxes: a few px too wide at 343 px */
  table[style*="dashed"] { width: 100%; }
  table[style*="dashed"] th, table[style*="dashed"] td { padding: 5px 3px; font-size: 13px; }
}
