:root {
  --bg: #e7eefb;
  --bg-soft: #f2f7ff;
  --text: #0f1c35;
  --muted: #3f5274;
  --line: rgba(28, 56, 102, 0.18);
  --accent: #6ea8ff;
  --accent-2: #73dfc8;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(1400px 800px at 80% -10%, rgba(96, 148, 255, .28) 0%, transparent 55%),
              radial-gradient(1200px 600px at -10% 100%, rgba(96, 219, 183, .20) 0%, transparent 50%),
              linear-gradient(180deg, #f7fbff 0%, var(--bg) 72%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: .28;
  pointer-events: none;
}

.bg-glow-1 {
  width: 320px; height: 320px;
  background: var(--accent);
  top: -80px; right: -80px;
}

.bg-glow-2 {
  width: 280px; height: 280px;
  background: var(--accent-2);
  bottom: -100px; left: -80px;
}

.container { width: min(1100px, 92vw); margin: 0 auto; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: .9rem;
}

.brand { font-weight: 800; letter-spacing: .4px; font-size: 1.05rem; color: #0f2b5b; }

.discord-chip {
  color: #2a3a58;
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.86);
  padding: .45rem .8rem;
  border-radius: 999px;
}

.hero {
  padding: 0 0 1.25rem;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kicker {
  color: #4c6fa8;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .78rem;
  margin: 2.4rem 0 1rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5.2vw, 3.8rem);
  line-height: 1.05;
}

h1 span {
  background: linear-gradient(90deg, #5d8ff0, #2ed5b9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
  margin-top: .75rem;
}

.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }

.btn {
  text-decoration: none;
  font-weight: 700;
  padding: .8rem 1.1rem;
  border-radius: .8rem;
  border: 1px solid transparent;
}

.btn-primary {
  color: #051021;
  background: linear-gradient(90deg, #8fb8ff, #7dffe1);
}

.btn-secondary {
  color: #2b3f65;
  border-color: var(--line);
  background: rgba(255,255,255,.6);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: .85rem;
  padding: .35rem 0 1.4rem;
}

@media (min-width: 980px) {
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(238,246,255,.92));
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.1rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 28px rgba(38, 67, 120, .10);
}

.card-highlight { border-color: rgba(125, 255, 225, .45); }

.card-label {
  margin: 0;
  font-size: .84rem;
  color: #4a6da5;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.card-value {
  margin: .5rem 0 .2rem;
  font-size: 1.9rem;
  font-weight: 800;
}


.card-text { color: var(--muted); margin: .5rem 0 0; }

.footer {
  padding: 1rem 0 1.8rem;
  color: #60708f;
  font-size: .9rem;
}

.top-links {
  display: flex;
  gap: .5rem;
}

.hero-rules {
  min-height: auto;
  padding-bottom: 1rem;
}

.rules-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  padding-bottom: 2rem;
}

.rules-list {
  margin: .6rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.rules-list li {
  margin-bottom: .45rem;
}

.rules-layout-single {
  grid-template-columns: minmax(280px, 900px);
}

.rules-prose h2 {
  margin: 0 0 .55rem;
  font-size: 1.2rem;
  color: #dce7ff;
}

.rules-prose p {
  margin: 0 0 .8rem;
  color: var(--muted);
  line-height: 1.55;
}


.card-label-ip {
  margin-top: 1rem;
}

.server-ip {
  margin: .45rem 0 .2rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #9fd4ff;
  letter-spacing: .02em;
}

.rules-accordion {
  display: grid;
  gap: .75rem;
  padding-bottom: 2rem;
}

.rule-item {
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(244,248,255,.9));
  overflow: clip;
}

.rule-item summary {
  list-style: none;
  cursor: pointer;
  padding: .95rem 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rule-item summary::-webkit-details-marker {
  display: none;
}

.rule-item summary::after {
  content: '▾';
  font-size: .95rem;
  color: #2b3f65;
  transition: transform .28s ease;
}

.rule-item[open] summary::after {
  transform: rotate(180deg);
}

.rule-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease;
}

.rule-item[open] .rule-content {
  grid-template-rows: 1fr;
}

.rule-content-inner {
  overflow: hidden;
  border-top: 1px solid rgba(28,56,102,.14);
  padding: 0 1rem;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .35s ease, transform .35s ease, padding .35s ease;
}

.rule-item[open] .rule-content-inner {
  opacity: 1;
  transform: translateY(0);
  padding: .85rem 1rem 1rem;
}

.rule-item-static h2 {
  margin: 0;
  padding: .95rem 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(28,56,102,.14);
}

.rule-content-static {
  grid-template-rows: 1fr;
}

.rule-content-inner-static {
  opacity: 1;
  transform: none;
  padding: .85rem 1rem 1rem;
  border-top: 0;
}

