:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-alt: #eef3f9;
  --border: rgba(35, 96, 196, 0.12);
  --text: #162033;
  --muted: #66748a;
  --primary: #0c66ff;
  --primary-deep: #0a47c8;
  --primary-soft: rgba(12, 102, 255, 0.1);
  --shadow: 0 18px 45px rgba(31, 63, 122, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(12, 102, 255, 0.12), transparent 32%),
    linear-gradient(180deg, #fcfdff 0%, var(--bg) 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(100%, 1120px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-panel {
  width: min(100%, 460px);
  padding: 40px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel-badge,
.brand-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

.login-panel h1,
.brand-block h1,
.section-head h2 {
  margin: 14px 0 0;
  line-height: 1.1;
}

.login-panel h1 {
  font-size: clamp(30px, 4vw, 40px);
}

.panel-copy,
.section-copy,
.meta-line,
.live-description,
.empty-state,
.form-message {
  color: var(--muted);
}

.login-form {
  margin-top: 32px;
  display: grid;
  gap: 18px;
}

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

.field span {
  font-size: 14px;
  font-weight: 600;
}

.field input {
  height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(22, 32, 51, 0.1);
  background: #f8faff;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: rgba(12, 102, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(12, 102, 255, 0.12);
}

.primary-button,
.ghost-button,
.card-action {
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  height: 54px;
  background: linear-gradient(135deg, var(--primary) 0%, #48a3ff 100%);
  color: #fff;
  font-weight: 700;
}

.ghost-button {
  height: 44px;
  padding: 0 18px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.card-action:hover,
.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.form-message {
  min-height: 20px;
  margin: 0;
  font-size: 14px;
}

.form-message.error {
  color: #c43d55;
}

.login-tip {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.login-tip code {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--primary-deep);
}

.site-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 24px auto;
}

.topbar,
.detail-layout,
.live-card,
.player-panel,
.info-panel {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.topbar {
  min-height: 88px;
  padding: 18px 24px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-block h1 {
  font-size: clamp(24px, 3vw, 30px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 600;
}

.page-content {
  margin-top: 24px;
}

.section-head,
.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.live-card {
  width: 325px;
  border-radius: 24px;
  overflow: hidden;
}

.live-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, #d4e5ff, #f4f9ff);
}

.card-content {
  padding: 22px;
}

.card-content h3,
.info-panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.meta-line {
  margin: 12px 0 18px;
  font-size: 14px;
}

.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.detail-toolbar {
  margin-bottom: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  color: var(--primary-deep);
  font-weight: 700;
}

.detail-layout {
  border-radius: 28px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 24px;
}

.player-panel,
.info-panel {
  border-radius: 24px;
  padding: 20px;
}

.player-shell {
  overflow: hidden;
  border-radius: 20px;
  background: #061224;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #061224;
}

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

.info-group {
  display: grid;
  gap: 8px;
}

.info-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--primary);
  text-transform: uppercase;
}

.qr-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-alt);
}

.qr-card img {
  width: min(100%, 220px);
  margin: 14px auto 0;
  border-radius: 18px;
}

.checkin-qr {
  width: min(100%, 120px);
  margin: 14px auto 0;
}

.checkin-name {
  text-align: center;
  margin: 10px 0 0;
  font-weight: 700;
  color: var(--text);
}

.checkin-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.qrcodelink-body {
  min-height: 100vh;
}

.qrcodelink-shell {
  width: min(100% - 24px, 520px);
  margin: 0 auto;
}

.qrcodelink-panel {
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.qrcodelink-header h1 {
  margin: 14px 0 0;
  font-size: clamp(28px, 5vw, 36px);
}

.qrcodelink-form {
  margin-top: 28px;
  display: grid;
  gap: 18px;
}

.qrcodelink-empty {
  text-align: center;
  color: var(--muted);
}

.qrcodelink-empty p {
  margin: 0;
}

.qrcodelink-empty p + p {
  margin-top: 12px;
}

.qrcodelink-empty a {
  color: var(--primary);
  font-weight: 700;
}

.required-mark {
  margin-left: 4px;
  color: #c43d55;
}

.empty-state {
  padding: 40px 24px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px dashed rgba(12, 102, 255, 0.18);
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--container));
    margin: 10px auto 24px;
  }

  .login-panel,
  .detail-layout,
  .player-panel,
  .info-panel,
  .topbar {
    padding: 18px;
  }

  .section-head,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .user-chip {
    flex: 1;
  }
}
