/* ==========================================================================
   KHOOT VLTN - PLAYER (MOBILE / CLIENT) SCREEN STYLES (VOLTAN BRANDED)
   ========================================================================== */

.player-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 500px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  background: var(--vltn-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--vltn-border-radius);
  box-shadow: var(--shadow-sm);
}

.player-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-logo-img {
  height: 32px;
  max-width: 130px;
  object-fit: contain;
}

.player-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  background: rgba(48, 35, 174, 0.08);
  color: var(--vltn-primary);
  border: 1px solid rgba(48, 35, 174, 0.2);
  padding: 0.35rem 0.8rem;
  border-radius: var(--vltn-border-radius);
}

/* Player Views */
.player-view {
  display: none;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.player-view.active {
  display: flex;
}

/* 1. VIEW: JOIN (PIN & NICKNAME) */
.join-card {
  padding: 2rem 1.5rem;
  text-align: center;
  background: #FFFFFF;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--vltn-border-radius);
  box-shadow: var(--shadow-md);
}

.join-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--vltn-primary);
  margin-bottom: 0.5rem;
}

.join-desc {
  color: var(--vltn-text);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--vltn-text);
  margin-bottom: 0.4rem;
}

.input-field {
  width: 100%;
  padding: 0.95rem 1.2rem;
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  border-radius: var(--vltn-border-radius);
  color: var(--vltn-text);
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.input-field:focus {
  border-color: var(--vltn-primary);
  box-shadow: 0 0 0 3px rgba(48, 35, 174, 0.15);
}

.input-pin {
  letter-spacing: 6px;
  font-size: 1.7rem;
  font-family: monospace;
}

/* Avatar Selector */
.avatar-grid {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.avatar-choice {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--vltn-border-radius);
  background: #F1F5F9;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-choice.selected {
  background: rgba(48, 35, 174, 0.1);
  border-color: var(--vltn-primary);
  transform: scale(1.1);
}

.error-alert {
  background: #FEF2F2;
  border: 1px solid #EF4444;
  color: #DC2626;
  padding: 0.75rem;
  border-radius: var(--vltn-border-radius);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: none;
}

/* 2. VIEW: LOBBY WAITING */
.waiting-card {
  padding: 2.5rem 1.5rem;
  text-align: center;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--vltn-border-radius);
  box-shadow: var(--shadow-md);
}

.waiting-avatar-circle {
  width: 90px;
  height: 90px;
  font-size: 3.5rem;
  background: rgba(48, 35, 174, 0.08);
  border: 3px solid var(--vltn-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  animation: pulseGlow 2s infinite ease-in-out;
}

.waiting-name {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--vltn-text);
  margin-bottom: 0.5rem;
}

.waiting-sub {
  color: var(--vltn-text);
  font-size: 1.05rem;
  line-height: 1.4;
}

/* 3. VIEW: GAME PAD (ANSWER BUTTONS) */
.gamepad-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.gamepad-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.25rem;
  margin-bottom: 0.75rem;
}

.gamepad-question-indicator {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--vltn-primary);
}

.gamepad-question-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--vltn-text);
  background: #FFFFFF;
  border: 1px solid var(--bg-card-border);
  padding: 0.75rem 1rem;
  border-radius: var(--vltn-border-radius);
  margin-bottom: 1rem;
  text-align: center;
  display: block;
  box-shadow: var(--shadow-sm);
}

/* 4 Big Buttons Grid */
.answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.75rem;
  flex: 1;
  min-height: 380px;
}

.pad-btn {
  border: none;
  border-radius: var(--vltn-border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.2s ease;
  box-shadow: var(--shadow-md);
  user-select: none;
  -webkit-user-select: none;
  padding: 1.25rem 1rem;
}

.pad-btn:active {
  transform: scale(0.95);
  filter: brightness(0.9);
}

.pad-btn-0 { background: var(--color-red); }
.pad-btn-1 { background: var(--color-blue); }
.pad-btn-2 { background: var(--color-yellow); }
.pad-btn-3 { background: var(--color-green); }

.pad-letter {
  font-size: 1.5rem;
  font-weight: 900;
  color: #FFFFFF;
  background: rgba(0, 0, 0, 0.22);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pad-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}

/* 4. VIEW: ANSWER SUBMITTED WAITING */
.submitted-card {
  padding: 3rem 1.5rem;
  text-align: center;
  background: #FFFFFF;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--vltn-border-radius);
  box-shadow: var(--shadow-md);
}

/* 5. VIEW: FEEDBACK (CORRECT / WRONG) */
.feedback-card {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-radius: var(--vltn-border-radius);
  animation: bounceIn 0.35s ease-out;
  color: #FFFFFF;
}

.feedback-card.correct {
  background: #16A34A;
  box-shadow: 0 4px 25px rgba(22, 163, 74, 0.35);
}

.feedback-card.wrong {
  background: var(--vltn-emphasis);
  box-shadow: 0 4px 25px rgba(255, 45, 85, 0.35);
}

.feedback-icon {
  font-size: 4.5rem;
  margin-bottom: 0.5rem;
}

.feedback-title {
  font-size: 2.3rem;
  font-weight: 900;
  margin-bottom: 0.4rem;
}

.feedback-points {
  font-size: 1.8rem;
  font-weight: 900;
  color: #FEF08A;
  margin-bottom: 1.25rem;
}

.feedback-stats-row {
  display: flex;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: var(--vltn-border-radius);
  margin-top: 1rem;
}

.feedback-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
}

.stat-val {
  font-size: 1.35rem;
  font-weight: 900;
}

/* 6. VIEW: FINAL RESULTS */
.final-card {
  padding: 3rem 1.5rem;
  text-align: center;
  background: #FFFFFF;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--vltn-border-radius);
  box-shadow: var(--shadow-md);
  animation: bounceIn 0.4s ease-out;
}
