:root {
  --bg: #07111f;
  --bg-2: #101c31;
  --panel: rgba(13, 21, 39, 0.88);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f8ff;
  --muted: #a7b2d1;
  --accent: #eb6835;
  --accent-2: #5d7df2;
  --accent-3: #22c55e;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --sidebar-width: 250px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(235, 104, 53, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(93, 125, 242, 0.14), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

button, a { font: inherit; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--border);
  z-index: 1200;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(160deg, #141428 0%, #1c1c35 100%);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  border-right: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand-icon {
  font-size: 24px;
  color: var(--accent);
}

.brand-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  letter-spacing: -0.5px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.page-header{
display:flex;
justify-content:space-between;
align-items:center;
padding:30px;
background:rgba(255,255,255,.05);
backdrop-filter:blur(20px);
border-radius:22px;
margin-bottom:30px;
}

.hero{
position:relative;
overflow:hidden;
}

.hero::before{
content:"";
position:absolute;
width:350px;
height:350px;
border-radius:50%;
background:linear-gradient(#7b61ff,#eb6835);
filter:blur(120px);
opacity:.25;
top:-100px;
right:-100px;
}

.hero::after{
content:"";
position:absolute;
width:220px;
height:220px;
border-radius:50%;
background:#6ae3ff;
filter:blur(100px);
opacity:.18;
bottom:-80px;
left:-80px;
}
.component-card{

transition:
transform .45s,
box-shadow .45s;
}

.component-card:hover{

transform:
translateY(-10px)
rotateX(4deg)
rotateY(-3deg);

box-shadow:
0 25px 60px rgba(0,0,0,.25);
}
.card-preview{

background:
rgba(255,255,255,.08);

backdrop-filter:
blur(15px);

border:

1px solid rgba(255,255,255,.15);

}

.visually-hidden{
position:absolute;
width:1px;
height:1px;
padding:0;
margin:-1px;
overflow:hidden;
clip:rect(0,0,0,0);
white-space:nowrap;
border:0;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: #8a9bc0;
  text-decoration: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.sidebar-nav li a i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.sidebar-nav li a:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
  transform: translateX(3px);
}

.sidebar-nav li.active a {
  background: linear-gradient(90deg, rgba(235,104,53,0.2) 0%, rgba(235,104,53,0.05) 100%);
  color: var(--accent);
  border-left: 3px solid var(--accent);
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 16px;
}

.sidebar-footer a {
  color: #6a7a94;
  font-size: 16px;
  transition: color 0.3s ease;
}

.sidebar-footer a:hover {
  color: var(--accent);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1040;
  backdrop-filter: blur(2px);
}

.sidebar-backdrop.visible {
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 32px;
  backdrop-filter: blur(18px);
  background: rgba(7, 17, 31, 0.72);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.topnav { display: inline-flex; gap: 10px; flex-wrap: wrap; }

.topnav a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.25s ease;
}

.topnav a:hover,
.topnav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.page-shell {
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  padding: 34px 32px 64px;
}

.hero {
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(16, 28, 49, 0.94), rgba(11, 18, 35, 0.88));
  box-shadow: var(--shadow);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(235, 104, 53, 0.14);
  color: #ffd4c4;
  border: 1px solid rgba(235, 104, 53, 0.22);
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  font-family: 'Syne', sans-serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
}

.hero p {
  max-width: 700px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-meta,
.related-pages,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta { margin-top: 18px; }

.meta-pill,
.related-pages a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: #e9efff;
  text-decoration: none;
}

.related-pages {
  margin: 20px 0 24px;
}

.related-pages a:hover {
  background: rgba(235, 104, 53, 0.12);
  border-color: rgba(235, 104, 53, 0.24);
}

.leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.component-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(13, 21, 39, 0.82);
  box-shadow: var(--shadow);
}

.card-preview {
  min-height: 250px;
  padding: 22px;
}

