:root {
  --bg-dark: #14110d;
  --bg-deep: #0c0907;
  --bg-panel: linear-gradient(180deg, rgba(64, 58, 48, 0.96), rgba(28, 24, 20, 0.97));
  --bg-panel-soft: linear-gradient(180deg, rgba(55, 48, 40, 0.94), rgba(21, 18, 15, 0.96));
  --bg-panel-strong: linear-gradient(180deg, rgba(22, 18, 15, 0.96), rgba(10, 8, 6, 0.98));
  --border-metal: #736754;
  --border-bright: #b49b67;
  --line: rgba(180, 155, 103, 0.22);
  --line-strong: rgba(180, 155, 103, 0.74);
  --text: #ebe0c8;
  --muted: #aea188;
  --accent: #b69252;
  --accent-soft: rgba(182, 146, 82, 0.14);
  --success: #7a805a;
  --error: #b36552;
  --shadow: rgba(0, 0, 0, 0.58);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: Verdana, Geneva, sans-serif;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(174, 132, 62, 0.08), transparent 36%),
    radial-gradient(circle at bottom, rgba(88, 69, 45, 0.14), transparent 34%),
    linear-gradient(180deg, #29231d, #0c0907 74%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at top left, rgba(214, 176, 103, 0.07), transparent 24%),
    radial-gradient(circle at top right, rgba(122, 128, 90, 0.05), transparent 20%);
  opacity: 0.7;
}

a,
button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.member-card,
.game-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 18px rgba(0, 0, 0, 0.32);
}

.hero {
  margin-bottom: 18px;
}

.panel {
  padding: 26px;
  border: 1px solid rgba(180, 155, 103, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(20, 17, 14, 0.94), rgba(11, 9, 7, 0.97)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 30px rgba(0, 0, 0, 0.35);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
  align-items: stretch;
  padding: 28px 30px;
}

.hero-copy {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  padding: 0;
  border-radius: 20px;
  border: 1px solid rgba(180, 155, 103, 0.16);
  background: var(--bg-panel-strong);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-kicker,
.game-kicker,
.member-label {
  margin: 0 0 10px;
  color: #d6b68c;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
}

.content-grid {
  display: block;
}

.hero-auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 8px 0 8px 18px;
  border-left: 1px solid rgba(180, 155, 103, 0.12);
}

.hero-auth-panel .panel-header {
  margin-bottom: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.panel-header h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.panel-note {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  text-align: right;
}

.tab-row {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(180, 155, 103, 0.14);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

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

.field span {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(180, 155, 103, 0.24);
  background: linear-gradient(180deg, rgba(41, 34, 28, 0.94), rgba(24, 20, 17, 0.98));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.field input:focus {
  outline: 0;
  border-color: var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 2px rgba(180, 155, 103, 0.16);
}

.primary-action,
.secondary-action,
.game-button,
.tab-button {
  appearance: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid rgba(168, 145, 97, 0.35);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-weight: bold;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  background:
    linear-gradient(180deg, rgba(120, 101, 72, 0.96), rgba(57, 46, 35, 0.99)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 2px, transparent 2px, transparent 5px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 7px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.08s ease, border-color 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.secondary-action {
  background: linear-gradient(180deg, rgba(90, 79, 67, 0.96), rgba(43, 37, 31, 0.99));
}

.primary-action:hover,
.secondary-action:hover,
.game-button:hover,
.tab-button:hover {
  transform: translateY(-1px);
  border-color: rgba(180, 155, 103, 0.82);
  filter: brightness(1.03);
}

.primary-action:active,
.secondary-action:active,
.game-button:active,
.tab-button:active {
  transform: translateY(1px);
}

.primary-action:focus-visible,
.secondary-action:focus-visible,
.game-button:focus-visible,
.tab-button:focus-visible,
.field input:focus-visible {
  outline: 0;
  border-color: rgba(180, 155, 103, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 2px rgba(182, 146, 82, 0.16);
}

.tab-button {
  min-height: 44px;
  border-radius: 999px;
  padding: 10px 14px;
}

.tab-button.active {
  border-color: rgba(182, 146, 82, 0.82);
  color: #fff4dd;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 16px rgba(182, 146, 82, 0.12);
}

.message-box,
.return-notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  line-height: 1.55;
  border: 1px solid rgba(180, 155, 103, 0.18);
  background: linear-gradient(180deg, rgba(42, 35, 29, 0.92), rgba(24, 20, 17, 0.96));
}

.message-box.success {
  border-color: rgba(122, 128, 90, 0.42);
  background: linear-gradient(180deg, rgba(53, 57, 39, 0.92), rgba(27, 30, 20, 0.96));
}

.message-box.error {
  border-color: rgba(179, 101, 82, 0.42);
  background: linear-gradient(180deg, rgba(69, 40, 31, 0.94), rgba(31, 17, 14, 0.96));
}

.return-notice {
  color: #f5dfc7;
}

.member-card {
  padding: 18px;
}

.member-card h3 {
  margin: 0;
  font-size: 26px;
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.account-editor {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(180, 155, 103, 0.14);
}

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

.game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.14s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(180, 155, 103, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 26px rgba(0, 0, 0, 0.4);
}

.game-frame {
  padding: 14px 14px 0;
}

.game-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(180, 155, 103, 0.18);
  background: var(--bg-panel-strong);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.3);
}

.game-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 18px;
}

.game-kicker {
  margin: 0;
}

.game-content .game-kicker {
  color: #d6b68c;
}

.game-content h3 {
  margin: 0;
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.game-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.game-content .game-button {
  width: 100%;
  margin-top: auto;
}

.game-button.disabled {
  color: var(--muted);
  cursor: not-allowed;
  background: linear-gradient(180deg, rgba(84, 74, 62, 0.76), rgba(41, 34, 28, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 10px rgba(0, 0, 0, 0.2);
}

.game-button.disabled:hover {
  transform: none;
  filter: none;
  border-color: rgba(168, 145, 97, 0.35);
}

@media (max-width: 1120px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-auth-panel {
    padding: 18px 0 0;
    border-top: 1px solid rgba(180, 155, 103, 0.12);
    border-left: 0;
  }

  .panel-note {
    text-align: left;
  }

  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hero-copy {
    min-height: 320px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 1240px);
  }

  .panel {
    border-radius: 18px;
  }

  .panel {
    padding: 20px;
  }

  .hero-shell {
    padding: 20px;
  }

  .hero-copy {
    min-height: 300px;
  }

  .panel-header {
    flex-direction: column;
  }

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

  .tab-row {
    width: 100%;
  }

  .tab-button {
    flex: 1;
  }
}

@media (max-width: 540px) {
  .panel-header h2,
  .game-content h3 {
    font-size: 24px;
  }
}
