/* client/styles/main.css copied from original */
@font-face {
  font-family: "ABChanelCorpo2022";
  src: url("../assets/fonts/ABChanelCorpo2022-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ABChanelCorpo2022";
  src: url("../assets/fonts/ABChanelCorpo2022-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ABChanelCorpo2022";
  src: url("../assets/fonts/ABChanelCorpo2022-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
html {
  font-family: "ABChanelCorpo2022", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  background: conic-gradient(
    #f1f1f1 12.5deg,
    #fafafa 12.5deg 25deg,
    #f1f1f1 25deg 57.5deg,
    #fafafa 57.5deg 90deg,
    #f1f1f1 90deg 122.5deg,
    #fafafa 122.5deg 155deg,
    #f1f1f1 155deg 167.5deg,
    #fafafa 167.5deg 180deg,
    #fafafa 180deg 192.5deg,
    #f1f1f1 192.5deg 205deg,
    #fafafa 205deg 237.5deg,
    #f1f1f1 237.5deg 270deg,
    #fafafa 270deg 302.5deg,
    #f1f1f1 302.5deg 335deg,
    #fafafa 335deg 347.5deg,
    #f1f1f1 347.5deg 360deg,
    #f1f1f1 360deg
  );
  min-height: calc(100% + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
  margin: 0;
  color: #333;
}
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  position: relative;
}
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin-top: 10px;
  margin-bottom: 10px;
}
.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: brightness(0) saturate(100%); /* ensure solid black rendering */
}
.event-title-wrapper {
  background: #111;
  color: #fff;
  padding: 10px;
  margin: 17px 0px 0px 0px;
  border-radius: 45px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
}
.event-title {
  padding: 0px 18px;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 1px;
  text-align: center;
  font-family: "Angkor";
  line-height: 1.3;
}
.event-sub {
  font-family: "Calligraffitti";
}
.session-bar {
  max-width: 460px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #111;
  margin: 0 0 4px;
}
.player-name {
  font-weight: 300;
}
.timer {
  font-weight: 300;
  color: #333;
  text-align: right;
}
.bingo-card {
  background: #fff;
  padding: 12px;
  width: 100%;
  max-width: 460px;
  border: 1px solid #333333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
}
.card-tagline {
  font-size: 14px;
  font-weight: 300;
  text-align: center;
  color: #333333;
  letter-spacing: 0.3px;
  margin: 8px 0 24px;
}
.bingo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.bingo-cell {
  background: #bbaa8a;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 4px 6px;
  line-height: 1.25;
  letter-spacing: 0.3px;
}
.bingo-cell.preview {
  background: #bbaa8a;
  border-color: #d0d0d0;
}
.bingo-cell.completed {
  background: #333;
  color: #fff;
  font-weight: 600;
  font-size: 11px;
}
.bingo-cell.completed::before {
  content: "";
}
.bingo-cell:hover:not(.completed) {
  background: #cfbf9f;
  transform: translateY(-2px);
}
.bingo-cell .cell-question {
  font-weight: 400;
}
.bingo-cell.completed .cell-question {
  font-weight: 300;
}
.bingo-cell.completed .cell-answer {
  margin-top: 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  opacity: 0.95;
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: #ffffff;
  padding: 16px;
  border-radius: 6px;
  max-width: 90%;
  width: 380px;
  text-align: center;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.28);
  border: 1px solid #cfcfcf;
}
.modal-content h3 {
  margin: 0 0 12px;
  color: #333;
  font-size: 1.2rem;
  font-weight: 300;
  margin-top: 4px;
}
.modal-input {
  width: 100%;
  padding: 16px 12px;
  border: 2px solid #909090;
  border-radius: 8px;
  font-size: 1rem;
  font-family: "ABChanelCorpo2022";
  margin-top: 8px;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.3s ease;
}
.modal-input:focus {
  border-color: #000000;
}
.modal-input::placeholder {
  color: #b7b7b7;
}
.answer-display {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  font-size: 1rem;
  color: #495057;
  text-align: left;
  line-height: 1.4;
  min-height: 50px;
  font-style: italic;
}
.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}
#submit-answer,
#player-name-submit,
#close-view,
.modal-buttons button.primary {
  background: #000;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  font-family: "ABChanelCorpo2022";
  cursor: pointer;
}
#submit-answer:hover,
#player-name-submit:hover,
#close-view:hover,
.modal-buttons button.primary:hover {
  background: #222;
}
#cancel-answer,
.modal-buttons button.secondary {
  background: #949494;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  font-family: "ABChanelCorpo2022";
  cursor: pointer;
}
#cancel-answer:hover,
.modal-buttons button.secondary:hover {
  background: #a0a0a0;
}
.hidden {
  display: none !important;
}

/* Waiting start modal */
#waiting-start-modal .waiting-modal-content {
  background: #ffffff;
  padding: 32px 40px;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  border: 1px solid #d5d5d5;
}

