:root {
  color-scheme: light;
  --kahoot-purple: #46178f;
  --kahoot-purple-dark: #3b1277;
  --kahoot-green: #00c985;
  --kahoot-green-hover: #00b377;
  --kahoot-red: #e21b3c;
  --kahoot-yellow: #ffa602;
  --kahoot-blue: #1368ce;
  --text: #333333;
  --text-muted: #666666;
  --border: #e0e0e0;
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial,
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background: var(--kahoot-purple);
  min-height: 100vh;
}

button,
input,
fieldset {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.view.is-hidden {
  display: none !important;
}

/* —— Fake kahoot.it join page —— */

.kahoot-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #2f1d5c;
}

.kahoot-topnav {
  background: #1f1333;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kahoot-topnav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.kahoot-go-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.kahoot-go-logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.kahoot-go-logo-img {
  display: block;
  width: auto;
  height: 26px;
}

.kahoot-topnav-menu {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  flex: 1;
}

.kahoot-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  padding: 8px 12px 6px;
  border-radius: 8px;
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.kahoot-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.kahoot-nav-item-active {
  background: rgba(255, 255, 255, 0.14);
}

.kahoot-nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
}

.kahoot-nav-icon-discover {
  background-color: #00c985;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 4v4M12 16v4M4 12h4M16 12h4'/%3E%3Cpath d='m8 8 2.5 2.5M13.5 13.5 16 16M16 8l-2.5 2.5M10.5 13.5 8 16'/%3E%3C/svg%3E");
}

.kahoot-nav-icon-learn {
  background-color: #ffa602;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 3 1 9l11 6 9-4.91V17h2V9L12 3Zm0 12.18L5 11.18V16l7 3.82 7-3.82v-4.82l-7 3.82Z'/%3E%3C/svg%3E");
}

.kahoot-nav-icon-present {
  background-color: #1368ce;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7L8 5Z'/%3E%3C/svg%3E");
}

.kahoot-nav-icon-make {
  background-color: #e21b3c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m3 21 9-9'/%3E%3Cpath d='M12.5 3.5 20 11l-2 2-7.5-7.5 2-2Z'/%3E%3Cpath d='m15 6 3 3'/%3E%3C/svg%3E");
}

.kahoot-nav-icon-join {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background:
    linear-gradient(#e21b3c, #e21b3c) 2px 2px / 11px 11px no-repeat,
    linear-gradient(#ffa602, #ffa602) 15px 2px / 11px 11px no-repeat,
    linear-gradient(#1368ce, #1368ce) 2px 15px / 11px 11px no-repeat,
    linear-gradient(#00c985, #00c985) 15px 15px / 11px 11px no-repeat;
  background-color: #ffffff;
}

.kahoot-page {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: calc(100vh - 56px);
  padding: 0 16px 28px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 45% at 78% 18%, rgba(88, 101, 242, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 18% 72%, rgba(124, 58, 237, 0.45) 0%, transparent 72%),
    radial-gradient(ellipse 40% 35% at 62% 78%, rgba(59, 130, 246, 0.35) 0%, transparent 70%),
    linear-gradient(145deg, #4f2d91 0%, #4338ca 38%, #3730a3 68%, #312e81 100%);
}

.kahoot-page::before,
.kahoot-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.kahoot-page::before {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.35) 0%, transparent 68%);
}

.kahoot-page::after {
  width: 420px;
  height: 420px;
  bottom: -140px;
  left: -100px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.28) 0%, transparent 68%);
}

.kahoot-lang {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.kahoot-lang-globe {
  width: 18px;
  height: 18px;
}

.kahoot-hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-top: 24px;
}

.kahoot-wordmark {
  margin: 0 0 28px;
  line-height: 0;
  text-align: center;
}

.kahoot-wordmark-img {
  display: block;
  width: auto;
  height: clamp(44px, 8vw, 58px);
  margin: 0 auto;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.18));
}

.kahoot-card {
  width: min(100%, 340px);
  padding: 22px 22px 20px;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.kahoot-form {
  display: flex;
  flex-direction: column;
}

.kahoot-label {
  display: block;
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
  color: #333333;
  letter-spacing: 0;
}

.kahoot-input {
  width: 100%;
  min-height: 48px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid #c5c5c5;
  border-radius: 4px;
  background: #ffffff;
  font-size: 16px;
  font-weight: 600;
  color: #333333;
  text-align: center;
}

.kahoot-input::placeholder {
  color: #9ca3af;
  font-weight: 600;
}

.kahoot-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.kahoot-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 4px;
  background: #333333;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  transition: background 0.15s ease;
}

.kahoot-button:hover {
  background: #222222;
}

.kahoot-button.is-loading {
  opacity: 0.8;
  cursor: wait;
}

.kahoot-status {
  min-height: 1.1rem;
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: #e21b3c;
}

.kahoot-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  margin-top: 28px;
  text-align: center;
  color: #ffffff;
}

