@font-face {
  font-family: 'Opsilon';
  src: url('/assets/opsilon.regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg-color: #000000;
  --card-bg: rgba(30, 41, 59, 0.9);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --secondary: #10b981;
  --secondary-hover: #059669;
  --accent: #8b5cf6;
  --danger: #ef4444;
  --border: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#app-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

#site-bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.40;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 768px) {

  /* Skip the 3MB+ background video on mobile - it's purely decorative and
     costs real data/battery on the connections most likely to be metered. */
  #site-bg-video {
    display: none;
  }
}

#app-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
  transition: opacity 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

#app-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
}

.site-logo {
  height: 60px;
  width: auto;
}

#view-container {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Home Banners */
.home-banners {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  width: 100%;
  padding: 2rem;
  align-items: stretch;
}

.banner {
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.banner:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.banner-yellow {
  background: #FFB300;
  color: #111;
}

.banner-magenta {
  background: #FF007F;
  color: #111;
}

.banner-cyan {
  background: #00c2ef;
  color: #111;
}

.banner-sus {
  background: #00dc6e;
  color: #111;
}

.banner-fibber {
  background: #8001ff;
  color: #fff;
}

.banner-group-chat {
  background: #248bf5;
  color: #fff;
}

.banner-drunkderby {
  background: #aed800;
  color: #111;
}

.panel-fibber .players-title {
  color: #fff;
}

.banner-dark {
  background: #2a2a2a;
  color: #111;
  cursor: default;
}

.banner-dark:hover {
  transform: none;
  box-shadow: none;
}

/* Flip Card Animation Base Styles (Desktop Hover & Mobile Click) */
.home-banners .banner {
  perspective: 1000px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible !important;
  min-height: 220px;
}

.home-banners .banner-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: 10px;
}

/* Flip trigger for desktop hover and mobile .flipped class */
@media (min-width: 769px) {
  .home-banners .banner {
    min-height: 400px;
  }

  .home-banners .banner:hover .banner-inner {
    transform: rotateY(180deg);
  }
}

.home-banners .banner.flipped .banner-inner {
  transform: rotateY(180deg) !important;
}

.home-banners .banner-front,
.home-banners .banner-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  transition: box-shadow 0.3s ease;
}

.home-banners .banner:hover .banner-front,
.home-banners .banner:hover .banner-back,
.home-banners .banner.flipped .banner-front,
.home-banners .banner.flipped .banner-back {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.home-banners .banner-front {
  z-index: 2;
  transform: rotateY(0deg);
}

.home-banners .banner-back {
  transform: rotateY(180deg);
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
}

/* Color themes for front and back faces */
.home-banners .banner-yellow .banner-front,
.home-banners .banner-yellow .banner-back {
  background: #FFB300;
  color: #111;
}

.home-banners .banner-magenta .banner-front,
.home-banners .banner-magenta .banner-back {
  background: #FF007F;
  color: #111;
}

.home-banners .banner-cyan .banner-front,
.home-banners .banner-cyan .banner-back {
  background: #00c2ef;
  color: #111;
}

.home-banners .banner-sus .banner-front,
.home-banners .banner-sus .banner-back {
  background: #00dc6e;
  color: #111;
}

.home-banners .banner-fibber .banner-front,
.home-banners .banner-fibber .banner-back {
  background: #8001ff;
  color: #fff;
}

.home-banners .banner-broken-remote .banner-front,
.home-banners .banner-broken-remote .banner-back {
  background: #ff8000;
  border: 3px solid #000000;
  color: #fff;
}

.home-banners .banner-battleshots .banner-front,
.home-banners .banner-battleshots .banner-back {
  background: #ff0100;
  color: #ffffff;
}

.home-banners .banner-dark .banner-front,
.home-banners .banner-dark .banner-back {
  background: #2a2a2a;
  color: #fff;
}

.home-banners .banner-group-chat .banner-front,
.home-banners .banner-group-chat .banner-back {
  background: #248bf5;
  color: #fff;
}

.home-banners .banner-drunkderby .banner-front,
.home-banners .banner-drunkderby .banner-back {
  background: #aed800;
  color: #111;
}

.banner-back-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}


.banner-back-desc {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(0.85rem, 1.8vh, 1rem);
  font-weight: 500;
  line-height: 1.45;
  margin: 0;
  color: #fff;
  opacity: 0.95;
}

.banner-learn-more-link {
  display: block;
  text-align: center;
  color: inherit;
  opacity: 0.8;
  font-size: 0.8rem;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.banner-learn-more-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.banner-play-btn {
  width: 100%;
  margin-top: auto;
  padding: 0.5rem 1rem;
  background: #111;
  color: #fff;
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1rem, 2.2vh, 1.4rem);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.banner-play-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.banner-fibber .banner-play-btn {
  background: #fff;
  color: #8001ff;
}

.banner-broken-remote .banner-play-btn {
  background: #000;
  color: #ff8000;
}

.banner-dark .banner-play-btn {
  background: #fff;
  color: #000;
}

/* Learn More button for mobile */
.btn-learn-more {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.65rem;
  font-family: 'Opsilon', sans-serif;
  font-size: 0.85rem;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 5;
  position: relative;
  align-self: flex-start;
  transition: transform 0.15s ease, background 0.15s ease;
}

.banner-magenta .btn-learn-more {
  background: #fff;
  color: #111;
}

.banner-fibber .btn-learn-more {
  background: #fff;
  color: #8001ff;
}

.banner-broken-remote .btn-learn-more {
  background: #000;
  color: #ff8000;
}

@media (min-width: 769px) {
  .btn-learn-more {
    display: none !important;
  }
}

.banner-content {
  position: relative;
  z-index: 2;
}

.banner-label {
  font-family: 'Opsilon', sans-serif;
  font-weight: 400;
  background: #111;
  color: #fff;
  display: inline-block;
  align-self: flex-start;
  padding: 0.05rem 0.45rem;
  border-radius: 0;
  font-size: clamp(1rem, 4.5vh, 1.65rem);
  margin-bottom: clamp(0.1rem, 0.5vh, 0.3rem);
}

.banner-label-black {
  background: #fff;
  color: #111;
}

.banner-tags {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: clamp(0.1rem, 0.5vh, 0.3rem);
}

.banner-tags .banner-label {
  font-size: clamp(0.55rem, 1.8vh, 0.8rem);
  margin-bottom: 0;
  white-space: nowrap;
  background: #fff;
  color: #111;
}

/* Tag text color always matches the card's own background color. */
.banner-yellow .banner-tags .banner-label {
  color: #FFB300;
}

.banner-magenta .banner-tags .banner-label {
  color: #FF007F;
}

.banner-cyan .banner-tags .banner-label {
  color: #00c2ef;
}

.banner-sus .banner-tags .banner-label {
  color: #00dc6e;
}

.banner-broken-remote .banner-tags .banner-label {
  color: #ff8000;
}

.banner-group-chat .banner-tags .banner-label {
  color: #248bf5;
}

.banner-drunkderby .banner-tags .banner-label {
  color: #aed800;
}

.banner-title {
  font-family: 'Opsilon', sans-serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 9vh, 4.5rem);
  line-height: 0.8;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.5rem;
}

