@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito:wght@600;700;800;900&display=swap');

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

body {
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
  background: #faf8f5;
  color: #1a202c;
  display: flex;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
}

h1,
h2,
h3,
.btn,
.badge,
.lobby-code-label,
.player-tag,
.timer-ring,
.q-label,
.round-pill,
.letter-badge {
  font-family: 'Lilita One', 'Nunito', sans-serif;
}

.screen {
  display: none;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}

.screen.active {
  display: block;
}

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

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

.container {
  padding: 10px 0;
}

.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4a5568;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 8px 18px;
  border-radius: 50px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.15s;
}

.back-link:hover {
  background: #f0f0f0;
  color: #1a202c;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Logo */
.logo-section {
  background: linear-gradient(165deg, #818cf8, #6366f1, #4f46e5);
  border-radius: 24px;
  padding: 40px 24px 36px;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 2.8rem;
  font-family: 'Lilita One', sans-serif;
  border-radius: 22px;
  margin-bottom: 14px;
  border: none;
  box-shadow: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }

  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

.logo {
  font-family: 'Lilita One', sans-serif;
  font-size: 2.6rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  line-height: 1.1;
}

.logo span {
  color: rgba(255, 255, 255, 0.85);
}

/* Main card panel */
.home-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  padding: 30px 26px;
  margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
}

/* Inputs */
.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-family: 'Lilita One', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(0, 0, 0, 0.45);
  margin-bottom: 8px;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 15px 18px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  color: #1a202c;
  font-size: 1.05rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  outline: none;
  transition: all 0.15s;
}

input[type="text"]:focus,
textarea:focus {
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: rgba(0, 0, 0, 0.35);
  font-weight: 700;
}

.full-width {
  width: 100%;
}

/* Buttons */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  padding: 16px 30px;
  border: none;
  border-radius: 16px;
  font-size: 1.05rem;
  font-family: 'Lilita One', sans-serif;
  cursor: pointer;
  transition: all 0.12s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: white;
  text-align: center;
  position: relative;
}

.btn-green {
  background: #6366f1;
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-green:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}

.btn-green:active {
  transform: translateY(2px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.btn-teal {
  background: #4da895;
  box-shadow: 0 4px 15px rgba(77, 168, 149, 0.3);
  border: 1px solid rgba(77, 168, 149, 0.3);
}

.btn-teal:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(77, 168, 149, 0.4);
}

.btn-teal:active {
  transform: translateY(2px);
  box-shadow: 0 2px 8px rgba(77, 168, 149, 0.2);
}

.btn-orange {
  background: #d97706;
  box-shadow: 0 4px 15px rgba(192, 122, 106, 0.3);
  border: 1px solid rgba(192, 122, 106, 0.3);
}

.btn-orange:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(192, 122, 106, 0.4);
}

.btn-orange:active {
  transform: translateY(2px);
  box-shadow: 0 2px 8px rgba(192, 122, 106, 0.2);
}

.btn-small {
  padding: 10px 20px;
  font-size: 0.88rem;
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.12);
}

.divider span {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
}

/* Join row */
.join-custom-row {
  display: flex;
  gap: 10px;
}

.join-custom-row input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.join-custom-row .btn {
  flex-shrink: 0;
  padding: 16px 28px;
}

/* Error / Status */
.error-msg {
  color: #ef4444;
  text-align: center;
  margin-top: 14px;
  min-height: 20px;
  font-size: 0.9rem;
  font-weight: 700;
}

.status-msg {
  text-align: center;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 700;
}

.status-pill {
  text-align: center;
  color: rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
  font-family: 'Lilita One', sans-serif;
  letter-spacing: 1px;
  padding: 10px 24px;
  background: #ffffff;
  border-radius: 50px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto;
  width: fit-content;
}

/* How to play */
.how-to-play {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
}

