:root {
  --bg:#0b1020;
  --panel:#121a33;
  --muted:#7e88a9;
  --text:#e8ecf8;
  --brand:#5ea0ff;
  --brand-2:#7bda91;
  --danger:#ff6b6b;
  --card:#0f1730;
  --border:#223057;
  --accent:#1a2a54;
}

* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
html, body { margin:0; padding:0; background:var(--bg); color:var(--text); font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Inter,sans-serif; line-height:1.55; }

a { text-decoration:none; }

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

/* ================= HEADER / NAV FIXED ================= */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(11,16,32,.95), rgba(11,16,32,.07));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

/* Brand */
.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;
}
.brand-icon:hover { transform: scale(1.1); }

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Link styling */
.nav-links a.nav-link {
  position: relative;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s, background 0.2s;
}
.nav-links a.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  width: 0%;
  height: 2px;
  background: orange;
  transition: width 0.3s ease;
}
.nav-links a.nav-link:hover::after,
.nav-links a.nav-link[aria-current="page"]::after { width: 70%; }
.nav-links a.nav-link:hover { color: orange; background: rgba(255,165,0,0.1); }

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

/* MOBILE MENU */
@media (max-width:900px) {
  .nav-links {
    display: none !important;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: var(--panel);
    border: 1px solid var(--border);
    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 !important; }
  .nav-links a.nav-link { padding: 0.75rem 1rem; }
  .nav-toggle { display: block; }
}

/* ================= BANNER + LOGO ================= */
.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%; /* slightly higher than center */
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 320px; /* increased max width */
  height: auto;
  pointer-events: none;
  z-index: 10;
}

/* Responsive adjustments */
@media (max-width:900px) { .banner-logo { max-width: 220px; } }
@media (max-width:500px) { .banner-logo { max-width: 180px; } }

/* Layout */
h1 { font-size:clamp(1.6rem,3.2vw,2.2rem); margin:.25rem 0 .5rem; }
h2 { font-size:clamp(1.2rem,2.6vw,1.6rem); margin:0 0 .75rem; }
p.muted { color:var(--muted); margin:.25rem 0 0; }

.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)); }
@media (max-width:900px){ .grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:680px){ .grid.cols-3, .grid.cols-2, .grid-cols-4{grid-template-columns:1fr} }

.card { background:var(--card); border:1px solid var(--border); border-radius:14px; padding:1rem; }