/* 8-dot circular pulsing spinner */
.waiting-spinner {
  position: relative;
  width: 30px; /* halved from 60px */
  height: 30px; /* halved from 60px */
}
.waiting-spinner span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px; /* halved from 10px */
  height: 5px; /* halved from 10px */
  margin: -2.5px; /* center each dot (half of previous) */
  border-radius: 50%;
  background: #767676;
  animation: waiting-dot-pulse 1.2s linear infinite;
  transform: rotate(var(--a)) translate(11px) scale(0.55); /* radius halved from 22px */
}
.waiting-spinner span:nth-child(1) {
  --a: 0deg;
  animation-delay: 0s;
}
.waiting-spinner span:nth-child(2) {
  --a: 45deg;
  animation-delay: 0.15s;
}
.waiting-spinner span:nth-child(3) {
  --a: 90deg;
  animation-delay: 0.3s;
}
.waiting-spinner span:nth-child(4) {
  --a: 135deg;
  animation-delay: 0.45s;
}
.waiting-spinner span:nth-child(5) {
  --a: 180deg;
  animation-delay: 0.6s;
}
.waiting-spinner span:nth-child(6) {
  --a: 225deg;
  animation-delay: 0.75s;
}
.waiting-spinner span:nth-child(7) {
  --a: 270deg;
  animation-delay: 0.9s;
}
.waiting-spinner span:nth-child(8) {
  --a: 315deg;
  animation-delay: 1.05s;
}

@keyframes waiting-dot-pulse {
  0%,
  80%,
  100% {
    transform: rotate(var(--a)) translate(11px) scale(0.55);
  }
  40% {
    transform: rotate(var(--a)) translate(11px) scale(1);
  }
}


.waiting-text {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.4px;
  margin: 0;
  color: #333;
}

/* Bingo status modal (almost / complete) */
.status-content {
  font-family: "ABChanelCorpo2022";
  font-weight: 300;
  background: #ffffff;
  padding: 16px 48px;
  margin: 0px 24px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.status-message {
  white-space: pre-wrap;
}

.status-badge {
  background: #df9134; /* almost variant */
  margin-top: 0px;
  padding: 6px 8px;
}

.status-badge.complete {
  background: #00821e; /* complete variant */
}

/* Distinct color variants for different partial milestones */
.status-badge.line-achieved {
  background: #df9134; /* orange for line achieved */
}

.status-badge.half-filled {
  background: #cd0000; /* red for half filled */
}

.status-sub {
  font-family: "ABChanelCorpo2022";
  font-weight: 400;
  font-size: 12px;
  white-space: pre-wrap;
}

/* Game rules modal specific additions */
.game-rules-content {
  font-family: "ABChanelCorpo2022";
  font-weight: 300;
  position: relative;
  text-align: left;
  max-width: 520px;
  width: 92%;
  line-height: 1.9;
  overflow-y: auto;
  max-height: 90dvh;
}
.game-rules-content ul {
  padding: 0 0 0 20px;
  margin-block-start: 0px;
  margin-block-end: 0px;
}
.game-rules-content h3 {
  margin: 0;
  font-weight: 600;
}
.game-rules-content b {
  font-weight: 600;
}

.game-rules-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  color: #000;
}
.game-rules-close:hover {
  color: #000;
}
.rules-trigger-wrapper {
  width: 100%;
  max-width: 460px;
  text-align: right;
}
.rules-trigger {
  margin-top: 12px;
  align-self: flex-end;
  background: none;
  border: none;
  padding: 4px 0;
  font-size: 13px;
  font-family: "ABChanelCorpo2022";
  color: #6f6f6f;
  cursor: pointer;
  text-decoration: underline;
}
.rules-trigger:hover,
.rules-trigger:focus {
  color: #111;
}
.game-rules-heading {
  font-family: "Angkor";
  font-size: 20px;
  margin: 12px 0;
  text-align: center;
}
.game-rules-star {
  margin: 6px;
  font-size: 18px;
}

.game-rules-spacing {
  margin: 12px 0;
}

/* Splash Screen */
.splash-screen {
  position: fixed;
  background: conic-gradient(
    #f1f1f1 12.5deg,
    #fafafa 12.5deg 25deg,
    #f1f1f1 25deg 57.5deg,
    #fafafa 57.5deg 90deg,
    #f1f1f1 90deg 122.5deg,
    #fafafa 122.5deg 155deg,
    #f1f1f1 155deg 167.5deg,
    #fafafa 167.5deg 180deg,
    #fafafa 180deg 192.5deg,
    #f1f1f1 192.5deg 205deg,
    #fafafa 205deg 237.5deg,
    #f1f1f1 237.5deg 270deg,
    #fafafa 270deg 302.5deg,
    #f1f1f1 302.5deg 335deg,
    #fafafa 335deg 347.5deg,
    #f1f1f1 347.5deg 360deg,
    #f1f1f1 360deg
  );
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
}
.splash-screen.visible {
  opacity: 1;
}
.splash-screen.fade-out {
  opacity: 0;
  transition: opacity 0.8s ease;
  transition-delay: 0s, 0.8s; 
}
.splash-screen .site-header {
  position: absolute;
  top: 23px;
}
.splash-inner {
  display: inline-block;
  position: relative;
  text-align: center;
}
.splash-poster-elements {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 480px;
  width: 80dvw;
}