.banner-title-faded {
  color: #1f1f1f;
  font-size: 4rem;
}

.banner-art {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: right;
  align-items: flex-end;
  pointer-events: none;
}

.banner-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom;
}

/* Forms & Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 500px;
}

.scrollable-setup {
  max-height: 90vh;
  overflow-y: auto;
}

h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 400;
  font-family: 'Opsilon', sans-serif;
  font-size: 2rem;
}

h3 {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  position: relative;
  font-weight: 700;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: 'Roboto', sans-serif;
}

input:focus {
  border-color: var(--primary);
}

.btn {
  width: 100%;
  padding: 0.875rem;
  border: none;
  border-radius: 8px;
  font-size: 1.125rem;
  font-family: 'Opsilon', sans-serif;
  font-weight: 400;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
  color: white;
  text-transform: uppercase;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--primary);
}

.btn.primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn.secondary {
  background: var(--secondary);
}

.btn.secondary:hover:not(:disabled) {
  background: var(--secondary-hover);
}

.hidden {
  display: none !important;
}

.highlight {
  color: var(--accent);
  letter-spacing: 2px;
}

ul {
  list-style: none;
}

#players-list li {
  padding: 0.75rem;
  background: black;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.option-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  color: var(--text-main);
  padding: 1.5rem;
  font-size: 1.25rem;
}

.option-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
}

.option-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
}

.option-btn.correct {
  background: var(--secondary) !important;
  border-color: var(--secondary) !important;
  color: white !important;
}

.option-btn.incorrect {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: white !important;
}

.timer-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

#timer-fill {
  height: 100%;
  background: var(--accent);
  width: 100%;
  transition: width 1s linear;
}

.fade-in {
  animation: cardEnter 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.card-swipe-out {
  animation: cardSwipeOut 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  transform-origin: bottom center;
}

@keyframes cardEnter {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(30px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes cardSwipeOut {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-100%, -20%) rotate(-15deg) scale(0.9);
  }
}

#leaderboard-list li {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

#leaderboard-list li:nth-child(1) {
  background: linear-gradient(to right, rgba(250, 204, 21, 0.2), transparent);
  border-left: 4px solid #facc15;
}

#leaderboard-list li:nth-child(2) {
  background: linear-gradient(to right, rgba(156, 163, 175, 0.2), transparent);
  border-left: 4px solid #9ca3af;
}

#leaderboard-list li:nth-child(3) {
  background: linear-gradient(to right, rgba(180, 83, 9, 0.2), transparent);
  border-left: 4px solid #b45309;
}

@media (max-width: 768px) {
  .home-view-wrapper {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom));
  }

  .home-banners {
    display: flex;
    flex-direction: column;
    overflow-y: visible !important;
    height: auto !important;
    padding: 2rem 0;
    /* Remove horizontal padding so width % is accurate to screen */
    justify-content: flex-start;
    align-items: center;
    /* Center the banners */
  }

  .hide-on-mobile {
    display: none !important;
  }

  #round-start-content {
    margin-top: 15vh !important;
    margin-bottom: auto !important;
  }

  .home-join-section {
    display: none !important;
  }

  .banner {
    flex: none;
    min-height: 400px;
    height: 400px;
    width: 90% !important;
    max-width: none !important;
    margin-bottom: 1rem;
  }

  /* Make art fully visible since tiles are tall enough */
  .banner-art {
    opacity: 1;
  }

}

/* ================================
   GAME SETUP SCREEN
   ================================ */

.game-setup-layout {
  width: 100%;
  height: 100%;
  display: flex;
  gap: 2rem;
  align-items: stretch;
  position: relative;
  overflow: visible;
  padding: 1rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.setup-banner {
  width: 450px;
  max-width: 28%;
  border-radius: 10px;
  padding: clamp(1rem, 4vh, 2.5rem);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  height: 90%;
  overflow-y: auto;
}

.setup-description {
  margin-top: clamp(0.5rem, 1.5vh, 1rem);
  margin-bottom: clamp(0.5rem, 2.5vh, 2rem);
  font-size: clamp(0.8rem, 1.8vh, 1.1rem);
  line-height: 1.4;
  color: #fff;
  font-weight: 500;
}

.setup-actions {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.5vh, 1rem);
  margin-top: auto;
}

.setup-input {
  width: 100%;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: clamp(0.5rem, 1.5vh, 1rem);
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1rem, 2.5vh, 1.5rem);
  text-align: center;
}

.setup-input::placeholder {
  color: #888;
}

.btn-black-solid {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: clamp(0.5rem, 1.5vh, 1rem);
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1.2rem, 3vh, 2rem);
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s;
}

.btn-black-solid:active {
  transform: scale(0.98);
}

.setup-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: clamp(0.25rem, 1vh, 0.5rem) 0;
}

.setup-divider-line {
  flex: 1;
  height: 2px;
  background: #111;
}

.setup-divider-text {
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1rem, 2.5vh, 1.5rem);
  color: #111;
}

.setup-join-title {
  text-align: center;
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1.5rem, 4vh, 2.5rem);
  color: #111;
}

.setup-join-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.setup-art-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.setup-art {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.back-text-btn {
  position: absolute;
  top: -3.5rem;
  /* align horizontally with logo */
  left: 2rem;
  right: auto;
  z-index: 200;
  color: #fff;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.8rem;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}

.back-text-btn:hover {
  opacity: 0.8;
}

/* Ensure banner dark elements have high contrast */
.banner-dark .setup-description,
.banner-dark .setup-divider-text,
.banner-dark .setup-join-title {
  color: #111;
}

.banner-dark .setup-divider-line {
  background: #111;
}

/* Make setup text readable over dark banner */
.banner-dark .banner-label {
  background: #111;
  color: #fff;
}

/* ================================
   NEW LOBBY DESIGN
   ================================ */

.join-input-group {
  display: flex;
  gap: 0.5rem;
  background: #fff;
  border-radius: 8px;
  padding: 0.25rem;
}

.setup-input-white {
  background: #fff;
  color: #111;
  border: none;
  border-radius: 4px;
  flex: 1;
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1rem, 2.5vh, 1.5rem);
  text-align: left;
  padding: clamp(0.2rem, 1vh, 0.5rem);
}

.setup-input-white::placeholder {
  color: #ccc;
}

.btn-join-inline {
  width: auto;
  padding: clamp(0.2rem, 1vh, 0.5rem) clamp(0.5rem, 2vh, 1.5rem);
  font-size: clamp(1rem, 2.5vh, 1.5rem);
}

/* Lobby Modal Overlay */
.lobby-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  z-index: 100;
  overflow: visible;
}