.kahoot-footer-main {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.kahoot-footer-main a {
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.kahoot-footer-main a:hover {
  text-decoration: underline;
}

.kahoot-footer-links {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.92;
}

.kahoot-footer-links a {
  color: #ffffff;
  text-decoration: none;
}

.kahoot-footer-links a:hover {
  text-decoration: underline;
}

.kahoot-footer-links span {
  margin: 0 8px;
  opacity: 0.75;
}

@media (max-width: 900px) {
  .kahoot-topnav-inner {
    flex-direction: column;
    align-items: stretch;
    padding-top: 10px;
    padding-bottom: 8px;
    gap: 10px;
  }

  .kahoot-topnav-menu {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
  }

  .kahoot-lang {
    top: 12px;
    right: 12px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .kahoot-nav-item {
    min-width: 64px;
    padding: 6px 8px 4px;
  }

  .kahoot-nav-label {
    font-size: 11px;
  }

  .kahoot-wordmark {
    margin-bottom: 22px;
  }
}

/* —— Real test joiner —— */

.joiner-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(160deg, #1a1033 0%, #2d1b69 50%, #46178f 100%);
}

.joiner-card {
  width: min(100%, 720px);
  padding: 28px 24px 22px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.joiner-header {
  margin-bottom: 8px;
}

.joiner-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kahoot-purple);
}

.joiner-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #222;
}

.joiner-form {
  margin: 0;
  padding: 0;
  border: 0;
}

.joiner-group {
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-top: 1px solid var(--border);
  min-width: 0;
}

.joiner-group:first-of-type {
  border-top: 0;
  padding-top: 8px;
}

.joiner-legend {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.joiner-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: #ffffff;
  font-size: 16px;
  font-weight: 600;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--kahoot-purple);
}

#pin {
  text-align: center;
  font-size: 26px;
  letter-spacing: 0.08em;
}

#count {
  flex: 1;
  min-width: 0;
  accent-color: var(--kahoot-purple);
}

.count-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

#count-input {
  width: 72px;
  flex-shrink: 0;
  padding: 8px 10px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}

#count-input::-webkit-outer-spin-button,
#count-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#count-input:focus {
  outline: none;
  border-color: var(--kahoot-purple);
}

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-weight: 600;
}

.option-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--kahoot-purple);
}

.joiner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.button {
  flex: 1 1 160px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 4px;
  border: 2px solid transparent;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.button-primary {
  background: var(--kahoot-green);
  color: #ffffff;
}

.button-primary:hover:not(:disabled) {
  background: var(--kahoot-green-hover);
}

.button-secondary {
  background: #ffffff;
  color: var(--kahoot-purple);
  border-color: var(--kahoot-purple);
}

.button-secondary:hover:not(:disabled) {
  background: #f6f0ff;
}

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

.status {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  min-height: 1.25rem;
}

.activity-log-panel {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #0f1117;
}

.activity-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #171a22;
  border-bottom: 1px solid #2a2f3a;
}

.activity-log-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa3b2;
}

.button-small {
  padding: 4px 10px;
  font-size: 12px;
  min-height: 0;
}

.activity-log {
  max-height: 280px;
  overflow-y: auto;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.45;
  color: #d7dce5;
}

.log-line {
  margin: 0 0 4px;
  word-break: break-word;
}

.log-line-info {
  color: #d7dce5;
}

.log-line-success {
  color: #86efac;
}

.log-line-warn {
  color: #fcd34d;
}

.log-line-error {
  color: #fca5a5;
}

.quiz-result {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 4px;
  background: #f5f5f5;
  font-size: 14px;
  font-weight: 600;
}

.quiz-result.is-winner {
  background: #fff8e6;
  color: #6e5712;
}

.version-info {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: #999;
  letter-spacing: 0.04em;
}

.version-info.is-stale {
  color: #c2410c;
  font-weight: 700;
}

.version-info.is-current {
  color: #15803d;
}

/* —— Blooket play decoy —— */

.blooket-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #7ec8ff 0%, #59b9ff 45%, #4aa8f5 100%);
  font-family: "Nunito", "Montserrat", var(--font);
}

.blooket-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 12px rgba(15, 77, 196, 0.12);
}

.blooket-logo-link {
  display: inline-flex;
  text-decoration: none;
}

.blooket-logo-img {
  display: block;
  height: 34px;
  width: auto;
}

.blooket-topnav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.blooket-nav-link {
  text-decoration: none;
  color: #0b63f6;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
}

.blooket-nav-link-primary {
  background: #0b63f6;
  color: #ffffff;
}

.blooket-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
}

.blooket-hero-card {
  width: min(100%, 420px);
  background: #ffffff;
  border-radius: 18px;
  padding: 32px 28px 28px;
  box-shadow: 0 18px 40px rgba(15, 77, 196, 0.18);
  text-align: center;
}

.blooket-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  color: #123d8f;
}

.blooket-subtitle {
  margin: 0 0 24px;
  color: #5b6f8f;
  font-size: 15px;
}

.blooket-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.blooket-label {
  font-size: 13px;
  font-weight: 700;
  color: #123d8f;
  letter-spacing: 0.02em;
}

.blooket-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #d7e6ff;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.12em;
  background: #f7fbff;
}

.blooket-input:focus {
  outline: none;
  border-color: #0b63f6;
  box-shadow: 0 0 0 3px rgba(11, 99, 246, 0.15);
}

.blooket-button {
  margin-top: 4px;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #2f7dff 0%, #0b63f6 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 8px 0 #084db8;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.blooket-button:hover {
  transform: translateY(1px);
  box-shadow: 0 7px 0 #084db8;
}

.blooket-button:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 #084db8;
}

.blooket-status {
  min-height: 1.2rem;
  margin: 14px 0 0;
  color: #c2410c;
  font-size: 14px;
  font-weight: 600;
}

.joiner-page-blooket {
  background: linear-gradient(160deg, #0f4dc4 0%, #2f7dff 55%, #59b9ff 100%);
}

.joiner-card-blooket .joiner-eyebrow {
  color: #0b63f6;
}

.button-blooket {
  background: #0b63f6;
  border-color: #0b63f6;
}

.button-blooket:hover:not(:disabled) {
  background: #084fd0;
}

@media (max-width: 480px) {
  .kahoot-card {
    padding: 28px 20px 22px;
  }

  .kahoot-logo {
    font-size: 36px;
  }

  .joiner-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
