:root {
  --font-body: "Inter", sans-serif;
  --font-display: "Barlow Condensed", sans-serif;

  --color-bg: #ececec;
  --color-surface: #f7f7f7;
  --color-surface-2: #e3e3e3;
  --color-surface-dark: #242424;
  --color-text: #242424;
  --color-muted: #747474;
  --color-border: #c8c8c8;
  --color-accent: #e6c33d;
  --color-blue: #2d6fc4;
  --color-green: #65b334;
  --color-red: #d94a45;
  --color-purple: #7448c8;
  --color-white: #ffffff;

  --page-max-width: 1600px;
  --panel-radius: 0px;
  --button-radius: 0px;
  --border-width: 1px;
  --panel-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  --transition: 180ms ease;
  --section-gap: 16px;
  --panel-padding: 16px;
  --header-height: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
}
a { color: inherit; transition: color var(--transition), background var(--transition), opacity var(--transition); }
a:hover { color: var(--color-blue); text-decoration: none; }
img { max-width: 100%; display: block; }

.page-shell { max-width: var(--page-max-width); }
.site-header {
  min-height: var(--header-height);
  background: rgba(247,247,247,.97);
  border-bottom: var(--border-width) solid var(--color-border);
  backdrop-filter: blur(8px);
}
.navbar { min-height: var(--header-height); }
.brand {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
}
.brand span { color: var(--color-text); }
.navbar-nav .nav-link {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 26px 14px !important;
  border-bottom: 2px solid transparent;
}
.navbar-nav .active .nav-link { border-color: var(--color-text); }
.account-avatar, .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-surface-dark);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 700;
}
.account-avatar { width: 38px; height: 38px; }
.account-meta { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--font-display); }
.account-meta strong { font-size: 15px; }
.account-meta span { color: var(--color-green); font-weight: 600; }
.header-icon { padding: 8px; font-size: 16px; color: var(--color-muted); }

