/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Dark theme (default — welcome, consent, matchmaking, leaderboard, debrief) ── */
:root {
  --bg:         #0f0f13;
  --surface:    #18181f;
  --surface2:   #1e1e28;
  --border:     #2a2a38;
  --text:       #e8e8f0;
  --text-muted: #7a7a96;
  --accent:     #6c63ff;
  --accent2:    #4f8ef7;
  --purple:     #9b5de5;
  --blue1:      #4f8ef7;
  --blue2:      #3a7bd5;
  --danger:     #ff6b6b;
  --warning:    #ffd166;
}

/* ── Light theme — applied to game, judgment, survey pages ── */
.light-mode {
  --bg:         #f5f5fa;
  --surface:    #ffffff;
  --surface2:   #f0f0f8;
  --border:     #d8d8e8;
  --text:       #1a1a2e;
  --text-muted: #6b6b88;
  --accent:     #6c63ff;
  --accent2:    #4f8ef7;
  --purple:     #9b5de5;
  --blue1:      #4f8ef7;
  --blue2:      #3a7bd5;
  --danger:     #e03c3c;
  --warning:    #e09000;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

/* ── Input — more visible, stronger focus ── */
.input {
  width: 100%;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}
.input::-moz-placeholder { color: var(--text-muted); opacity: 0.7; }
.input::placeholder { color: var(--text-muted); opacity: 0.7; }

.label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  font-family: inherit;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:not(:disabled):hover { opacity: 0.88; }
.btn:not(:disabled):active { transform: scale(0.97); }
.btn-primary  { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-secondary{ background: transparent; border-color: var(--border); color: var(--text); }

/* ── Chat bubbles — fixed min-width to prevent single-char vertical stacking ── */
.bubble-user {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff;
  padding: 10px 16px;
  border-radius: 16px 4px 16px 16px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  display: inline-block;
  min-width: 48px;
  max-width: 100%;
  white-space: pre-wrap;
}
.bubble-partner {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 4px 16px 16px 16px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  display: inline-block;
  min-width: 48px;
  max-width: 100%;
  white-space: pre-wrap;
}

/* Light mode bubble overrides */
.light-mode .bubble-user {
  background: linear-gradient(135deg, #6c63ff, #9b5de5);
}
.light-mode .bubble-partner {
  background: #f0f0f8;
  border-color: #d8d8e8;
  color: #1a1a2e;
}

/* ── Chat message input — larger, more visible ── */
.chat-input {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  padding: 14px 18px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(108,99,255,0.15);
}
.chat-input::-moz-placeholder { color: var(--text-muted); opacity: 0.65; }
.chat-input::placeholder { color: var(--text-muted); opacity: 0.65; }
.chat-input:disabled { opacity: 0.5; cursor: not-allowed; }

/* Light mode chat input */
.light-mode .chat-input {
  background: #ffffff;
  border-color: #c0c0d8;
  color: #1a1a2e;
}
.light-mode .chat-input:focus {
  border-color: #6c63ff;
  box-shadow: 0 0 0 4px rgba(108,99,255,0.12);
}

/* ── End & Decide button — pulse animation when active ── */
@keyframes endButtonPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108,99,255,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(108,99,255,0); }
}
.btn-end-ready {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  animation: endButtonPulse 1.8s ease-in-out infinite;
  opacity: 1 !important;
}

/* ── Typing animation ── */
.typing-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40%           { transform: translateY(-6px); opacity: 1; }
}

/* ── Spinner ── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Countdown ── */
@keyframes countdownPop {
  from { transform: scale(1.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.countdown-num { animation: countdownPop 0.35s ease-out; }

/* ── Slider ── */
.step-slider {
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
  height: 6px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  display: block;
  margin: 0; padding: 0;
}
.step-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
}
.step-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-top: -8px;
}
.step-slider::-moz-range-track {
  height: 6px; border-radius: 3px; background: var(--border);
}
.step-slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent);
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.step-slider:disabled { opacity: 0.4; cursor: not-allowed; }

select.input {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a7a96' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

textarea.input { resize: vertical; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Timer warning flash ── */
@keyframes timerFlash {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.timer-warning { animation: timerFlash 1s ease-in-out infinite; }

