@font-face {
  font-family: 'Genshin';
  src: url('./Genshin Font.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body, input, button, select, textarea, label, datalist {
  font-family: 'Genshin', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
  font-size: 16px;
}

.navbar, .navbar label, .navbar button, .navbar input, .navbar .center-group {
  font-size: 20px;
}

.navbar {
  overflow: hidden;
  background: linear-gradient(135deg, #0a2258 0%, #131313 100%);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  z-index: 900;
}

.navbar a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

.navbar a:hover {
  background: #ddd;
  color: black;
}

.main {
  margin-top: 56px;
}

.navbar .center-group {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

#cycleColor {
  position: fixed;
  top: 8px;
  left: 56px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: #131313;
  border: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
}

#cycleColor svg {
  width: 18px;
  height: 18px;
  display: block;
}

.navbar label {
  color: #ffffff;
  padding-right: 12px;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

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

#mask {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 400;
  pointer-events: none;
  display: block;
  --hole-w: 50px;
  --hole-h: 50px;
  --mask-alpha: 1;
}

#mask .mask-hole {
  position: absolute;
  left: var(--hole-left, 50%);
  top: var(--hole-top, 50%);
  transform: translate(-50%, -50%);
  width: var(--hole-w);
  height: var(--hole-h);
  border-radius: 5px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, var(--mask-alpha));
  pointer-events: none;
}

.info-btn {
  position: fixed;
  top: 8px;
  left: 12px;
  background: #131313;
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  font-family: Arial, Helvetica, sans-serif;
}

.icon-btn {
  position: fixed;
  top: 8px;
  left: 100px;
  width: 36px;
  height: 36px;
  padding: 0;
  box-sizing: border-box;
  border: none;
  background: #131313;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  z-index: 1000;
  cursor: pointer;
  line-height: 0;
  font-size: 0;
  overflow: hidden;
}

.icon-btn svg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -60%);
  width: 18px;
  height: 18px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  z-index: 1200;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #0a2258 0%, #131313 100%);
  color: #fff;
  padding: 20px;
  max-width: 640px;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.modal-close {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 20px;
  float: right;
  cursor: pointer;
}

#scoreTracker {
  position: fixed;
  top: 16px;
  right: 18px; 
  color: #fff;
  font-size: 20px;
  z-index: 1000;
}

.welcome-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a2258 0%, #131313 100%);
  color: #fff;
  z-index: 1000;
  font-family: 'Genshin', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

.welcome-content {
  max-width: 900px;
  width: calc(100% - 80px);
  padding: 56px;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
}

.welcome-content h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 8vw, 64px);
  line-height: 1.02;
  text-shadow: 
    -2px -2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    2px 2px 0 #000;
}

.welcome-content p {
  margin: 0 0 26px;
  color: #e6eef6;
  font-size: 24px;
  line-height: 1.4;
}

.start-btn {
  display: inline-block;
  padding: 18px 36px;
  font-size: 22px;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.primary {
  background: linear-gradient(90deg, #ffd166 0%, #ffb86b 100%);
  color: #441900;
  box-shadow: 0px 0px 10px rgba(255,184,107,0.9);
}

.start-btn:hover {
  transform: translateY(-3px);
}

.start-btn:active {
  transform: translateY(0);
}

.start-btn:focus {
  outline: 3px solid rgba(255,210,150,0.25);
  outline-offset: 2px;
}

.welcome-content .start-btn + .start-btn {
  margin-left: 12px;
}

.info-btn:hover, #cycleColor:hover, .icon-btn:hover {
  background: #fff;
  color: #111;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.info-btn:hover svg, #cycleColor:hover svg, .icon-btn:hover svg {
  stroke: currentColor;
  fill: none;
}

.question-counter {
  position: fixed;
  top: 16px;
  left: 140px;
  color: #fff;
  font-size: 20px;
  z-index: 1000;
  pointer-events: none;
  padding-left: 16px;
}

a {
  color: red;
}

@media (max-width: 480px) {
  .welcome-content { padding: 28px; }
  .welcome-content h1 { font-size: 28px; }
  .start-btn { width: 100%; padding: 16px; font-size: 18px; }
}

@media (max-width: 520px) {
  .question-counter { left: 140px; font-size: 14px; }
}