.lobby-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: -50vw;
  width: 100vw;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

#legal-age-modal,
#cookies-modal {
  position: fixed !important;
  background: rgba(0, 0, 0, 0.9) !important;
  z-index: 9999 !important;
}

.lobby-content {
  display: flex;
  flex-direction: column;
  width: 500px;
  max-width: min(90%, 80vh);
  margin: auto;
  gap: clamp(0.2rem, 1vh, 1rem);
}

.lobby-panel {
  background: #FF007F;
  border-radius: 12px;
  padding: clamp(0.5rem, 2vh, 2rem);
  text-align: center;
  color: #111;
}

.lobby-title {
  font-family: 'Opsilon', sans-serif;
  font-size: 3rem;
  color: #111;
  margin-bottom: 1.5rem;
}

.lobby-title-box {
  background: #fff;
  color: #111;
  border-radius: 12px;
  padding: clamp(0.2rem, 1vh, 1rem);
  margin-bottom: clamp(0.2rem, 1vh, 1.5rem);
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1.2rem, 4vh, 3rem);
  text-align: center;
}

.players-title {
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1rem, 3vh, 2rem);
  color: #111;
  margin-bottom: clamp(0.2rem, 1vh, 1rem);
}

.players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.2rem, 1vh, 0.5rem);
  list-style: none;
  padding: 0;
}

.players-grid li {
  background: #111;
  color: #fff;
  border-radius: 8px;
  padding: clamp(0.2rem, 1vh, 0.75rem);
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(0.8rem, 2vh, 1.5rem);
  font-weight: 400;
  display: flex;
  justify-content: center;
  align-items: center;
}

.players-grid li.waiting-slot {
  color: #666;
}

.packs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pack-checkbox-label {
  display: flex;
  align-items: center;
  background: #fff;
  color: #111;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.2rem;
  gap: 0.5rem;
  text-align: left;
}

.pack-checkbox-label input {
  width: auto;
  margin-right: 0.2rem;
}

.waiting-msg {
  background: #fff;
  color: #ccc;
  border-radius: 8px;
  padding: 0.75rem;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

/* Bottom QR Panel */
.lobby-qr-panel {
  background: #FF007F;
  border-radius: 12px;
  padding: clamp(0.5rem, 1.5vh, 1rem);
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vh, 1rem);
}

.qr-image {
  width: clamp(50px, 10vh, 100px);
  height: clamp(50px, 10vh, 100px);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.qr-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.qr-title {
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1rem, 3vh, 2rem);
  color: #111;
  line-height: 1;
}

.qr-subtitle {
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(0.6rem, 1.5vh, 1rem);
  color: #111;
  margin-bottom: clamp(0.1rem, 0.5vh, 0.5rem);
}

.qr-link-box {
  display: flex;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  padding: 0.25rem;
}

.qr-link-input {
  flex: 1;
  border: none;
  background: transparent;
  color: #111;
  padding: 0.5rem;
  font-family: 'Roboto', sans-serif;
  font-weight: bold;
  outline: none;
  text-align: center;
}

.btn-copy-inline {
  width: auto;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  border-radius: 4px;
}

.btn-large-white {
  background: #fff;
  color: #111;
  border: none;
  border-radius: 12px;
  padding: clamp(0.5rem, 2vh, 1rem);
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1.5rem, 4vh, 3rem);
  width: 100%;
  cursor: pointer;
  transition: transform 0.1s;
  text-align: center;
}

.btn-large-white:active {
  transform: scale(0.98);
}

/* ================================
   NEW QUIZ & LEADERBOARD DESIGN
   ================================ */

.question-view,
.leaderboard-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 600px;
  max-width: 90%;
  margin: 0 auto;
}

.panel-magenta {
  background: #FF007F;
}

.panel-white {
  background: #ffffff;
}

.panel-white .setup-input-white,
.panel-white .lobby-title-box {
  border: 1px solid #ddd;
}

.panel-cyan {
  background: #00c2ef;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: #111;
}

.panel-cyan-dark {
  background: #00a0c6;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.panel-red {
  background: #FF0000;
}

.panel-green {
  background: #4CAF50;
}

.question-title,
.leaderboard-title {
  font-family: 'Opsilon', sans-serif;
  font-size: 3.5rem;
  color: #fff;
  text-align: center;
  margin-bottom: 2rem;
  text-transform: uppercase;
  line-height: 1;
}

.answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.answer-btn {
  background: #fff;
  color: #888;
  border: 4px solid #fff;
  border-radius: 8px;
  padding: clamp(0.5rem, 2vh, 1.5rem);
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1rem, 10cqi, 2rem);
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s, border-color 0.2s, color 0.2s;
  container-type: inline-size;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-word;
  hyphens: auto;
}

.answer-btn:hover {
  border-color: #000;
  color: #111;
}

.answer-btn.selected {
  border-color: #000;
  color: #000;
}

.answer-btn.correct-reveal {
  background: #000;
  color: #fff;
  border-color: #000;
}

.answer-btn.incorrect-reveal {
  border-color: #000;
  color: #000;
}

.status-pill {
  width: 100%;
  height: 40px;
  background: #D8006B;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-pill-fill {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  background: #FFB3E6;
  width: 100%;
  border-radius: 20px;
  transition: width 1s linear;
  z-index: 1;
}

.status-pill.wrong .status-pill-fill {
  background: #FF0000;
  width: 100%;
}

.status-pill.wrong {
  background: #CC0000;
}

.status-pill.correct .status-pill-fill {
  background: #4CAF50;
  width: 100%;
}

.status-pill.correct {
  background: #388E3C;
}

.status-pill-text {
  position: relative;
  z-index: 2;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.5rem;
  color: #111;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lb-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lb-rank {
  background: #000;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Opsilon', sans-serif;
  font-size: 2rem;
  flex-shrink: 0;
}

.lb-name {
  background: #fff;
  color: #111;
  flex: 1;
  height: 50px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-family: 'Opsilon', sans-serif;
  font-size: 2rem;
  text-transform: uppercase;
}

.lb-score {
  background: #fff;
  color: #111;
  width: 120px;
  height: 50px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Opsilon', sans-serif;
  font-size: 2rem;
  flex-shrink: 0;
}

/* ================================
   THATS YOU STYLES
   ================================ */
.panel-yellow {
  background: #FFB300;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: #111;
}

