:root {
  color-scheme: dark;
  --bg: #06111d;
  --ink: #f7fbff;
  --muted: #c9d6e6;
  --panel: rgba(5, 12, 22, 0.88);
  --panel-strong: rgba(9, 21, 36, 0.94);
  --line: rgba(255, 255, 255, 0.18);
  --ice: #9bc4ff;
  --red: #ef3340;
  --gold: #ffca3a;
  --blue: #1a73e8;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg) url("/background-desktop.png") center center / cover no-repeat fixed;
}

button,
input,
.google-auth-button {
  font: inherit;
}

button {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: center;
  padding: 56px 0;
}

.intro {
  display: grid;
  gap: 18px;
  align-content: center;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
}

.game-badge {
  width: 96px;
  height: 58px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

.game-badge span {
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.game-badge span:first-child {
  background: linear-gradient(135deg, #c91424, #ff3847);
}

.game-badge span:last-child {
  color: #10151f;
  background: linear-gradient(135deg, #ffd65a, #d89800);
}

.eyebrow {
  margin: 0;
  color: var(--ice);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 0;
  font-size: 58px;
  line-height: 1.02;
  font-weight: 900;
}

h2 {
  margin-bottom: 8px;
  font-size: 26px;
  line-height: 1.2;
}

.lead {
  max-width: 590px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.status-strip {
  width: fit-content;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.status-strip span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #eef6ff;
  background: rgba(6, 17, 29, 0.68);
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 750;
}

.panel {
  min-height: 460px;
  padding: 30px;
  border: 1px solid rgba(155, 196, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel-heading {
  margin-bottom: 24px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
  padding: 5px;
  border: 1px solid rgba(155, 196, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 8, 16, 0.55);
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}

.auth-tab.active {
  color: #120b08;
  background: linear-gradient(135deg, var(--gold), #ff9f1c);
  box-shadow: 0 10px 22px rgba(255, 159, 28, 0.18);
}

.google-auth {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.google-auth-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #10151f;
  background: #f7fbff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.google-auth-button:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.google-auth-button.disabled {
  color: rgba(247, 251, 255, 0.72);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  cursor: not-allowed;
}

.google-auth-button.disabled:hover {
  transform: none;
}

.google-auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.panel-heading p,
.muted {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.google-step {
  min-height: 56px;
}

.google-button {
  min-height: 44px;
}

.game-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #eaf3ff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(155, 196, 255, 0.32);
  border-radius: 8px;
  outline: none;
  color: #f7fbff;
  background: rgba(3, 8, 16, 0.66);
}

.field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 202, 58, 0.2);
}

.field input[readonly] {
  color: #cbd8e8;
  background: rgba(255, 255, 255, 0.08);
}

.notice {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 202, 58, 0.45);
  border-radius: 8px;
  color: #ffe8a3;
  background: rgba(90, 60, 0, 0.44);
  line-height: 1.45;
}

.message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.primary-button {
  color: #120b08;
  background: linear-gradient(135deg, var(--gold), #ff9f1c);
  box-shadow: 0 12px 28px rgba(255, 159, 28, 0.22);
}

.primary-button:hover {
  background: linear-gradient(135deg, #ffe06f, #ffb342);
}

.secondary-button {
  margin-top: 12px;
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.12);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.dashboard-shell {
  width: min(1180px, calc(100% - 32px));
  grid-template-columns: 1fr;
  align-items: stretch;
  padding: 32px 0;
}

.dashboard-shell .intro {
  display: none;
}

.dashboard-shell .panel {
  min-height: calc(100vh - 64px);
  padding: 0;
  overflow: hidden;
}

.main-menu {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.side-menu {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  background: rgba(3, 8, 16, 0.44);
}

.side-menu-title {
  margin: 0;
  color: var(--ice);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.side-menu-items {
  min-height: 100%;
}

.main-menu-content {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  padding: 30px;
}

.main-menu-header {
  display: grid;
  gap: 8px;
}

.main-menu-header h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 38px;
  line-height: 1.1;
}

.news-feed {
  min-height: 360px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.news-feed-heading {
  display: grid;
  gap: 6px;
}

.news-feed-heading h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.news-feed-heading p {
  margin: 0;
  color: var(--muted);
}

.news-feed-empty {
  min-height: 220px;
  border: 1px dashed rgba(155, 196, 255, 0.34);
  border-radius: 8px;
  background: rgba(3, 8, 16, 0.32);
}

.main-menu-actions {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.main-menu-actions .secondary-button {
  width: auto;
  min-width: 132px;
  margin-top: 0;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  body {
    background: var(--bg) url("/background.png") center top / contain no-repeat fixed;
  }

  .shell {
    grid-template-columns: 1fr;
    gap: 28px;
    align-content: center;
    padding: 28px 0;
  }

  h1 {
    font-size: 42px;
  }

  .lead {
    font-size: 17px;
  }

  .dashboard-shell {
    align-content: stretch;
    padding: 18px 0;
  }

  .dashboard-shell .panel,
  .main-menu {
    min-height: calc(100vh - 36px);
  }

  .main-menu {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .main-menu-content {
    padding: 24px;
  }

  .main-menu-header h2 {
    font-size: 32px;
  }
}

@media (max-width: 460px) {
  body {
    background: var(--bg) url("/background.png") center top / contain no-repeat scroll;
  }

  .shell {
    width: min(100% - 22px, 1080px);
  }

  h1 {
    font-size: 34px;
  }

  .panel {
    padding: 22px;
  }

  .main-menu {
    grid-template-columns: 1fr;
  }

  .side-menu {
    min-height: 132px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main-menu-content {
    padding: 20px;
  }

  .main-menu-header h2 {
    font-size: 28px;
  }

  .news-feed {
    min-height: 300px;
  }
}
