:root {
  --bg-0: #060916;
  --bg-1: #0c1838;
  --bg-2: #123063;
  --ink: #ecf4ff;
  --muted: #9db5d9;
  --line: rgba(156, 194, 255, 0.35);
  --panel: rgba(8, 15, 35, 0.78);
  --panel-soft: rgba(9, 21, 44, 0.66);
  --gold-1: #ffe094;
  --gold-2: #ce9d3f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "Noto Sans SC", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 18%, rgba(102, 164, 255, 0.28), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(90, 205, 255, 0.23), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(70, 108, 255, 0.18), transparent 42%),
    linear-gradient(150deg, var(--bg-0), var(--bg-1) 52%, var(--bg-2));
  background-attachment: fixed;
}

.screen {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 14px 30px;
}

.login-only {
  position: relative;
  min-height: calc(100vh - 52px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ambient {
  position: absolute;
  filter: blur(6px);
  pointer-events: none;
  border-radius: 999px;
}

.ambient-a {
  width: 460px;
  height: 460px;
  left: -120px;
  top: 8%;
  background: radial-gradient(circle, rgba(98, 162, 255, 0.34), rgba(98, 162, 255, 0.02));
  animation: floatA 8s ease-in-out infinite;
}

.ambient-b {
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: 2%;
  background: radial-gradient(circle, rgba(78, 225, 255, 0.26), rgba(78, 225, 255, 0.03));
  animation: floatB 10s ease-in-out infinite;
}

.login-card {
  position: relative;
  width: min(460px, 100%);
  padding: 30px 24px 24px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(13, 30, 59, 0.82), rgba(8, 17, 38, 0.9));
  box-shadow:
    0 20px 50px rgba(2, 6, 17, 0.68),
    inset 0 0 0 1px rgba(186, 220, 255, 0.09);
  backdrop-filter: blur(3px);
  animation: reveal 480ms ease-out;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(130deg, rgba(129, 204, 255, 0.8), rgba(255, 228, 150, 0.5), rgba(100, 174, 255, 0.8));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.kicker {
  margin: 0;
  font-size: 12px;
  color: #9cd3ff;
  letter-spacing: 0.17em;
  font-weight: 700;
}

.login-card h1 {
  margin: 10px 0 8px;
  font-size: 34px;
  line-height: 1.2;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.sub {
  margin: 0 0 18px;
  color: #b4cae7;
}

.input-wrap {
  margin-top: 10px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #c9e2ff;
  font-size: 13px;
}

input {
  width: 100%;
  border: 1px solid rgba(139, 182, 245, 0.5);
  border-radius: 12px;
  background: rgba(14, 34, 63, 0.86);
  color: #eff6ff;
  font: inherit;
  padding: 12px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input::placeholder {
  color: #88a7cf;
}

input:focus {
  outline: none;
  border-color: #9cd0ff;
  box-shadow: 0 0 0 3px rgba(58, 152, 255, 0.2);
  transform: translateY(-1px);
}

button {
  border: 0;
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-primary {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  color: #2f2207;
  font-weight: 700;
  border: 1px solid rgba(241, 199, 118, 0.92);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
}

.tip {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  min-height: 20px;
}

.tip.error {
  color: #ffb2b2;
}

.tip.ok {
  color: #a4ffd7;
}

.app-area {
  margin-top: 8px;
}

.is-hidden {
  display: none !important;
}

.hero {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero h2 {
  margin: 0;
  font-size: 18px;
}

.hero p {
  margin: 4px 0 0;
  color: var(--muted);
}

.panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  padding: 14px;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-ghost {
  border: 1px solid var(--line);
  padding: 9px 12px;
  background: rgba(13, 31, 55, 0.62);
  color: #d4e5ff;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.profile {
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(14, 32, 57, 0.58);
  padding: 10px;
  line-height: 1.65;
}

.purchase-note {
  border: 1px solid rgba(133, 187, 255, 0.28);
  border-radius: 12px;
  padding: 14px;
  background: rgba(14, 32, 57, 0.46);
  color: #d7e9ff;
  line-height: 1.8;
}

.purchase-qrcode-wrap {
  margin-top: 14px;
}

.purchase-qrcode-wrap h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #d7e9ff;
}

.purchase-qrcode-box {
  border: 1px dashed rgba(133, 187, 255, 0.38);
  border-radius: 12px;
  padding: 12px;
  background: rgba(9, 23, 41, 0.56);
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

#groupQrcodeImage {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(133, 187, 255, 0.28);
  display: none;
}

#groupQrcodeHint {
  margin: 0;
  font-size: 13px;
  color: #bcd6f8;
  text-align: center;
}

.list {
  margin: 0;
  padding-left: 20px;
}

.list li {
  margin: 6px 0;
}

.teacher-video-list-wrap {
  border: 1px dashed rgba(133, 187, 255, 0.38);
  border-radius: 12px;
  background: rgba(9, 23, 41, 0.56);
  padding: 12px;
}

.teacher-video-list-wrap h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #d7e9ff;
}

.teacher-video-help {
  margin: 0 0 10px;
  font-size: 13px;
  color: #bcd6f8;
}

.teacher-video-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.teacher-video-list li {
  margin: 0;
}

.teacher-video-list a {
  display: block;
  text-align: left;
  border-radius: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(133, 187, 255, 0.34);
  background: rgba(13, 31, 55, 0.66);
  color: #dcecff;
  text-decoration: none;
}

.teacher-video-list a:hover {
  border-color: rgba(241, 199, 118, 0.92);
  background: rgba(64, 47, 13, 0.76);
  color: #ffe8bf;
}

.teacher-video-list-empty {
  color: #9db5d9;
  font-size: 13px;
  padding: 8px 2px;
}

.log {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 29, 51, 0.78);
  padding: 10px;
  min-height: 120px;
  color: #d9e9ff;
  white-space: pre-wrap;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatA {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(14px);
  }
}

@media (max-width: 700px) {
  .screen {
    padding: 12px;
  }

  .login-only {
    min-height: calc(100vh - 26px);
  }

  .login-card {
    padding: 24px 16px 18px;
    border-radius: 16px;
  }

  .login-card h1 {
    font-size: 28px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .row {
    width: 100%;
  }

  .row .btn-ghost,
  .row .btn-link {
    flex: 1;
  }

  .teacher-video-list {
    max-height: 240px;
  }

}