.panel-yellow-dark {
  background: #FFB300;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ================================
   SUS STYLES
   ================================ */
.panel-sus {
  background: #00dc6e;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: #111;
}

.panel-sus-dark {
  background: #00cc66;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ================================
   FIBBER STYLES
   ================================ */
.panel-fibber {
  background: #8001ff;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: #ffffff;
}

.banner-fibber,
.panel-fibber,
.panel-fibber-dark {
  color: #ffffff;
}

.banner-fibber .banner-title,
.banner-fibber #setup-title,
.banner-fibber .setup-join-title,
.banner-fibber .setup-divider-text,
.banner-fibber .setup-description,
.panel-fibber .lobby-title,
.panel-fibber .players-title,
.panel-fibber h1,
.panel-fibber h2,
.panel-fibber h3,
.panel-fibber h4,
.panel-fibber-dark .qr-title,
.panel-fibber-dark .qr-subtitle {
  color: #ffffff !important;
}

/* White block exceptions: elements with white backgrounds have dark/purple text */
.banner-fibber .banner-label,
.panel-fibber .banner-label,
.panel-fibber .lobby-title-box {
  background: #ffffff !important;
  color: #8001ff !important;
}

.banner-fibber .banner-play-btn,
.banner-fibber .btn-learn-more {
  background: #ffffff !important;
  color: #8001ff !important;
}

.panel-fibber-dark {
  background: #6600cc;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #ffffff;
}

.banner-battleshots,
.panel-battleshots {
  background: #ff0100 !important;
  color: #ffffff !important;
}

.banner-battleshots .banner-title,
.banner-battleshots #setup-title,
.banner-battleshots .setup-join-title,
.banner-battleshots .setup-divider-text,
.banner-battleshots .setup-description,
.panel-battleshots .lobby-title,
.panel-battleshots .players-title,
.panel-battleshots h1,
.panel-battleshots h2,
.panel-battleshots h3,
.panel-battleshots h4,
.panel-battleshots-dark .qr-title,
.panel-battleshots-dark .qr-subtitle {
  color: #ffffff !important;
}

.banner-battleshots .banner-label,
.panel-battleshots .banner-label,
.panel-battleshots .lobby-title-box {
  background: #ffffff !important;
  color: #ff0100 !important;
}

.banner-battleshots .banner-play-btn,
.banner-battleshots .btn-learn-more {
  background: #ffffff !important;
  color: #ff0100 !important;
}

.panel-battleshots-dark {
  background: #cc0000;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #ffffff;
}

/* ================================
   GROUP CHAT STYLES
   ================================ */
.panel-group-chat {
  background: #248bf5;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: #ffffff;
}

.banner-group-chat,
.panel-group-chat,
.panel-group-chat-dark {
  color: #ffffff;
}

.banner-group-chat .banner-title,
.banner-group-chat #setup-title,
.banner-group-chat .setup-join-title,
.banner-group-chat .setup-divider-text,
.banner-group-chat .setup-description,
.panel-group-chat .lobby-title,
.panel-group-chat .players-title,
.panel-group-chat h1,
.panel-group-chat h2,
.panel-group-chat h3,
.panel-group-chat h4,
.panel-group-chat-dark .qr-title,
.panel-group-chat-dark .qr-subtitle {
  color: #ffffff !important;
}

.banner-group-chat .banner-label,
.panel-group-chat .banner-label,
.panel-group-chat .lobby-title-box {
  background: #ffffff !important;
  color: #248bf5 !important;
}

.banner-group-chat .banner-play-btn,
.banner-group-chat .btn-learn-more {
  background: #ffffff !important;
  color: #248bf5 !important;
}

.panel-group-chat-dark {
  background: #1c6fd6;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #ffffff;
}

/* --- Group Chat gameplay: iPhone mockup + iMessage-style thread --- */
.gc-game-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  padding: 1rem 0 2rem;
  gap: 1rem;
}

.gc-phone {
  width: 380px;
  max-width: 92vw;
  background: #000;
  border-radius: 44px;
  padding: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.gc-screen {
  background: linear-gradient(180deg, #ffffff 0%, #eef0f4 100%);
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 560px;
}

.gc-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem 0.2rem;
  color: #111;
}

.gc-clock {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.gc-status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.gc-status-icons img {
  height: 11px;
  width: auto;
  display: block;
}

.gc-icon-battery {
  height: 12px;
}

.gc-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 0.5rem;
}

.gc-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin-bottom: 0.35rem;
  display: block;
  object-fit: cover;
}

.gc-header-label {
  background: #3a3a3c;
  color: #fff;
  font-family: 'Opsilon', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.7rem;
  border-radius: 10px;
}

.gc-round-pill {
  align-self: center;
  background: #248bf5;
  color: #fff;
  font-family: 'Opsilon', sans-serif;
  font-size: 0.85rem;
  padding: 0.2rem 0.8rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.gc-screen-copy {
  padding: 0.75rem 1rem 0.5rem;
  text-align: center;
}

.gc-screen-title {
  font-family: 'Opsilon', sans-serif;
  font-size: 1.6rem;
  color: #111;
  line-height: 1.05;
  text-transform: uppercase;
}

.gc-screen-subtitle {
  font-family: 'Roboto', sans-serif;
  font-size: 0.8rem;
  color: #555;
  margin-top: 0.25rem;
  line-height: 1.3;
}

.gc-thread {
  flex: 1;
  min-height: 220px;
  max-height: 46vh;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
}

.gc-bubble-row {
  display: flex;
  flex-direction: column;
  margin: 0.35rem 0;
  max-width: 78%;
}

.gc-bubble-row-sender {
  align-self: flex-end;
  align-items: flex-end;
}

.gc-bubble-row-player {
  align-self: flex-start;
  align-items: flex-start;
}

.gc-bubble-name {
  font-family: 'Roboto', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: #8e8e93;
  margin-bottom: 0.15rem;
  padding: 0 0.4rem;
}

.gc-bubble {
  border-radius: 1.1rem;
  padding: 0.55rem 0.9rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  line-height: 1.3;
  word-wrap: break-word;
}

.gc-bubble-sender {
  background: #248bf5;
  color: #fff;
  border-bottom-right-radius: 0.3rem;
}

.gc-bubble-player {
  background: #e5e5ea;
  color: #111;
  border-bottom-left-radius: 0.3rem;
}

.gc-bubble-typing {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0.7rem 0.9rem;
}

.gc-bubble-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8e8e93;
  animation: gcTypingBounce 1.2s infinite ease-in-out;
}

.gc-bubble-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.gc-bubble-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes gcTypingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.gc-bubble-selectable {
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}

.gc-bubble-selectable:hover {
  transform: scale(1.02);
}

.gc-bubble-favorite {
  background: #34c759;
  color: #fff;
}

.gc-thumb {
  height: 1.1em;
  width: auto;
  vertical-align: -0.15em;
  margin-left: 0.2rem;
}

.gc-loading-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.gc-loading-pulse {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid #d1d1d6;
  border-top-color: #248bf5;
  animation: gcSpin 0.9s linear infinite;
}

@keyframes gcSpin {
  to {
    transform: rotate(360deg);
  }
}

.gc-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.gc-option-btn {
  background: #248bf5;
  color: #fff;
  border: none;
  border-radius: 1.15rem;
  border-bottom-right-radius: 0.3rem;
  padding: 0.65rem 1rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  align-self: flex-end;
  max-width: 90%;
  transition: transform 0.1s, background 0.15s;
}

.gc-option-btn:hover {
  transform: scale(1.02);
}

.gc-option-selected {
  background: #34c759;
}

.gc-composer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 1rem;
}

