/* TV Display Layout */
body.tv-body {
  background-color: #121218;
  color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 30px;
  overflow: hidden;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #2c2c3a;
  padding-bottom: 15px;
  margin-bottom: 25px;
}

.room-badge {
  background: #232332;
  border-left: 5px solid #2ecc71;
  box-shadow: -4px 0 12px rgba(46, 204, 113, 0.2);
  padding: 10px 20px;
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.status-banner {
  font-size: 1.3rem;
  color: #a0a0b8;
}

.status-alert {
  color: #e74c3c;
  font-weight: bold;
}

.category-title {
  font-size: 3.2rem;
  font-weight: 800;
  text-align: center;
  color: #d8b4fe;
  margin: 0;
  text-transform: uppercase;
}

.host-subtitle {
  text-align: center;
  font-size: 1.3rem;
  color: #a0a0b8;
  margin-top: 5px;
  margin-bottom: 30px;
}

.answers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.answer-card {
  background: #1e1e2a;
  border-left: 6px solid #4a4a6a;
  border-radius: 6px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.answer-text {
  font-size: 1.5rem;
  font-weight: 600;
}

.player-tag {
  font-size: 1.1rem;
  font-weight: bold;
  padding: 5px 12px;
  border-radius: 4px;
}

.answer-card.safe {
  background: #192e24;
  border-left-color: #2ecc71;
  box-shadow: -4px 0 12px rgba(46, 204, 113, 0.25);
}

.answer-card.safe .player-tag {
  background: #2ecc71;
  color: #0b1911;
}

.answer-card.trap {
  background: #3b181c;
  border-left-color: #e74c3c;
  box-shadow: -4px 0 20px rgba(231, 76, 60, 0.6);
  animation: pulseTrap 0.8s infinite alternate;
}

.answer-card.trap .player-tag {
  background: #e74c3c;
  color: #ffffff;
}

@keyframes pulseTrap {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

/* Phone Controller Layout */
body.phone-body {
  background-color: #121218;
  color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 16px;
}

.hidden {
  display: none !important;
}

.phone-card {
  background: #1e1e2a;
  border-left: 5px solid #2ecc71;
  box-shadow: -4px 0 12px rgba(46, 204, 113, 0.2);
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 18px;
}

.phone-title {
  margin-top: 0;
  color: #d8b4fe;
  letter-spacing: 1px;
}

.panel-heading {
  margin-top: 0;
  margin-bottom: 12px;
  color: #d8b4fe;
}

.phone-label {
  display: block;
  font-size: 0.9rem;
  color: #a0a0b8;
  margin-bottom: 6px;
}

.phone-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 5px;
  border: 1px solid #3a3a4e;
  background: #121218;
  color: #ffffff;
  font-size: 1rem;
}

.phone-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.badge-green {
  background: #192e24;
  border-left: 4px solid #2ecc71;
  padding: 6px 12px;
  font-weight: bold;
}

.badge-purple {
  background: #282036;
  border-left: 4px solid #d8b4fe;
  padding: 6px 12px;
  color: #d8b4fe;
  font-weight: bold;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: #2ecc71;
  color: #0b1911;
  font-weight: bold;
  font-size: 1.05rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.btn-danger {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background: #e74c3c;
  color: #ffffff;
  font-weight: bold;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.round-info {
  text-align: center;
  margin-bottom: 16px;
}

.small-muted {
  font-size: 0.85rem;
  color: #a0a0b8;
}

.phone-category {
  margin: 4px 0;
  color: #d8b4fe;
  font-size: 1.6rem;
}

.phone-answers-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-answer-choice {
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  background: #252535;
  color: #ffffff;
  border: 1px solid #3a3a4e;
  border-left: 5px solid #d8b4fe;
  border-radius: 5px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-answer-choice:hover {
  background-color: #f1c40f;
  color: #121218;
}

.answer-status-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: #252535;
  border-radius: 4px;
  font-size: 0.95rem;
}

.answer-status-row:hover {
  background-color: #f1c40f;
  color: #121218;
}

.row-safe {
  border-left: 4px solid #2ecc71;
}

.row-trap {
  border-left: 4px solid #e74c3c;
  background: #3b181c;
}

.feedback-banner {
  padding: 10px 14px;
  border-radius: 5px;
  margin-bottom: 14px;
  font-weight: bold;
  text-align: center;
}

.feedback-success {
  background: #192e24;
  color: #2ecc71;
  border: 1px solid #2ecc71;
}

.feedback-error {
  background: #3b181c;
  color: #e74c3c;
  border: 1px solid #e74c3c;
}

/* TV QR Code & Join Cluster */
.tv-join-cluster {
  display: flex;
  align-items: center;
  gap: 16px;
}

.qr-container {
  background: #ffffff;
  padding: 6px;
  border-radius: 6px;
  line-height: 0;
}

.room-label {
  font-size: 0.85rem;
  color: #2ecc71;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

/* Pass Control Row on Phone */
.pass-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #3a3a4e;
}

.pass-row {
  display: flex;
  gap: 8px;
}

.pass-row .phone-input {
  margin-bottom: 0;
}

.btn-secondary {
  padding: 0 18px;
  background: #d8b4fe;
  color: #121218;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* Admin Page Layout */
.admin-container {
  max-width: 680px;
  margin: 0 auto;
}

.admin-textarea {
  font-family: inherit;
  resize: vertical;
}

/* Mobile-Friendly Enhancements for play.php */
body.phone-body {
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 14px 40px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.phone-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #121218;
  padding: 10px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid #2c2c3a;
}

.phone-input {
  font-size: 16px;
  min-height: 48px;
}

.btn-primary,
.btn-danger,
.btn-secondary {
  min-height: 50px;
  font-size: 16px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-answer-choice {
  min-height: 54px;
  font-size: 1.15rem;
  padding: 14px 16px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-answer-choice:active {
  background-color: #f1c40f;
  color: #121218;
  transform: scale(0.98);
}

.answer-status-row {
  min-height: 46px;
  align-items: center;
  gap: 10px;
}

.btn-set-trap {
  cursor: pointer;
  border: 1px dashed #d8b4fe;
  touch-action: manipulation;
}

.btn-set-trap:active {
  background-color: #f1c40f;
  color: #121218;
}

@media (max-width: 480px) {
  .phone-card {
    padding: 14px;
  }

  .phone-category {
    font-size: 1.4rem;
  }

  .pass-row {
    flex-direction: column;
  }

  .btn-secondary {
    width: 100%;
  }
}
/* TV Turn Indicator Highlights */
.turn-highlight {
  background-color: #2ecc71;
  color: #0b1911;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-left: 8px;
}

.turn-safe {
  color: #2ecc71;
  font-weight: bold;
}
