@font-face {
  font-family: "RuneScape";
  src: url("../runescape_uf.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../Montserrat-Light.woff2") format("woff2");
  font-weight: 300; /* Light weight */
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #121217;
  --bg-gradient-top: rgba(127,87,255,0.04);
  --panel: #1a1a1d;
  --card: #201f22;
  --card-2: #19181a;
  --accent: #9B7BFF;
  --accent-strong: #7F57FF;
  --border: rgba(111,75,230,0.10);
  --muted: #a9a4b6;
  --text: #eceaf0;
  --glass: rgba(255,255,255,0.02);
  --shadow: 0 8px 24px rgba(0,0,0,0.55);
  --radius: 10px;
  --focus-glow: rgba(111,75,230,0.08);
  --success: #17c964;
  --danger: #ff6b6b;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --bronze: #cd7f32;
  --purple: #7f57ff;      
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Inter, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--accent); }
a:hover { color: var(--accent-strong); text-decoration: underline; }

h1 { 
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  margin: .25rem 0 .5rem;
  font-weight: 700;
  color: var(--text);
}
h2 { 
  font-size: clamp(1.4rem, 2.8vw, 1.8rem);
  margin: 0 0 .75rem;
  font-weight: 700;
  color: var(--text);
}

p.muted { color: var(--muted); margin: .25rem 0 0; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.flex { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.right { margin-left: auto; }
.muted-small { color: var(--muted); font-size: .9rem; }
.divider { border-top: 1px solid rgba(255,255,255,0.03); margin: 1.5rem 0; opacity: .5; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: white;
  border: 0;
  border-radius: 10px;
  padding: .6rem .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .12s ease, filter .12s;
  box-shadow: 0 6px 18px rgba(74,43,184,0.12);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 12px 36px rgba(74,43,184,0.12); }
.btn.secondary {
  background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.04);
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--card));
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  color: var(--text);
}

.pill-card {
  background: linear-gradient(180deg, rgba(12,12,14,0.95), rgba(18,17,18,0.96));
  border: 1px solid rgba(255,255,255,0.02);
  border-radius: 12px;
  padding: 0.65rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.55);
}

.card.list .row, .pill-card .row {
  background: linear-gradient(180deg, var(--card-2), rgba(8,8,10,0.88));
  border: 1px solid rgba(255,255,255,0.02);
  border-radius: 8px;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.45);
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.6rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color .12s;
}
.card.list .row:hover, .pill-card .row:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  border-color: rgba(111,75,230,0.08);
  background: linear-gradient(90deg, rgba(111,75,230,0.02), transparent);
}

.card.kpi.kpi-row {
  border-radius: 6px;
  padding: 0.85rem 0.95rem;
  background: linear-gradient(180deg, rgba(21,26,40,0.92), rgba(8,10,18,0.88));
  border: 1px solid rgba(255,255,255,0.02);
  box-shadow: 0 6px 14px rgba(0,0,0,0.32);
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  transition: box-shadow 0.18s ease, transform 0.12s ease, border-color 0.12s ease;
}
.card.kpi.kpi-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.32);
  border-color: rgba(127,87,255,0.08);
}

.stat, .stat-box, .stat-item {
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(0,0,0,0.06));
  border: 1px solid rgba(255,255,255,0.02);
  padding: 12px;
  border-radius: 8px;
  color: var(--muted);
}
.stat .value, .stat .number { color: var(--text); font-weight:700; }

.notice {
  background: linear-gradient(180deg, rgba(18,18,20,0.98), rgba(11,12,16,0.98));
  border: 1px dashed rgba(111,75,230,0.08);
  border-radius: 12px;
  padding: .75rem;
  color: var(--muted);
}

.tooltip { position: relative; cursor: default; }

header {
  position: sticky;
  top: 0;
  z-index: 99999; 
  background: linear-gradient(180deg, rgba(12,12,14,0.92), rgba(8,8,10,0.85));
  backdrop-filter: blur(6px);
  border-bottom: 2px solid rgba(255,255,255,0.03);
}

.nav {
  display: flex;
  align-items: center;      
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;       
}

.nav .brand { display: flex; align-items: center; gap: 1rem; }
.brand-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  transition: transform 0.2s ease;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.brand-icon:hover { transform: scale(1.06); }

.nav-links { display: flex; align-items: center; gap: 1rem; position: relative; }
.nav-links a.nav-link {
  position: relative;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.18s, background 0.18s;
  background: transparent;
  display: inline-flex;
  align-items: center;
  height: calc(2 * 0.5rem + 1rem); 
  line-height: 1;
}
.nav-links a.nav-link::after {
  content: "";
  display: none;
}

.nav-links a.nav-link[aria-current="page"]::after {
  display: block;
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(79,45,160,0.18);
}

.nav-links a.nav-link:hover {
  color: var(--accent);
  background: rgba(111,75,230,0.03);
  text-decoration: none;
}

