/* public/css/controller.css - Mobile Phone Game Controller UI */
.controller-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: calc(100dvh - 75px);
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 6px 4px;
}

/* Big Buzzer Buttons (Trivia / Quick Reaction) */
.buzzer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  flex: 1;
  min-height: 180px;
}

.buzzer-btn {
  border: none;
  border-radius: var(--radius-md);
  font-size: 2.2rem;
  font-weight: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(0,0,0,0.3);
  transition: transform 0.1s, box-shadow 0.1s;
}

.buzzer-btn:active {
  transform: translateY(6px);
  box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

.buzzer-A { background: #ff4757; color: #fff; }
.buzzer-B { background: #2ed573; color: #fff; }
.buzzer-C { background: #1e90ff; color: #fff; }
.buzzer-D { background: #ffa502; color: #fff; }

.buzzer-label {
  font-size: 1rem;
  font-weight: 700;
  opacity: 0.9;
}

/* Motion / Gyroscope Balance Gauge (Egg Balance) */
.gyro-arena {
  width: 300px;
  height: 300px;
  max-width: 86vw;
  max-height: 86vw;
  background: radial-gradient(circle at center, #1e2640 0%, #0d111d 100%);
  border: 4px solid var(--accent-cyan);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 35px rgba(0, 243, 255, 0.35), 0 0 25px rgba(0, 243, 255, 0.25);
  margin: 0 auto;
}

.gyro-target-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 110px; height: 110px;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  pointer-events: none;
}

.gyro-pass-gate {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 36px;
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.35), transparent);
  border-bottom: 2px dashed var(--accent-green);
  border-radius: 0 0 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-green);
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
  pointer-events: none;
  z-index: 5;
}

.gyro-egg-object {
  position: absolute;
  width: 36px; height: 48px;
  background: radial-gradient(circle at 35% 35%, #fffdf0 0%, #ecd078 70%, #d49a3d 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.04s linear;
  z-index: 10;
}

.gyro-egg-cracked {
  filter: grayscale(0.8) contrast(1.5);
  animation: eggCrack 0.35s forwards;
}

@keyframes eggCrack {
  0% { transform: translate(-50%, -50%) scale(1); }
  40% { transform: translate(-50%, -50%) scale(1.3) rotate(18deg); }
  100% { transform: translate(-50%, -50%) scale(0.85) rotate(-25deg); opacity: 0.75; }
}

@keyframes eggSlideOutTop {
  0% { transform: translate(-50%, -100px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -280px) scale(0.7); opacity: 0; }
}

@keyframes eggSlideInBottom {
  0% { transform: translate(-50%, 280px) scale(0.7); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Hot Potato Bomb */
.bomb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px 10px;
}

.bomb-graphic {
  font-size: 6rem;
  animation: bombPulse 0.8s infinite alternate;
}

@keyframes bombPulse {
  from { transform: scale(1); filter: drop-shadow(0 0 10px #ff3b00); }
  to { transform: scale(1.15); filter: drop-shadow(0 0 35px #ff0055); }
}

.bomb-timer-bar {
  width: 100%;
  height: 18px;
  background: #1c223a;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.bomb-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #ffe600, #ff0055);
  width: 100%;
  transition: width 0.1s linear;
}

/* Heads Up! Forehead Tilt Screen */
.heads-up-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 350px;
  text-align: center;
  background: #1c223a;
  border-radius: var(--radius-lg);
  padding: 25px;
  border: 3px solid var(--accent-pink);
}

.heads-up-word {
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 20px var(--accent-pink);
  margin-bottom: 20px;
}

.heads-up-guide {
  font-size: 1rem;
  color: var(--text-secondary);
  display: flex;
  gap: 20px;
}

/* Camera Scavenger Viewfinder */
.camera-viewfinder {
  width: 100%;
  max-width: 360px;
  height: 260px;
  border-radius: var(--radius-md);
  border: 2px solid var(--accent-cyan);
  overflow: hidden;
  margin: 0 auto;
  position: relative;
  background: #000;
}

.camera-viewfinder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-target-swatch {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
  position: absolute;
  top: 15px; right: 15px;
}

/* Board Game Grid (Tic-Tac-Toe / Mini Checkers) */
.board-grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
  max-width: 320px;
  height: 320px;
  margin: 0 auto;
}

.board-cell {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.15s;
}

.board-cell:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 243, 255, 0.1);
}

.board-cell.cell-x { color: var(--accent-pink); text-shadow: 0 0 15px var(--accent-pink); }
.board-cell.cell-o { color: var(--accent-cyan); text-shadow: 0 0 15px var(--accent-cyan); }

/* Solitaire Card Styling */
.solitaire-card {
  width: 44px;
  height: 64px;
  border-radius: 6px;
  background: #fff;
  color: #111;
  border: 1px solid rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  user-select: none;
  transition: transform 0.1s, box-shadow 0.1s;
}

@media (min-width: 400px) {
  .solitaire-card {
    width: 48px;
    height: 70px;
    font-size: 0.95rem;
  }
}

.solitaire-card.card-red { color: #d63031; }
.solitaire-card.card-black { color: #2d3436; }

.solitaire-card-back {
  background: linear-gradient(135deg, #0984e3, #6c5ce7);
  border: 2px solid #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.solitaire-card.card-empty {
  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.2);
  box-shadow: none;
}

.solitaire-card.card-selected {
  outline: 3px solid var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: 0 0 12px var(--accent-cyan);
}

.solitaire-tableau-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  min-height: 280px;
  position: relative;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 8px 4px;
}

.solitaire-col {
  position: relative;
  min-height: 250px;
}

.solitaire-col .solitaire-card {
  position: absolute;
  left: 0;
  width: 100%;
}

