/* =====================================================================
   Divine X - LAUNCH THEME
   ---------------------------------------------------------------------
   One site-wide skin for launch. Loaded LAST on every public page, after
   each page's own <style> block and after cosmic-theme / summer-pages, so
   it wins on equal specificity without any page needing to be rewritten.

   It deliberately overrides the shared design tokens (--primary, --accent,
   --dark-bg, --card-bg ...) that every page already declares in its own
   :root, so restyling one variable restyles all 25 pages at once.

   Pairs with js/launch.js, which injects the launch bar + countdown.
   To retire the theme after launch week: remove the two <link>/<script>
   lines, or set DX_LAUNCH_OVER in js/launch.js. Nothing else depends on it.
   ===================================================================== */

/* ---------- 1. Global tokens ---------------------------------------- */
:root {
  --primary:        #e0a83c;
  --primary-light:  #ffd97a;
  --accent:         #23c9bd;
  --accent-2:       #57f0e2;
  --dark-bg:        #060c0e;
  --card-bg:        #0d181a;
  --card-border:    #1d383b;
  --text-primary:   #ffffff;
  --text-secondary: #93aeae;

  --dx-gold:    #ffd35c;
  --dx-gold-dp: #d99a1f;
  --dx-ink:     #05090a;
  --dx-line:    #1d383b;
  --dx-glow:    0 0 40px rgba(255, 211, 92, .18);
  --dx-shadow:  0 18px 50px rgba(0, 0, 0, .5);
  --dx-bar-h:   40px;
}

/* ---------- 2. Page ground ------------------------------------------ */
body {
  background-color: var(--dark-bg) !important;
  background-image:
    radial-gradient(950px 520px at 10% -6%, rgba(255, 211, 92, .06), transparent 62%),
    radial-gradient(880px 520px at 90% 4%,  rgba(35, 201, 189, .07), transparent 62%),
    radial-gradient(700px 700px at 50% 108%, rgba(35, 201, 189, .05), transparent 70%) !important;
  background-attachment: fixed !important;
}
::selection { background: rgba(255, 211, 92, .3); color: #fff; }

/* tidy scrollbars everywhere */
* { scrollbar-color: #24494c transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #1d383b; border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: #2b5457; }

/* visible keyboard focus - most pages had none at all */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 3. The launch bar (injected by js/launch.js) ------------- */
.dx-launchbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3000;
  height: var(--dx-bar-h);
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 0 46px 0 16px;
  background: linear-gradient(100deg, #0a1a1c 0%, #123033 28%, #1a2b1e 52%, #123033 74%, #0a1a1c 100%);
  background-size: 250% 100%;
  animation: dxSheen 16s ease-in-out infinite;
  border-bottom: 1px solid rgba(255, 211, 92, .32);
  box-shadow: 0 6px 26px rgba(0, 0, 0, .5);
  font-size: 13px; color: #dff2f0; overflow: hidden;
}
@keyframes dxSheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.dx-launchbar::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, .022) 22px 44px);
}
.dx-launchbar > * { position: relative; }

