:root {
  color-scheme: dark;
  --bg: #050810;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(10, 15, 28, 0.9);
  --line: rgba(148, 163, 184, 0.14);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #64748b;
  --cyan: #22d3ee;
  --emerald: #34d399;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.13), transparent 34rem),
    radial-gradient(circle at 80% 20%, rgba(52, 211, 153, 0.09), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
}

.brand,
nav,
.actions,
.split {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--soft);
  margin-top: 2px;
}

nav {
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

nav a:hover {
  color: var(--text);
}

.nav-login {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 8px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.1);
}

button.nav-login {
  font-size: 14px;
}

.hero {
  min-height: 640px;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 660px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 800;
}

.actions {
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.button.primary {
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.34);
  color: #a5f3fc;
}

.button.secondary {
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
}

.button.full {
  width: 100%;
  margin-top: 20px;
}

.button.inline-space {
  margin-top: 18px;
}

.status-panel,
.download-card,
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
}

.status-panel {
  padding: 26px;
}

.status-panel strong,
.download-card strong {
  display: block;
  font-size: 22px;
}

.status-panel p,
.download-card span,
.card p,
.section p,
.community p {
  color: var(--muted);
  line-height: 1.6;
}

.pulse {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--emerald);
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.7);
  margin-bottom: 18px;
}

.panel-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 18px;
}

.section {
  padding: 72px 0;
}

.page-hero {
  padding: 92px 0 42px;
}

.page-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.page-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 22px;
}

h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card {
  min-height: 168px;
  padding: 20px;
}

.card span {
  color: var(--cyan);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.card h3 {
  margin: 14px 0 8px;
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-item {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 22px;
}

.detail-item span {
  color: var(--cyan);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.detail-item h2,
.detail-item h3 {
  margin: 12px 0 8px;
}

.detail-item p,
.detail-item li,
.markdown {
  color: var(--muted);
  line-height: 1.65;
}

.markdown h3,
.markdown h4,
.markdown h5 {
  color: var(--text);
  margin: 18px 0 8px;
}

.markdown p {
  margin: 0 0 12px;
}

.compact-markdown {
  max-height: 156px;
  overflow: hidden;
}

.compact-markdown h3,
.compact-markdown h4,
.compact-markdown h5 {
  font-size: 16px;
  margin: 10px 0 6px;
}

.compact-markdown p,
.compact-markdown li {
  font-size: 14px;
}

.compact-markdown ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.markdown a {
  color: #a5f3fc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.markdown code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  padding: 2px 5px;
}

.news-image,
.markdown img {
  display: block;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 16px 0;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(14px);
}

.auth-dialog {
  width: min(460px, 100%);
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #08111f;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--muted);
  font-size: 20px;
}

.auth-providers,
.auth-tabs,
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-providers {
  margin: 18px 0;
}

.auth-providers button,
.auth-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--text);
}

.auth-tabs {
  flex-direction: row;
  margin-bottom: 14px;
}

.auth-tabs button {
  flex: 1;
  color: var(--muted);
}

.auth-tabs button.active {
  border-color: rgba(34, 211, 238, 0.34);
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.1);
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050810;
  color: var(--text);
  padding: 10px 12px;
}

.auth-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-status.error {
  color: #fca5a5;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.account-grid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.5);
  padding: 14px;
}

.account-grid strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.account-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.split {
  justify-content: space-between;
  gap: 48px;
}

.download-card {
  width: 320px;
  padding: 22px;
}

.community {
  margin-top: 40px;
  padding: 56px 0;
  background: var(--panel-strong);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.footer {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--soft);
  font-size: 13px;
}

@media (max-width: 860px) {
  .topbar,
  .split,
  .hero-grid,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    height: auto;
    padding: 16px 0;
    gap: 14px;
  }

  nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero {
    min-height: auto;
    padding: 80px 0 40px;
  }

  .hero-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .download-card {
    width: 100%;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }
}

/* Account dashboard */
.account-dashboard {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.account-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.account-card-header span:first-child {
  color: var(--cyan);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.account-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
  border: 1px solid var(--line);
}

.role-badge.admin {
  background: rgba(34, 211, 238, 0.14);
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, 0.34);
}

.account-field label {
  display: block;
  color: var(--soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.account-field p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  word-break: break-word;
}

.permission-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.perm-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  border: 1px solid var(--line);
}

.perm-badge.active {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.3);
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--text);
}

.game-item::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.empty-text {
  color: var(--soft);
  font-size: 14px;
  margin: 0;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.settings-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050810;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
}

.settings-form .button {
  margin-top: 4px;
}

.account-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 860px) {
  .account-cards {
    grid-template-columns: 1fr;
  }
}
