:root {
  --bg: #edf4ee;
  --bg-deep: #0f2a22;
  --panel: rgba(10, 26, 22, 0.84);
  --panel-soft: rgba(255, 255, 255, 0.9);
  --ink: #f6fff9;
  --ink-dark: #163528;
  --muted: rgba(236, 247, 241, 0.72);
  --green: #28a55f;
  --green-deep: #19713f;
  --blue: #2c7be5;
  --yellow: #e9b51b;
  --purple: #7d59d8;
  --orange: #df6a36;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  --radius: 24px;
  --neon: #89ff42;
  --neon-soft: rgba(137, 255, 66, 0.22);
  --panel-line: rgba(150, 255, 170, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(40, 165, 95, 0.16), transparent 24%),
    radial-gradient(circle at bottom right, rgba(233, 181, 27, 0.14), transparent 26%),
    linear-gradient(180deg, #123328 0%, #0d241d 45%, #081611 100%);
}

button,
input,
textarea {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 44px);
  overflow: hidden;
}

.page-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 18, 15, 0.88) 0%, rgba(7, 30, 24, 0.72) 42%, rgba(13, 56, 42, 0.38) 100%),
    linear-gradient(160deg, rgba(44, 123, 229, 0.2), transparent 46%);
  transform: scale(1.02);
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 18px);
  opacity: 0.28;
  pointer-events: none;
  animation: gridDrift 16s linear infinite;
}

.login-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(360px, 0.9fr);
  gap: clamp(20px, 4vw, 34px);
  width: min(1320px, 100%);
  min-height: 620px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(135deg, rgba(9, 27, 22, 0.96), rgba(5, 17, 15, 0.92)),
    rgba(7, 19, 16, 0.9);
  border: 1px solid rgba(178, 255, 199, 0.24);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(14px);
  overflow: hidden;
  animation: panelRise 560ms ease both;
}

.login-card::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -18%;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(137, 255, 66, 0.18), transparent 64%);
  pointer-events: none;
}

.role-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: min(360px, 100%);
  margin: 4px 0 18px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.role-tab {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  color: rgba(246, 255, 249, 0.78);
  font-weight: 900;
  cursor: pointer;
  background: transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.role-tab.active {
  color: #102018;
  background: linear-gradient(135deg, #d8f9a1, #39e879);
  box-shadow: 0 10px 26px rgba(137, 255, 66, 0.2);
}

.role-tab:hover {
  transform: translateY(-1px);
}

.access-form {
  display: grid;
  gap: 10px;
}

.access-form + .access-form {
  margin-top: 12px;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 5px solid #8de86f;
  background:
    linear-gradient(120deg, rgba(149, 219, 169, 0.16), transparent 34%),
    linear-gradient(280deg, rgba(233, 181, 27, 0.16), transparent 38%);
  pointer-events: none;
  animation: softSweep 5.5s ease-in-out infinite alternate;
}

.login-copy,
.login-visual {
  position: relative;
  z-index: 1;
}

.login-copy {
  align-self: center;
}

.login-card h1 {
  margin: 12px 0 12px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.6rem, 6.6vw, 4.35rem);
  line-height: 1.04;
  max-width: 11ch;
  text-wrap: balance;
}

.login-card p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 700;
}

.mission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 22px;
}

.mission-tags span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #0f261e;
  font-size: 0.82rem;
  font-weight: 900;
  background: #d8f9a1;
  box-shadow: 0 10px 24px rgba(17, 112, 55, 0.24);
}

.mission-tags span:nth-child(2) {
  background: #ffd76a;
}

.mission-tags span:nth-child(3) {
  color: white;
  background: #2c7be5;
}

