/* DreamScape website. Laid out like the 2011 RuneScape site (banner, menu bar,
   breadcrumbs, news column and sidebar) and dressed in the game's own login
   screen look: a moonlit purple night, carved stone frames and the gold logo.
   All art is DreamScape's own: the login screen images and CSS drawings. */
:root {
  --night: #120c1f;
  --night-2: #1d1433;
  --dusk: #3a2556;
  --mauve: #8b5a8f;
  --moon: #f3e8bf;
  --gold: #f2c75c;
  --gold-hi: #ffe7a0;
  --gold-lo: #a8741c;
  --stone: #3a3732;
  --stone-hi: #6d685e;
  --stone-lo: #1f1d1a;
  --panel: rgba(22, 17, 30, .92);
  --row: rgba(255, 255, 255, .035);
  --line: rgba(160, 140, 200, .18);
  --text: #ece4f2;
  --muted: #a99bbd;
  --green: #8fd36a;
  --red: #ef7b6b;
  --serif: "Cinzel", "Trajan Pro", Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--night); }
body {
  margin: 0;
  color: var(--text);
  font: 13px/1.55 Verdana, Tahoma, "Segoe UI", sans-serif;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); text-decoration: underline; }
code { font-size: 12px; background: rgba(0, 0, 0, .35); padding: 1px 5px; border-radius: 3px; color: var(--moon); }

/* ---- The night sky behind everything ---- */
.sky {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 72%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 34%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 12%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 77% 58%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 26%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 52%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 93% 84%, #fff5 50%, transparent 51%),
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(150, 110, 200, .28), transparent 70%),
    radial-gradient(ellipse 70% 50% at 10% 100%, rgba(140, 70, 120, .25), transparent 70%),
    linear-gradient(180deg, #0d0918 0%, #1a1130 45%, #2a1a3e 80%, #352048 100%);
  background-size: 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, auto, auto, auto;
}

#page { max-width: 1000px; margin: 0 auto; padding: 0 16px; }

