* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.rules-link { color: #FFB300; }
.rules-link:hover { color: #d89701; }

@font-face {
  font-family: Ariw9500;
  src: url(Fonts/ari-w9500-display.ttf) format("truetype");
  font-weight: normal;
  font-style: normal;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  font-family: Ariw9500;
  touch-action: manipulation;
  color: white;
}

.container {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  box-sizing: border-box;
  overflow: hidden;
  background: url('Grondbier.gif');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Auto-fit game area: scale content down to avoid cut-off, scroll only as last resort */
.game-scroll {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}
.game-scroll::-webkit-scrollbar { width: 0; height: 0; }
.game-fit {
  width: 100%;
  margin: auto 0; /* center vertically when there's room; collapses when content overflows */
}
.game-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
}

#landscapeBlock {
  display: none;
}

@media (orientation: landscape) and (max-height: 600px) {
  #landscapeBlock {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #000;
    color: #fff;
    font-size: 18px;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
  }
}

.logo img {
  max-width: 400px;
  height: auto;
}

.letter {
  width: fit-content;
  height: auto;
  margin-top: -20px;
  margin-bottom: 20px;
  font-size: 40px;
  white-space: nowrap;
}

.letter img {
  max-width: 100%;
}

.question-display {
  display: none;
  font-size: 28px;
  text-align: center;
  padding: 30px;
  background: rgba(8, 4, 0, 0.72);
  border-radius: 15px;
  border: 2px solid #f1c40f;
  margin: 20px 0;
  max-width: 80%;
}

.countdown-container {
  display: none;
  font-size: 48px;
  margin: 20px 0;
  color: #f1c40f;
}

.time-up-image {
  display: none;
  font-size: 64px;
  margin: 20px 0;
}

/* ── Sprite-sheet timer (replaces numeric countdown) ───────────── */
.sprite-timer {
  width: 240px;
  height: 240px;
  margin: 0 auto;
  background-image: url('Piet_bier_Gifje-Sheet.png');
  background-repeat: no-repeat;
  background-size: 7200px 240px;
  background-position: 0 0;
  will-change: background-position;
}
.sprite-timer.run {
  -webkit-animation: spritePlay var(--timer-dur, 30s) steps(30) forwards;
          animation: spritePlay var(--timer-dur, 30s) steps(30) forwards;
}
@-webkit-keyframes spritePlay { from { background-position: 0 0; } to { background-position: -7200px 0; } }
@keyframes spritePlay { from { background-position: 0 0; } to { background-position: -7200px 0; } }

.timer-seconds {
  text-align: center;
  font-size: 40px;
  font-weight: bold;
  color: #f1c40f;
  margin-top: 4px;
}

/* ── Online vote countdown ─────────────────────────────────────── */
#onlineVoteTimer { margin: 4px auto 0; }
.vote-timer-label {
  text-align: center;
  color: #f1c40f;
  font-size: 22px;
  font-weight: bold;
}

