/* ── EmojiGuessr — Game-specific styles ────────────────────────────────────
   Base styles (body, btn, card, etc.) are in sdk/sdk.css
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Category badge ── */
.category-badge {
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 16px; border-radius:20px; font-size:14px; font-weight:700;
  background:rgba(249,211,66,0.12); border:1.5px solid rgba(249,211,66,0.3);
  color:var(--gold); margin:10px auto 0; letter-spacing:0.3px;
}
.category-badge-inline {
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 12px; border-radius:20px; font-size:13px; font-weight:700;
  background:rgba(249,211,66,0.10); border:1px solid rgba(249,211,66,0.25);
  color:var(--gold);
}

/* ── Word to represent ── */
.word-to-represent {
  font-size:28px; font-weight:700; color:var(--gold);
  text-shadow:0 0 20px rgba(249,211,66,0.5);
  background:rgba(249,211,66,0.08); border:2px solid rgba(249,211,66,0.3);
  border-radius:14px; padding:14px 28px; margin-top:12px; letter-spacing:1px;
}

/* ── Guess header ── */
.guess-header {
  display:flex; align-items:center; gap:12px;
  width:100%; max-width:560px; margin-bottom:16px;
}
.timer-bar-wrap { flex:1; height:8px; background:rgba(255,255,255,0.1); border-radius:4px; overflow:hidden; }
.timer-bar { height:100%; border-radius:4px; background:linear-gradient(90deg,var(--green),var(--gold),var(--red)); transition:width 0.5s linear; }
.timer-text { font-size:18px; font-weight:700; color:var(--gold); min-width:36px; text-align:right; }

/* ── Guess input ── */
.guess-input-row { display:flex; gap:8px; width:100%; margin-bottom:6px; }
.guess-error { color:var(--red); font-size:13px; text-align:center; animation:wrongShake 0.4s ease-out; }
.guess-close { color:var(--gold-dark) !important; animation:wrongShake 0.4s ease-out; }
.found-badge {
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 20px; border-radius:20px; font-size:16px; font-weight:700;
  background:rgba(46,204,113,0.15); border:2px solid rgba(46,204,113,0.35);
  color:var(--green); animation:pop 0.3s ease-out;
}

/* ── Emoji canvas ── */
.emoji-canvas {
  position:relative; width:100%; aspect-ratio:16/9;
  background:rgba(255,255,255,0.07); border:2px dashed rgba(255,255,255,0.3);
  border-radius:16px; overflow:hidden; margin-bottom:10px;
  cursor:crosshair; user-select:none; min-height:160px;
}
.results-canvas { max-width:100%; aspect-ratio:16/9; margin-bottom:12px; cursor:default; }
.canvas-emoji {
  position:absolute; font-size:32px; line-height:1;
  transform:translate(-50%,-50%); cursor:pointer; transition:transform 0.1s; user-select:none;
}
.canvas-emoji:hover { transform:translate(-50%,-50%) scale(1.3); }
.emoji-canvas.is-viewer .canvas-emoji { cursor:default; }
.emoji-canvas.is-viewer .canvas-emoji:hover { transform:translate(-50%,-50%) scale(1); }
.canvas-hint {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  color:rgba(255,255,255,0.25); font-size:13px; text-align:center; padding:20px; pointer-events:none;
}

/* ── Emoji quick picker ── */
.emoji-input-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; width:100%; }
.selected-emoji-slot {
  width:44px; height:44px; border-radius:10px; font-size:28px;
  background:rgba(249,211,66,0.12); border:2px solid rgba(249,211,66,0.3);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.emoji-quick-grid { display:flex; flex-direction:column; gap:0; }

/* Category tabs */
.emoji-tabs {
  display:flex; gap:4px; flex-wrap:wrap; padding:6px 0 8px;
  border-bottom:1px solid rgba(255,255,255,0.08); margin-bottom:6px;
}
.emoji-tab {
  font-size:20px; width:36px; height:36px; border-radius:8px;
  border:2px solid transparent; background:rgba(255,255,255,0.04);
  cursor:pointer; transition:background 0.12s, border-color 0.12s;
  display:flex; align-items:center; justify-content:center;
}
.emoji-tab:hover  { background:rgba(255,255,255,0.10); }
.emoji-tab.active { border-color:var(--gold); background:rgba(249,211,66,0.12); }

/* Emoji buttons grid */
.emoji-grid-inner {
  display:flex; flex-wrap:wrap; gap:4px;
  max-height:180px; overflow-y:auto; padding:2px 0;
}
.emoji-grid-inner::-webkit-scrollbar { width:3px; }
.emoji-grid-inner::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.15); border-radius:2px; }
.emoji-quick-btn {
  font-size:22px; width:38px; height:38px; border-radius:8px;
  border:2px solid transparent; background:rgba(255,255,255,0.05);
  cursor:pointer; transition:background 0.1s, border-color 0.1s;
  display:flex; align-items:center; justify-content:center;
}
.emoji-quick-btn:hover  { background:rgba(255,255,255,0.12); }
.emoji-quick-btn.active { border-color:var(--gold); background:rgba(249,211,66,0.12); }