.nav-links .nav-indicator {
  position: absolute;
  bottom: -2px; 
  height: 3px;
  left: var(--indicator-left, 0px);
  width: var(--indicator-width, 0px);
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 2px;
  transition: left 220ms cubic-bezier(.2,.9,.2,1), width 220ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease;
  pointer-events: none;
  opacity: 1; /* visible */
  z-index: 2;
}

.nav-links a.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(79,45,160,0.18);
}

@media (max-width: 900px) {
  .nav-links .nav-indicator { display: none !important; }
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  margin-left: auto;
}

.banner-container {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}
.banner-video {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 300px;
  width: auto;
  object-fit: cover;
}
.banner-logo {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 320px;
  height: auto;
  pointer-events: none;
  z-index: 10;
}

footer {
  color: var(--muted);
  padding: 2rem 0;
  margin-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.03);
  text-align: center;
}
footer .flex { display: flex; justify-content: center; align-items: center; }
footer .right { display: none; }

.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(3,3,5,0.60); 
  backdrop-filter: blur(6px) saturate(0.9);
  display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.28s ease; z-index: 10000;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-container {
  position: relative;
  max-width: 90%;
  max-height: 85%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-content {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.65);
  display: block;
}
.modal-container .close {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 2.2rem; font-weight: 700;
  color: #fff; cursor: pointer;
  transition: color 0.2s ease; user-select: none;
}
.modal-container .close:hover { color: var(--accent); }
.modal-container .arrow {
  position: absolute; top: 50%; font-size: 3rem; font-weight: 700;
  color: rgba(255,149,0,0.85);
  cursor: pointer; user-select: none; transform: translateY(-50%);
  transition: color 0.2s ease;
}
.modal-container .arrow:hover { color: #ffb347; }
.modal-container .arrow.prev { left: 10px; }
.modal-container .arrow.next { right: 10px; }

.tabs {
  display: flex; gap: 0.5rem; margin-bottom: 1rem; justify-content: center; flex-wrap: wrap;
}
.tab-btn {
  padding: 0.65rem 1.25rem;
  font-size: 1.05rem;
  background: var(--card); 
  border: 1px solid var(--border); 
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  color: white; 
  font-weight: 800; 
  cursor: pointer;
  transition: all 0.14s ease;
  display: inline-flex;
  align-items: center;
  height: calc(2 * 0.65rem + 1rem);
  line-height: 1;
}
.tab-btn:hover { background: rgba(111,75,230,0.06); transform: translateY(-1px); }

.tab-btn.active {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border-color: var(--accent-strong);
  color: white !important; 
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(81,35,168,0.08);
}

.tab-content { display: none; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,0.04); }
.tab-content.active { display: block; }

.section-title, .stats-title {
  color: var(--accent);
  font-weight: 800;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0;
  display: inline-block;
}

.stats-panel > header, .pill-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0; 
  margin-bottom: 1rem;
  background: transparent;
  border-bottom: 2px solid rgba(111,75,230,0.06);
  position: relative;
  z-index: 1; 
}

.widget { border-top: 3px solid var(--accent-strong); }

.widget .controls button, .widget .nav-controls button {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 6px;
  padding: 6px;
}
.widget .controls button:hover { border-color: var(--border); color: var(--text); }

.chart, .pie {
  background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
  border-radius: 50%;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
}

.table, table, .list {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}
.table tr { border-bottom: 1px solid rgba(255,255,255,0.02); }
.table td, .table th { padding: 10px 12px; color: var(--muted); }
.table tr:hover td { background: linear-gradient(90deg, rgba(111,75,230,0.02), transparent); color: var(--text); }

.badge, .chip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow: 0 4px 10px rgba(81,35,168,0.12);
}
.badge.alt {
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.04);
}

input, select, textarea {
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-glow);
  border-color: var(--accent-strong);
}

a:focus, button:focus, input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(111,75,230,0.06);
  border-radius: 6px;
}

.text-muted { color: var(--muted); }
.text-strong { color: var(--text); font-weight:700; }
.kv { color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 100%; right: 0; width: 220px;
    background: var(--panel); border: 1px solid rgba(255,255,255,0.03);
    border-radius: 8px; padding: 0.5rem 0; z-index: 100;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  }
  .nav-links.show { display: flex; }
  .nav-links a.nav-link { padding: 0.75rem 1rem; width: 100%; }
  .grid.cols-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 768px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr !important; }
  .container { max-width: 100% !important; padding: 0.5rem !important; }
  body, html { overflow-x: hidden !important; width: 100% !important; max-width: 100vw !important; }
}

@media (max-width: 520px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr !important; }
  .container { max-width: 100% !important; padding: 0.25rem !important; }
  .pill-section { grid-template-columns: 1fr !important; }
}

.page-hero { position: relative; }
.page-hero::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 100%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.28), rgba(0,0,0,0));
}