/* STATS PANEL */
.stats-panel { background:var(--panel); border:1px solid var(--border); border-radius:14px; padding:1rem; margin-top:2rem; box-shadow:0 6px 16px rgba(0,0,0,.35); }
.stats-panel > header { display:flex; align-items:center; justify-content:space-between; padding:.25rem .25rem .75rem; border-bottom:1px solid var(--border); }
.stats-title { font-weight:800; letter-spacing:.4px; text-transform:uppercase; font-size:1.05rem; color:var(--brand); }
.stat-controls { display:inline-flex; gap:.5rem; }
.chip { height:28px; min-width:28px; display:inline-flex; align-items:center; justify-content:center; border-radius:8px; border:1px solid var(--border); background:#0e1530; color:var(--text); padding:0 .4rem; font-weight:700; user-select:none; }

/* KPI row */
.kpi-grid { margin-top:.25rem; }
.card.kpi.kpi-row { display:flex; flex-direction:row; align-items:center; gap:.8rem; padding:1rem; }
.kpi-body { display:flex; flex-direction:column; gap:.15rem; }
.kpi-body .value { font-weight:800; }
.kpi-body .label { color:var(--muted); font-size:.95rem; }

/* KPI Icons */
.kpi-icon{ width:2em; height:2em; font-size:1.6rem; flex-shrink:0; background-color:transparent; background-repeat:no-repeat; background-position:center; background-size:contain; transform:translateY(1px); }
.kpi-activity .kpi-icon{ font-size:1.2rem; }
.kpi-icon.icon-members{ background-image:url("https://i.imgur.com/5cvU7k4.png"); }
.kpi-icon.icon-homeworld{ background-image:url("https://i.imgur.com/4W0ezBr.png"); }
.kpi-icon.icon-activity{ background-image:url("https://i.imgur.com/0hiJlJc.png"); }
.kpi-icon.icon-avgxp{ background-image:url("https://i.imgur.com/6yMlDy1.png"); }
.kpi-icon.icon-maxed{ background-image:url("https://i.imgur.com/hCmEEd0.png"); }
.kpi-icon.icon-maxed-combat{ background-image:url("https://i.imgur.com/OuaGWkf.png"); }
.kpi-icon.icon-avgoverall{ background-image:url("https://i.imgur.com/yejPmHa.png"); }

/* Pills: Loot + Achievements */
.pill-section { display:grid; grid-template-columns:repeat(2,1fr); gap:1rem; margin-top:.5rem; }
.pill-card { background:var(--panel); border:1px solid var(--border); border-radius:14px; padding:1rem 1.25rem; min-height:110px; box-shadow:0 6px 16px rgba(0,0,0,0.35); display:flex; flex-direction:column; overflow:hidden; transition:border-color .25s; }
.pill-card:hover { border-color:var(--brand); }
.pill-card header { display:flex; justify-content:space-between; align-items:center; margin-bottom:.5rem; border-bottom:1px solid var(--border); padding-bottom:.25rem; }
.pill-title { font-size:1rem; font-weight:700; text-transform:uppercase; color:var(--brand); letter-spacing:.3px; }
.coming-soon { color:var(--muted); text-align:center; font-style:italic; font-size:0.9rem; margin-top:.5rem; }

/* Scrolling Achievements */
#achListHome { overflow:hidden; max-height:180px; position:relative; }
#achListHome .row { display:flex; justify-content:space-between; padding:.25rem 0; border-bottom:1px solid rgba(255,255,255,0.05); font-size:.9rem; white-space:nowrap; }
#achListHome .row:last-child{border-bottom:none;}
#achListHome .scroll-content{display:flex;flex-direction:column; animation:scrollAchievements 30s linear infinite;}
#achListHome:hover .scroll-content{animation-play-state:paused;}
@keyframes scrollAchievements{0%{transform:translateY(0);}100%{transform:translateY(-50%);}}

.divider{border-top:1px solid var(--border); margin:1rem 0 1.5rem 0; opacity:.6;}

/* Footer */
footer{color:var(--muted);padding:2rem 0;margin-top:1rem;border-top:1px solid var(--border);}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:.5rem;background:linear-gradient(135deg,var(--brand),#3a7cff);color:white;border:0;border-radius:10px;padding:.6rem .9rem;font-weight:600;cursor:pointer}
.btn.secondary{background:none;color:var(--text);border:1px solid var(--border)}
.btn:hover{filter:brightness(1.06)}

/* Misc */
.flex{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap}
.right{margin-left:auto}
.muted-small{color:var(--muted);font-size:.9rem}
.notice{background:#0e1838;border:1px dashed var(--border);border-radius:12px;padding:.75rem;color:var(--muted)}

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

/* ================= ABOUT SECTION ================= */
.about-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.about-section h2 {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.about-section p {
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.about-section a {
  color: var(--brand-2);
  font-weight: 600;
  transition: color 0.2s ease;
}

.about-section a:hover {
  color: var(--brand);
}

/* ================= STAFF SECTION ================= */
.about-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
}

.staff-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Title and icon centered */
.staff-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 0.25rem;
  gap: 0.4rem;
}

.staff-title img.rank-icon {
  width: 38px;
  height: 38px;
}

.staff-title h2 {
  font-size: 1.4rem;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0;
}

/* Catchy descriptions */
.staff-desc {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

/* Member list */
.staff-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.staff-member {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.staff-member:hover {
  border-color: var(--brand);
  background: rgba(94,160,255,0.05);
}

.staff-member span {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Icon link group */
.staff-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.staff-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.staff-links a:hover::after {
  content: attr(title);
  position: absolute;
  bottom: -1.6rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--text);
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0.9;
}

.staff-links img {
  width: 18px;
  height: 18px;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.staff-links img:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* ================= CLAN RULES ================= */
.rules-section ol {
  list-style: decimal;
  margin-left: 1.5rem;
  padding-left: 0;
}

.rules-section li {
  margin-bottom: 0.5rem;
  line-height: 1.55;
  color: var(--text);
}