.btn {
  border-radius: var(--button-radius);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.btn-accent { background: var(--color-accent); color: #181818; padding: 11px 24px; }
.btn-accent:hover { filter: brightness(.95); color: #181818; }
.btn-ghost { border: 1px solid rgba(255,255,255,.48); color: var(--color-white); padding: 10px 24px; }
.btn-ghost:hover { background: var(--color-white); color: var(--color-text); }
.btn-blue { background: var(--color-blue); color: var(--color-white); }

.ui-panel {
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
}
.ui-panel-dark { background: rgba(25,25,25,.90); border-color: rgba(255,255,255,.16); color: var(--color-white); }
.panel-heading {
  min-height: 48px;
  padding: 13px var(--panel-padding);
  border-bottom: var(--border-width) solid var(--color-border);
}
.panel-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  text-transform: uppercase;
}
.panel-heading a { font-family: var(--font-display); text-transform: uppercase; font-size: 12px; color: var(--color-muted); }
.panel-footer-link {
  display: block;
  padding: 14px;
  text-align: center;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 600;
  border-top: var(--border-width) solid rgba(255,255,255,.12);
}
.ui-tag {
  display: inline-block;
  padding: 4px 7px;
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}
.ui-tag-blue { background: var(--color-blue); }
.ui-tag-yellow { background: var(--color-accent); color: #181818; }
.ui-tag-green { background: var(--color-green); }
.ui-tag-red { background: var(--color-red); }

.hero-panel {
  position: relative;
  min-height: 330px;
  background: url('hero.jpg') center/cover no-repeat;
  color: var(--color-white);
}
.hero-overlay { position:absolute; inset:0; background: linear-gradient(90deg, rgba(20,20,20,.74), rgba(20,20,20,.12) 62%, rgba(20,20,20,.48)); }
.hero-content { min-height: 330px; z-index: 1; }
.hero-copy { max-width: 520px; }
.hero-copy h1 { margin: 12px 0 8px; font: 700 58px/1 var(--font-display); text-transform: uppercase; }
.hero-copy p { max-width: 410px; font-size: 17px; line-height: 1.55; }
.challenge-card { margin-left: auto; max-width: 430px; box-shadow: none; }
.challenge-card .panel-heading { border-color: rgba(255,255,255,.15); }
.timer { font-family: var(--font-display); font-weight: 600; }
.challenge-item { padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.challenge-item strong { font-family: var(--font-display); font-size: 16px; }
.challenge-item small { color: #c8c8c8; }
.progress-line { height: 4px; margin: 8px 0 4px; background: rgba(255,255,255,.25); }
.progress-line span { display:block; height:100%; background: var(--color-white); }
.challenge-item.completed, .challenge-item.completed small { color: var(--color-green); }
.challenge-item.completed .progress-line span { background: var(--color-green); }

.quick-action {
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 14px 22px;
  border-right: var(--border-width) solid var(--color-border);
}
.quick-action:hover { background: var(--color-surface-2); color: var(--color-text); }
.quick-action i { width: 42px; font-size: 28px; }
.quick-action span { display: flex; flex:1; flex-direction:column; }
.quick-action strong { font: 700 17px/1.15 var(--font-display); text-transform: uppercase; }
.quick-action small { margin-top: 5px; color: var(--color-muted); }
.quick-action b { font-size: 25px; color: var(--color-muted); }

.ui-tabs { border-bottom: 0; margin-top: 10px; }
.ui-tabs .nav-item { flex: 1; }
.ui-tabs .nav-link { border: 0; border-radius: 0; text-align:center; background: var(--color-surface-2); color: var(--color-text); font: 600 13px var(--font-display); text-transform: uppercase; }
.ui-tabs .nav-link.active { background: var(--color-text); color: var(--color-white); }
.ranking-list { padding: 6px 16px 0; }
.rank-row { display:flex; align-items:center; min-height:52px; border-bottom:1px solid var(--color-border); gap:10px; }
.rank-row:last-child { border-bottom:0; }
.rank-row.current { margin-top:10px; padding:0 8px; background:#e4eadf; color:#346918; }
.rank { width:22px; text-align:center; font-family:var(--font-display); font-weight:700; }
.rank-gold { color:#b99100; }
.rank-bronze { color:#9b5c31; }
.avatar { width:32px; height:32px; font-size:11px; flex:0 0 32px; }
.player { display:flex; flex:1; flex-direction:column; font-family:var(--font-display); }
.player strong { font-size:15px; }
.player small { color:var(--color-muted); }
.player-meta-sep { opacity:.55; }
.db-status {
  padding: 10px 16px;
  font-size: 12px;
  border-bottom: 1px solid var(--color-border);
}
.db-status-error {
  background: #f7d7d7;
  color: #7a1f1f;
}
.empty-state { padding:40px 20px; color:var(--color-muted); text-align:center; }

.feature-card { position:relative; min-height:420px; overflow:hidden; background:url('featured.jpg') center/cover no-repeat; color:var(--color-white); border:1px solid #4a4a4a; }
.feature-shade { position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.84)); }
.feature-content { position:absolute; left:0; right:0; bottom:35px; padding:28px; }
.feature-content h2 { margin:10px 0 2px; font:700 38px var(--font-display); text-transform:uppercase; }
.feature-content p { max-width:340px; }
.slider-dots { position:absolute; bottom:14px; left:50%; transform:translateX(-50%); }
.slider-dots span { display:inline-block; width:7px; height:7px; margin:0 4px; background:#aaa; border-radius:50%; }
.slider-dots .active { background:var(--color-blue); }

.news-row { display:flex; min-height:95px; border-bottom:1px solid var(--color-border); }
.news-row:last-child { border-bottom:0; }
.news-row > div { flex:1; padding:13px 15px; }
.news-row small, .news-row strong { display:block; }
.news-row strong { margin:4px 0; font:700 17px var(--font-display); text-transform:uppercase; }
.news-row p { margin:0; color:var(--color-muted); font-size:13px; }
.news-row img, .news-icon { width:112px; object-fit:cover; }
.news-icon { display:flex; align-items:center; justify-content:center; background:#333; color:#aaa; font-size:30px; }

.stack-item { display:flex; align-items:center; min-height:90px; padding:12px 15px; border-bottom:1px solid var(--color-border); }
.stack-item:last-child { border-bottom:0; }
.square-icon { width:48px; height:48px; display:flex; align-items:center; justify-content:center; margin-right:12px; background:var(--color-surface-dark); color:var(--color-white); font-size:20px; }
.stack-item > span:nth-child(2) { display:flex; flex:1; flex-direction:column; }
.stack-item strong { font:700 16px var(--font-display); text-transform:uppercase; }
.stack-item small { margin-top:4px; color:var(--color-muted); line-height:1.35; }
.stack-item em { font-style:normal; font:700 16px var(--font-display); }

.product-grid > div { border-right:1px solid var(--color-border); }
.product-grid > div:last-child { border-right:0; }
.product-card { min-height:260px; padding:16px; display:flex; flex-direction:column; align-items:flex-start; }
.weapon-silhouette { width:100%; height:100px; display:flex; align-items:center; justify-content:center; margin:10px 0; background:linear-gradient(135deg,#d2d2d2,#f5f5f5); color:#555; font:700 30px var(--font-display); letter-spacing:.12em; }
.product-card h3 { margin:0; font:700 20px var(--font-display); text-transform:uppercase; }
.product-card small { color:var(--color-muted); text-transform:uppercase; }
.price-btn { width:100%; margin-top:auto; padding:7px; border:0; background:#3f3d2d; color:#f2d85b; font-weight:700; }

.map-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.map-card { position:relative; min-height:90px; padding:12px; display:flex; align-items:flex-end; overflow:hidden; background-size:cover; background-position:center; color:var(--color-white); }
.map-card::before { content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.8)); }
.map-card span, .map-card em { position:relative; z-index:1; }
.map-card span { display:flex; flex:1; flex-direction:column; }
.map-card strong { font:700 15px var(--font-display); text-transform:uppercase; }
.map-card small { font-size:10px; text-transform:uppercase; }
.map-card em { font:700 10px var(--font-display); color:var(--color-green); text-transform:uppercase; }
.social-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:14px; }
.social { aspect-ratio:1; display:flex; align-items:center; justify-content:center; color:var(--color-white); font-size:24px; }
.social:hover { color:var(--color-white); opacity:.86; }
.discord { background:#5865f2; }.twitter { background:#1da1f2; }.youtube { background:#e62117; }.twitch { background:#6441a5; }.instagram { background:#d63384; }

.site-footer { background:#262626; color:#bdbdbd; }
.footer-brand { color:var(--color-white); margin-bottom:15px; }
.site-footer h4 { color:var(--color-white); font:700 16px var(--font-display); text-transform:uppercase; }
.site-footer a { display:block; color:#bdbdbd; margin-bottom:8px; font-size:13px; }
.newsletter { padding:18px; border:1px solid #464646; }
.newsletter .form-control { border-radius:0; background:#202020; border-color:#454545; color:#fff; }
.footer-bottom { border-top:1px solid #3b3b3b; font-size:12px; }
.footer-bottom a { display:inline-block; margin-left:20px; }

.flash-banner {
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-weight: 600;
}
.flash-banner-success {
  background: #deedd4;
  color: #2f5f13;
  border-color: #b5d39a;
}
.flash-banner-error {
  background: #f7d7d7;
  color: #7a1f1f;
  border-color: #e1b0b0;
}
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(45,111,196,.18), transparent 28%),
    linear-gradient(135deg, #ececec 0%, #dcdcdc 100%);
}
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-panel {
  width: min(100%, 520px);
  padding: 28px;
}
.auth-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.auth-home-link {
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
}
.auth-panel h1 {
  margin: 0 0 8px;
  font: 700 48px/1 var(--font-display);
  text-transform: uppercase;
}
.auth-subtitle {
  margin: 0 0 16px;
  color: var(--color-muted);
  font-size: 15px;
}
.auth-form {
  display: grid;
  gap: 10px;
}
.auth-form label {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}
.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  outline: 0;
}
.auth-form input:focus {
  border-color: var(--color-blue);
  box-shadow: inset 0 0 0 1px var(--color-blue);
}
.auth-switch {
  margin: 18px 0 0;
  color: var(--color-muted);
}
.auth-empty {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

@media (max-width: 991.98px) {
  .navbar-nav .nav-link { padding:10px 0 !important; border-bottom:0; }
  .account-bar { padding-bottom:16px; flex-wrap:wrap; }
  .hero-copy h1 { font-size:44px; }
  .challenge-card { max-width:none; }
  .map-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 575.98px) {
  :root { --panel-padding: 12px; }
  .hero-copy h1 { font-size:38px; }
  .quick-action { border-right:0; border-bottom:1px solid var(--color-border); }
  .product-grid > div { border-right:0; border-bottom:1px solid var(--color-border); }
  .map-grid { grid-template-columns:1fr; }
  .social-grid { gap:8px; }
  .auth-panel { padding: 20px; }
  .auth-brand-row { align-items: flex-start; flex-direction: column; }
  .auth-panel h1 { font-size: 40px; }
}