.raee-intro {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.raee-intro article {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(216, 249, 161, 0.16);
}

.raee-intro h2 {
  margin: 0 0 8px;
  color: #d8f9a1;
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
  line-height: 1.2;
}

.raee-intro p {
  margin: 0 0 8px;
  color: rgba(236, 247, 241, 0.82);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.45;
}

.raee-intro ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(236, 247, 241, 0.78);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.raee-intro li {
  margin-bottom: 5px;
}

.raee-intro li:last-child {
  margin-bottom: 0;
}

.raee-intro strong {
  color: #ffd76a;
}

.login-card label {
  display: block;
  margin-top: 4px;
  margin-bottom: 0;
  font-weight: 800;
  color: #ffffff;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #28a55f;
  box-shadow: 0 0 0 6px rgba(40, 165, 95, 0.14);
  transform: translateY(-50%);
  pointer-events: none;
}

.login-card input {
  width: 100%;
  border: 2px solid rgba(149, 219, 169, 0.58);
  border-radius: 18px;
  padding: 17px 18px 17px 44px;
  color: var(--ink-dark);
  background: rgba(255, 255, 255, 0.95);
  outline: none;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.22),
    0 0 0 5px rgba(149, 219, 169, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.access-form input {
  margin-bottom: 4px;
}

.login-card input:focus {
  border-color: #d8f9a1;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.28),
    0 0 0 6px rgba(216, 249, 161, 0.18);
  transform: translateY(-1px);
}

.player-error {
  min-height: 22px;
  margin: 8px 0 14px;
  color: #ffd6c9;
  font-weight: 700;
}

.login-button {
  width: 100%;
  min-height: 56px;
  margin-top: 6px;
  color: #092016;
  background:
    linear-gradient(135deg, #d8ff45 0%, #31e878 50%, #12ad67 100%);
  box-shadow:
    0 18px 36px rgba(37, 191, 111, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.24) inset;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-button:hover {
  filter: saturate(1.08);
  transform: translateY(-2px);
  box-shadow:
    0 22px 42px rgba(37, 191, 111, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.28) inset;
}

.login-visual {
  aspect-ratio: 3 / 2;
  min-height: 0;
  align-self: center;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    #0a2018;
  border: 1px solid rgba(216, 249, 161, 0.26);
  overflow: hidden;
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  animation: visualFloat 5.2s ease-in-out infinite;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 18, 15, 0.1), rgba(5, 18, 15, 0.24));
  pointer-events: none;
  z-index: 2;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
  z-index: 3;
  animation: focusPulse 2.8s ease-in-out infinite;
}

.mission-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  border-radius: 999px;
  padding: 10px 14px;
  color: #102018;
  font-weight: 900;
  background: #ffd76a;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
  animation: badgeBounce 2.4s ease-in-out infinite;
}

.login-feature-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  animation: scenePan 12s ease-in-out infinite alternate;
  background: rgba(2, 18, 15, 0.9);
}

@keyframes panelRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gridDrift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 180px 180px;
  }
}

@keyframes softSweep {
  from {
    opacity: 0.72;
    transform: translateX(-1.5%);
  }
  to {
    opacity: 1;
    transform: translateX(1.5%);
  }
}

@keyframes visualFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes focusPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(216, 249, 161, 0);
  }
  50% {
    box-shadow: 0 0 28px rgba(216, 249, 161, 0.24);
  }
}

@keyframes badgeBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes scenePan {
  from {
    transform: scale(1.04) translateX(-1%);
  }
  to {
    transform: scale(1.09) translateX(1%);
  }
}

@property --spin-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes borderSpin {
  to {
    --spin-angle: 360deg;
  }
}

@keyframes buttonGlow {
  0%,
  100% {
    transform: translateY(0);
    box-shadow:
      0 18px 38px rgba(40, 165, 95, 0.28),
      0 0 0 2px rgba(216, 249, 161, 0.18) inset;
  }
  50% {
    transform: translateY(-2px);
    box-shadow:
      0 24px 54px rgba(33, 183, 232, 0.34),
      0 0 0 2px rgba(216, 249, 161, 0.32) inset;
  }
}

@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes cardShine {
  0%,
  70% {
    transform: translateX(-65%);
    opacity: 0;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateX(65%);
    opacity: 0;
  }
}

.app-shell {
  position: relative;
  width: min(1440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 26px;
  overflow: hidden;
}

.app-shell > :not(.page-video) {
  position: relative;
  z-index: 1;
}

.app-video {
  position: fixed;
  opacity: 0.32;
  filter: saturate(1.08) brightness(0.74);
}

.hud-panel {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  min-height: 190px;
  padding: 24px 28px;
  background:
    linear-gradient(90deg, rgba(6, 27, 22, 0.98) 0%, rgba(6, 27, 22, 0.76) 44%, rgba(6, 27, 22, 0.35) 100%),
    url("assets/media/cuida_planeta_nuevo_ciclo.png") center top / cover,
    linear-gradient(135deg, rgba(20, 68, 48, 0.96), rgba(8, 27, 21, 0.92)),
    var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.kicker,
.label {
  display: inline-flex;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #95dba9;
}

.hero-panel h1,
.info-panel h2 {
  margin: 10px 0 12px;
  font-family: "Manrope", sans-serif;
}

.hero-panel h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.04;
}

.hero-panel p,
.info-panel p,
.compact-panel small,
.hero-note,
.step-list {
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: grid;
  gap: 12px;
  justify-items: start;
  min-width: 280px;
}

.teacher-panel {
  display: grid;
  grid-template-columns: 170px minmax(310px, 0.38fr) minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
  min-height: 560px;
}

.teacher-card,
.results-table-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 100%, rgba(149, 219, 169, 0.16), transparent 45%),
    linear-gradient(rgba(5, 29, 22, 0.93), rgba(4, 18, 15, 0.94)) padding-box,
    conic-gradient(from var(--spin-angle), rgba(216, 249, 161, 0.85), rgba(33, 183, 232, 0.38), rgba(255, 215, 106, 0.68), rgba(216, 249, 161, 0.85)) border-box;
  border: 2px solid transparent;
  animation: borderSpin 7s linear infinite;
}