.how-to-play h3 {
  font-family: 'Lilita One', sans-serif;
  font-size: 1.2rem;
  color: #6366f1;
  margin-bottom: 18px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step {
  display: flex;
  align-items: center;
  gap: 14px;
}

.step-num {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: #6366f1;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lilita One', sans-serif;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.step p {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.45);
  line-height: 1.4;
}

.step strong {
  color: #6366f1;
  font-weight: 700;
}

/* Screen header */
.screen-header {
  text-align: center;
  margin-bottom: 24px;
}

.screen-header h2 {
  font-family: 'Lilita One', sans-serif;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #1a202c;
}

.screen-sub {
  color: rgba(0, 0, 0, 0.45);
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 6px;
}

/* ===== LOBBY TWO-COLUMN LAYOUT ===== */
#screen-lobby {
  max-width: 900px;
}

.lobby-top-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: linear-gradient(165deg, #818cf8, #6366f1, #4f46e5);
  border: none;
  border-radius: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.lobby-code-label {
  font-family: 'Lilita One', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 2px;
  white-space: nowrap;
}

.lobby-code-inline {
  font-family: 'Lilita One', sans-serif;
  letter-spacing: 8px;
  color: white;
  font-size: 1.8rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-copy {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lobby-code-hint {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: auto;
  white-space: nowrap;
}

.lobby-layout {
  display: flex;
  gap: 16px;
}

.lobby-col-left {
  width: 300px;
  min-width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lobby-col-right {
  flex: 1;
  min-width: 0;
}

.lobby-panel {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  padding: 20px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.panel-title {
  font-family: 'Lilita One', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #6366f1;
  margin-bottom: 14px;
  text-align: center;
}

.panel-hint {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.4);
  margin-bottom: 14px;
}

.active-count {
  text-align: center;
  font-family: 'Lilita One', sans-serif;
  font-size: 0.82rem;
  color: rgba(0, 0, 0, 0.4);
  letter-spacing: 1px;
  margin-top: 12px;
}

/* Section title (used in non-panel contexts) */
.section-title {
  font-family: 'Lilita One', sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #6366f1;
  margin-bottom: 14px;
  text-align: center;
  width: 100%;
}

/* Lobby Players */
.lobby-players {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  width: 100%;
}

.lobby-player-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  animation: cardSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.lobby-player-card.is-you {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px) scale(0.95);
  }

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

.player-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.player-avatar span {
  font-family: 'Lilita One', sans-serif;
  font-size: 1.3rem;
  color: white;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-card-name {
  font-family: 'Lilita One', sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  color: #1a202c;
}

.player-badges {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.badge-host {
  font-family: 'Lilita One', sans-serif;
  font-size: 0.65rem;
  padding: 2px 10px;
  background: rgba(217, 119, 6, 0.15);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 50px;
  letter-spacing: 1px;
}

.badge-you {
  font-family: 'Lilita One', sans-serif;
  font-size: 0.65rem;
  padding: 2px 10px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 50px;
  letter-spacing: 1px;
}

.player-score-display {
  font-family: 'Lilita One', sans-serif;
  font-size: 1rem;
  color: #6366f1;
  letter-spacing: 1px;
}

/* Timer */
.timer-ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #1a202c;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
}

.timer-ring.timer-small {
  width: 60px;
  height: 60px;
  font-size: 1.6rem;
  margin-bottom: 0;
}

.timer-ring.urgent {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(255, 107, 107, 0.1);
  animation: shake 0.35s ease infinite;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0) rotate(0);
  }

  25% {
    transform: translateX(-4px) rotate(-2deg);
  }

  75% {
    transform: translateX(4px) rotate(2deg);
  }
}

/* ===== CATEGORY CONFIG ===== */
.category-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  justify-content: center;
}

.category-chip {
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.4);
  transition: all 0.15s;
  user-select: none;
}

.category-chip.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #818cf8;
}

.category-chip.custom {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(192, 122, 106, 0.3);
  color: #d97706;
}

.chip-remove {
  margin-left: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1em;
}

.custom-category-row {
  display: flex;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto;
}

.custom-category-row input {
  flex: 1;
}

/* ===== LETTER PICK SCREEN ===== */
.pick-header {
  text-align: center;
  margin-bottom: 28px;
}

.pick-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 14px;
}

