@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #050505;
  --panel: #151515;
  --panel-2: #1a1818;
  --line: rgba(255,255,255,.08);
  --muted: #8f8c8c;
  --text: #f7f5f4;
  --orange: #ff7419;
  --orange-soft: #5c2a16;
  --orange-glow: rgba(255,92,22,.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: .35;
  z-index: -1;
}
.ambient-one { left: -280px; top: -220px; background: #7b2d0d; }
.ambient-two { right: -300px; bottom: -250px; background: #5a2514; }

.layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 1500px;
  margin: 0 auto;
}

.sidebar {
  margin: 24px 0 24px 24px;
  border: 1px solid var(--line);
  background: rgba(23,23,23,.93);
  border-radius: 22px;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 26px;
}
.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #25140d;
  border: 1px solid rgba(255,116,25,.18);
  font-size: 18px;
}
.brand strong, .brand span { display: block; }
.brand strong { font-size: 14px; }
.brand span { font-size: 13px; font-weight: 700; color: #fff; margin-top: 3px; }

nav { display: grid; gap: 7px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #aaa6a5;
  border-radius: 14px;
  padding: 12px 13px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: .2s ease;
  text-decoration: none;
}
.nav-item .tabler-icon { flex: 0 0 20px; color: #aaa6a5; }
.nav-item:hover { background: rgba(255,255,255,.04); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, #673018, #492211);
  color: #fff;
}
.nav-item.active .tabler-icon { color: var(--orange); }

.sidebar-bottom { margin-top: auto; }
.server-status {
  border-top: 1px solid var(--line);
  padding: 18px 8px 0;
  display: flex;
  gap: 10px;
  align-items: center;
}
.server-status i, .online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #63d471;
  box-shadow: 0 0 12px rgba(99,212,113,.5);
}
.server-status i { display: block; }
.server-status b, .server-status small { display: block; }
.server-status b { font-size: 12px; }
.server-status small { color: var(--muted); font-size: 10px; margin-top: 3px; }

.content { padding: 26px 42px 70px 34px; min-width: 0; }

.topbar {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}
.crumb { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: rgba(20,20,20,.7);
  padding: 9px 13px;
  border-radius: 999px;
  color: #b4b1b0;
  font-size: 11px;
}

.section { display: none; max-width: 1080px; margin: 0 auto; }
.active-section { display: block; }

.hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 26px;
}
.eyebrow { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .1em; margin-bottom: 7px; }
h1 { margin: 0; font-size: clamp(34px, 4vw, 56px); line-height: 1; letter-spacing: -.04em; }
h1 span { color: #fff; }
.hero p { color: var(--muted); font-size: 13px; margin: 12px 0 0; max-width: 650px; }
.hero-stat {
  min-width: 105px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  padding: 16px 18px;
  text-align: center;
}
.hero-stat strong { display: block; font-size: 29px; }
.hero-stat span { color: var(--muted); font-size: 10px; }

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 12px 14px;
}
.search span { color: var(--orange); font-size: 18px; }
.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
}
.search input::placeholder { color: #666; }
.hint { color: #686565; font-size: 10px; white-space: nowrap; }

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.rank-card, .forum-card, .about-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(24,24,24,.96), rgba(18,17,17,.96));
  border-radius: 18px;
}

.rank-card {
  padding: 17px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.rank-card::after {
  content: "";
  position: absolute;
  right: -45px;
  top: -45px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--orange-glow);
  filter: blur(25px);
  opacity: 0;
  transition: .2s;
}
.rank-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,116,25,.32);
  background: linear-gradient(145deg, rgba(31,25,22,.98), rgba(18,17,17,.98));
}
.rank-card:hover::after { opacity: 1; }

