/* Navigation, home, status and info pages */
.btn { text-decoration: none; display: inline-block; }
.nav-links { display: flex; gap: .3rem; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-weight: 600;
  padding: .5rem .9rem; border-radius: 8px; transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--fg); background: #1d1636; }
.nav-links a.active { color: #fff; background: rgba(139, 92, 246, .3); }
/* 3-column header: logo left, menu truly centered, actions right */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.topbar .actions { justify-self: end; }
@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto; gap: .5rem 1rem; }
  .nav-links { grid-column: 1 / -1; grid-row: 2; justify-content: center; flex-wrap: wrap; }
}

.home-hero {
  min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 1.1rem; padding: 4rem 5vw 2rem;
}
.eyebrow { color: var(--cyan); font-weight: 700; letter-spacing: .25em; text-transform: uppercase; font-size: .8rem; }
.home-hero h1 { font-family: "Cinzel", serif; font-size: clamp(2.6rem, 9vw, 5.5rem); line-height: 1.05; }
.grad { background: linear-gradient(90deg, var(--purple), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero p { color: #cfc9ee; max-width: 560px; font-size: 1.1rem; }
.cta-row { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; margin-top: .5rem; }
.cta-row .btn { padding: .8rem 1.6rem; font-size: 1rem; }

.status-card {
  display: inline-flex; align-items: center; gap: .7rem; flex-wrap: wrap; justify-content: center;
  background: rgba(21, 16, 39, .85); border: 1px solid #2a2150; border-radius: 99px; padding: .6rem 1.2rem; margin-top: 1rem;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #6b7280; display: inline-block; }
.dot.on { background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.dot.off { background: #ef4444; box-shadow: 0 0 10px #ef4444; }
.sep { color: var(--muted); }

.tiles { max-width: 1000px; margin: 0 auto; padding: 1rem 5vw 4rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.tile {
  display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: var(--fg);
  background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid #2a2150; border-radius: 14px; padding: 1.4rem;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.tile:hover { transform: translateY(-4px); border-color: var(--purple); box-shadow: 0 8px 30px rgba(139, 92, 246, .25); }
.tile h3 { font-family: "Cinzel", serif; color: var(--cyan); }
.tile p { color: var(--muted); font-size: .9rem; }

.page { max-width: 900px; margin: 0 auto; padding: 2rem 5vw 4rem; }
.page > h1 { font-family: "Cinzel", serif; font-size: 2.2rem; margin-bottom: .4rem; }
.page .lead { color: var(--muted); margin-bottom: 1.5rem; }
.panel {
  background: rgba(21, 16, 39, .85); border: 1px solid #2a2150; border-radius: 14px;
  padding: 1.3rem 1.5rem; margin-bottom: 1.2rem; line-height: 1.7;
}
.panel h2 { font-family: "Cinzel", serif; font-size: 1.2rem; color: var(--cyan); margin-bottom: .5rem; }
.panel p, .panel li { color: #d6d1f0; }
.panel ul { padding-left: 1.3rem; }
.panel a { color: var(--cyan); }
.panel code { background: #241b45; color: var(--gold); padding: .1rem .5rem; border-radius: 6px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-top: .8rem; }
.stat { background: #120d24; border: 1px solid #2a2150; border-radius: 10px; padding: .9rem 1rem; }
.stat small { color: var(--muted); display: block; font-size: .8rem; }
.stat b { font-size: 1.15rem; }
.muted { color: var(--muted); }

/* Custom rank icons */
.ico { width: 84px; height: 84px; filter: drop-shadow(0 0 12px var(--glow, #8b5cf6)); }
.art.big .ico { width: 150px; height: 150px; }
.inc-icon .ico { width: 38px; height: 38px; filter: drop-shadow(0 0 8px var(--glow, #8b5cf6)); }
.pair { display: flex; align-items: center; justify-content: center; gap: .3rem; color: var(--muted); font-weight: 700; }
.pair .ico { width: 40px; height: 40px; filter: none; }

/* Server address: permanently blurred */
.ip-blur { filter: blur(20px); user-select: none; pointer-events: none; }

/* Original sharp background; purple gradient shows only while it loads */
body::before {
  background:
    linear-gradient(rgba(11, 8, 22, .78), rgba(11, 8, 22, .9)),
    url("assets/Mystic_Horizon__Neon_Fantasy_Realm.png") center / cover no-repeat,
    radial-gradient(circle at 50% 20%, #2a1b5e, #0b0816 70%);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #0b0816; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--purple), var(--cyan));
  border-radius: 99px; border: 3px solid #0b0816;
}
::-webkit-scrollbar-thumb:hover { filter: brightness(1.25); }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: #8b5cf6 #0b0816; scrollbar-width: thin; }
}

/* Discord login */
.actions { align-items: center; }
.btn-discord { background: #5865f2; color: #fff; }
.user-chip {
  display: flex; align-items: center; gap: .4rem; padding: .15rem;
  background: rgba(21, 16, 39, .85); border: 1px solid #2a2150; border-radius: 99px;
}
.user-chip img { width: 24px; height: 24px; border-radius: 50%; }
.user-chip span { font-size: .8rem; font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip button, .user-chip a {
  background: #1d1636; color: var(--muted); border: 0; border-radius: 99px; text-decoration: none;
  padding: .2rem .55rem; cursor: pointer; font: 600 .7rem "Inter", sans-serif;
}
.user-chip button:hover, .user-chip a:hover { color: var(--fg); }

/* Login window */
.auth-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); display: grid; place-items: center; z-index: 60; }
.auth-box {
  position: relative; width: min(360px, 92vw); display: flex; flex-direction: column; gap: .7rem;
  background: var(--card); border: 1px solid #2a2150; border-radius: 16px; padding: 1.5rem;
}
.auth-box h3 { font-family: "Cinzel", serif; font-size: 1.3rem; }
.auth-box p { color: var(--muted); font-size: .9rem; margin-bottom: .3rem; }
.auth-box .x { position: absolute; top: .5rem; right: .8rem; background: none; border: 0; color: var(--fg); font-size: 1.6rem; cursor: pointer; }
.auth-provider {
  display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-radius: 10px;
  border: 1px solid #2a2150; background: #1d1636; color: var(--fg); text-decoration: none; cursor: pointer;
  font: 600 .95rem "Inter", sans-serif;
}
.auth-provider.discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.auth-provider:disabled { opacity: .5; cursor: not-allowed; }
.auth-provider small { font-weight: 400; color: var(--muted); }