.gaming-preview { background: linear-gradient(145deg, rgba(235, 104, 53, 0.12), rgba(93, 125, 242, 0.12)); }
.coding-preview { background: linear-gradient(145deg, rgba(93, 125, 242, 0.12), rgba(34, 197, 94, 0.10)); }
.education-preview { background: linear-gradient(145deg, rgba(34, 197, 94, 0.10), rgba(235, 104, 53, 0.10)); }
.analytics-preview { background: linear-gradient(145deg, rgba(93, 125, 242, 0.10), rgba(235, 104, 53, 0.10)); }
.team-preview { background: linear-gradient(145deg, rgba(16, 28, 49, 0.96), rgba(93, 125, 242, 0.10)); }
.sales-preview { background: linear-gradient(145deg, rgba(235, 104, 53, 0.12), rgba(34, 197, 94, 0.10)); }
.community-preview { background: linear-gradient(145deg, rgba(6, 182, 212, 0.12), rgba(168, 85, 247, 0.10)); }
.creator-preview { background: linear-gradient(145deg, rgba(93, 125, 242, 0.14), rgba(15, 23, 42, 0.8)); }
.sprint-preview { background: linear-gradient(145deg, rgba(34, 197, 94, 0.12), rgba(15, 23, 42, 0.85)); }
.mover-preview { background: linear-gradient(145deg, rgba(148, 163, 184, 0.12), rgba(15, 23, 42, 0.9)); }

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 20px;
}

.preview-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #f2b8a3;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
}

.preview-head h2 {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-size: 26px;
}

.preview-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.podium-slot,
.ranking-row,
.score-item,
.team-row,
.analytics-row {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
}

.podium-slot {
  border-radius: 22px 22px 18px 18px;
  padding: 18px 14px;
  text-align: center;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
}

.podium-slot span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto;
  font-weight: 800;
}

.podium-slot.first { min-height: 180px; background: linear-gradient(180deg, rgba(235, 104, 53, 0.24), rgba(235, 104, 53, 0.08)); }
.podium-slot.second { background: linear-gradient(180deg, rgba(93, 125, 242, 0.22), rgba(93, 125, 242, 0.08)); }
.podium-slot.third { background: linear-gradient(180deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.08)); }

.podium-slot strong,
.ranking-row strong,
.score-item strong,
.team-row small,
.analytics-row strong {
  font-weight: 800;
}

.ranking-table,
.scoreboard,
.team-board,
.analytics-list {
  display: grid;
  gap: 10px;
}

.ranking-row,
.score-item,
.team-row,
.analytics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
}

.sales-ladder,
.heatmap,
.creator-list,
.sprint-list,
.mover-list {
  display: grid;
  gap: 12px;
}

.ladder-row,
.heat-row,
.creator-row,
.sprint-pill,
.mover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
}

.ladder-rank {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.heat-row {
  gap: 10px;
}

.heat-dots {
  display: flex;
  gap: 6px;
}

.heat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.35);
}

.heat-dot.hot { background: #f97316; box-shadow: 0 0 8px rgba(249, 115, 22, 0.45); }
.heat-dot.warm { background: #a855f7; box-shadow: 0 0 8px rgba(168, 85, 247, 0.45); }
.heat-dot.cool { background: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.35); }

.creator-row {
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(168, 85, 247, 0.18);
  color: #e2e8f0;
}

.creator-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  font-size: 12px;
  font-weight: 700;
}

.sprint-pill {
  background: rgba(15, 23, 42, 0.75);
}