/* ---- Top strip ---- */
.topbar {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 4px; font-size: 11px; color: var(--muted);
}
.topbar-status { display: inline-flex; align-items: center; gap: 6px; color: var(--moon); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #777; }
.dot.up { background: #6fe06a; box-shadow: 0 0 6px #6fe06a; }
.dot.down { background: #e0575a; box-shadow: 0 0 6px #e0575a; }

/* ---- Banner: the login screen's moonlit castle ---- */
.banner {
  position: relative; overflow: hidden;
  height: 210px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 34px;
  background: url("/art/background.png") 50% 62% / cover no-repeat, var(--dusk);
  border: 3px solid var(--stone-hi);
  outline: 2px solid var(--stone-lo); outline-offset: -5px;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 0 40px rgba(150, 100, 210, .25), 0 10px 24px rgba(0, 0, 0, .6);
}
.banner::after { /* Soft mist along the bottom edge. */
  content: ""; position: absolute; inset: auto 0 0 0; height: 60px;
  background: linear-gradient(transparent, rgba(18, 12, 31, .7));
  pointer-events: none;
}
.logo { position: relative; z-index: 1; }
.logo img { display: block; width: 278px; max-width: 100%; height: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); }
.logo:hover { text-decoration: none; }

.play-now {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 30px 10px;
  color: #2c1d02; text-decoration: none !important;
  background: linear-gradient(#fff2a6 0%, #f2cf4a 40%, #c9971f 60%, #f0c24a 100%);
  border: 2px solid #4a3006;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 #fff8d0, 0 0 0 2px rgba(255, 220, 120, .25), 0 0 26px rgba(255, 200, 90, .45), 0 6px 14px rgba(0, 0, 0, .6);
  transition: transform .15s, box-shadow .15s;
}
.play-now span { font: 900 26px/1 var(--serif); letter-spacing: .5px; text-shadow: 0 1px 0 #fff3b8; }
.play-now small { font-size: 11px; font-weight: bold; color: #5a3d06; margin-top: 3px; }
.play-now:hover { transform: translateY(-1px); color: #2c1d02; box-shadow: inset 0 1px 0 #fff8d0, 0 0 0 2px rgba(255, 220, 120, .4), 0 0 36px rgba(255, 210, 110, .7), 0 8px 16px rgba(0, 0, 0, .6); }

/* Fireflies drifting over the banner, as on the login screen. */
.fireflies i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #ffe9a8; box-shadow: 0 0 6px 2px rgba(255, 220, 140, .7);
  opacity: 0; animation: drift 9s ease-in-out infinite;
}
.fireflies i:nth-child(1) { left: 8%; top: 70%; animation-delay: 0s; }
.fireflies i:nth-child(2) { left: 22%; top: 82%; animation-delay: 1.4s; }
.fireflies i:nth-child(3) { left: 35%; top: 60%; animation-delay: 3s; }
.fireflies i:nth-child(4) { left: 48%; top: 78%; animation-delay: 4.2s; }
.fireflies i:nth-child(5) { left: 58%; top: 66%; animation-delay: 2.1s; }
.fireflies i:nth-child(6) { left: 66%; top: 85%; animation-delay: 5.5s; }
.fireflies i:nth-child(7) { left: 74%; top: 58%; animation-delay: .8s; }
.fireflies i:nth-child(8) { left: 83%; top: 76%; animation-delay: 6.3s; }
.fireflies i:nth-child(9) { left: 91%; top: 64%; animation-delay: 3.7s; }
.fireflies i:nth-child(10) { left: 14%; top: 50%; animation-delay: 7.1s; }
@keyframes drift {
  0% { opacity: 0; transform: translate(0, 0); }
  25% { opacity: .9; }
  60% { opacity: .5; }
  100% { opacity: 0; transform: translate(18px, -40px); }
}
@media (prefers-reduced-motion: reduce) {
  .fireflies i { animation: none; opacity: .6; }
}

/* ---- Menu bar: carved stone ---- */
.menu {
  display: flex; flex-wrap: wrap;
  background: linear-gradient(#57534a, #3d3a34 45%, #2e2b27 55%, #3a3731);
  border: 3px solid var(--stone-hi); border-top: 0;
  box-shadow: inset 0 1px 0 #8a8578, inset 0 -2px 0 #1a1816, 0 8px 18px rgba(0, 0, 0, .5);
}
.menu a {
  flex: 1 1 auto; text-align: center;
  padding: 10px 14px;
  font: 700 15px var(--serif); color: var(--gold);
  text-shadow: 0 2px 2px #000;
  border-right: 1px solid #22201c; box-shadow: 1px 0 0 #5c584f;
}
.menu a:last-child { border-right: 0; box-shadow: none; }
.menu a:hover { background: rgba(255, 230, 160, .07); color: var(--gold-hi); text-decoration: none; }
.menu a.active {
  color: #fff3c6;
  background: linear-gradient(#2c2340, #21192f);
  box-shadow: inset 0 2px 6px #000, inset 0 -2px 0 var(--gold);
}

.crumbs {
  margin: 10px 2px 12px; font-size: 11px; color: var(--muted);
}
.crumbs span { margin: 0 4px; color: var(--stone-hi); }
.crumbs b { color: var(--text); font-weight: normal; }

/* ---- Two columns, like the old site ---- */
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; }
main { min-width: 0; }

/* ---- Stone panels, like the login box ---- */
.panel, .box {
  position: relative;
  background: var(--panel);
  border: 3px solid var(--stone-hi);
  outline: 2px solid var(--stone-lo); outline-offset: -5px;
  border-radius: 4px;
  box-shadow: 0 0 24px rgba(120, 80, 180, .18), 0 8px 18px rgba(0, 0, 0, .55);
  margin-bottom: 16px;
}
/* Riveted corners. */
.panel::before, .panel::after, .box::before, .box::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #b9b2a2 0 2px, #4b473f 2.5px 4px, transparent 4.5px);
}
.panel::before, .box::before { top: -3px; left: -3px; }
.panel::after, .box::after { top: -3px; right: -3px; }
.panel-head {
  padding: 9px 16px 8px;
  background: linear-gradient(#4f4b43, #34312c);
  border-bottom: 2px solid var(--stone-lo);
  box-shadow: inset 0 1px 0 #7d786c, 0 1px 0 #5a564d;
}
.panel-head h1 {
  margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font: 700 18px var(--serif); color: var(--gold);
  text-shadow: 0 2px 2px #000, 0 0 12px rgba(242, 199, 92, .25);
}
.panel-head .sub { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--moon); }
.panel-body { padding: 16px; }
.lead .panel-body { padding-bottom: 4px; }
.intro { margin: 0 0 12px; color: var(--muted); }
.muted { color: var(--muted); }
.loading { text-align: center; color: var(--muted); padding: 40px; }
.empty { padding: 22px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 3px; }
.notice { padding: 12px 14px; border: 1px solid var(--gold-lo); background: rgba(242, 199, 92, .08); border-radius: 3px; }
.panel-body h2 { font: 700 16px var(--serif); color: var(--gold); margin: 20px 0 8px; }
.panel-body h2:first-child { margin-top: 0; }

/* ---- Buttons ---- */
.gold-btn, .stone-btn {
  display: inline-block; cursor: pointer;
  padding: 7px 18px; border-radius: 3px;
  font: 700 14px var(--serif); text-decoration: none !important;
}
.gold-btn {
  color: #2c2003;
  background: linear-gradient(#f6e46a, #d8bd2c 50%, #a8901a 51%, #c9ad27);
  border: 1px solid #3a2e05;
  box-shadow: inset 0 1px 0 #fff6b0, 0 2px 4px rgba(0, 0, 0, .5);
}
.gold-btn:hover { color: #2c2003; filter: brightness(1.08); }
.gold-btn.big { display: block; text-align: center; font-size: 18px; padding: 10px; }
.stone-btn {
  color: var(--moon);
  background: linear-gradient(#5d594f, #3b3832);
  border: 1px solid #1a1816;
  box-shadow: inset 0 1px 0 #8a8578, 0 2px 4px rgba(0, 0, 0, .5);
}
.stone-btn:hover { color: #fff; filter: brightness(1.1); }

/* ---- Home ---- */
.welcome {
  position: relative; margin-bottom: 16px; padding: 22px 24px;
  border-radius: 4px; overflow: hidden;
  background: linear-gradient(90deg, rgba(18, 12, 31, .95) 35%, rgba(18, 12, 31, .3)), url("/art/loading.png") 100% 55% / 70% auto no-repeat, var(--night-2);
  border: 1px solid var(--line);
  box-shadow: 0 0 30px rgba(140, 90, 200, .2);
}
.welcome h1 { margin: 0 0 6px; font: 700 22px var(--serif); color: var(--gold); text-shadow: 0 2px 3px #000; }
.welcome p { max-width: 430px; margin: 0 0 14px; }

.news-panel .panel-body { padding: 6px 16px; }
.news-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-thumb {
  flex: 0 0 96px; height: 72px; position: relative;
  background: url("/art/background.png") no-repeat var(--dusk);
  background-size: 420px auto;
  border: 2px solid var(--stone-hi); outline: 1px solid var(--stone-lo);
  border-radius: 2px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .5);
}
.news-thumb span {
  position: absolute; right: 4px; bottom: 3px;
  font-size: 18px; color: var(--gold); text-shadow: 0 0 6px #000, 0 0 2px #000;
}
.news-text { min-width: 0; }
.news-text h2 { margin: 0; font: 700 16px var(--serif); }
.news-text h2 a { color: var(--gold); }
.news-meta { margin: 1px 0 6px; font-size: 11px; color: var(--muted); }
.news-text p { margin: 0 0 4px; }
.read-more { font-size: 11px; font-weight: bold; }
.article-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.article ul { padding-left: 20px; }
.article li { margin: 7px 0; }
.news-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.news-gallery figure { margin: 0; }
.news-gallery img {
  width: 100%; display: block;
  border: 2px solid var(--stone-hi); outline: 1px solid var(--stone-lo); border-radius: 2px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .5);
}
.news-gallery figcaption { margin-top: 5px; font-size: 13px; opacity: .85; }
.back { margin: 16px 0 0; }

/* ---- Play Now ---- */
.play-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: center; margin-bottom: 8px; }
.play-art { width: 100%; display: block; border: 2px solid var(--stone-hi); outline: 1px solid var(--stone-lo); border-radius: 3px; }
.play-cta p { margin: 0 0 12px; }
.play-cta .muted { margin-top: 8px; font-size: 11px; text-align: center; }
.steps { padding-left: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 6px 0 8px 40px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 4px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 14px var(--serif); color: #2c2003;
  background: radial-gradient(circle at 35% 30%, #fff1a0, #d4a92c 70%, #8a6512);
  border: 1px solid #3a2e05;
}
.faq { padding-left: 18px; }
.faq li, .guide li { margin: 6px 0; }
.guide ul { padding-left: 18px; }

/* ---- Hiscores ---- */
.skill-icon { width: 16px; height: 16px; flex: 0 0 16px; vertical-align: -3px; }
.hiscores { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: start; }
.skill-list {
  display: flex; flex-direction: column;
  background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 3px; padding: 4px;
}
.skill-list a {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 8px; color: var(--text); border-radius: 2px;
}
.skill-list a:hover { background: rgba(255, 255, 255, .06); color: var(--gold-hi); text-decoration: none; }
.skill-list a.active { background: linear-gradient(90deg, rgba(242, 199, 92, .3), rgba(242, 199, 92, .05)); color: var(--gold-hi); font-weight: bold; }
.table-wrap { overflow-x: auto; }
table.scores { width: 100%; border-collapse: collapse; }
.scores th, .scores td { padding: 6px 10px; text-align: left; white-space: nowrap; }
.scores th {
  font: 700 12px var(--serif); color: var(--gold);
  background: linear-gradient(#4a463e, #322f2a);
  border-bottom: 2px solid var(--stone-lo);
}
.scores tbody tr:nth-child(odd) { background: var(--row); }
.scores tbody tr:hover { background: rgba(160, 120, 220, .12); }
.scores tr.overall { background: rgba(242, 199, 92, .08) !important; font-weight: bold; }
.scores td.num, .scores th.num { text-align: right; font-variant-numeric: tabular-nums; }
.skill-cell { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.progress { width: 110px; }
.bar { height: 7px; background: #0c0814; border: 1px solid #000; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #8b5a8f, var(--gold)); }

/* ---- Player page ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.stat {
  text-align: center; padding: 8px 6px;
  background: linear-gradient(#2a2238, #1a1426);
  border: 1px solid var(--line); border-radius: 3px;
}
.stat b { display: block; font: 900 22px var(--serif); color: var(--gold); text-shadow: 0 2px 2px #000; }
.stat span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }

/* ---- Grand Exchange ---- */
.tag { display: inline-block; font-size: 11px; font-weight: bold; padding: 0 6px; border-radius: 2px; border: 1px solid; }
.tag.buy { color: var(--green); border-color: #3f6a2c; background: #142010; }
.tag.sell { color: var(--red); border-color: #74321f; background: #2a120b; }

/* ---- Sidebar ---- */
.box h2 {
  margin: 0; padding: 8px 12px 7px;
  font: 700 14px var(--serif); color: var(--gold); text-shadow: 0 2px 2px #000;
  background: linear-gradient(#4f4b43, #34312c);
  border-bottom: 2px solid var(--stone-lo);
  box-shadow: inset 0 1px 0 #7d786c;
}
.box > :not(h2) { margin: 12px; }
.play-box { background: linear-gradient(rgba(22, 17, 30, .6), rgba(22, 17, 30, .95)), url("/art/background.png") 80% 70% / 260% auto; }
.side-online { text-align: center; font-size: 11px; color: var(--moon); }
.status-line { display: flex; align-items: center; gap: 8px; }
.online-list { list-style: none; padding: 0; margin: 0 12px 12px !important; columns: 2; font-size: 12px; }
#lookup { display: flex; gap: 6px; }
#lookup input {
  flex: 1; min-width: 0; padding: 6px 8px; font: inherit; color: var(--text);
  background: #0e0a16; border: 1px solid var(--stone-hi); border-radius: 3px;
  box-shadow: inset 0 2px 4px #000;
}
#lookup .gold-btn { padding: 5px 10px; font-size: 12px; }
.side-top { padding-left: 26px; margin: 10px 12px 12px; }
.side-top li { padding: 2px 0; }
.side-top li span { float: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- Footer ---- */
footer {
  margin-top: 8px; padding: 14px 0 34px;
  text-align: center; font-size: 11px; color: var(--muted);
  border-top: 1px solid var(--line);
}
footer nav { margin-bottom: 6px; color: var(--stone-hi); }
footer nav a { margin: 0 6px; }
footer p { margin: 4px 0; }

/* ---- Small screens ---- */
@media (max-width: 820px) {
  .columns { grid-template-columns: 1fr; }
  .hiscores { grid-template-columns: 1fr; }
  .skill-list { flex-direction: row; overflow-x: auto; }
  .skill-list a { white-space: nowrap; }
  .play-hero { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .banner { height: 170px; padding: 0 16px; flex-direction: column; justify-content: center; }
  .logo img { width: 200px; }
  .play-now { padding: 8px 22px 6px; }
  .play-now span { font-size: 20px; }
  .menu a { font-size: 13px; padding: 8px 10px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .news-thumb { flex-basis: 64px; height: 56px; }
  .progress { display: none; }
  .welcome { background: linear-gradient(rgba(18, 12, 31, .85), rgba(18, 12, 31, .85)), url("/art/loading.png") center / cover; }
}
