body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #050816;
  color: white;
}

.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: #0b1124;
  border: 1px solid #1b2545;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.hidden {
  display: none !important;
}

input {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 14px;
  font-size: 16px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #111827;
  color: white;
}

button {
  padding: 10px 16px;
  font-size: 15px;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  background: #1b5cff;
  color: white;
}

button:hover {
  opacity: 0.92;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.error {
  color: #ff6b6b;
  min-height: 20px;
}

.question-bar {
  background: linear-gradient(180deg, #0d1630 0%, #0a1125 100%);
  border: 1px solid #253662;
  border-radius: 18px;
  padding: 18px 22px;
  margin-bottom: 18px;
}

.question-label {
  font-size: 12px;
  letter-spacing: 1.4px;
  color: #96a7d6;
  margin-bottom: 8px;
  font-weight: 700;
}

.question-text {
  font-size: 28px;
  font-weight: 800;
}

.timer-shell {
  height: 18px;
  background: #0b1124;
  border: 1px solid #1f2b52;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #eab308 60%, #ef4444 100%);
  transform-origin: left center;
  transition: width 1s linear;
}

.round-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  background: #0b1124;
  border: 1px solid #1f2b52;
  border-radius: 14px;
  padding: 14px 18px;
}

.cam-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.cam-controls button {
  background: #1f2b52;
  border: 1px solid #3b4b7a;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
  min-height: 260px;
}

.player-card {
  background: #0b1124;
  border: 1px solid #1f2b52;
  border-radius: 18px;
  padding: 16px;
  min-height: 300px;
  position: relative;
}

.player-card.eliminated {
  opacity: 0.45;
  filter: grayscale(1);
}

.player-name {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.video-slot {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111827;
  border: 1px solid #2d3a67;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.video-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: black;
}

.video-slot .placeholder {
  color: #93a4d1;
  font-size: 14px;
  text-align: center;
  padding: 12px;
}

.video-slot .cam-off-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.mirror {
  transform: scaleX(-1);
}

.hearts-overlay {
  position: absolute;
  top: 60px;
  right: 24px;
  background: rgba(5, 8, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 22px;
  letter-spacing: 3px;
  color: #ef4444;
}

.player-status {
  margin-top: 14px;
  color: #9fb0e0;
  font-size: 14px;
}

.gm-zone {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.gm-box {
  min-width: 360px;
  background: linear-gradient(180deg, #141c35 0%, #0c1327 100%);
  border: 1px solid #314673;
  border-radius: 20px;
  padding: 18px 24px;
  text-align: center;
}

.gm-label {
  font-size: 12px;
  letter-spacing: 1.4px;
  color: #96a7d6;
  margin-bottom: 8px;
  font-weight: 700;
}

.gm-name-big {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 14px;
}

.gm-video-wrap {
  display: flex;
  justify-content: center;
}

.gm-video-slot {
  width: 320px;
}

.gm-panel {
  background: #0b1124;
  border: 1px solid #1f2b52;
  border-radius: 18px;
  padding: 20px;
}

.gm-answer-box {
  background: #111827;
  border: 1px solid #2d3a67;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}

.gm-answer-label {
  font-size: 12px;
  color: #96a7d6;
  margin-bottom: 6px;
  font-weight: 700;
}

.gm-answer-text {
  font-size: 24px;
  font-weight: 900;
  color: #ffe76a;
}

.heart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.heart-btn {
  background: #dc2626;
}

.winner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.winner-card {
  width: min(520px, 90vw);
  background: linear-gradient(180deg, #0d1630 0%, #0a1125 100%);
  border: 1px solid #2b406f;
  border-radius: 22px;
  padding: 28px;
  text-align: center;
}

.winner-title {
  font-size: 34px;
  font-weight: 900;
  margin-bottom: 12px;
}

.winner-text {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 18px;
}

@media (max-width: 1000px) {
  .players-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 700px) {
  .players-grid {
    grid-template-columns: 1fr;
  }

  .round-meta {
    flex-direction: column;
  }

  .gm-video-slot {
    width: 100%;
  }
}