:root {
  color-scheme: dark;
  font-family: "Segoe UI", "Inter", system-ui, sans-serif;
  --sky: #2b1b16;
  --glow: #67f5ff;
  --sunrise: #ff9a5c;
  --sunrise-strong: #ff7a3c;
  --emerald: #1fe0c5;
  --brass: #d6a156;
  --ink: #120906;
  --mist: rgba(255, 255, 255, 0.8);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(circle at top, rgba(95, 58, 44, 0.85) 0%, rgba(43, 27, 22, 0.9) 45%, #0b0705 100%),
    url("assets/bg/literealm.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1.5rem;
  color: white;
}

.scene {
  max-width: 1000px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.game {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 15%, #88d9ff 0%, #5aa7db 35%, #2a4f7a 70%, #0a1626 100%);
}

.game__world {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 50%),
    radial-gradient(circle at 60% 60%, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, rgba(20, 45, 75, 0.5) 0%, rgba(5, 10, 20, 0.9) 70%);
  background-repeat: no-repeat;
  background-size: 160% 160%;
}

.game canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.panel {
  background: rgba(24, 16, 12, 0.88);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(214, 161, 86, 0.35);
  backdrop-filter: blur(18px);
}

.panel__header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.panel__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.7rem;
  color: var(--brass);
  margin-bottom: 0.75rem;
}

.panel__subtitle {
  color: var(--mist);
  line-height: 1.5;
  margin-bottom: 2rem;
}

.panel__form {
  display: grid;
  gap: 1.2rem;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.field {
  display: grid;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.field input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: white;
  font-size: 1rem;
}

.field input:focus {
  outline: none;
  border-color: var(--glow);
  box-shadow: 0 0 0 3px rgba(125, 249, 255, 0.2);
}

.cta {
  background: linear-gradient(120deg, var(--sunrise), var(--emerald));
  border: none;
  color: #0b0b1d;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.95rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 154, 92, 0.45);
}

.cta--ghost {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

.cta--ghost:hover {
  box-shadow: 0 8px 18px rgba(103, 245, 255, 0.3);
}

.is-hidden {
  display: none;
}

.status {
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: var(--glow);
}

.panel__footer {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.chat {
  display: grid;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem 0.75rem;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(35, 22, 16, 0.92), rgba(12, 8, 6, 0.92));
  border: 1px solid rgba(255, 210, 150, 0.35);
  width: min(420px, 92vw);
}

.chat--overlay {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.chat__title {
  padding: 0.3rem 0.75rem 0.25rem;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #6f4a1f 0%, #2a1809 100%);
  border: 1px solid rgba(255, 210, 150, 0.55);
  border-bottom: none;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: #f7dfb2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.chat__logout {
  padding: 0.35rem 0.8rem;
  font-size: 0.7rem;
}

.chat__log {
  min-height: 140px;
  height: 200px;
  overflow-y: auto;
  padding: 0.45rem 0.5rem 0.55rem;
  border-radius: 4px;
  background: rgba(10, 7, 6, 0.75);
  border: 1px solid rgba(255, 210, 150, 0.15);
  display: grid;
  gap: 0.55rem;
  font-size: 0.82rem;
}

.chat__message {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 1.2rem;
  line-height: 1.2rem;
}

.chat__status {
  min-height: 1rem;
  font-size: 0.75rem;
  color: rgba(255, 210, 160, 0.6);
}

.chat__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

.chat__input {
  background: rgba(6, 4, 3, 0.85);
  border: 1px solid rgba(255, 210, 150, 0.25);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  color: rgba(255, 245, 225, 0.95);
  font-size: 0.85rem;
}

.chat__input:focus {
  outline: none;
  border-color: rgba(255, 210, 150, 0.6);
  box-shadow: 0 0 0 2px rgba(255, 210, 150, 0.2);
}

.chat__send {
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem;
}

.sigil {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  gap: 1.5rem;
}

.sigil__logo {
  width: min(320px, 80%);
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.5));
}

@media (max-width: 720px) {
  .panel {
    padding: 2rem;
  }

  .panel__header h1 {
    font-size: 1.8rem;
  }
}