.rank-number {
  color: #595555;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 18px;
}
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  padding: 5px 8px;
  background: #25150e;
  color: var(--orange);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
}
.rank-card h3 { margin: 12px 0 6px; font-size: 17px; }
.rank-card p { margin: 0; color: #8e8a89; font-size: 11px; line-height: 1.5; }
.rank-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 12px;
  color: #676363;
  font-size: 9px;
}
.rank-footer span:last-child { color: #b4afad; }

.forum-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.forum-card { padding: 20px; }
.forum-top { display: flex; justify-content: space-between; gap: 15px; }
.forum-role { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.min-rank {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(255,116,25,.16);
  background: #21140e;
  color: #eaa477;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 700;
}
.forum-card h3 { margin: 13px 0 8px; font-size: 18px; }
.forum-card p { margin: 0; color: #94908f; font-size: 11px; line-height: 1.65; }

.about-card {
  display: flex;
  gap: 18px;
  padding: 24px;
}
.about-icon {
  flex: 0 0 52px;
  height: 52px;
  border-radius: 15px;
  background: #28150c;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.about-card h2 { margin: 2px 0 8px; font-size: 18px; }
.about-card p { margin: 0; color: #979291; font-size: 12px; line-height: 1.7; }

.roster-controls {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(21,21,21,.85);
}
.roster-controls label { display: grid; gap: 7px; }
.roster-controls label span {
  color: #888382;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.roster-controls select, .sort-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1c1a19;
  color: var(--text);
  font: inherit;
  font-size: 12px;
}
.roster-controls select { padding: 0 30px 0 11px; }
.sort-button {
  padding: 0 16px;
  border-color: rgba(255,116,25,.25);
  background: #3b2115;
  color: #ffd2b6;
  cursor: pointer;
}
.sort-button:hover { background: #512b18; }
.roster-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(24,24,24,.96), rgba(18,17,17,.96));
}
.roster-table { width: 100%; border-collapse: collapse; text-align: left; }
.roster-table th {
  padding: 15px 20px;
  color: #807b79;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.roster-table td {
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.roster-table tbody tr { transition: background .18s ease; }
.roster-table tbody tr:hover { background: rgba(255,255,255,.025); }
.player-name { color: #f4efed; font-weight: 600; }
.privilege-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}
.privilege-badge .tabler-icon { width: 14px; height: 14px; }
.tabler-icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.privilege-yellow { color: #ffe27a; background: rgba(176,137,20,.14); border-color: rgba(255,220,83,.2); }
.privilege-blue { color: #9acbff; background: rgba(36,105,174,.17); border-color: rgba(95,172,255,.23); }
.privilege-red { color: #ff9b9b; background: rgba(164,38,38,.17); border-color: rgba(255,96,96,.23); }
.privilege-orange { color: #ffc08a; background: rgba(185,91,20,.17); border-color: rgba(255,145,58,.25); }
.roster-message {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: #aaa5a3;
  padding: 22px;
  font-size: 13px;
}
.roster-error { border-color: rgba(255,96,96,.25); color: #ffb0b0; }

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10;
}
.modal.open { display: block; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(7px);
}
.modal-card {
  position: relative;
  width: min(650px, calc(100% - 30px));
  margin: 10vh auto 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px;
  background: #151515;
  padding: 28px;
  box-shadow: 0 30px 100px rgba(0,0,0,.5);
}
.modal-close {
  position: absolute;
  right: 17px;
  top: 14px;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 26px;
  cursor: pointer;
}
.modal-rank { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.modal-card h2 { margin: 8px 0 22px; font-size: 27px; }
.modal-block { border-top: 1px solid var(--line); padding: 17px 0 0; margin-top: 17px; }
.modal-block span { color: #6f6a68; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.modal-block p { color: #aaa5a3; font-size: 12px; line-height: 1.7; margin: 8px 0 0; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    margin: 12px;
    padding: 12px;
  }
  .brand { padding-bottom: 12px; }
  nav { grid-template-columns: repeat(3, 1fr); }
  .sidebar-bottom { display: none; }
  .content { padding: 15px; }
  .rank-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .rank-grid, .forum-grid { grid-template-columns: 1fr; }
  .hero { align-items: start; }
  .hero-stat { display: none; }
  .toolbar { display: block; }
  .hint { margin-top: 8px; }
  nav { grid-template-columns: 1fr; }
  .top-actions { display: none; }
  .roster-controls { align-items: stretch; flex-direction: column; }
  .roster-controls select, .sort-button { width: 100%; }
  .roster-table th, .roster-table td { padding: 13px 14px; }
}