.gc-input {
  flex: 1;
  border: none;
  border-radius: 1.2rem;
  padding: 0.6rem 1rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  background: #fff;
  color: #111;
}

.gc-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #248bf5;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.gc-waiting-note {
  color: #8e8e93;
  font-family: 'Opsilon', sans-serif;
  font-size: 0.8rem;
  text-align: center;
  padding: 0 1rem 1.25rem;
  letter-spacing: 0.03em;
}

.gc-bottom-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #e5e5ea;
  border: none;
  border-radius: 1.6rem;
  padding: 0.4rem 0.4rem 0.4rem 1.1rem;
  margin: 0 1rem 1rem;
  cursor: pointer;
  transition: transform 0.1s;
}

.gc-bottom-btn:active {
  transform: scale(0.98);
}

.gc-bottom-btn-label {
  font-family: 'Opsilon', sans-serif;
  font-size: 0.95rem;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.gc-bottom-btn-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.gc-round-result {
  padding: 1rem 1.25rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gc-winner-banner {
  font-family: 'Opsilon', sans-serif;
  font-size: 1.2rem;
  color: #111;
  text-align: center;
}

.gc-winner-quote {
  font-family: 'Roboto', sans-serif;
  font-style: italic;
  color: #444;
  text-align: center;
  font-size: 0.9rem;
}

.gc-score-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gc-score-row {
  display: flex;
  justify-content: space-between;
  background: #fff;
  color: #111;
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  font-family: 'Opsilon', sans-serif;
  font-size: 0.95rem;
}

.gc-end-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 0.6rem 1.5rem;
  font-family: 'Opsilon', sans-serif;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 480px) {
  .gc-phone {
    border-radius: 32px;
    padding: 10px;
  }
}

.fibber-local-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sus-local-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ty-local-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ty-local-input {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.5rem;
  text-align: center;
  width: 100%;
}

.ty-local-input::placeholder {
  color: #666;
}

.ty-turn-header {
  background: #fff;
  color: #111;
  border-radius: 8px;
  padding: clamp(0.2rem, 1vh, 0.5rem);
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1rem, 4vh, 2rem);
  text-align: center;
  margin-bottom: clamp(0.5rem, 1.5vh, 1rem);
}

.ty-prompt-text {
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(0.8rem, 5vmin, 2.5rem);
  color: #111;
  text-align: center;
  line-height: 1.2;
  padding: 10px;
  word-wrap: break-word;
  overflow: hidden;
}

/* ================================
   DRUNK DERBY STYLES
   ================================ */
.panel-drunkderby {
  background: #aed800;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: #111;
}

.panel-drunkderby-dark {
  background: #96bd00;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* TV screens for Drunk Derby swap the app's default black page background
   for a bright pale blue, and drop the dark vignette that every other game
   relies on for mood - it would muddy this game's bright derby-day look. */
#app-bg.dd-tv-active {
  background-color: #cae8ff;
}

#app-bg.dd-tv-active::after {
  background: none;
}

.dd-game-view {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- TV: race track view --- */
.dd-tv-view {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dd-tv-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 90vh;
  aspect-ratio: 1921 / 1000;
  margin: 0 auto;
}

.dd-tv-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.dd-tv-screen {
  position: absolute;
  left: 30.5%;
  top: 17.4%;
  width: 39%;
  height: 25.8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6vw;
  padding: 1%;
  text-align: center;
  overflow: hidden;
}

.dd-tv-question-text {
  font-family: 'Opsilon', sans-serif;
  color: #fff;
  font-size: clamp(0.7rem, 2.1vw, 1.7rem);
  line-height: 1.15;
  text-transform: uppercase;
}

.dd-tv-winner-text {
  font-family: 'Opsilon', sans-serif;
  color: #ff2d2d;
  font-size: clamp(0.6rem, 1.7vw, 1.35rem);
  text-transform: uppercase;
}

.dd-tv-countdown {
  position: absolute;
  left: 30.5%;
  top: 17.4%;
  width: 39%;
  height: 25.8%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Opsilon', sans-serif;
  color: #fff;
  font-size: clamp(2rem, 7vw, 5rem);
}

.dd-tv-track {
  position: absolute;
  left: 0;
  top: 65.5%;
  width: 97%;
  height: 34.5%;
}

.dd-lane {
  position: absolute;
  left: 0;
  width: 100%;
}

.dd-lane-label {
  position: absolute;
  left: 1%;
  top: 4%;
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(0.5rem, 1.15vw, 0.95rem);
  color: #111;
  background: #fff;
  padding: 0.1em 0.5em;
  border-radius: 4px;
  z-index: 20;
  white-space: nowrap;
}

.dd-horse-wrap {
  position: absolute;
  top: 30%;
  width: 8%;
  transition: left 1.1s cubic-bezier(0.3, 0.9, 0.4, 1);
}

.dd-horse-img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.35));
}

/* --- Mobile: your horse + answers view --- */
.dd-player-view {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dd-player-countdown {
  font-family: 'Opsilon', sans-serif;
  color: #fff;
  font-size: clamp(4rem, 30vw, 8rem);
  text-align: center;
}

.dd-player-race {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dd-player-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dd-your-horse-label {
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1rem, 4vh, 1.5rem);
  color: #111;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.dd-player-horse-img {
  width: clamp(120px, 40vw, 200px);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
  margin-bottom: 1rem;
}

.dd-next-question-title {
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(1.8rem, 7vh, 2.75rem);
  color: #111;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.dd-next-question-sub {
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #111;
  opacity: 0.85;
  margin: 0 0 1.25rem;
  max-width: 90%;
}

/* ================================
   KINGS CUP STYLES
   ================================ */
.kc-card-container {
  display: flex;
  flex-direction: column;
  padding: clamp(0.5rem, 2vh, 1.5rem);
  position: relative;
  background: transparent;
  border: none;
  box-shadow: none;
  align-items: center;
}

.kc-playing-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(40vh, 200px);
  aspect-ratio: 2 / 3;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.kc-card-value {
  font-family: 'Opsilon', sans-serif;
  font-size: min(12vh, 6rem);
  color: #111;
  line-height: 1;
}

.kc-card-suit {
  width: 50%;
  object-fit: contain;
  margin-top: 1rem;
}

.kc-prompt-text {
  font-family: 'Opsilon', sans-serif;
  font-size: clamp(0.8rem, 3vmin, 2.5rem);
  color: #fff;
  text-align: center;
  line-height: 1.2;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
  word-wrap: break-word;
  overflow: hidden;
}

@media (max-width: 768px) {

  /* Let body scroll natively to avoid nested overflow issues */
  body,
  #app-container,
  #view-container {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    display: block !important;
  }

  #app-bg {
    position: fixed !important;
    height: 100vh !important;
  }

  /* Game setup layout and banner */
  .game-setup-layout {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    padding: 1.5rem 0 2rem 0 !important;
    gap: 0 !important;
  }

  .setup-banner {
    width: 90% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 500px !important;
    /* Big card like home screen */
    margin-bottom: 2rem !important;
  }

  .back-text-btn {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    align-self: center;
    width: 90%;
    margin: 0 auto 0.5rem auto !important;
    font-size: 1.5rem;
    justify-content: flex-start;
    order: -1;
  }


  .lobby-content {
    width: 90% !important;
    max-width: none !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
  }

  .lobby-modal {
    flex-direction: column;
    justify-content: flex-start;
  }
}