.teacher-card::after,
.results-table-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background:
    radial-gradient(circle at 20% 80%, rgba(216, 249, 161, 0.18), transparent 34%),
    linear-gradient(90deg, transparent, rgba(40, 165, 95, 0.12), transparent);
  pointer-events: none;
}

.teacher-card strong {
  display: block;
  margin: 10px 0;
  color: #ffd76a;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: 0.08em;
}

.teacher-card p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.teacher-live-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.teacher-live-stats div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(149, 219, 169, 0.2);
}

.teacher-live-stats span,
.teacher-live-stats small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.teacher-live-stats strong {
  margin: 4px 0 0;
  color: #d8f9a1;
  font-size: 1.55rem;
  letter-spacing: 0;
}

.teacher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.results-table-card {
  overflow-x: auto;
}

.teacher-table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.teacher-table-title strong {
  color: white;
  font-family: "Manrope", sans-serif;
  font-size: 1.25rem;
}

.results-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0 8px;
  margin-top: 14px;
  color: white;
}

.results-table th,
.results-table td {
  padding: 13px 12px;
  border-bottom: none;
  text-align: left;
}

.results-table th {
  color: #95dba9;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.results-table tbody tr {
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 0 1px rgba(149, 219, 169, 0.09) inset;
}

.results-table tbody td:first-child {
  border-radius: 16px 0 0 16px;
  font-weight: 900;
}

.results-table tbody td:last-child {
  border-radius: 0 16px 16px 0;
  color: #ffd76a;
}

.student-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  border-radius: 50%;
  color: #092016;
  background: linear-gradient(135deg, #d8f9a1, #21b7e8);
  font-size: 0.78rem;
  font-weight: 900;
}

.student-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.student-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.student-status.live {
  color: #d8f9a1;
  background: rgba(40, 165, 95, 0.16);
}

.student-status.done {
  color: #ffd76a;
  background: rgba(255, 215, 106, 0.14);
}

.level-badge {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #ffd76a;
  border: 1px solid rgba(255, 215, 106, 0.45);
  background: rgba(255, 215, 106, 0.09);
  font-weight: 900;
}

.student-game {
  display: block;
}

.welcome-panel {
  position: relative;
  margin-top: 18px;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
}

.welcome-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.72fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: start;
  padding: clamp(22px, 4vw, 34px);
  color: white;
  background:
    linear-gradient(135deg, rgba(10, 36, 28, 0.86), rgba(5, 18, 15, 0.84)),
    var(--panel);
  border: 1px solid rgba(216, 249, 161, 0.22);
}

.welcome-video {
  opacity: 0.34;
  filter: saturate(1.18) brightness(0.7);
}

.welcome-card h2 {
  margin: 10px 0 14px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 4.4vw, 3.8rem);
  line-height: 1.04;
}

.welcome-card p,
.welcome-card li {
  color: rgba(236, 247, 241, 0.82);
  font-weight: 700;
  line-height: 1.55;
}

.welcome-copy {
  align-self: center;
}

.welcome-poster {
  position: relative;
  margin: 0;
  border-radius: 26px;
  overflow: hidden;
  padding: 4px;
  background: conic-gradient(from var(--spin-angle), #d8f9a1, #28a55f, #21b7e8, #ffd76a, #d8f9a1);
  border: 1px solid rgba(216, 249, 161, 0.26);
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.36),
    0 0 42px rgba(40, 217, 120, 0.16);
  animation: borderSpin 4.5s linear infinite;
}

.welcome-poster img {
  display: block;
  width: 100%;
  max-height: 430px;
  border-radius: 22px;
  object-fit: contain;
  background: rgba(3, 18, 14, 0.94);
}