:root[data-theme='dark'] {
  --bg: #070b14;
  --bg-soft: #0d1424;
  --text: #f5f7ff;
  --muted: #a9b2c7;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #6ea8ff;
  --accent-2: #7bffd3;
}

:root[data-theme='dark'] body {
  background: radial-gradient(1400px 800px at 80% -10%, #21335f 0%, transparent 55%),
              radial-gradient(1200px 600px at -10% 100%, #16382d 0%, transparent 50%),
              linear-gradient(180deg, #0c1324 0%, var(--bg) 70%);
}

.theme-toggle {
  cursor: pointer;
  font: inherit;
}

:root[data-theme='dark'] .discord-chip {
  color: #dbe7ff;
  background: rgba(255,255,255,.04);
}

:root[data-theme='dark'] h1 span { background: linear-gradient(90deg, #9ec1ff, #86ffe4); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme='dark'] .kicker { color: #9db6ff; }
:root[data-theme='dark'] .btn-secondary { color: #dbe5fb; background: rgba(255,255,255,.03); }
:root[data-theme='dark'] .card { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); }
:root[data-theme='dark'] .card-label { color: #a8c3ff; }
:root[data-theme='dark'] .footer { color: #7d89a4; }
:root[data-theme='dark'] .server-ip { color: #9fd4ff; }
:root[data-theme='dark'] .rule-item { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); }
:root[data-theme='dark'] .rule-item summary::after { color: #dbe5fb; }
:root[data-theme='dark'] .rule-content-inner,
:root[data-theme='dark'] .rule-item-static h2 { border-color: rgba(255,255,255,.08); }


.login-form {
  display: grid;
  gap: .55rem;
  margin-top: .55rem;
}

.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: .65rem;
  padding: .65rem .75rem;
  font: inherit;
  background: rgba(255,255,255,.65);
  color: var(--text);
}

.btn {
  cursor: pointer;
}

:root[data-theme='dark'] .input {
  background: rgba(255,255,255,.04);
}


.status-bad {
  color: #b23b3b;
}

:root[data-theme='dark'] .status-bad {
  color: #ff9b9b;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.86);
  color: #2a3a58;
  border-radius: 999px;
  padding: .35rem .7rem;
  font-weight: 600;
}

.account-chip-avatar {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(110, 168, 255, .24);
  font-size: .8rem;
}

.profile-card {
  grid-column: 1 / -1;
}

.profile-hello {
  margin: .5rem 0;
  font-size: 1.45rem;
}

.profile-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: .35rem;
}

.profile-list span {
  font-weight: 500;
}

:root[data-theme='dark'] .account-chip {
  color: #dbe7ff;
  background: rgba(255,255,255,.04);
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    gap: .6rem;
    flex-direction: column;
  }

  .top-links {
    flex-wrap: wrap;
  }
}

.auth-tabs-card {
  grid-column: 1 / -1;
}

.auth-tabs {
  margin-top: .65rem;
  display: inline-flex;
  gap: .45rem;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.65);
}

.auth-tab-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: .45rem .85rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.auth-tab-btn.is-active {
  color: #0f1c35;
  background: linear-gradient(90deg, #8fb8ff, #7dffe1);
}

.tab-panel {
  grid-column: 1 / -1;
}

:root[data-theme='dark'] .auth-tabs {
  background: rgba(255,255,255,.03);
}

:root[data-theme='dark'] .auth-tab-btn.is-active {
  color: #081526;
}


.single-column-grid {
  grid-template-columns: minmax(280px, 700px);
}

.top-links .account-chip {
  margin-left: auto;
}

.auth-entry-link {
  margin-left: auto;
}

.auth-entry-link.account-link {
  font-weight: 700;
  color: #2a3a58;
}

:root[data-theme='dark'] .auth-entry-link.account-link {
  color: #dbe7ff;
}

.auth-user-menu {
  position: relative;
  margin-left: auto;
}

.auth-user-button {
  cursor: pointer;
  font: inherit;
}

.auth-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + .4rem);
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 28px rgba(38, 67, 120, .2);
  padding: .35rem;
  display: grid;
  gap: .25rem;
  z-index: 20;
}

.auth-user-item {
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--text);
  text-decoration: none;
  padding: .45rem .55rem;
  border-radius: .55rem;
  font: inherit;
  cursor: pointer;
}

.auth-user-item:hover {
  background: rgba(110, 168, 255, .18);
}

:root[data-theme='dark'] .auth-user-dropdown {
  background: #111a2e;
}

.auth-user-button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.auth-user-avatar {
  width: 20px;
  height: 20px;
  border-radius: .35rem;
  image-rendering: pixelated;
}
