@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);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

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

#main-header {
  width: 100%;
  max-width: 1400px;
  padding: 1rem 2rem 0 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

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

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

/* Home Banners */
.home-banners {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  height: 100%;
  padding: 2rem;
  align-items: center;
}

.banner {
  flex: 1;
  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;
  height: 90%;
}

.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-dark {
  background: #2a2a2a;
  color: #111;
  cursor: default;
}

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

.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-title {
  font-family: 'Opsilon', sans-serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 9vh, 4.5rem);
  line-height: 0.8;
  text-transform: uppercase;
}

.banner-title-black {
  color: #111;
}

.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-banners {
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
    padding: 2rem 0; /* Remove horizontal padding so width % is accurate to screen */
    justify-content: flex-start;
    align-items: center; /* Center the banners */
  }

  .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: 20%;
  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: #111;
  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 */
  right: 2.5rem;
  z-index: 20;
  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;
  background: rgba(0, 0, 0, 0.5);
  /* darkened background */
  z-index: 100;
  overflow: hidden;
}

.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-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;
}

.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;
}

/* ================================
   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, 5vmin, 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: 4rem 0 2rem 0 !important; /* Remove horizontal padding */
  }

  .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 {
    top: 1rem;
    left: 1rem;
    right: auto;
    font-size: 1.5rem;
  }

  /* Lobby layouts */
  .lobby-modal {
    position: relative !important;
    height: auto !important;
    min-height: calc(100vh - 80px) !important;
    flex-direction: column !important;
    overflow: visible !important;
    padding: 2rem 0 !important; /* Remove horizontal padding */
    align-items: center !important;
    justify-content: flex-start !important;
    background: transparent !important;
  }

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