.welcome-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.welcome-grid section {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(rgba(20, 42, 34, 0.94), rgba(15, 32, 27, 0.94)) padding-box,
    conic-gradient(from var(--spin-angle), rgba(216, 249, 161, 0.95), rgba(40, 165, 95, 0.35), rgba(33, 183, 232, 0.8), rgba(255, 215, 106, 0.82), rgba(216, 249, 161, 0.95)) border-box;
  border: 2px solid transparent;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  animation: borderSpin 5.5s linear infinite, cardFloat 4.8s ease-in-out infinite;
}

.welcome-grid section:nth-child(2) {
  animation-delay: -1s;
}

.welcome-grid section:nth-child(3) {
  animation-delay: -2s;
}

.welcome-grid section:nth-child(4) {
  animation-delay: -3s;
}

.welcome-grid section::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.12) 48%, transparent 60%);
  transform: translateX(-60%);
  animation: cardShine 5.5s ease-in-out infinite;
  pointer-events: none;
}

.welcome-grid h3 {
  margin: 0 0 10px;
  color: #d8f9a1;
  font-family: "Manrope", sans-serif;
}

.welcome-grid ul {
  margin: 0;
  padding-left: 18px;
}

.welcome-close {
  grid-column: 1 / -1;
  color: #ffd76a !important;
}

.welcome-button {
  grid-column: 1 / -1;
  min-height: 56px;
  padding-inline: 30px;
  background:
    linear-gradient(135deg, #b7ff63 0%, #28d978 44%, #21b7e8 100%);
  box-shadow:
    0 20px 46px rgba(40, 165, 95, 0.34),
    0 0 0 2px rgba(216, 249, 161, 0.22) inset;
  animation: buttonGlow 2.4s ease-in-out infinite;
}

.primary-button {
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  color: white;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 12px 18px;
  color: white;
  font-weight: 800;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
}

.secondary-button:hover,
.primary-button:not(:disabled):hover {
  filter: saturate(1.12);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 34px rgba(40, 165, 95, 0.28);
}

.finish-button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  color: #211100;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #ffd76a, #ff8a4c);
  box-shadow: 0 14px 28px rgba(223, 106, 54, 0.28);
}