/* ── Result overlay entrance animation ─────────────────────────── */
#onlineResultContent { -webkit-animation: resultPop 0.45s cubic-bezier(0.2,1.3,0.4,1) both; animation: resultPop 0.45s cubic-bezier(0.2,1.3,0.4,1) both; }
@-webkit-keyframes resultPop { from { opacity: 0; transform: scale(0.7) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes resultPop { from { opacity: 0; transform: scale(0.7) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* Non-voter (timed out) row in vote details */
.vote-detail-row--novote { opacity: 0.55; }
.vote-detail-row--novote .vote-detail-name { color: #999; }
.vote-novote-icon { color: #888; font-weight: bold; }

/* Wrong starting letter banner */
.result-wrongletter {
  margin: 10px auto;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(231, 76, 60, 0.18);
  border: 2px solid #e74c3c;
  color: #ff8a7a;
  font-weight: bold;
  font-size: 16px;
}

/* ── Slokken received flash ────────────────────────────────────── */
.slokken-flash-content {
  font-size: 64px;
  font-weight: bold;
  color: #f1c40f;
  text-shadow: 0 4px 18px rgba(0,0,0,0.7);
  text-align: center;
  -webkit-animation: slokkenFlash 1.6s ease-out forwards;
          animation: slokkenFlash 1.6s ease-out forwards;
}
@-webkit-keyframes slokkenFlash {
  0%   { opacity: 0; transform: scale(0.3); }
  20%  { opacity: 1; transform: scale(1.15); }
  35%  { transform: scale(1); }
  80%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}
@keyframes slokkenFlash {
  0%   { opacity: 0; transform: scale(0.3); }
  20%  { opacity: 1; transform: scale(1.15); }
  35%  { transform: scale(1); }
  80%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

.start-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 80px;
}

.start-button button {
  margin-bottom: 0;
  min-width: 240px;
  font-family: Ariw9500;
  font-size: 24px;
  padding: 20px 40px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  background: linear-gradient(270deg, #FFB300, #F57C00, #E65100);
  background-size: 600% 600%;
  animation: gradientMove 10s ease infinite;
  border: none;
  transition: transform 0.5s;
  box-shadow: 0px 4px 0px #b36200;
}

.start-button button:hover {
  opacity: 0.85;
  transform: scale(1.1);
}

.bottom-left, .bottom-right {
  display: flex;
  gap: 10px;
}

#backButton {
  display: none;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

button {
  padding: 12px 25px;
  font-family: Ariw9500;
  font-size: 16px;
  background: linear-gradient(270deg, #FFB300, #F57C00, #E65100);
  background-size: 800% 800%;
  animation: gradientMove 10s ease infinite;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  border: none;
  transition: transform 0.5s, opacity 0.3s;
  box-shadow: 0px 4px 0px #b36200;
}

button:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

button:active {
  transform: translateY(4px);
  box-shadow: 0px 0px 0px transparent;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  background: linear-gradient(180deg, #5c4810, #2e2405);
  padding: 30px;
  border: 2px solid #f1c40f;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  color: white;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb { background: #f1c40f; border-radius: 10px; }

#feedbackModal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.feedback-form {
  margin-top: 20px;
}

.feedback-form label {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #f1c40f;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: inherit;
}

.feedback-form textarea {
  min-height: 100px;
  resize: vertical;
}

.feedback-form button[type="submit"] {
  width: 100%;
  padding: 12px;
  font-size: 18px;
  background: linear-gradient(270deg, #f39c12, #f1c40f);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
}

.feedback-form button[type="submit"]:hover {
  opacity: 0.85;
}

.feedback-success {
  display: none;
  padding: 15px;
  background: rgba(241, 196, 15, 0.3);
  border: 1px solid #f1c40f;
  border-radius: 5px;
  margin-top: 15px;
  text-align: center;
}

.feedback-error {
  display: none;
  padding: 15px;
  background: rgba(231, 76, 60, 0.3);
  border: 1px solid #e74c3c;
  border-radius: 5px;
  margin-top: 15px;
  text-align: center;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #f1c40f;
}

.slider-container {
  margin: 30px 0;
}

.slider-container label {
  font-size: 18px;
  margin-bottom: 10px;
  display: block;
}

.slider-container input[type="range"] {
  width: 100%;
  height: 8px;
  background: #f1c40f;
  outline: none;
  border-radius: 5px;
}

.slider-value {
  font-size: 24px;
  color: #f1c40f;
  margin-top: 10px;
  text-align: center;
}

/* --- POWER-UP --- */
.power-up-display {
  display: none;
  font-size: 24px;
  color: #FFE0B2;
  margin-top: 10px;
  padding: 10px 20px;
  border: 2px dashed #FF6F00;
  border-radius: 10px;
  background: rgba(120, 50, 0, 0.6);
  animation: popIn 0.5s ease;
  white-space: pre-line;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.setting-item select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 5px;
  border: 1px solid #f1c40f;
  background: rgba(255,255,255,0.9);
}

.checkbox-container {
  margin: 15px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  background: rgba(0,0,0,0.2);
  padding: 10px;
  border-radius: 8px;
}

.checkbox-container input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #f1c40f;
}

#creditsModal {
  background-color: rgba(0, 0, 0, 0.9);
}

.footer-controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  pointer-events: none;
}

.footer-controls button {
  pointer-events: auto;
}

@media (max-width: 768px) {
  .logo img { max-width: 400px; }
  .letter { max-width: 250px; }
  .question-display { font-size: 20px; padding: 20px; }
  .start-button button { font-size: 20px; padding: 16px 32px; }

  .bottom-left, .bottom-right {
    display: contents;
  }
  .bottom-left button,
  .bottom-right button {
    width: 30vw;
    max-width: 110px;
    min-width: 80px;
    font-size: 12px;
    padding: 12px 0;
    margin: 0 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .modal-content {
    width: 90%;
    max-height: 85vh;
    padding: 20px;
  }
  .footer-controls {
    bottom: 15px;
    justify-content: center;
    gap: 0;
    padding: 0 5px;
  }
}

/* --- SHAKE --- */
@keyframes shake {
  0%   { transform: translate(1px, 1px) rotate(0deg); }
  10%  { transform: translate(-1px, -2px) rotate(-1deg); }
  20%  { transform: translate(-3px, 0px) rotate(1deg); }
  30%  { transform: translate(3px, 2px) rotate(0deg); }
  40%  { transform: translate(1px, -1px) rotate(1deg); }
  50%  { transform: translate(-1px, 2px) rotate(-1deg); }
  60%  { transform: translate(-3px, 1px) rotate(0deg); }
  70%  { transform: translate(3px, 1px) rotate(-1deg); }
  80%  { transform: translate(-1px, -1px) rotate(1deg); }
  90%  { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake-effect {
  animation: shake 0.5s 1;
}

/* --- JILLA MODAL --- */
.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.3);
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid #f1c40f;
}

.score-name {
  font-size: 18px;
  flex-grow: 1;
  text-align: left;
  padding-left: 10px;
}

.score-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.score-btn {
  background: #f1c40f;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.score-value {
  font-size: 20px;
  font-weight: bold;
  min-width: 25px;
  text-align: center;
}

.delete-player {
  color: #e74c3c;
  cursor: pointer;
  margin-left: 10px;
  font-size: 16px;
  background: none;
  border: none;
  padding: 0;
  width: auto;
  animation: none;
}

/* --- BONUS TITLE --- */
@keyframes textShine {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.bonus-title {
  background: linear-gradient(90deg, #8e44ad, #d966ff, #9b59b6, #fff, #8e44ad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: textShine 3s linear infinite;
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

/* --- UPDATE MODAL BUTTONS --- */
.modal-button-container {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-family: Ariw9500;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s;
}

.modal-btn:hover {
  opacity: 0.9;
}

.link-btn   { background-color: #3498db; }
.action-btn { background-color: #e67e22; }

/* --- HOME BUTTON --- */
.home-icon-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 100;
  width: 50px;
  height: 50px;
  padding: 10px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(270deg, #FFB300, #F57C00, #E65100);
  background-size: 600% 600%;
  animation: gradientMove 10s ease infinite;
  box-shadow: 0px 4px 0px #b36200;
}

.home-icon-btn img {
  width: 100%;
  height: auto;
  pointer-events: none;
}

.home-icon-btn:active {
  transform: translateY(4px);
  box-shadow: 0px 0px 0px transparent;
}

@media (max-width: 768px) {
  .home-icon-btn {
    width: 40px;
    height: 40px;
    padding: 8px;
    top: 15px;
    left: 15px;
  }
}


/* ============================================================
   ONLINE MULTIPLAYER UI
   ============================================================ */

/* Spelers panel — player rows */
.online-jilla-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
  background: rgba(255,255,255,0.04);
}

.jilla-row--turn {
  background: rgba(241,196,15,0.12);
  border: 1px solid rgba(241,196,15,0.35);
}

.jilla-row-order {
  font-size: 13px;
  color: #aaa;
  min-width: 20px;
  text-align: right;
}

.jilla-row-arrow {
  font-size: 14px;
  min-width: 18px;
  color: #f1c40f;
  text-align: center;
}

.jilla-row-name {
  flex: 1;
  font-size: 15px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jilla-row-badge {
  font-size: 11px;
  color: #e74c3c;
  font-weight: bold;
  padding: 2px 6px;
  border: 1px solid #e74c3c;
  border-radius: 4px;
  white-space: nowrap;
}

.jilla-row-count {
  font-size: 13px;
  color: #aaa;
  min-width: 28px;
  text-align: right;
}

/* Vote buttons */
.online-vote-btn {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 8px;
  font-family: Ariw9500;
  font-size: 16px;
  background: rgba(241,196,15,0.15);
  border: 1px solid #f1c40f;
  color: white;
  cursor: pointer;
  box-shadow: none;
  animation: none;
  transition: background 0.2s;
}

.online-vote-btn:hover { background: rgba(241,196,15,0.35); }
.online-vote-btn.online-voted { background: rgba(241,196,15,0.5); }
.online-vote-nobody {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
}

.online-vote-count { font-size: 12px; color: #aaa; margin-top: 8px; }

/* Status toast */
#onlineStatus {
  display: none;
  position: fixed;
  /* Bottom-anchored (above the footer buttons): a persistent
     "... is aan de beurt" toast at the top covered the letter text. */
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  border: 1px solid #f1c40f;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 20000;
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* Lobby player list */
#onlineLobbyPlayers li {
  padding: 8px 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  border: 1px solid rgba(241,196,15,0.25);
  margin-bottom: 6px;
  font-size: 15px;
}

/* Skipped player badge in strip */
.online-player--skipped {
  opacity: 0.45;
  border-color: rgba(231,76,60,0.5);
}
.online-player--skipped .online-player__name {
  text-decoration: line-through;
}

/* Result overlay content */
.result-accepted, .result-rejected {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.result-icon   { font-size: 64px; }
.result-text   { font-size: 30px; font-weight: bold; color: white; }
.result-accepted .result-text { color: #2ecc71; }
.result-rejected .result-text { color: #e74c3c; }
.result-jilla  { font-size: 20px; color: #e74c3c; }
.result-letter      { font-size: 20px; color: #f1c40f; }
.result-bonus       { font-size: 22px; font-weight: bold; color: #f1c40f; animation: jillaSlam 0.4s ease; margin-top: 4px; }
.result-skip-notice { font-size: 14px; color: #e74c3c; margin-top: 10px; }

/* Powerup action panel in result overlay */
.pu-action              { margin-top: 14px; padding: 12px; background: rgba(255,255,255,0.08); border-radius: 10px; }
.pu-action label        { display: block; font-size: 14px; margin-bottom: 6px; color: #ccc; }
.pu-action p            { font-size: 14px; margin: 0 0 8px; color: #ccc; }
.pu-action input[type="text"]   { width: 50px; text-transform: uppercase; text-align: center; font-size: 22px; padding: 4px 6px; border-radius: 6px; border: none; font-weight: bold; }
.pu-action input[type="number"] { width: 60px; text-align: center; font-size: 18px; padding: 4px 6px; border-radius: 6px; border: none; }
.pu-action button       { margin: 4px 6px; padding: 8px 14px; border-radius: 8px; border: none; cursor: pointer; font-weight: bold; background: #2980b9; color: #fff; font-size: 14px; animation: none; box-shadow: 0 2px 0 #1a6090; }

/* Rules modal sections */
.rules-section { margin-bottom: 16px; }
.rules-section h3 { font-size: 15px; margin: 0 0 8px; color: #f1c40f; }
.rules-section ol, .rules-section ul { margin: 0; padding-left: 20px; }
.rules-section li { font-size: 14px; margin-bottom: 5px; line-height: 1.45; }
.rules-section p { font-size: 14px; margin: 0; line-height: 1.45; }
.rules-section--tip { background: rgba(241,196,15,0.08); border-left: 3px solid #f1c40f; padding: 10px 12px; border-radius: 4px; }
.rules-section--tip h3 { margin-bottom: 4px; }

/* Brand logo back-link — fixed top-left, hidden during gameplay */
#brandLogo { display: block; position: fixed; top: 12px; left: 12px; z-index: 200; }
#brandLogoImg { width: 110px; height: auto; opacity: 0.8; transition: opacity 0.2s; }
#brandLogo:hover #brandLogoImg { opacity: 1; }

/* Jilla animation */
@keyframes jillaSlam {
  0%   { transform: scale(2.5); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}

/* Jilla panel player rows */
.online-jilla-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.jilla-row-name  { flex: 1; font-size: 16px; }
.jilla-row-count { font-size: 14px; min-width: 60px; text-align: center; }
.jilla-row-btn {
  padding: 5px 12px;
  font-size: 13px;
  font-family: Ariw9500, sans-serif;
  background: #e74c3c;
  box-shadow: 0 2px #8f1f1f;
  border-radius: 5px;
  color: white;
  border: none;
  cursor: pointer;
  animation: none;
}
.jilla-row-btn--active {
  background: #27ae60;
  box-shadow: 0 2px #1a6e3e;
}

/* Panel banners */
.panel-pu-banner {
  padding: 8px 10px;
  background: rgba(241,196,15,0.15);
  border: 1px solid rgba(241,196,15,0.4);
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #f1c40f;
}
.panel-round-banner {
  padding: 4px 10px;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 6px;
  text-align: right;
}

/* Player stats in spelers panel */
.jilla-row-stats {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  min-width: 55px;
  text-align: right;
}

/* Vote details in result overlay */
.vote-details {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.vote-detail-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 5px 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  opacity: 0;
  animation: voteReveal 0.35s ease forwards;
}
.vote-detail-name { font-size: 15px; }
@keyframes voteReveal {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Auto-resolve animation on Sluit stemming button */
.resolve-btn--auto {
  animation: autoResolveCountdown 7s linear forwards !important;
}
@keyframes autoResolveCountdown {
  0%   { opacity: 1;   box-shadow: 0 4px 0 #1a6e3e, 0 0 0px 0px rgba(46,204,113,0.7); }
  50%  { opacity: 0.8; box-shadow: 0 4px 0 #1a6e3e, 0 0 14px 6px rgba(46,204,113,0.4); }
  100% { opacity: 0.5; box-shadow: 0 4px 0 #1a6e3e, 0 0 0px 0px rgba(46,204,113,0); }
}

/* Tikkie result notice */
.result-tikkie {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255,165,0,0.18);
  border: 1px solid rgba(255,165,0,0.45);
  border-radius: 6px;
  font-size: 15px;
  color: #f39c12;
  text-align: center;
}

/* Lobby drag-to-reorder */
.lobby-player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: grab;
  user-select: none;
}
.lobby-player-row:hover { background: rgba(241,196,15,0.1); }
.lobby-drag-handle { color: #f1c40f; font-size: 18px; opacity: 0.7; }

/* Bonus pill (collapsed by default during question phase) */
.power-up-display .bonus-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(241,196,15,0.15);
  border: 1px solid rgba(241,196,15,0.5);
  border-radius: 20px;
  padding: 5px 14px;
  cursor: pointer;
  font-family: inherit;
  color: #f1c40f;
  font-size: 14px;
  width: auto;
  max-width: 90vw;
}
.bonus-pill-title    { font-weight: bold; }
.bonus-pill-preview  { opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.bonus-pill-full     { display: none; font-size: 14px; text-align: left; white-space: normal; }
.power-up-display.bonus-expanded .bonus-pill-preview { display: none; }
.power-up-display.bonus-expanded .bonus-pill-full    { display: inline; }
.power-up-display.bonus-expanded .bonus-pill {
  border-radius: 10px;
  background: rgba(241,196,15,0.22);
  padding: 8px 14px;
}

/* Answer submitted popup big text */
.result-answer-big {
  font-size: 26px;
  font-weight: bold;
  color: #fff;
  margin: 8px 0 4px;
  word-break: break-word;
  text-align: center;
}

/* Give-slokken picker (active player, result phase) */
.give-slokken-ui {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.give-slokken-label {
  font-size: 15px;
  color: #f1c40f;
  font-weight: bold;
}
.give-slokken-btn {
  width: 90%;
  max-width: 300px;
  background: linear-gradient(180deg, #e67e22, #a04000);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 16px;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px #6b2a00;
}
.give-slokken-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Give-out notice for non-active players */
.result-give-notice {
  margin-top: 6px;
  font-size: 15px;
  color: #aaa;
  text-align: center;
}

/* ============================================================
   ACCOUNTS — profile button (mirrors the home button, top-right)
   + auth / profile / friends modals.  (injected by ../auth.js)
   ============================================================ */
.profile-icon-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  width: 50px;
  height: 50px;
  padding: 10px;
  border: none;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  background: linear-gradient(270deg, #FFB300, #F57C00, #E65100);
  background-size: 600% 600%;
  animation: gradientMove 10s ease infinite;
  box-shadow: 0px 4px 0px #b36200;
}
.profile-icon-btn--avatar { padding: 0; overflow: hidden; }
.profile-icon-btn img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.profile-icon-btn:active { transform: translateY(4px); box-shadow: 0px 0px 0px transparent; }

@media (max-width: 768px) {
  .profile-icon-btn { width: 40px; height: 40px; padding: 8px; top: 15px; right: 15px; font-size: 20px; }
}

/* ── auth modal shell ─────────────────────────────────────── */
.auth-content { max-width: 380px; }
.auth-h2 { color: #f1c40f; text-align: center; margin: 0 0 14px; }
.auth-h3 { color: #f1c40f; font-size: 15px; margin: 16px 0 8px; }
.auth-link { display: inline-block; margin-top: 10px; color: #f1c40f; font-size: 13px; text-decoration: none; }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tab {
  flex: 1; padding: 10px; border: none; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,0.08); color: #ccc; font-family: inherit; font-size: 15px;
}
.auth-tab--active { background: #f1c40f; color: #1a0a00; font-weight: bold; }

.auth-field {
  width: 100%; box-sizing: border-box; padding: 11px; margin: 6px 0;
  border-radius: 8px; border: 1px solid #f1c40f; background: rgba(0,0,0,0.4);
  color: #fff; font-family: inherit; font-size: 16px;
}
.auth-btn {
  width: 100%; box-sizing: border-box; padding: 11px; margin-top: 8px; border: none;
  border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 600;
  background: rgba(255,255,255,0.12); color: #fff;
}
.auth-btn--primary { background: linear-gradient(180deg,#f1c40f,#e67e22); color: #1a0a00; box-shadow: 0 4px #a04000; }
.auth-btn--ghost { background: transparent; border: 1px solid rgba(255,255,255,0.25); }
.auth-btn--mini { width: auto; padding: 6px 10px; margin: 0; font-size: 13px; }
.auth-btn--join { background: linear-gradient(180deg,#27ae60,#1e8449); color: #fff; }
.auth-btn:disabled { opacity: .6; cursor: default; }

.auth-msg { min-height: 18px; margin: 10px 0 0; font-size: 14px; text-align: center; }
.auth-msg--err { color: #e74c3c; }
.auth-msg--ok  { color: #2ecc71; }

/* ── profile ──────────────────────────────────────────────── */
.profile-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #f1c40f; color: #1a0a00; font-size: 28px; font-weight: bold;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 20px; font-weight: bold; }
.profile-code { font-size: 13px; color: #aaa; }
.profile-code strong { color: #f1c40f; letter-spacing: 1px; }
.profile-actions, .profile-edit { display: flex; gap: 8px; margin: 8px 0; }
.profile-edit .auth-field { margin: 0; }
.profile-edit .auth-btn, .profile-actions .auth-btn { margin-top: 0; }
.profile-foot { display: flex; gap: 8px; margin-top: 14px; }

.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-box { background: rgba(255,255,255,0.06); border-radius: 8px; padding: 10px 4px; text-align: center; }
.stat-val { font-size: 22px; font-weight: bold; color: #f1c40f; }
.stat-label { font-size: 11px; color: #aaa; margin-top: 2px; }

/* ── friends ──────────────────────────────────────────────── */
.friend-add { display: flex; gap: 8px; }
.friend-add .auth-field { margin: 0; }
.friend-add .auth-btn { margin-top: 0; width: auto; white-space: nowrap; }
.friend-list { display: flex; flex-direction: column; gap: 6px; }
.friend-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.05); border-radius: 8px; padding: 8px 10px; }
.friend-name { flex: 1; display: flex; align-items: center; gap: 6px; }
.friend-actions { display: flex; gap: 6px; }
.friend-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #f1c40f; color: #1a0a00; font-weight: bold; font-size: 14px;
}
.friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-dot { width: 9px; height: 9px; border-radius: 50%; background: #2ecc71; display: inline-block; }
.friend-empty { color: #888; font-size: 14px; text-align: center; }

/* user badge (admin-assigned; color set inline per badge) */
.badge-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid;
  color: #f1c40f;
  border-color: #f1c40f;
  background: rgba(255,255,255,0.08);
}

/* ============================================================
   ONLINE GAME ANIMATIONS (v2.2)
   All transform/opacity only — cheap on mobile GPUs.
   ============================================================ */

/* Question / letter / bonus pill reveal on each new round (staggered via
   --reveal-delay set by online.js) */
@keyframes qReveal {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.q-reveal { animation: qReveal 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) var(--reveal-delay, 0ms) both; }

/* Answer input & vote box slide up whenever they (re)appear
   (display none→flex restarts the animation) */
@keyframes boxSlideUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
#onlineAnswerBox, #onlineVoteBox { animation: boxSlideUp 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) both; }

/* Result overlay: backdrop fades in on show, and out before hiding
   (online.js adds .overlay-hide, then sets display:none after 240ms) */
@keyframes overlayFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlayFadeOut { from { opacity: 1; } to { opacity: 0; } }
#onlineResultOverlay { animation: overlayFadeIn 0.25s ease both; }
#onlineResultOverlay.overlay-hide { animation: overlayFadeOut 0.22s ease both; }

/* Big ✅ / ❌ pops in just after the content card lands */
@keyframes resultIconPop {
  0%   { transform: scale(0); }
  55%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.result-icon { animation: resultIconPop 0.5s cubic-bezier(0.2, 1.2, 0.4, 1) 0.1s both; }

/* Status pill slides up from the bottom edge */
@keyframes statusSlideUp {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
#onlineStatus { animation: statusSlideUp 0.3s ease both; }

/* Timer urgency — last 5 seconds pulse red (question + vote countdown) */
@keyframes urgentPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}
.timer-seconds.urgent,
.vote-timer-label.vote-timer--urgent {
  color: #e74c3c;
  animation: urgentPulse 0.9s ease-in-out infinite;
}

/* Vote counter pulses when a new vote lands */
@keyframes countPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
#onlineVoteCount.count-pulse { animation: countPulse 0.35s ease; }

/* Lobby rows pop in — the list only re-renders when the roster changes,
   so this fires once per join/leave/reorder (stagger set inline) */
#onlineLobbyPlayers li { animation: qReveal 0.35s ease both; }

/* Bonus pill glows while expanded (bonus preview + manual expand) */
@keyframes bonusGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0); }
  50%      { box-shadow: 0 0 16px 2px rgba(241, 196, 15, 0.55); }
}
.power-up-display.bonus-expanded .bonus-pill { animation: bonusGlow 1.6s ease-in-out infinite; }

/* Nudge the host's "Volgende ▶" button a few times so it isn't missed
   (gradientMove kept — a bare animation override would kill the gradient) */
@keyframes nextBtnNudge {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.07); }
}
#onlineNextTurnBtn { animation: gradientMove 10s ease infinite, nextBtnNudge 1.4s ease-in-out 1.2s 3; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .q-reveal, #onlineAnswerBox, #onlineVoteBox,
  #onlineResultOverlay, #onlineResultOverlay.overlay-hide, #onlineResultContent,
  .result-icon, #onlineStatus,
  .timer-seconds.urgent, .vote-timer-label.vote-timer--urgent,
  #onlineVoteCount.count-pulse, #onlineLobbyPlayers li,
  .power-up-display.bonus-expanded .bonus-pill,
  .vote-detail-row {
    animation: none !important;
    opacity: 1;
  }
  #onlineNextTurnBtn { animation: gradientMove 10s ease infinite; }
}