/* Privacy & Footer Styles */
.home-footer {
  width: 100%;
  text-align: center;
  padding: 1rem 0 2rem 0;
  z-index: 10;
}

.home-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.home-footer a:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.privacy-content h2 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.privacy-content p {
  margin-bottom: 1rem;
}

.privacy-content ul {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.privacy-content li {
  margin-bottom: 0.5rem;
}

/* Wrapper for home to push footer to bottom */
.home-view-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  overflow-y: auto;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.home-view-wrapper::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.home-view-wrapper .home-banners {
  flex: 0 0 auto;
  height: auto;
}

.home-join-section {
  position: relative;
  z-index: 10;
  width: calc(100% - 4rem);
  max-width: 1000px;
  margin: 1.5rem auto;
  padding: 1.2rem 2rem;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

@media (max-width: 768px) {

  .question-title,
  .leaderboard-title {
    font-size: 1.75rem !important;
  }

  .answer-btn {
    font-size: 1rem !important;
    padding: 0.75rem !important;
  }
}

/* BROKEN REMOTE STYLES (#ff8000 Theme) */
.banner-broken-remote {
  background: #ff8000 !important;
  border: 3px solid #000000 !important;
  color: #000000 !important;
}

.panel-broken-remote {
  background: #ff8000 !important;
  border: 3px solid #000000 !important;
  color: #000000 !important;
}

.panel-broken-remote-dark {
  background: #e67300 !important;
  border: 3px solid #000000 !important;
  color: #000000 !important;
}

.role-badge {
  background: #000;
  color: #ff8000;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.2rem;
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  letter-spacing: 1px;
  font-weight: bold;
}

.technician-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
  gap: 1.2rem;
  padding: 1rem;
}

.tech-card {
  background: #ff8000;
  border: 3px solid #000;
  border-radius: 12px;
  width: 100%;
  padding: 1.5rem;
  text-align: center;
  color: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tech-header {
  font-family: 'Opsilon', sans-serif;
  font-size: 2.2rem;
  color: #000;
  margin-bottom: 0.2rem;
}

.tech-subtext {
  font-weight: 900;
  font-size: 1.1rem;
  color: #000;
  margin-bottom: 1.2rem;
}

.tech-instruction-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
  background: #000;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  min-height: 80px;
}

.instruction-pill {
  background: #ff8000;
  color: #000;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.5rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-weight: bold;
  border: 2px solid #fff;
  letter-spacing: 1px;
}

.tech-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-tech-action {
  background: #000;
  color: #ff8000;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.6rem;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-tech-action:hover {
  transform: scale(1.03);
  background: #1a1a1a;
}

.tech-tally-card {
  background: #ff8000;
  border: 3px solid #000;
  border-radius: 12px;
  width: 100%;
  padding: 1.2rem;
  color: #000;
}

.tally-title {
  font-family: 'Opsilon', sans-serif;
  font-size: 1.6rem;
  color: #000;
  text-align: center;
  margin-bottom: 1rem;
}

.tally-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tally-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000;
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.1rem;
}

.tally-row.winner {
  border: 2px solid #00ff80;
  color: #00ff80;
}

.tally-row.drinking {
  border: 2px solid #ff4444;
  color: #ff4444;
}

/* Hide scrollbars for game views */
.game-view::-webkit-scrollbar,
.game-view-container::-webkit-scrollbar,
.player-panel::-webkit-scrollbar,
.remote-outer-scaler::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.game-view,
.game-view-container,
.player-panel,
.remote-outer-scaler {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.player-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px;
  flex: 1;
  overflow-y: auto;
}

.player-status-card {
  background: #ff8000;
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 0.5rem;
  text-align: center;
  color: #111;
  width: 100%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: center;
  flex-shrink: 0;
}

.player-status-msg {
  font-family: 'Opsilon', sans-serif;
  font-size: 1.3rem;
  color: #111;
}

.player-progress-badge {
  background: #111;
  color: #ff8000;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.2rem;
  padding: 0.3rem 1rem;
  border-radius: 15px;
  font-weight: bold;
}

.game-view-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  padding: 1rem;
  overflow-y: auto;
  box-sizing: border-box;
}

.remote-top-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 500px;
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.btn-subtle {
  background: #111;
  border: none;
  color: #ff8000;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.1rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-subtle:hover {
  background: #222;
}

.remote-outer-scaler {
  flex: 1;
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  position: relative;
}