.finish-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.finish-button:not(:disabled):hover {
  transform: translateY(-1px);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.compact-panel {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.compact-panel strong {
  display: block;
  margin: 8px 0 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
  overflow-wrap: anywhere;
}

.mistakes-panel {
  background:
    linear-gradient(135deg, rgba(223, 106, 54, 0.24), rgba(255, 255, 255, 0.08));
  border-color: rgba(255, 215, 106, 0.22);
}

.mistakes-panel .label {
  color: #ffd76a;
}

.mistakes-panel strong {
  color: #ffd6c9;
}

.play-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 18px;
}

.scene-frame {
  position: relative;
  min-height: min(82vh, 860px);
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #80d2ff 0%, #dbf3ff 30%, #b8de8d 31%, #7cb464 100%);
  box-shadow: var(--shadow);
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.scene-overlay {
  position: absolute;
  z-index: 3;
  max-width: min(320px, calc(100% - 24px));
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(10, 22, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
}

.top-left {
  top: 16px;
  left: 16px;
}

.top-right {
  top: 16px;
  right: 16px;
}

.bottom-left {
  left: 16px;
  bottom: 16px;
}

.bottom-right {
  right: 16px;
  bottom: 16px;
}

.side-column {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 0.75fr) minmax(320px, 1fr);
  gap: 16px;
  align-content: start;
}

.info-panel {
  padding: 20px;
  background: rgba(7, 19, 16, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.step-list {
  margin: 12px 0 0;
  padding-left: 20px;
  max-height: 220px;
  overflow: auto;
}

.step-list li {
  margin-bottom: 10px;
  opacity: 0.52;
}

.step-list li.active {
  opacity: 1;
  color: white;
}

.step-list li.done {
  opacity: 0.9;
  color: #98e2ae;
}

.current-item-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.current-item-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.legend-chip {
  border-radius: 12px;
  padding: 10px 14px;
  color: white;
  font-weight: 700;
  text-align: center;
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 75% 30%, rgba(122, 255, 74, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(4, 13, 12, 0.88), rgba(6, 38, 24, 0.78));
  backdrop-filter: blur(10px);
  animation: resultBackdropIn 180ms ease both;
}

body.result-open {
  overflow: hidden;
}

.result-card {
  position: relative;
  overflow: hidden;
  width: min(1120px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: clamp(24px, 4vw, 40px);
  border-radius: calc(var(--radius) + 4px);
  color: white;
  background:
    radial-gradient(circle at 78% 8%, rgba(139, 255, 74, 0.3), transparent 25%),
    radial-gradient(circle at 88% 42%, rgba(33, 183, 232, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(3, 22, 18, 0.99), rgba(5, 18, 15, 0.98)),
    var(--panel);
  border: 1px solid rgba(149, 219, 169, 0.32);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 56px rgba(122, 255, 74, 0.12);
  animation: resultAnnouncementIn 260ms cubic-bezier(0.2, 0.95, 0.25, 1.08) both;
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 215, 106, 0.12), transparent 4px),
    radial-gradient(circle at 50% 10%, rgba(216, 249, 161, 0.14), transparent 3px),
    radial-gradient(circle at 84% 18%, rgba(33, 183, 232, 0.14), transparent 3px);
  background-size: 180px 160px;
  opacity: 0.85;
  pointer-events: none;
}

.result-hero,
.result-stats,
.result-encouragement,
.result-actions {
  position: relative;
  z-index: 1;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.58fr);
  gap: clamp(18px, 4vw, 46px);
  align-items: center;
}

.result-kicker {
  align-items: center;
  gap: 10px;
  color: #b7ff63;
}

.result-kicker::before {
  content: "🏆";
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(216, 249, 161, 0.12);
  box-shadow: 0 0 24px rgba(122, 255, 74, 0.18);
}

.result-card h2 {
  margin: 18px 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.result-card p {
  margin: 0;
  color: rgba(236, 247, 241, 0.82);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.65;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.result-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #eaf7ef;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(149, 219, 169, 0.18);
}

.result-meta span:nth-child(1) {
  color: #b7ff63;
}

.result-visual {
  position: relative;
  min-height: 340px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(6, 46, 27, 0.55), rgba(5, 18, 15, 0.46)),
    url("assets/media/raee_acciones_grandes_cambios.png") center / cover,
    radial-gradient(circle at 60% 24%, rgba(122, 255, 74, 0.28), transparent 34%),
    linear-gradient(135deg, rgba(21, 80, 50, 0.5), rgba(5, 18, 15, 0.35));
  backdrop-filter: blur(2px);
}

.result-visual img {
  position: absolute;
  left: 10%;
  bottom: 0;
  width: min(270px, 58%);
  max-height: 96%;
  object-fit: contain;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.42));
}

.mission-board {
  position: absolute;
  right: 8%;
  top: 16%;
  rotate: -5deg;
  padding: 22px 18px;
  border-radius: 14px;
  color: #15321f;
  font-family: "Manrope", sans-serif;
  font-size: 1.08rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  background: #f2ead5;
  border: 6px solid #8d6a44;
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.32);
}

.mission-board::after {
  content: "✓";
  display: block;
  margin: 12px auto 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: white;
  background: #28a55f;
  font-size: 2.4rem;
  line-height: 54px;
}

.result-kicker::before {
  content: "";
  background:
    radial-gradient(circle, #b7ff63 0 22%, transparent 23% 38%, rgba(216, 249, 161, 0.18) 39% 100%);
}

.mission-board::after {
  content: "OK";
  font-size: 1.35rem;
}

@keyframes resultBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes resultAnnouncementIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0 20px;
}

.result-stats div {
  min-height: 145px;
  padding: 22px;
  border-radius: 22px;
  background:
    linear-gradient(rgba(11, 38, 30, 0.92), rgba(7, 24, 20, 0.92)) padding-box,
    linear-gradient(135deg, rgba(149, 219, 169, 0.45), rgba(255, 255, 255, 0.08)) border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(6px);
}

.result-stats span {
  display: block;
  color: #b7ff63;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-stats strong {
  display: block;
  margin-top: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
}

.result-stats small {
  display: block;
  margin-top: 10px;
  color: rgba(236, 247, 241, 0.74);
  font-weight: 700;
  line-height: 1.35;
}

.result-stat.success {
  box-shadow: 0 0 32px rgba(40, 165, 95, 0.12) inset;
}

.result-stat.danger span {
  color: #ff6f6f;
}

.result-stat.danger {
  box-shadow: 0 0 32px rgba(255, 70, 70, 0.12) inset;
}

.result-stat.grade span,
.result-stat.grade small {
  color: #ffd76a;
}

.result-encouragement {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  padding: 22px 24px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 65%, rgba(122, 255, 74, 0.22), transparent 20%),
    linear-gradient(135deg, rgba(40, 165, 95, 0.18), rgba(8, 35, 24, 0.8));
  border: 1px solid rgba(122, 255, 74, 0.48);
}