.pick-avatar span {
  font-family: 'Lilita One', sans-serif;
  font-size: 1.6rem;
  color: white;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.pick-title {
  font-family: 'Lilita One', sans-serif;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #1a202c;
  margin-bottom: 6px;
}

.pick-sub {
  color: rgba(0, 0, 0, 0.45);
  font-weight: 700;
  font-size: 0.9rem;
}

.letter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 500px;
}

.letter-pick-btn {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  color: #1a202c;
  font-family: 'Lilita One', sans-serif;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.letter-pick-btn:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(99, 102, 241, 0.2);
}

.letter-pick-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.letter-pick-btn.selected {
  background: #6366f1;
  border-color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  color: #1a202c;
  transform: scale(1.1);
}

.letter-pick-btn.waiting {
  opacity: 0.25;
  cursor: not-allowed;
}

.letter-pick-btn:disabled:not(.selected):not(.waiting) {
  opacity: 0.15;
  cursor: not-allowed;
}

/* ===== FILLING SCREEN ===== */
#screen-filling {
  max-width: 900px;
}

.fill-top-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  margin-bottom: 14px;
}

.letter-badge {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  background: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  border: 2px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.04);
}

.fill-instruction {
  color: rgba(0, 0, 0, 0.5);
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0;
}

.fill-instruction strong {
  color: #6366f1;
  font-size: 1.1rem;
}

.fill-alert {
  width: 100%;
  text-align: center;
  padding: 12px 20px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 14px;
  animation: popIn 0.3s ease;
}

.fill-alert.urgent {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.2);
  color: #ef4444;
}

.categories-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.fill-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fill-label {
  font-family: 'Lilita One', sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #4a5568;
  padding-left: 4px;
}

.fill-input-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.15s;
}

.fill-input-wrap:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.letter-prefix {
  font-family: 'Lilita One', sans-serif;
  font-size: 1.1rem;
  color: #6366f1;
  padding: 10px 0 10px 14px;
  user-select: none;
}

.fill-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 10px 14px 10px 4px !important;
  font-size: 1rem;
  color: #1a202c;
  font-weight: 700;
  outline: none;
  border-radius: 0 !important;
}

.fill-input:focus {
  box-shadow: none !important;
}

.fill-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fill-status {
  flex: 1;
  color: rgba(0, 0, 0, 0.5);
  font-weight: 700;
  font-size: 0.88rem;
}

.fill-bottom .btn {
  flex-shrink: 0;
  padding: 14px 40px;
}

/* ===== REVEAL SCREEN ===== */
.reveal-header {
  text-align: center;
  margin-bottom: 24px;
}

.reveal-progress {
  font-family: 'Lilita One', sans-serif;
  font-size: 0.88rem;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.reveal-category-name {
  font-family: 'Lilita One', sans-serif;
  font-size: 2rem;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.reveal-answers {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.reveal-answer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  animation: cardSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.reveal-answer-card.duplicate {
  border-color: rgba(192, 122, 106, 0.4);
  background: rgba(192, 122, 106, 0.08);
}

.reveal-answer-card.invalidated {
  border-color: rgba(192, 80, 80, 0.35);
  background: rgba(192, 80, 80, 0.08);
}

.reveal-answer-card.empty {
  opacity: 0.4;
}

.reveal-answer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.reveal-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.reveal-avatar span {
  font-family: 'Lilita One', sans-serif;
  font-size: 1rem;
  color: white;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.reveal-answer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.reveal-player-name {
  font-family: 'Lilita One', sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: inherit;
}

.reveal-answer-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a202c;
}

.reveal-answer-text em {
  color: rgba(0, 0, 0, 0.4);
  font-style: italic;
  font-weight: 700;
}

.reveal-answer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.duplicate-tag {
  font-family: 'Lilita One', sans-serif;
  font-size: 0.65rem;
  padding: 3px 10px;
  background: rgba(192, 122, 106, 0.15);
  color: #c07a6a;
  border: 1px solid rgba(192, 122, 106, 0.35);
  border-radius: 50px;
  letter-spacing: 1px;
}

.invalid-tag {
  font-family: 'Lilita One', sans-serif;
  font-size: 0.65rem;
  padding: 3px 10px;
  background: rgba(192, 80, 80, 0.15);
  color: #ef4444;
  border: 1px solid rgba(192, 80, 80, 0.3);
  border-radius: 50px;
  letter-spacing: 1px;
}

.vote-count-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.5);
}

.btn-vote-invalid {
  padding: 6px 14px;
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 50px;
  background: rgba(255, 107, 107, 0.1);
  color: #ef4444;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-vote-invalid:hover {
  background: rgba(255, 107, 107, 0.18);
  border-color: rgba(255, 107, 107, 0.4);
}

.btn-vote-invalid.voted,
.btn-vote-invalid:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.host-wait {
  margin-bottom: 20px;
}

/* ===== CHAT BOX ===== */
.chat-box {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
}

.chat-messages {
  height: 180px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}

.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 78%;
}