.dx-lb-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--dx-gold), var(--dx-gold-dp));
  color: #241800; font-weight: 800; font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; padding: 5px 13px; border-radius: 999px;
  box-shadow: 0 0 22px rgba(255, 211, 92, .35);
  white-space: nowrap;
}
.dx-lb-text { color: #b9d4d1; letter-spacing: .02em; }
.dx-lb-text b { color: #fff; }

.dx-lb-clock { display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.dx-lb-clock span {
  background: rgba(0, 0, 0, .42); border: 1px solid rgba(255, 211, 92, .26);
  border-radius: 7px; padding: 3px 8px; font-weight: 800; color: var(--dx-gold);
  min-width: 34px; text-align: center; font-size: 13px;
}
.dx-lb-clock small { color: #7fa09d; font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; }

.dx-lb-cta {
  background: rgba(35, 201, 189, .14); border: 1px solid rgba(87, 240, 226, .4);
  color: var(--accent-2) !important; text-decoration: none !important;
  padding: 6px 15px; border-radius: 999px; font-weight: 700; font-size: 12px;
  white-space: nowrap; transition: all .16s;
}
.dx-lb-cta:hover { background: rgba(35, 201, 189, .26); transform: translateY(-1px); }

.dx-lb-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: rgba(255, 255, 255, .45);
  cursor: pointer; font-size: 15px; line-height: 1; padding: 6px;
}
.dx-lb-close:hover { color: #fff; }

/* live state */
.dx-launchbar.is-live { border-bottom-color: rgba(46, 204, 113, .45); }
.dx-launchbar.is-live .dx-lb-tag {
  background: linear-gradient(135deg, #48e08a, #1f9d55); color: #04240f;
  box-shadow: 0 0 22px rgba(72, 224, 138, .4);
  animation: dxPulse 2.4s ease-in-out infinite;
}
@keyframes dxPulse { 50% { box-shadow: 0 0 34px rgba(72, 224, 138, .7); } }

/* make room, and push the existing giveaway banner underneath us */
body.dx-has-launchbar { padding-top: var(--dx-bar-h) !important; }
body.dx-has-launchbar .giveaway-banner { top: var(--dx-bar-h) !important; }
body.dx-has-launchbar.has-banner { padding-top: calc(var(--dx-bar-h) + 40px) !important; }
body.dx-has-launchbar .navbar { top: var(--dx-bar-h) !important; }
body.dx-has-launchbar.has-banner .navbar { top: calc(var(--dx-bar-h) + 40px) !important; }

@media (max-width: 900px) {
  .dx-lb-text { display: none; }
}
@media (max-width: 620px) {
  .dx-launchbar { gap: 10px; font-size: 12px; }
  .dx-lb-clock span { min-width: 28px; padding: 3px 6px; font-size: 12px; }
  .dx-lb-clock small { display: none; }
  .dx-lb-cta { display: none; }
}

/* ---------- 4. Navigation ------------------------------------------- */
.navbar {
  background: rgba(6, 12, 14, .9) !important;
  backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid var(--dx-line) !important;
}
.nav-brand span {
  background: linear-gradient(100deg, #fff 5%, var(--dx-gold) 55%, var(--primary) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
/* ---------------------------------------------------------------------
   ONE NAVBAR FOR THE WHOLE SITE (2026-08-13)

   Only 6 pages use includes/header.php; 17 others carry their own copied
   navbar, so the top bar drifted page to page. On top of that cosmic-theme.css
   styles .nav-links a as WOODEN BUTTONS (brown gradient, border, uppercase)
   while store.php styles them as plain text links - the difference the owner
   spotted between Home and Store.

   Owner's call: everything matches the Store. This file loads LAST on every
   page, so restating the nav here wins over both cosmic-theme and each page's
   private copy, without editing 17 files the night before launch.

   !important is used deliberately: several pages set these with equal
   specificity, and load order alone would not settle it consistently.
   --------------------------------------------------------------------- */
.nav-links a {
  padding: 8px 4px !important;
  color: var(--text-secondary) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
}
.nav-links a:hover,
.nav-links a.active,
.nav-links a:active { color: var(--accent-2) !important; background: none !important;
  box-shadow: none !important; transform: none !important; }

/* the CTA button keeps its pill treatment - it is an action, not a nav link */
.nav-links a.nav-cta, a.nav-cta {
  padding: 8px 18px !important; border-radius: 999px !important;
  color: #05090a !important; font-weight: 700 !important;
  background: linear-gradient(135deg, var(--dx-gold), var(--dx-gold-dp)) !important;
}
.nav-links a.nav-cta:hover, a.nav-cta:hover { color: #05090a !important; }
.nav-links a.nav-cta.ghost, a.nav-cta.ghost {
  background: transparent !important; color: var(--text-secondary) !important;
  border: 1px solid var(--dx-line) !important;
}

.nav-links a { position: relative; transition: color .16s; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
  transform: scaleX(0); transition: transform .2s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
@media (max-width: 768px) { .nav-links a::after { display: none; } }

/* ---------- 5. Type -------------------------------------------------- */
h1, h2 { letter-spacing: .005em; }
.page-header h1, .welcome-scroll h1 {
  background: linear-gradient(100deg, #fff 8%, var(--dx-gold) 52%, var(--primary-light) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
}

/* ---------- 6. Surfaces ---------------------------------------------- */
.card, .guide-card, .stat-card, .prod, .pack, .monster-card, .info-card,
.news-card, .rule-card, .staff-card, .feature-card, .tile, .panel {
  background-image: linear-gradient(165deg, rgba(255, 255, 255, .022), transparent 60%);
  border-color: var(--dx-line);
  transition: transform .18s cubic-bezier(.2, .8, .3, 1), border-color .18s, box-shadow .18s;
}
.card:hover, .guide-card:hover, .news-card:hover, .staff-card:hover, .feature-card:hover {
  box-shadow: var(--dx-shadow);
}

/* ---------- 7. Buttons ----------------------------------------------- */
.btn, .btn-primary, .nav-cta, button.btn {
  position: relative; overflow: hidden;
}
.btn::after, .btn-primary::after, .nav-cta::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .26), transparent);
  transform: skewX(-18deg); transition: left .55s ease; pointer-events: none;
}
.btn:hover::after, .btn-primary:hover::after, .nav-cta:hover::after { left: 135%; }
.btn-primary, .nav-cta {
  background: linear-gradient(135deg, var(--dx-gold), var(--dx-gold-dp)) !important;
  color: #241800 !important; border-color: transparent !important;
  box-shadow: 0 8px 22px rgba(255, 180, 40, .2);
}
.btn-primary:hover, .nav-cta:hover { box-shadow: 0 12px 30px rgba(255, 180, 40, .32); }

/* ---------- 8. Tables ------------------------------------------------- */
table th {
  background: rgba(35, 201, 189, .08) !important;
  color: var(--accent-2) !important;
  letter-spacing: .1em; text-transform: uppercase; font-size: 10.5px;
}
table tbody tr:hover td { background: rgba(255, 255, 255, .022); }

/* ---------- 9. Footer -------------------------------------------------- */
.footer {
  background: linear-gradient(180deg, var(--card-bg), #060c0e) !important;
  border-top: 1px solid var(--dx-line) !important;
}
.footer-brand {
  background: linear-gradient(100deg, #fff, var(--dx-gold));
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
.footer-links a { transition: color .15s; }
.footer-links a:hover { color: var(--accent-2) !important; }

/* ---------- 10. Reduced motion ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .dx-launchbar, .dx-launchbar .dx-lb-tag { animation: none !important; }
  * { transition-duration: .01ms !important; }
}

/* ---------- 11. Store product images ------------------------------------
   Items can carry an image (store_items.image_url). When one is set the
   icon tile becomes a picture frame instead of a FontAwesome glyph. Sized
   so a 1:1 item render and a wide screenshot both sit correctly. */
.prod .pic.has-img {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--dx-line);
  width: 62px; height: 62px; padding: 5px;
  overflow: hidden;
}
.prod .pic.has-img img {
  width: 100%; height: 100%; object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .55));
  transition: transform .2s cubic-bezier(.2, .8, .3, 1);
}
.prod:hover .pic.has-img img { transform: scale(1.09); }

/* ---------- 12. Purchase agreement ---------------------------------------
   The pay buttons stay physically un-clickable until the box is ticked -
   pointer-events, not just a visual dim, so it cannot be clicked through. */
.agree-box {
  background: rgba(255, 211, 92, .05);
  border: 1px solid rgba(255, 211, 92, .22);
  border-radius: 13px; padding: 15px 17px; margin-bottom: 16px;
}
.agree { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; user-select: none; }
.agree input { position: absolute; opacity: 0; width: 0; height: 0; }
.agree .tick {
  flex-shrink: 0; width: 21px; height: 21px; border-radius: 6px; margin-top: 1px;
  border: 1.5px solid rgba(255, 211, 92, .5); background: rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.agree .tick i { font-size: 11px; color: #241800; opacity: 0; transition: opacity .12s; }
.agree input:checked + .tick { background: var(--dx-gold); border-color: var(--dx-gold); }
.agree input:checked + .tick i { opacity: 1; }
.agree input:focus-visible + .tick { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.agree-txt { font-size: 13px; line-height: 1.65; color: var(--text-secondary); }
.agree-txt b { color: var(--dx-gold); }
.agree-txt a { color: var(--accent-2); text-decoration: underline; }

#ppWrap { position: relative; transition: opacity .2s; }
#ppWrap.pp-locked { opacity: .32; pointer-events: none; filter: grayscale(.7); }
#ppWrap .pp-lockmsg {
  display: none; margin-top: 10px; font-size: 12.5px; color: var(--warn);
  align-items: center; gap: 8px;
}
#ppWrap.pp-locked .pp-lockmsg { display: flex; }

/* ---------- 14. Store: category tabs + denser cards ----------------------
   With ~90 products a single scroll is a mile long, so the categories are
   tabs and only one section renders at a time. Cards are tightened up so a
   category fits on roughly one screen. */
.shopjump { gap: 5px; }
.cat-tab {
  background: transparent; border: 1px solid transparent; cursor: pointer;
  font-family: inherit; color: var(--text-secondary);
  font-size: 12.5px; font-weight: 700; padding: 8px 14px; border-radius: 999px;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 7px;
  transition: all .15s;
}
.cat-tab i { font-size: 11px; opacity: .8; }
.cat-tab .n {
  font-size: 10px; font-weight: 800; opacity: .65;
  background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 999px;
}
.cat-tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.cat-tab.on {
  color: var(--c, var(--accent-2));
  background: color-mix(in srgb, var(--c, #23c9bd) 14%, transparent);
  border-color: color-mix(in srgb, var(--c, #23c9bd) 40%, transparent);
}
.cat-tab.on .n { background: color-mix(in srgb, var(--c, #23c9bd) 22%, transparent); opacity: 1; }
.shopjump a.cat-coins {
  border: 1px solid rgba(255,211,92,.3); color: var(--dx-gold);
  background: rgba(255,211,92,.08);
}

/* denser product grid */
.grid { grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 13px; }
.prod { padding: 17px; border-radius: 15px; }
.prod .pic { width: 40px; height: 40px; font-size: 16px; margin-bottom: 11px; border-radius: 11px; }
.prod .pic.has-img { width: 46px; height: 46px; }
.prod h3 { font-size: 14.5px; margin-bottom: 5px; }
.prod .desc { font-size: 12px; line-height: 1.55; }
.prod .price-row { margin-top: 13px; }
.price { font-size: 17px; }
.sec { margin-bottom: 34px; }
.sec-head { margin-bottom: 15px; }

/* packages deserve a bit more room - they carry the most text */
.catsec[data-cat="packages"] .grid { grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.catsec[data-cat="packages"] .prod { padding: 22px; }
.catsec[data-cat="packages"] .prod .desc { font-size: 12.8px; }

@media (max-width: 620px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
  .prod { padding: 14px; }
  .cat-tab { font-size: 11.5px; padding: 7px 11px; }
}

/* ---------- 15. Launch sale ---------------------------------------------- */
.sale-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(100deg, rgba(244,63,94,.14), rgba(255,211,92,.1));
  border: 1px solid rgba(244,63,94,.36); border-radius: 16px;
  padding: 14px 20px; margin-bottom: 18px;
}
.sale-banner .sb-tag {
  background: linear-gradient(135deg, #f43f5e, #b91c3c); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}
.sale-banner .sb-txt { flex: 1; min-width: 220px; font-size: 13.5px; color: var(--text-secondary); }
.sale-banner .sb-txt b { color: #fff; }
.sale-banner .sb-clock {
  font-size: 12.5px; font-weight: 700; color: var(--dx-gold);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* struck-through original price */
.price .was {
  text-decoration: line-through; color: var(--text-dim); font-size: .62em;
  font-weight: 600; margin-right: 5px; opacity: .8;
}

/* ---------- 16. Forms, auth cards and readability ------------------------
   The summer block in cosmic-theme.css used to style these (login/register
   cards, inputs, selects) with light sandy backgrounds. It was removed on
   2026-08-13 because its !important rules were beating this theme and making
   text unreadable. These replace what it provided, in the dark palette.     */

.auth-card, .login-card, .register-card, .form-card {
  background: linear-gradient(165deg, var(--card-bg), #0a1416);
  border: 1px solid var(--dx-line);
  border-radius: 18px;
  box-shadow: var(--dx-shadow);
  color: var(--text-primary);
}
.auth-card h1, .auth-card h2, .login-card h1, .register-card h1 { color: var(--dx-gold); }

/* inputs: dark field, light text - the pairing the summer theme inverted */
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="search"], input[type="url"], input[type="date"], textarea, select,
.form-control {
  background: rgba(0, 0, 0, .32);
  border: 1px solid var(--dx-line);
  color: var(--text-primary);
  border-radius: 9px;
}
input:focus, textarea:focus, select:focus, .form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, .45);
}
::placeholder { color: var(--text-secondary); opacity: .65; }
select option { background: #0d181a; color: var(--text-primary); }

label, .form-group label, .label { color: var(--text-secondary); }

/* ---- readability safety net -------------------------------------------
   Any element that still carries a pale background from an older stylesheet
   gets dark text, so a leftover light card can never render light-on-light.
   Deliberately narrow: it only targets the specific legacy classes that were
   light, rather than blanket-styling every element. */
.parchment, .sand-card, .scroll-card, .osrs-panel {
  color: #10343a;
}
.parchment a, .sand-card a, .scroll-card a, .osrs-panel a { color: #0e5e5a; }
.parchment h1, .parchment h2, .parchment h3,
.osrs-panel h1, .osrs-panel h2, .osrs-panel h3 { color: #10343a; }

/* ============================================================
   HOMEPAGE TRAILER + CONTENT CREATOR CALLOUT
   ============================================================
   Lives in launch-theme.css because this sheet loads LAST and the
   .osrs-panel colour override above (dark teal text on parchment)
   would otherwise win over anything set in cosmic-theme.css.
   ------------------------------------------------------------ */

/* Responsive 16:9 video frame. Padding-bottom is the ratio trick:
   the wrapper has zero height and its padding scales with WIDTH, so
   the box keeps 16:9 at every breakpoint. aspect-ratio would be
   cleaner but still needs a fallback for older mobile browsers. */
.video-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 56.25%;         /* 9 / 16 */
  height: 0;
  overflow: hidden;
  border: 2px solid #0e5e5a;
  border-radius: 6px;
  background: #000;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}
.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Cap the height on very wide screens so the video does not swallow
   the whole viewport on ultrawide monitors. */
@media (min-width: 1200px) {
  .video-wrap { max-width: 820px; padding-bottom: min(56.25%, 461px); }
}

.creator-callout {
  margin: 24px auto 0;
  max-width: 900px;
  padding: 18px 22px;
  border: 1px solid rgba(14, 94, 90, .35);
  border-left: 4px solid #0e5e5a;
  border-radius: 5px;
  background: rgba(14, 94, 90, .07);
  color: #10343a;
}
.creator-callout h4 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  color: #10343a;
}
.creator-callout h4 i { margin-right: 8px; color: #0e5e5a; }
.creator-callout p {
  margin: 0;
  line-height: 1.62;
  color: #1d4a4f;
}
.creator-callout strong { color: #10343a; }

@media (max-width: 640px) {
  .creator-callout { padding: 14px 16px; }
  .creator-callout h4 { font-size: 1.02rem; }
}
