* { box-sizing: border-box; }

body.auth-page {
  margin: 0;
  min-height: 100vh;
  background: #080d16;
  color: #f4f6fb;
  font-family: Arial, sans-serif;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 55px;
  background:
    radial-gradient(ellipse at 65% 45%, #273b58 0%, transparent 48%),
    linear-gradient(135deg, #17263b, #080d16 75%);
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 45px 45px;
}

.game-brand, .character-thumbnail, .visual-footer {
  position: relative;
  z-index: 1;
}

.brand-kicker, .eyebrow {
  color: #d5ae62;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
}

.game-brand h1 {
  margin: 15px 0 8px;
  font-size: clamp(38px, 5vw, 72px);
  line-height: .98;
  letter-spacing: -3px;
}

.game-brand h1 span { color: #d5ae62; }

.game-brand p {
  color: #aeb9c9;
  font-size: 11px;
  letter-spacing: 3px;
}

.character-thumbnail {
  position: absolute;
  left: 12%;
  right: 5%;
  top: 22%;
  bottom: 8%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.character-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 35px rgba(0,0,0,.55));
}

.visual-footer {
  color: #7f8da1;
  font-size: 10px;
  letter-spacing: 2px;
}

.auth-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 45px;
  background: #0b111d;
}

.auth-panel-inner { width: 100%; max-width: 390px; }

.auth-heading { margin-bottom: 28px; }
.auth-heading h2 { margin: 13px 0 8px; font-size: 34px; }
.auth-heading p { margin: 0; color: #8995a8; font-size: 13px; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  margin-bottom: 25px;
  border: 1px solid #202c3e;
  border-radius: 9px;
  background: #101a29;
}

.auth-tab {
  padding: 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8794a8;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.active { background: #d5ae62; color: #111722; }

.auth-form { display: flex; flex-direction: column; gap: 11px; }
.auth-form.hidden { display: none; }
.auth-form label { margin-top: 7px; color: #c4ccda; font-size: 12px; }

.auth-form input {
  width: 100%;
  padding: 15px;
  outline: none;
  border: 1px solid #29364a;
  border-radius: 7px;
  background: #101a29;
  color: white;
  font-size: 13px;
}

.auth-form input:focus {
  border-color: #d5ae62;
  box-shadow: 0 0 0 3px rgba(213,174,98,.1);
}

.auth-form input::placeholder { color: #657286; }

.auth-submit {
  margin-top: 15px;
  padding: 16px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(100deg, #e5c27d, #bd9147);
  color: #101722;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
  cursor: pointer;
}

.auth-submit:disabled { opacity: .6; cursor: wait; }

.auth-message {
  min-height: 20px;
  margin-top: 18px;
  color: #e4b7a8;
  font-size: 12px;
}

.auth-message.success { color: #8dd6a5; }

.auth-terms {
  margin-top: 28px;
  color: #657286;
  font-size: 10px;
  line-height: 1.7;
}

@media (max-width: 800px) {
  .auth-layout { display: block; }
  .auth-visual { min-height: 220px; height: 30vh; padding: 25px; }
  .game-brand h1 { font-size: 36px; }
  .game-brand p { font-size: 8px; }
  .character-thumbnail { left: 35%; top: 12%; bottom: 0; }
  .visual-footer { display: none; }
  .auth-panel { min-height: 70vh; padding: 35px 24px; align-items: flex-start; }
  .auth-heading h2 { font-size: 29px; }
}

.character-thumbnail {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 17%;
  bottom: 2%;
  overflow: hidden;
  pointer-events: none;
}

#character-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 800px) {
  .character-thumbnail {
    left: 38%;
    right: 0;
    top: 0;
    bottom: 0;
  }
}

.character-thumbnail {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 17%;
  bottom: 2%;
  overflow: hidden;
}

.character-thumbnail canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 800px) {
  .character-thumbnail {
    left: 38%;
    right: 0;
    top: 0;
    bottom: 0;
  }
}