/* ── Word hint letters ── */
.hw-letter {
  font-size:22px; font-weight:700; color:var(--gold); min-width:16px;
  text-align:center; border-bottom:2px solid rgba(249,211,66,0.5);
  padding-bottom:2px; line-height:1.3; letter-spacing:0;
}
.hw-letter.revealed { color:var(--green); border-color:rgba(46,204,113,0.5); }
.hw-space { width:18px; flex-shrink:0; }

/* ── Live results / player status ── */
.live-results { width:100%; display:flex; flex-direction:column; gap:5px; }
.live-row {
  display:flex; align-items:flex-start; gap:10px; padding:8px 12px;
  border-radius:10px; background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.06); font-size:14px;
}
.live-row.found  { background:rgba(46,204,113,0.08); border-color:rgba(46,204,113,0.2); }
.live-row.poseur { background:rgba(249,211,66,0.06); border-color:rgba(249,211,66,0.15); }
.player-guesses { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.player-guess-tag {
  font-size:11px; padding:2px 7px; border-radius:8px;
  background:rgba(231,76,60,0.12); color:rgba(231,76,60,0.8);
  border:1px solid rgba(231,76,60,0.2); font-weight:600;
}

/* ── Answer reveal ── */
.answer-reveal {
  font-size:26px; font-weight:700; color:var(--gold);
  background:rgba(249,211,66,0.08); border:2px solid rgba(249,211,66,0.25);
  border-radius:14px; padding:12px 24px; margin-top:12px; animation:pop 0.4s ease-out;
}

/* ── Pts delta ── */
.pts-delta { font-size:12px; color:var(--green); margin-left:4px; }

/* ── Guessing layout ── */
.poseur-progress { font-size:12px; color:var(--text-dim); margin-bottom:10px; text-align:center; }

.guessing-main {
  display:flex; gap:20px; align-items:flex-start;
  width:100%; max-width:1020px;
}

.guessing-left {
  flex:1; min-width:0; display:flex; flex-direction:column; gap:10px;
}

/* Remove old max-width constraint from header when inside guessing-left */
.guessing-left .guess-header { max-width:none; }

.guessing-sidebar {
  flex:0 0 260px; display:flex; flex-direction:column; gap:12px;
}

/* Poseur panels */
.poseur-tools-panel { display:flex; flex-direction:column; gap:8px; }
.poseur-watch-panel { display:flex; flex-direction:column; align-items:center; padding:8px 0; }
.guesser-input-panel { display:flex; flex-direction:column; gap:6px; }

/* Sidebar panels */
.sidebar-panel {
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.09);
  border-radius:16px; overflow:hidden;
}
.sidebar-panel-title {
  font-size:11px; font-weight:700; letter-spacing:1.5px; color:var(--text-dim);
  padding:9px 14px; border-bottom:1px solid rgba(255,255,255,0.07);
  text-transform:uppercase; background:rgba(255,255,255,0.03);
}

/* Live results inside sidebar */
.live-results { padding:8px; display:flex; flex-direction:column; gap:5px; }
.live-results .live-row { font-size:13px; padding:7px 10px; }

/* Chat feed */
.chat-panel { display:flex; flex-direction:column; }
.chat-feed {
  flex:1; overflow-y:auto; padding:10px; display:flex; flex-direction:column; gap:8px;
  max-height:300px; scroll-behavior:smooth;
}
.chat-feed::-webkit-scrollbar { width:3px; }
.chat-feed::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.12); border-radius:2px; }

.pg-bubble {
  display:flex; gap:8px; align-items:flex-start; animation:slideInGuess 0.2s ease-out;
}
@keyframes slideInGuess {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0); }
}
.pg-avatar-wrap {
  width:30px; height:30px; border-radius:50%; flex-shrink:0;
  background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.1);
  display:flex; align-items:center; justify-content:center; font-size:16px;
}
.pg-bubble-body {
  background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.08);
  border-radius:4px 12px 12px 12px; padding:6px 10px; flex:1; min-width:0;
}
.pg-name { font-size:11px; font-weight:700; color:rgba(255,255,255,0.55); margin-bottom:2px; }
.pg-text { font-size:14px; color:var(--text); word-break:break-word; line-height:1.35; }
.pg-empty { color:var(--text-dim); font-size:13px; text-align:center; padding:20px 10px; opacity:0.7; }

@media (max-width: 640px) {
  .guessing-main { flex-direction:column; gap:12px; }
  .guessing-sidebar { flex:none; width:100%; flex-direction:row; display:flex; gap:10px; }
  .sidebar-panel { flex:1; }
  .chat-feed { max-height:180px; }
  .emoji-grid-inner { max-height:120px; }
}