.chat-bubble-wrap.chat-you {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-author-name {
  font-family: 'Lilita One', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  padding: 0 12px;
}

.chat-bubble {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 10px 16px;
  border-radius: 20px 20px 20px 6px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1a202c;
}

.chat-bubble-wrap.chat-you .chat-bubble {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.25);
  border-radius: 20px 20px 6px 20px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

.chat-input-row input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  background: #ffffff;
  color: #1a202c;
}

.chat-input-row .btn {
  flex-shrink: 0;
}

/* ===== RESULTS ===== */
.results-table-wrap {
  width: 100%;
  margin-bottom: 26px;
}

.results-scroll {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 500px;
}

.results-table th {
  font-family: 'Lilita One', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.4);
  padding: 12px 10px;
  background: #ffffff;
  text-align: left;
  white-space: nowrap;
}

.results-table td {
  padding: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}

.results-table tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.04);
}

.results-player-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-family: 'Lilita One', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
  color: #1a202c;
}

.results-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.score-good {
  color: #4da895;
}

.score-bad {
  color: #c07a6a;
  text-decoration: line-through;
  opacity: 0.6;
}

.score-empty {
  color: rgba(0, 0, 0, 0.4);
}

.results-total {
  font-family: 'Lilita One', sans-serif;
  color: #6366f1;
  font-size: 1rem;
}

.results-section {
  margin-bottom: 26px;
  width: 100%;
}

.results-section h3 {
  font-family: 'Lilita One', sans-serif;
  margin-bottom: 14px;
  color: #6366f1;
  text-align: center;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#scoreboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.score-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  font-size: 1.05rem;
  color: #1a202c;
}

.score-row .score-points {
  color: #6366f1;
}

h2 {
  text-align: center;
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 800px) {
  #screen-lobby { max-width: 560px; }
  #screen-filling { max-width: 560px; }

  .lobby-top-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: linear-gradient(165deg, #818cf8, #6366f1, #4f46e5);
  border: none;
  border-radius: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

  .lobby-code-hint {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: auto;
  white-space: nowrap;
}

  .lobby-layout {
    flex-direction: column;
  }

  .lobby-col-left {
    width: 100%;
    min-width: 0;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .fill-bottom {
    flex-direction: column;
  }

  .fill-bottom .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .logo {
  font-family: 'Lilita One', sans-serif;
  font-size: 2.6rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  line-height: 1.1;
}

  .home-card {
    padding: 24px 20px;
  }

  .lobby-code-inline {
  font-family: 'Lilita One', sans-serif;
  letter-spacing: 8px;
  color: white;
  font-size: 1.8rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

  .screen-header h2 {
    font-size: 1.5rem;
  }

  .reveal-category-name {
    font-size: 1.5rem;
  }
}

/* Used Letters Grid in Lobby */
.used-letters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
}

.used-letter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-family: 'Lilita One', cursive;
  font-size: 1rem;
  background: #e0fce7;
  color: #22c55e;
  border: 2px solid #bbf7d0;
}

.used-letter-chip.used {
  background: #f3f4f6;
  color: #b0b0b0;
  border-color: #e5e7eb;
  text-decoration: line-through;
  opacity: 0.6;
}