.result-encouragement strong {
  color: #b7ff63;
  font-family: "Manrope", sans-serif;
  font-size: 1.55rem;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.result-button {
  width: 100%;
  min-height: 76px;
  font-size: 1.1rem;
  box-shadow: 0 20px 42px rgba(40, 165, 95, 0.22);
}

.result-actions .secondary-button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(236, 247, 241, 0.28);
}

.result-actions .primary-button {
  background: linear-gradient(135deg, #d8ff45, #2bd86f 45%, #0fa463);
  color: #061912;
}

.quiz-card {
  width: min(1080px, 100%);
  background:
    radial-gradient(circle at 18% 28%, rgba(137, 255, 66, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(4, 24, 20, 0.98), rgba(3, 15, 13, 0.98));
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.quiz-side-art {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  min-height: 420px;
  padding: 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 34%, rgba(137, 255, 66, 0.28), transparent 32%),
    linear-gradient(135deg, rgba(14, 76, 48, 0.7), rgba(4, 21, 17, 0.88));
  border: 1px solid rgba(137, 255, 66, 0.24);
}

.quiz-side-art span {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 28px;
  color: #d8f9a1;
  font-size: 4.2rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(137, 255, 66, 0.32);
  box-shadow: 0 0 40px rgba(137, 255, 66, 0.16);
}

.quiz-side-art strong {
  font-family: "Manrope", sans-serif;
  font-size: 1.55rem;
}

.quiz-side-art small {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.quiz-content {
  display: grid;
  align-content: center;
}

.quiz-options {
  display: grid;
  gap: 12px;
  margin: 22px 0 14px;
}

.quiz-option {
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 15px 18px;
  color: white;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  background:
    linear-gradient(rgba(20, 42, 34, 0.96), rgba(10, 28, 23, 0.96)) padding-box,
    conic-gradient(from var(--spin-angle), rgba(216, 249, 161, 0.95), rgba(33, 183, 232, 0.72), rgba(255, 215, 106, 0.86), rgba(216, 249, 161, 0.95)) border-box;
  animation: borderSpin 5s linear infinite;
  transition: transform 160ms ease, filter 160ms ease;
}

.quiz-option:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.quiz-option.correct {
  background:
    linear-gradient(rgba(25, 113, 63, 0.96), rgba(13, 86, 48, 0.96)) padding-box,
    conic-gradient(from var(--spin-angle), #d8f9a1, #28a55f, #d8f9a1) border-box;
}

.quiz-option.wrong {
  background:
    linear-gradient(rgba(116, 30, 30, 0.96), rgba(72, 20, 20, 0.96)) padding-box,
    conic-gradient(from var(--spin-angle), #ffd6c9, #df6a36, #ffd6c9) border-box;
}

.quiz-feedback {
  min-height: 30px;
  color: #ffd76a !important;
}

/* Eco-gamified visual layer from the RAEE Heroes reference pack. */
.login-card {
  grid-template-rows: auto auto auto;
  background:
    radial-gradient(circle at 76% 22%, rgba(122, 255, 74, 0.18), transparent 28%),
    radial-gradient(circle at 100% 80%, rgba(33, 183, 232, 0.1), transparent 24%),
    linear-gradient(135deg, rgba(2, 18, 15, 0.98), rgba(5, 36, 24, 0.94));
  border-color: rgba(149, 255, 139, 0.34);
}

.login-card h1,
.hero-panel h1 {
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.36);
}

.login-card h1::after,
.hero-panel h1::after {
  content: "del planeta";
  display: block;
  color: #7ee84f;
}

.login-card h1 {
  max-width: 13ch;
}

.login-card h1::after {
  margin-top: -0.05em;
}

.login-visual {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(149, 255, 139, 0.28) inset,
    0 0 48px rgba(122, 255, 74, 0.14);
}

.login-feature-image {
  object-fit: cover;
  object-position: center;
}

.login-benefits {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(149, 255, 139, 0.18);
}

.login-benefits article {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.login-benefits article:last-child {
  border-right: 0;
}

.login-benefits span {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(216, 249, 161, 0.28), transparent 62%),
    linear-gradient(135deg, rgba(122, 255, 74, 0.22), rgba(33, 183, 232, 0.12));
  border: 1px solid rgba(122, 255, 74, 0.42);
  box-shadow: 0 0 24px rgba(122, 255, 74, 0.16);
}

.login-benefits strong {
  color: white;
  font-weight: 900;
}

.login-benefits small,
.login-footer-note {
  color: rgba(236, 247, 241, 0.72);
  font-weight: 700;
}

.login-footer-note {
  grid-column: 1 / -1;
  padding: 18px 22px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 50%, rgba(122, 255, 74, 0.2), transparent 12%),
    linear-gradient(90deg, rgba(40, 165, 95, 0.16), rgba(33, 183, 232, 0.08));
  border: 1px solid rgba(149, 255, 139, 0.2);
}

.teacher-panel {
  grid-template-columns: 170px minmax(320px, 0.38fr) minmax(0, 1fr);
  align-items: stretch;
}

.teacher-sidebar {
  grid-row: 1 / 3;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: 28px;
  background:
    linear-gradient(rgba(4, 25, 20, 0.9), rgba(3, 15, 13, 0.94)) padding-box,
    linear-gradient(160deg, rgba(122, 255, 74, 0.42), rgba(255, 255, 255, 0.04)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.teacher-logo {
  display: grid;
  place-items: center;
  min-height: 104px;
  margin-bottom: 8px;
  border-radius: 24px;
  color: #d8f9a1;
  font-family: "Manrope", sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  background: radial-gradient(circle, rgba(122, 255, 74, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(149, 255, 139, 0.18);
}

.teacher-logo::before {
  content: "";
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, transparent 34%, var(--neon) 35% 66%, transparent 67%),
    radial-gradient(circle, rgba(137, 255, 66, 0.28), rgba(255, 255, 255, 0.04));
  display: block;
  box-shadow: 0 0 28px rgba(137, 255, 66, 0.22);
}

.teacher-sidebar span,
.teacher-sidebar small {
  position: relative;
  border-radius: 16px;
  padding: 12px 14px 12px 38px;
  color: rgba(236, 247, 241, 0.78);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.035);
}

.teacher-sidebar span::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(216, 249, 161, 0.7);
  transform: translateY(-50%) rotate(45deg);
}

.teacher-sidebar span:first-of-type {
  color: white;
  background: rgba(40, 165, 95, 0.28);
  box-shadow: 0 0 24px rgba(40, 165, 95, 0.16);
}

.teacher-sidebar small {
  margin-top: auto;
  color: #95dba9;
  text-align: center;
}

.teacher-overview {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.teacher-overview article {
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 16% 50%, rgba(122, 255, 74, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(8, 57, 38, 0.72), rgba(4, 25, 20, 0.88));
  border: 1px solid rgba(149, 255, 139, 0.2);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.2);
}

.teacher-overview article::before,
.teacher-live-stats div::before,
.login-benefits span::before,
.student-achievements span::before,
.teacher-bottom-cards span::before {
  content: "";
  display: block;
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--neon) 0 28%, transparent 30%),
    radial-gradient(circle, rgba(137, 255, 66, 0.18), transparent 70%);
  border: 1px solid rgba(137, 255, 66, 0.42);
  box-shadow: 0 0 22px rgba(137, 255, 66, 0.18);
}

.teacher-overview span,
.teacher-overview small {
  display: block;
  color: rgba(236, 247, 241, 0.7);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-overview strong {
  display: block;
  margin: 6px 0 2px;
  color: #f6fff9;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
}

.teacher-card {
  grid-column: 2;
}

.results-table-card {
  grid-column: 3;
}

.teacher-impact-card {
  grid-column: 2;
  padding: 22px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 40%, rgba(137, 255, 66, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(8, 58, 36, 0.82), rgba(4, 20, 17, 0.92));
  border: 1px solid rgba(137, 255, 66, 0.24);
  box-shadow: var(--shadow);
}

.teacher-impact-card span {
  color: #95dba9;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.teacher-impact-card strong {
  display: block;
  margin: 10px 0 8px;
  color: #d8f9a1;
  font-family: "Manrope", sans-serif;
  font-size: 1.35rem;
}

.teacher-impact-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

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

.teacher-bottom-cards article,
.student-achievements article {
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(rgba(8, 41, 31, 0.82), rgba(4, 20, 17, 0.9)) padding-box,
    linear-gradient(135deg, rgba(137, 255, 66, 0.38), rgba(255, 255, 255, 0.05)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.teacher-bottom-cards strong,
.student-achievements strong {
  display: block;
  color: white;
  font-weight: 900;
}

.teacher-bottom-cards small,
.student-achievements small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.game-banner {
  position: relative;
  overflow: hidden;
  min-height: clamp(190px, 19vw, 280px);
  margin-top: 18px;
  border-radius: 30px;
  border: 1px solid rgba(149, 255, 139, 0.26);
  background: #041713;
  box-shadow: var(--shadow);
}

.game-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.96;
}

.game-banner::after {
  content: "Cada escenario es un nivel. Clasifica, aprende y gana racha eco.";
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 1;
  max-width: min(560px, calc(100% - 48px));
  border-radius: 999px;
  padding: 12px 18px;
  color: white;
  font-weight: 900;
  background: rgba(2, 18, 15, 0.78);
  border: 1px solid rgba(137, 255, 66, 0.26);
  backdrop-filter: blur(8px);
}

.dashboard-grid {
  position: relative;
}

.dashboard-grid::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border-radius: 28px;
  background: linear-gradient(90deg, rgba(137, 255, 66, 0.12), rgba(33, 183, 232, 0.08), rgba(255, 215, 106, 0.08));
}

.compact-panel {
  background:
    radial-gradient(circle at 16% 35%, rgba(137, 255, 66, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.075);
}

.compact-panel .label::before,
.info-panel .label::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 14px rgba(137, 255, 66, 0.8);
}

.play-area {
  grid-template-columns: minmax(0, 1fr);
}

.scene-frame {
  border: 2px solid rgba(137, 255, 66, 0.28);
  background:
    radial-gradient(circle at top right, rgba(137, 255, 66, 0.12), transparent 30%),
    linear-gradient(180deg, #80d2ff 0%, #dbf3ff 30%, #b8de8d 31%, #7cb464 100%);
}

.side-column {
  grid-template-columns: minmax(260px, 0.8fr) minmax(260px, 0.8fr) minmax(320px, 1fr);
}

.info-panel {
  background:
    linear-gradient(rgba(4, 26, 20, 0.9), rgba(3, 17, 14, 0.94)) padding-box,
    linear-gradient(135deg, rgba(137, 255, 66, 0.28), rgba(255, 255, 255, 0.06)) border-box;
  border: 1px solid transparent;
}

.legend-chip {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.student-achievements {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.dashboard-grid .compact-panel,
.info-panel,
.scene-frame {
  border-color: rgba(149, 255, 139, 0.18);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.22),
    0 0 28px rgba(122, 255, 74, 0.06);
}

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .play-area,
  .side-column,
  .welcome-card,
  .welcome-grid,
  .result-hero,
  .quiz-layout {
    grid-template-columns: 1fr;
  }

  .teacher-panel {
    grid-template-columns: 1fr;
  }

  .teacher-sidebar,
  .teacher-overview,
  .teacher-card,
  .results-table-card {
    grid-column: 1;
  }

  .teacher-sidebar {
    grid-row: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .teacher-logo,
  .teacher-sidebar small {
    grid-column: 1 / -1;
  }

  .teacher-overview,
  .login-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-bottom-cards,
  .student-achievements {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .login-card {
    grid-template-columns: 1fr;
    width: min(620px, 100%);
    min-height: auto;
    padding: 24px;
  }

  .login-card h1 {
    font-size: clamp(2.3rem, 11vw, 3.5rem);
  }

  .login-visual {
    width: 100%;
  }

  .hero-panel {
    flex-direction: column;
    align-items: start;
  }

  .scene-frame {
    min-height: 620px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 18px, 1440px);
  }

  .login-screen {
    place-items: start center;
  }

  .login-card {
    padding: 20px;
  }

  .mission-tags {
    gap: 8px;
  }

  .mission-tags span {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .login-visual {
    width: 100%;
  }

  .mission-badge {
    top: 14px;
    right: 14px;
  }

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

  .teacher-sidebar,
  .teacher-overview,
  .login-benefits,
  .teacher-bottom-cards,
  .student-achievements {
    grid-template-columns: 1fr;
  }

  .game-banner {
    min-height: 180px;
  }

  .game-banner::after {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    border-radius: 18px;
  }

  .quiz-side-art {
    min-height: 220px;
  }

  .login-benefits article {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .login-benefits article:last-child {
    border-bottom: 0;
  }

  .result-stats,
  .result-actions {
    grid-template-columns: 1fr;
  }

  .result-card h2 {
    font-size: clamp(2.4rem, 14vw, 3.8rem);
  }

  .result-visual {
    min-height: 260px;
  }

  .mission-board {
    right: 4%;
    top: 10%;
    transform: scale(0.82);
    transform-origin: top right;
  }

  .scene-overlay {
    max-width: calc(100% - 24px);
    font-size: 0.92rem;
  }
}
