/* UnoPlay — real UNO game styles (room page) */
.game-board {
  background: radial-gradient(ellipse at center, #1a5a3b 0%, #0d3a25 55%, #062718 100%);
  border-radius: 28px;
  border: 8px solid #3a2010;
  box-shadow: inset 0 0 80px rgba(0,0,0,.55), 0 22px 60px rgba(0,0,0,.45);
  position: relative;
  min-height: 640px;
  overflow: hidden;
  padding: 24px;
}
.game-board::before {
  content: ""; position: absolute; inset: 20px; border-radius: 22px;
  border: 2px dashed rgba(255,255,255,.08); pointer-events: none;
}

/* Seats around the oval table */
.seat {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,.45); backdrop-filter: blur(8px);
  padding: 8px 14px 8px 8px; border-radius: 40px;
  border: 2px solid rgba(255,255,255,.12);
  transition: transform .3s, border-color .3s, box-shadow .3s;
  z-index: 3;
}
.seat img { width: 44px; height: 44px; border-radius: 50%; background: #222; }
.seat strong { color: #fff; font-size: 13px; display: block; font-weight: 700; letter-spacing: .5px; }
.seat small { color: #ffd32d; font-size: 10px; letter-spacing: 1px; }
.seat.active-turn {
  border-color: #ffd32d;
  box-shadow: 0 0 0 3px rgba(255,211,45,.35), 0 0 30px rgba(255,211,45,.55);
  transform: scale(1.06);
}
.seat-top    { top: 14px; left: 50%; transform: translateX(-50%); }
.seat-top.active-turn { transform: translateX(-50%) scale(1.06); }
.seat-left   { left: 14px; top: 50%; transform: translateY(-50%); }
.seat-left.active-turn { transform: translateY(-50%) scale(1.06); }
.seat-right  { right: 14px; top: 50%; transform: translateY(-50%); }
.seat-right.active-turn { transform: translateY(-50%) scale(1.06); }
.seat-bottom { bottom: 180px; left: 50%; transform: translateX(-50%); }
.seat-bottom.active-turn { transform: translateX(-50%) scale(1.06); }

/* Deck + discard */
.deck-area {
  position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%);
  display: flex; gap: 26px; align-items: center; z-index: 2;
}
.uno-card {
  width: 78px; height: 116px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 30px; color: #fff;
  border: 4px solid #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.5), inset 0 -6px 0 rgba(0,0,0,.15);
  position: relative; overflow: hidden;
  font-family: 'Arial Black', system-ui, sans-serif;
  user-select: none;
}
.uno-card::before {
  content: ""; position: absolute; inset: 8px; border-radius: 50% / 40%;
  background: rgba(255,255,255,.16); transform: rotate(-18deg);
  pointer-events: none;
}
.uno-card > span { position: relative; z-index: 2; text-shadow: 2px 2px 0 rgba(0,0,0,.45); }
.uno-card.red    { background: #d7263d; }
.uno-card.yellow { background: #f9c80e; color: #222; }
.uno-card.yellow > span { text-shadow: 2px 2px 0 rgba(255,255,255,.4); }
.uno-card.green  { background: #2fbf71; }
.uno-card.blue   { background: #2b8ee6; }
.uno-card.wild   { background: linear-gradient(135deg, #d7263d 0 25%, #f9c80e 25% 50%, #2fbf71 50% 75%, #2b8ee6 75% 100%); }
.uno-card.deck-back {
  background: #111; cursor: pointer; border-color: #fff;
}
.uno-card.deck-back::after {
  content: "UNO"; position: absolute; z-index: 2;
  color: #ef3340; font-style: italic; font-weight: 900;
  transform: rotate(-20deg); font-size: 22px;
  text-shadow: 2px 2px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
}
.uno-card.deck-back > span { display: none; }
.uno-card.deck-back:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.6); }
.discard-top { transform: rotate(-4deg); }

.current-color-chip {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.5);
  position: absolute; top: -14px; right: -14px; z-index: 4;
}
.current-color-chip.red    { background: #d7263d; }
.current-color-chip.yellow { background: #f9c80e; }
.current-color-chip.green  { background: #2fbf71; }
.current-color-chip.blue   { background: #2b8ee6; }
.current-color-chip.wild   { background: #333; }

/* Turn banner */
.turn-banner {
  position: absolute; top: 46%; left: 50%; transform: translate(-50%, -120px);
  font-size: 11px; letter-spacing: 3px; font-weight: 800;
  color: #fff; background: rgba(0,0,0,.55); padding: 6px 14px;
  border-radius: 20px; border: 1px solid rgba(255,255,255,.15); z-index: 3;
}

/* Player hand at bottom */
.hand {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: -8px; z-index: 4; padding: 0 20px;
  max-width: 96%; flex-wrap: nowrap; overflow-x: auto; overflow-y: visible;
}
.hand::-webkit-scrollbar { height: 6px; }
.hand::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }
.hand .uno-card.play {
  margin-left: -22px; cursor: pointer;
  transition: transform .18s ease, margin .18s;
  flex-shrink: 0;
}
.hand .uno-card.play:first-child { margin-left: 0; }
.hand .uno-card.play:hover:not(.disabled) {
  transform: translateY(-18px) rotate(-2deg);
  z-index: 10;
  box-shadow: 0 20px 40px rgba(0,0,0,.65);
}
.hand .uno-card.play.disabled {
  filter: brightness(.55) saturate(.6);
  cursor: not-allowed;
}

.uno-call-btn {
  position: absolute; bottom: 148px; right: 24px; z-index: 5;
  padding: 12px 22px !important; font-weight: 900; font-size: 14px;
  letter-spacing: 2px; box-shadow: 0 8px 20px rgba(255,211,45,.4);
  animation: unoPulse 1.6s ease-in-out infinite;
}
@keyframes unoPulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.06); }
}

.game-state {
  position: absolute; top: 12px; right: 16px; z-index: 3;
  font-size: 10px; letter-spacing: 2px; font-weight: 700;
  color: #ffd32d; background: rgba(0,0,0,.55);
  padding: 6px 12px; border-radius: 12px;
  border: 1px solid rgba(255,211,45,.3);
}

/* Color picker modal */
.color-picker {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: none; align-items: center; justify-content: center;
  z-index: 9999;
}
.color-picker.open { display: flex; }
.color-picker-card {
  background: #1a1a1a; padding: 24px; border-radius: 18px;
  border: 2px solid #ffd32d; text-align: center;
}
.color-picker-card h3 { color: #fff; margin: 0 0 16px; letter-spacing: 2px; font-size: 14px; }
.color-picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cp-btn {
  width: 70px; height: 70px; border-radius: 12px; border: 3px solid #fff;
  cursor: pointer; transition: transform .15s;
}
.cp-btn:hover { transform: scale(1.1); }
.cp-red    { background: #d7263d; }
.cp-yellow { background: #f9c80e; }
.cp-green  { background: #2fbf71; }
.cp-blue   { background: #2b8ee6; }

/* Flash message */
.flash-msg {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.8);
  background: rgba(0,0,0,.85); color: #ffd32d;
  padding: 18px 40px; border-radius: 14px; border: 2px solid #ffd32d;
  font-weight: 900; letter-spacing: 3px; font-size: 20px;
  opacity: 0; pointer-events: none; z-index: 9998;
  transition: opacity .25s, transform .25s;
}
.flash-msg.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Start button always visible when appropriate */
.start-game, #start-game { display: inline-flex !important; }
/* Never lock guests out of the browser game */
#gate-step-download { display: none !important; }
.join-gate.app-required { display: none !important; }

/* Hide floating music / mute controls site-wide */
.floating-controls { display: none !important; }

/* Play page shell */
.play-shell { padding-top: 24px; }
.play-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.play-head h1 { margin: 6px 0 0; font-size: 26px; color: #fff; }
.play-head .kicker { color: #ffd32d; }

/* Password modal for private rooms */
.pw-modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
  animation: pwFade .18s ease;
}
@keyframes pwFade { from { opacity: 0 } to { opacity: 1 } }
.pw-modal-card {
  background: #1a1a1a; color: #fff; padding: 30px 28px; border-radius: 18px;
  border: 2px solid #ffd32d; width: min(400px, 92vw); position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.pw-modal-card h3 { margin: 8px 0 4px; font-size: 20px; }
.pw-modal-card p { color: #bbb; font-size: 13px; margin: 0 0 16px; }
.pw-modal-card .input { width: 100%; margin-bottom: 10px; background: #2a2a2a; color: #fff; border-color: #444; }
.pw-lock { font-size: 34px; text-align: center; margin-bottom: 4px; }
.pw-error { color: #ff6b6b; font-size: 12px; min-height: 16px; margin-bottom: 8px; }
.pw-close {
  position: absolute; top: 10px; right: 12px; background: transparent;
  border: none; color: #888; font-size: 22px; cursor: pointer;
}
.pw-close:hover { color: #fff; }

/* Discover fake room polish */
.discover-fake { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.discover-fake:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.35); }
.discover-fake .room-kind { font-size: 11px; letter-spacing: 1px; font-weight: 700; }

/* Mobile tweaks */
@media (max-width: 720px) {
  .game-board { min-height: 540px; padding: 12px; }
  .uno-card { width: 60px; height: 90px; font-size: 22px; }
  .hand .uno-card.play { margin-left: -30px; }
  .seat img { width: 34px; height: 34px; }
  .seat strong { font-size: 11px; }
  .uno-call-btn { bottom: 118px; right: 12px; padding: 8px 14px !important; font-size: 12px; }
}