.mover-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.mover-chip.up {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.mover-chip.down {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.ranking-row .rank {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.analytics-row { align-items: center; }

.bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.card-body {
  padding: 22px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-family: 'Syne', sans-serif;
  font-size: 24px;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.card-actions { margin-top: 18px; }

.card-actions button {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.code-block {
  display: none;
  overflow: auto;
  margin: 18px 0 0;
  padding: 16px;
  border-radius: 18px;
  background: #09101f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #d5ddf5;
  font-size: 13px;
  line-height: 1.7;
}

.code-block.open { display: block; }

@media (max-width: 900px) {
  .leaderboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
  .page-shell {
    width: 100%;
    margin-left: 0;
    padding: 32px 20px 60px;
  }

  .sidebar {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar { padding: 18px; flex-direction: column; align-items: stretch; }
  .page-shell { width: min(100% - 20px, 1180px); padding-top: 20px; }
  .hero, .card-body { padding: 20px; }
  .podium { grid-template-columns: 1fr; }
  .podium-slot.first { min-height: 150px; }
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-left: var(--sidebar-w);
  background: #111;
  color: #aaa;
  padding: 0;
  margin-top: 60px;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 2fr 2fr;
  gap: 40px;
  padding: 56px 48px 40px;
  max-width: 100%;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}

.footer-col p {
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 16px;
}

.footer-col h3 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  color: #888;
  text-decoration: none;
  font-size: 14px;
  position: relative;
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-col ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
  transition: color var(--transition);
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

.footer-col ul li a:hover {
  color: var(--accent);
  transform: translateX(3px);
  text-shadow: 0 0 8px rgba(235, 104, 53, 0.4);
}

.footer-col ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.footer-col ul li a:hover::after {
  width: 100%;
}

.socials a {
  transition: all 0.3s ease;
}

.socials a:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 12px rgba(235, 104, 53, 0.35);
}

.footer-col ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-col ul li a:hover::after {
  width: 100%;
}

.footer-links {
  display: flex;
  gap: 6rem;
  align-items: start;
  justify-content: center;
  padding: 0 2rem;
}

.socials {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.socials a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1e1e1e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  text-decoration: none;
  margin-right: 12px;
  font-size: 14px;
  transition: all 0.3s ease;
  transition: color 0.3s ease, transform 0.2s ease;
}

.socials a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 0 8px var(--accent);
  transform: scale(1.1);
}

.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}

.newsletter-form input:focus {
  border-color: var(--accent);
}

.newsletter-form button {
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.newsletter-form button:hover {
  background: #d45c28;
}

.footer-bottom {
  border-top: 1px solid #1e1e1e;
  padding: 20px 48px;
  text-align: center;
  font-size: 13px;
  color: #555;
}

/* ========================================= */
/* ENHANCED FOOTER FOR LEADERBOARD COMPONENT */
/* ========================================= */
.footer {
  margin-top: auto;
  margin-left: var(--sidebar-width, 260px);
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding: 60px 80px 40px !important;
  text-align: left !important;
  width: calc(100% - var(--sidebar-width, 260px)) !important;
  display: block !important;
  flex-basis: 100% !important;
  clear: both !important;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #eb6835, #7b61ff, #00f7ff);
}


@media (max-width: 900px) {
  .footer { margin-left: 0 !important; width: 100% !important; padding: 40px 20px !important; }
  .footer-container { grid-template-columns: 1fr !important; }
  .footer-bottom { flex-direction: column !important; gap: 10px !important; }
}


.hero-stats{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:1rem;
  margin-top:2rem;
}

.stat-card{
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(20px);
  padding:1.2rem;
  border-radius:18px;
}

.stat-card span{
  display:block;
  color:#9ca3af;
  font-size:.85rem;
}

.stat-card strong{
  display:block;
  margin-top:.4rem;
  font-size:1.4rem;
}

.component-card{
  position:relative;
  overflow:hidden;
  border-radius:28px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(20px);
  transition:.4s ease;
}

.component-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:
  linear-gradient(
      135deg,
      rgba(123,97,255,.15),
      rgba(235,104,53,.12)
  );
  opacity:0;
  transition:.4s;
}

.component-card:hover{
  transform:translateY(-8px);
  box-shadow:
  0 20px 60px rgba(0,0,0,.25);
}

.component-card:hover::before{
  opacity:1;
}

.card-rank{
  position:absolute;
  top:16px;
  right:16px;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(
    135deg,
    #7b61ff,
    #eb6835
  );
  color:white;
  font-weight:800;
}