/* TV Remote Frame: 386px x 987px */
.tv-remote-frame {
  position: relative;
  width: 386px;
  height: 987px;
  background-image: url('/assets/tv/phone_background.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  flex-shrink: 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border-radius: 40px;
  user-select: none;
  -webkit-user-select: none;
}

.tv-remote-btn {
  position: absolute;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease;
  user-select: none;
  -webkit-user-select: none;
  display: block;
}

.tv-remote-btn:hover {
  filter: brightness(1.2);
}

.tv-remote-btn:active {
  transform: scale(0.95);
}

.tv-static-bg {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

/* Authentication & Header Styles */
#main-header {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "left logo right";
  align-items: center;
  padding: 1rem 2rem;
  z-index: 100;
  flex-shrink: 0;
  gap: 1rem;
}

.logo-container {
  grid-area: logo;
  justify-self: center;
  cursor: pointer;
}

.header-left {
  grid-area: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.header-right {
  grid-area: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

/* Mobile game-action icon buttons (back/cancel/end game) */
.mobile-game-actions {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.mobile-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.mobile-action-btn:active {
  transform: scale(0.92);
}

.mobile-action-back,
.mobile-action-cancel {
  background: #000000;
  border: 1px solid #ffffff;
  color: #ffffff;
}

.mobile-action-back:hover,
.mobile-action-cancel:hover {
  background: #1a1a1a;
}

.mobile-action-end {
  background: #ef4444;
  border: none;
  color: #ffffff;
}

.mobile-action-end:hover {
  filter: brightness(1.1);
}

/* Desktop account icon + dropdown */
.account-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.account-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-icon-btn:hover,
.account-icon-btn[aria-expanded="true"] {
  background: rgba(236, 72, 153, 0.2);
  border-color: #ec4899;
  color: #ec4899;
}

.account-dropdown {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  min-width: 180px;
  background: rgba(17, 24, 39, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  padding: 0.5rem;
  z-index: 200;
}

.account-dropdown.open {
  display: flex;
}

.account-dropdown-link,
.account-dropdown-btn {
  display: block;
  width: 100%;
  color: #f3f4f6;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-family: 'Opsilon';
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

.account-dropdown-link:hover,
.account-dropdown-btn:hover {
  background: rgba(236, 72, 153, 0.2);
  color: #ec4899;
}

.header-game-action-btn {
  font-family: 'Opsilon', sans-serif;
  font-size: 1.1rem;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header-game-action-btn.host-end-btn {
  background: #ef4444;
  color: #ffffff;
}

.header-game-action-btn.host-end-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.header-game-action-btn.player-leave-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

.header-game-action-btn.player-leave-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ffffff;
}

.header-game-action-btn.back-btn {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

.header-game-action-btn.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.auth-nav {
  display: none;
  align-items: center;
  gap: 1rem;
}

.auth-nav-link {
  color: #f3f4f6;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: 'Opsilon';
}

.auth-nav-link:hover {
  background: rgba(236, 72, 153, 0.2);
  color: #ec4899;
}

.auth-nav-btn {
  color: #ffffff;
  background: #ef4444;
  border: none;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Opsilon';
  transition: background 0.2s ease;
}

.auth-nav-btn:hover {
  background: #dc2626;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #f3f4f6;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  position: relative;
}

.mobile-menu-toggle svg {
  width: 28px;
  height: 28px;
}

.mobile-code-banner {
  display: none;
}

@media (max-width: 768px) {
  .mobile-code-banner {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    background: rgba(17, 24, 39, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.6rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-code-banner.visible {
    transform: translateY(0);
  }

  .mobile-code-banner-form {
    display: flex;
    align-items: stretch;
    gap: 0.6rem;
    width: 100%;
  }

  .mobile-code-banner-input {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: #ffffff;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    text-transform: uppercase;
    outline: none;
  }

  .mobile-code-banner-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
  }

  .mobile-code-banner-input:focus {
    border-color: #ec4899;
  }

  .mobile-code-banner-btn {
    flex-shrink: 0;
    background: #ec4899;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 1.4rem;
    font-family: 'Opsilon', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .mobile-code-banner-btn:hover,
  .mobile-code-banner-btn:active {
    background: #db2777;
  }
}

@media (max-width: 768px) {
  #main-header {
    grid-template-columns: 1fr auto;
    grid-template-areas: "logo right";
  }

  .header-left {
    display: none;
  }

  .logo-container {
    justify-self: start;
  }

  .header-right {
    justify-self: end;
    gap: 0.6rem;
  }

  .site-logo {
    height: 40px;
    max-width: 100%;
    object-fit: contain;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .account-menu {
    display: none;
  }

  #header-game-action-btn {
    display: none;
  }

  .mobile-game-actions {
    display: flex;
  }

  .auth-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    gap: 2rem;
  }

  .auth-nav.open {
    display: flex;
  }

  .auth-nav-link,
  .auth-nav-btn {
    font-family: 'Opsilon', sans-serif;
    font-size: 2.5rem;
    padding: 1rem 2rem;
    width: 100%;
    text-align: center;
    background: transparent;
    border: none;
    text-transform: uppercase;
    letter-spacing: 2px;
  }
}


.auth-card-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  width: 100%;
  padding: 1.5rem;
}

.auth-card {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.auth-title {
  font-family: 'Opsilon', 'Roboto', sans-serif;
  font-size: 2.2rem;
  color: #ec4899;
  text-align: center;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: #9ca3af;
  text-align: center;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

.auth-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #d1d5db;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(31, 41, 55, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
  border-color: #ec4899;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.25);
}

.auth-btn-primary {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: transform 0.1s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

.auth-btn-primary:hover {
  background: linear-gradient(135deg, #f472b6, #ec4899);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.6);
}

.auth-btn-primary:active {
  transform: scale(0.98);
}

.auth-alert-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.auth-alert-success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #6ee7b7;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.auth-footer-text {
  text-align: center;
  font-size: 0.9rem;
  color: #9ca3af;
  margin-top: 0.5rem;
}

.auth-footer-text a {
  color: #ec4899;
  text-decoration: none;
  font-weight: 700;
}

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

.account-info-box {
  background: rgba(31, 41, 55, 0.5);
  border-radius: 8px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.account-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.account-info-label {
  font-size: 0.85rem;
  color: #9ca3af;
  text-transform: uppercase;
  font-weight: 700;
}

.account-info-value {
  font-size: 1rem;
  font-weight: 700;
  color: #f3f4f6;
}

.badge-verified {
  background: #10b981;
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-unverified {
  background: #f59e0b;
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* --- ADMIN DASHBOARD STYLES --- */
.admin-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.admin-stat-card {
  background: rgba(31, 41, 55, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  backdrop-filter: blur(10px);
}

.admin-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.admin-stat-value {
  font-family: 'Opsilon', 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: #f3f4f6;
  line-height: 1;
}

.admin-table-container {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  background: rgba(31, 41, 55, 0.8);
  color: #9ca3af;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.live-pulse-dot {
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.badge-local {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.4);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-online {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-country {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-game-info {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.btn-game-info:hover {
  background: rgba(59, 130, 246, 0.5);
  color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* ==========================================
   BATTLE SHOTS GAME STYLES
   ========================================== */
.bs-game-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

.bs-game-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  box-sizing: border-box;
}

.bs-header-container {
  text-align: center;
  margin-bottom: 0.5rem;
}

.bs-main-title {
  font-family: 'Opsilon', sans-serif;
  font-size: 2.2rem;
  color: #ffffff;
  margin: 0;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.bs-subtitle {
  font-size: 0.75rem;
  color: #ffffff;
  font-weight: 700;
  max-width: 360px;
  margin: 0.25rem auto 0 auto;
  line-height: 1.2;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* Placement Stage */
.bs-placement-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.bs-palette-container {
  background: rgba(40, 40, 40, 0.9);
  border-radius: 12px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.bs-palette-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.bs-palette-item {
  background: #2a2a2a;
  border: 2px solid #444;
  border-radius: 8px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s ease;
}

.bs-palette-item-wide {
  width: 110px;
  height: 50px;
}

.bs-palette-item:hover {
  background: #3a3a3a;
  border-color: #00ff00;
}

.bs-palette-item.selected {
  border-color: #00ff00 !important;
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.7);
  background: #334433;
}

.bs-palette-item.placed {
  opacity: 0.4;
  border-color: #555;
  cursor: default;
}

.bs-palette-icon-tall {
  max-height: 42px;
  width: auto;
  object-fit: contain;
}

.bs-palette-icon-small {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.bs-palette-icon-wide {
  max-width: 95px;
  max-height: 40px;
  object-fit: contain;
}

/* Down Arrows */
.bs-arrows-container {
  display: flex;
  justify-content: space-around;
  width: 290px;
  margin: 0.2rem 0;
}

.bs-arrow-icon {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

/* Grid System */
.bs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 310px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  margin: 0.5rem auto;
}

.bs-cell {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  background: #24a0ed;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.2s ease;
  user-select: none;
  overflow: hidden;
  box-sizing: border-box;
}

.bs-cell:active {
  transform: scale(0.95);
}

/* Drink Icon Centering & Sizing */
.bs-cell-icon {
  width: 75%;
  height: 75%;
  object-fit: contain;
  pointer-events: none;
}

/* Directional Alignments for Tall and Wide Bottle Split Parts */
.bs-cell.bs-cell-tall-top {
  align-items: flex-end !important;
  justify-content: center !important;
}

.bs-cell.bs-cell-tall-bottom {
  align-items: flex-start !important;
  justify-content: center !important;
}

.bs-cell.bs-cell-wide-left {
  align-items: center !important;
  justify-content: flex-end !important;
}

.bs-cell.bs-cell-wide-right {
  align-items: center !important;
  justify-content: flex-start !important;
}

.bs-cell-icon-tall-top {
  width: 75%;
  height: 100%;
  object-fit: fill;
  object-position: bottom center;
  pointer-events: none;
}

.bs-cell-icon-tall-bottom {
  width: 75%;
  height: 100%;
  object-fit: fill;
  object-position: top center;
  pointer-events: none;
}

.bs-cell-icon-wide-left {
  width: 100%;
  height: 75%;
  object-fit: fill;
  object-position: center right;
  pointer-events: none;
}

.bs-cell-icon-wide-right {
  width: 100%;
  height: 75%;
  object-fit: fill;
  object-position: center left;
  pointer-events: none;
}

/* Confirm Button */
.bs-confirm-btn {
  background: #444444;
  color: #888888;
  border: none;
  border-radius: 10px;
  width: 290px;
  padding: 0.75rem;
  font-family: 'Opsilon', sans-serif;
  font-size: 2.2rem;
  margin-top: 0.75rem;
  cursor: not-allowed;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.bs-confirm-btn.active {
  background: #00ff00 !important;
  color: #000000 !important;
  cursor: pointer !important;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}

/* Stage 2: Battle Area */
.bs-battle-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.bs-board-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.bs-board-title {
  font-family: 'Opsilon', sans-serif;
  font-size: 1.1rem;
  color: #d0d0d0;
  margin-bottom: 0.2rem;
  letter-spacing: 1px;
}

.bs-board-title-attack {
  color: #00ff00;
  font-size: 1.3rem;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
}

.bs-battle-area .bs-grid {
  width: 100%;
  max-width: 215px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

/* Player Grid (Top) */
.bs-player-grid .bs-cell {
  background: #24a0ed;
}

.bs-player-grid .bs-cell.hit {
  background: #c3272b !important;
  /* Red background when opponent hits your drink */
}

.bs-player-grid .bs-cell.miss {
  background: #2b2b2b !important;
  /* Dark background with grey cross */
}

/* Attack Grid (Bottom) */
.bs-attack-grid .bs-cell {
  background: #2b2b2b;
}

.bs-attack-grid .bs-cell.hit {
  background: #00ff00 !important;
  /* Green background with grey tick */
}

.bs-attack-grid .bs-cell.miss {
  background: #2b2b2b !important;
  /* Red cross on miss */
}

/* Middle Turn & Score Bar */
.bs-turn-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 290px;
  color: #ffffff;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.6rem;
  margin: 0.2rem 0;
}

.bs-turn-arrow {
  color: #00ff00;
  font-size: 1.8rem;
  font-weight: bold;
  visibility: hidden;
  width: 20px;
  text-align: center;
}

.bs-turn-arrow.active {
  visibility: visible;
}

.bs-turn-label-you,
.bs-turn-label-them {
  letter-spacing: 1px;
}

.bs-score-box {
  background: #ffffff;
  color: #000000;
  border: 2px solid #ffffff;
  border-radius: 4px;
  padding: 0.1rem 0.6rem;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.5rem;
  line-height: 1;
}

/* Victory / Game Over Overlay */
.bs-game-over-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.88) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.bs-game-over-modal.hidden {
  display: none !important;
}

.bs-game-over-content {
  background: #ff0100;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  width: 320px;
  box-shadow: 0 0 30px rgba(255, 1, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bs-game-over-title {
  font-family: 'Opsilon', sans-serif;
  font-size: 3rem;
  color: #ffffff;
  margin: 0;
}

.bs-game-over-subtitle {
  color: #ffffff;
  font-weight: bold;
  font-size: 1.1rem;
  margin: 0;
}

.bs-game-over-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ================================
   GAME ENDED POPUP OVERLAY
   ================================ */
.game-ended-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  animation: fadeInOverlay 0.3s ease forwards;
}

.game-ended-popup {
  width: 90%;
  max-width: 420px;
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  background: #FF007F;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.85) translateY(20px);
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
  position: relative;
  overflow: hidden;
}

.game-ended-title {
  font-family: 'Opsilon', sans-serif;
  font-size: 2rem;
  color: #111;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  position: relative;
}

.game-ended-message {
  font-size: 1.1rem;
  color: rgba(17, 17, 17, 0.85);
  margin-bottom: 1.75rem;
  line-height: 1.4;
  position: relative;
}

.game-ended-btn {
  display: inline-block;
  background: #ffffff;
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 2.5rem;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-transform: uppercase;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.game-ended-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.game-ended-btn:active {
  transform: scale(0.97);
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes popIn {
  from {
    transform: scale(0.85) translateY(20px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes fadeOutOverlay {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* ================================
   CUSTOM CONFIRM POPUP
   ================================ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  animation: fadeInOverlay 0.3s ease forwards;
  padding: 1.5rem;
}

.confirm-popup {
  width: 100%;
  max-width: 380px;
  border-radius: 16px;
  padding: 2rem 1.75rem 1.75rem;
  text-align: center;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.85) translateY(20px);
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

.confirm-title {
  font-family: 'Opsilon', sans-serif;
  font-size: 1.6rem;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.confirm-message {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.confirm-buttons {
  display: flex;
  gap: 0.75rem;
}

.confirm-btn {
  flex: 1;
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-family: 'Opsilon', sans-serif;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-transform: uppercase;
}

.confirm-btn:hover {
  transform: scale(1.03);
}

.confirm-btn:active {
  transform: scale(0.97);
}

.confirm-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.confirm-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.confirm-btn-danger {
  background: #ef4444;
  color: #ffffff;
}

.confirm-btn-danger:hover {
  background: #dc2626;
}

.confirm-btn-primary {
  background: #ec4899;
  color: #ffffff;
}

.confirm-btn-primary:hover {
  background: #db2777;
}