/* Global Reset / Consistency */
* { box-sizing: border-box; }

/* Page Base */
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background-color: #0e1116;
  color: #e6edf3;
  min-height: 100vh;
}

/* ===================== */
/* Hero Header */
/* ===================== */
.site-header {
  min-height: 5vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  margin: 0;
  animation: float 12s ease-in-out infinite;
}
.logo .word { white-space: nowrap; }

/* Symbol */
.logo-symbol {
  width: 90px;
  height: auto;
  filter: drop-shadow(0 0 18px rgba(77, 163, 255, 0.7));
  animation: pulse 6s ease-in-out infinite;
}

/* Tagline */
.tagline {
  margin-top: 20px;
  color: #9da7b1;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

/* Divider (responsive) */
.divider {
  width: min(1175px, 92vw);
  height: 1px;
  margin: 24px auto 0;
  background: linear-gradient(to right, transparent, rgba(120,170,255,0.4), transparent);
}

/* ===================== */
/* Navigation */
/* ===================== */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  padding: 18px 0;
  backdrop-filter: blur(6px);
  background: rgba(14, 17, 22, 0.75);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

@supports not (backdrop-filter: blur(6px)) {
  .nav-wrapper { background: rgba(14, 17, 22, 0.9); }
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.main-nav a {
  color: #9da7b1;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.25s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 0;
  height: 1px;
  background: rgba(120,170,255,0.6);
  transition: width 0.25s ease, left 0.25s ease;
}

.main-nav a:hover { color: #e6edf3; }
.main-nav a:hover::after { width: 100%; left: 0; }

/* ===================== */
/* Animations */
/* ===================== */
@keyframes pulse {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(120, 170, 255, 0.45)); }
  50%      { filter: drop-shadow(0 0 22px rgba(120, 170, 255, 0.65)); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* ===================== */
/* Responsive Tweaks */
/* ===================== */
@media (max-width: 600px) {
  .logo {
    font-size: 2.2rem;
    gap: 12px;
    letter-spacing: 0.12em;
  }
  .logo-symbol { width: 60px; }
  .main-nav { gap: 18px; }
  .main-nav a { font-size: 0.75rem; }
}

/* ===================== */
/* Universal page container for ALL pages */
/* ===================== */
.page,
.page-content {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 22px 16px 60px; /* side padding prevents edge-kissing */
}

/* ===================== */
/* Panels (shared) */
/* ===================== */
.panel{
  margin-top: 22px;
  padding: 22px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-head h2{
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.3px;
}

.panel-link{
  color: #e6edf3;
  opacity: 0.8;
  text-decoration: none;
}
.panel-link:hover{ opacity: 1; }

.panel-subtext {
  margin: 8px 0 0;
  color: #9da7b1;
  line-height: 1.6;
}

/* ===================== */
/* Council */
/* ===================== */
.council-panel {
  border: 1px solid rgba(120,170,255,0.25);
  background: linear-gradient(145deg, rgba(120,170,255,0.08), rgba(255,255,255,0.02));
}

.council-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.council-member {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.council-member:hover {
  transform: translateY(-2px);
  border-color: rgba(120,170,255,0.35);
}

.council-name {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.council-meta {
  margin-top: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9da7b1;
}

.council-gold {
  color: #ffcc66;
  text-shadow: 0 0 12px rgba(255, 204, 102, 0.25);
}

/* ===================== */
/* Roster Grid — NEVER overlaps (spacer row) */
/* ===================== */
:root { --stickyHeadH: 56px; }

.roster-grid-wrap {
  margin-top: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  overflow: auto;
  position: relative;
}

.roster-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  position: relative;
}

.roster-grid th,
.roster-grid td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
  background-clip: padding-box;
}

.roster-grid tr:last-child td,
.roster-grid tr:last-child th { border-bottom: none; }

.roster-grid th {
  background: rgba(255,255,255,0.02);
  color: #9da7b1;
  font-size: 0.70rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.corner { width: 150px; }
.rank-cell { width: 150px; white-space: nowrap; text-align: left; }

.roster-grid thead th.sticky-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 17, 22, 0.95);
}

.roster-grid th.sticky-left {
  position: sticky;
  left: 0;
  z-index: 30;
  background: rgba(14, 17, 22, 0.95);
}

.roster-grid thead th.corner.sticky-left.sticky-top {
  z-index: 40;
  background: rgba(14, 17, 22, 0.98);
}

.head-spacer th,
.head-spacer td {
  padding: 0 !important;
  height: var(--stickyHeadH);
  border-right: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: transparent;
}

.prestige-label {
  color: var(--prestigeColor);
  font-weight: 700;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.cell.empty { opacity: 0.25; }
.roster-grid td { text-align: center; }

.member {
  margin: 0;
  padding: 2px 0;
  background: transparent;
  border: none;
  display: block;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  line-height: 1.2;
}

.prestige-text {
  color: var(--prestigeColor);
  font-weight: 600;
  font-size: 0.90rem;
  letter-spacing: 0.04em;
}

/* ===================== */
/* Candidates */
/* ===================== */
.candidate-panel {
  border: 1px solid rgba(255, 200, 120, 0.25);
  background: linear-gradient(145deg, rgba(255, 200, 120, 0.08), rgba(255,255,255,0.02));
}

.candidate-list {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.candidate-entry {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: #ffcc66;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.candidate-entry:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 200, 120, 0.35);
}

/* ===================== */
/* Inactive */
/* ===================== */
.inactive-panel {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}

.inactive-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.inactive-entry {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

/* Status page player bubbles */
.pname {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
}

/* ===================== */
/* Home-only pieces */
/* ===================== */
.hero{
  margin: 0 auto;
  max-width: 1100px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.hero-img{
  display: block;
  width: 100%;
  height: auto;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #e6edf3;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.btn:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}
.btn.primary{
  background: rgba(255,255,255,0.14);
}

.news-grid{
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.news-card{
  padding: 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
}
.news-card.pinned{
  border-color: rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.28);
}

.news-meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 8px;
}

.tag{
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
}

.news-card h3{
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.news-card p{
  margin: 0 0 10px;
  opacity: 0.92;
  line-height: 1.45;
}

.news-more{
  color: #e6edf3;
  opacity: 0.85;
  text-decoration: none;
}
.news-more:hover{ opacity: 1; }

.about-grid{
  display: grid;
  gap: 16px;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: start;
}

.about-text p{
  margin: 0 0 14px;
  line-height: 1.55;
  opacity: 0.95;
}

.about-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stats{
  display: grid;
  gap: 10px;
}

.stat{
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
}

.stat-label{
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 4px;
}

.stat-value{
  font-size: 1.15rem;
  font-weight: 600;
}

.inline-link{
  color: #e6edf3;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.28);
}
.inline-link:hover{
  border-bottom-color: rgba(255,255,255,0.55);
}

/* Gallery */
.gallery-controls{
  display: flex;
  gap: 10px;
}

.icon-btn{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #e6edf3;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.icon-btn:hover{
  background: rgba(255,255,255,0.10);
}

.gallery-wrap{
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}

.gallery{
  display: flex;
  gap: 12px;
  padding: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.gallery::-webkit-scrollbar{
  height: 10px;
}
.gallery::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
}

.g-item{
  flex: 0 0 calc(20% - 9.6px);
  scroll-snap-align: start;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.20);
}

.g-item img{
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.muted-note{
  margin: 10px 2px 0;
  font-size: 0.9rem;
  opacity: 0.75;
}

/* Home responsive */
@media (max-width: 980px){
  .news-grid{ grid-template-columns: 1fr; }
  .about-grid{ grid-template-columns: 1fr; }
  .g-item{ flex-basis: calc(50% - 6px); }
  .g-item img{ height: 160px; }
}

/* ===================== */
/* Archive (Card Timeline) */
/* ===================== */
.archive-list{
  margin-top: 10px;
  display: grid;
  gap: 14px;
  padding: 12px; /* gutter inside the panel */
}

.archive-entry{
  padding: 16px;
  border-radius: 16px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
}

.archive-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.archive-date{
  font-size: 0.85rem;
  opacity: 0.8;
  white-space: nowrap;
}

.archive-title{
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.archive-desc{
  margin: 0;
  line-height: 1.55;
  opacity: 0.92;
  color: #9da7b1;
}

.archive-links{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.archive-photos{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.a-photo{
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.20);
  display: block;
}

.a-photo img{
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px){
  .archive-photos{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-photo img{ height: 140px; }
}

/* Archive tag base (pill style) */
.archive-tag{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}

/* Tag colors */
.archive-tag.event{
  color: #ff9a2e;
  background: rgba(255, 154, 46, 0.12);
  border-color: rgba(255, 154, 46, 0.35);
}

.archive-tag.promotion{
  color: #6ea8ff;
  background: rgba(110, 168, 255, 0.12);
  border-color: rgba(110, 168, 255, 0.35);
}

.archive-tag.newmember{
  color: #40ff40;
  background: rgba(64, 255, 64, 0.12);
  border-color: rgba(64, 255, 64, 0.35);
}

.archive-tag.ally{
  color: #c77dff;
  background: rgba(199, 125, 255, 0.12);
  border-color: rgba(199, 125, 255, 0.35);
}

.archive-tag.major{
  color: #ff4d4d;
  background: rgba(255, 77, 77, 0.12);
  border-color: rgba(255, 77, 77, 0.35);
}

.archive-tag.other{
  color: #9da7b1;
  background: rgba(157, 167, 177, 0.10);
  border-color: rgba(157, 167, 177, 0.25);
}
