/* 후추봇 게임 코너 - games.css */
@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;600;700;800&display=swap');

:root {
  --bg: #faf9f6;
  --card-bg: #ffffff;
  --text: #2d3a2e;
  --text-sub: #6b7c6e;
  --accent: #7c8a65;
  --accent-light: #e8ecd8;
  --purple: #9b72cf;
  --purple-light: #f0e6ff;
  --border: #e0ddd5;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --radius: 16px;
  --correct: #4caf50;
  --wrong: #e74c3c;
  --warning: #f39c12;
}

[data-theme="dark"] {
  --bg: #1a1d1a;
  --card-bg: #252825;
  --text: #e0e0d8;
  --text-sub: #9a9e8f;
  --accent: #a3b18a;
  --accent-light: #2d3328;
  --purple: #b794e0;
  --purple-light: #2d2540;
  --border: #3a3d3a;
  --shadow: 0 2px 12px rgba(0,0,0,0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Pretendard', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .3s, color .3s;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.back-btn {
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--accent-light);
  transition: .2s;
}
.back-btn:hover { opacity: .8; }
.header-text { flex: 1; }
.header-title { font-size: 1.2rem; font-weight: 800; }
.header-sub { font-size: 0.8rem; color: var(--text-sub); margin-top: 2px; }
.dark-toggle {
  background: none; border: none; font-size: 1.3rem; cursor: pointer;
  padding: 6px; border-radius: 8px;
}
.dark-toggle:hover { background: var(--accent-light); }

/* Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Game Section */
.game-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.game-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.game-title { font-size: 1.15rem; font-weight: 800; }
.game-desc { font-size: 0.82rem; color: var(--text-sub); margin-top: 6px; line-height: 1.5; }

.game-coming-soon {
  opacity: 0.6;
  text-align: center;
  padding: 30px 20px;
}
.game-coming-soon .game-header { border-bottom: none; }

/* Quiz Login */
.quiz-login-required {
  text-align: center;
  padding: 40px 20px;
}
.quiz-login-required p { font-size: 1rem; font-weight: 700; }
.quiz-login-sub { font-size: 0.82rem; color: var(--text-sub); margin-top: 8px; }
.quiz-home-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--accent);
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Quiz Area */
.quiz-area { padding: 20px; }

/* Role Banner */
.quiz-role-banner {
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
}
.quiz-role-banner.hinter {
  background: linear-gradient(135deg, #fff3cd, #ffeeba);
  color: #856404;
}
.quiz-role-banner.guesser {
  background: linear-gradient(135deg, var(--purple-light), #e8d5ff);
  color: var(--purple);
}
.quiz-role-banner.spectator {
  background: var(--accent-light);
  color: var(--text-sub);
}
[data-theme="dark"] .quiz-role-banner.hinter {
  background: linear-gradient(135deg, #3d3520, #4a3f1a);
  color: #ffc107;
}
[data-theme="dark"] .quiz-role-banner.guesser {
  background: linear-gradient(135deg, #2d2040, #3a2855);
  color: var(--purple);
}

/* Roles display */
.quiz-roles {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.role-card {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hinter-role { background: #fff8e1; }
.guesser-role { background: var(--purple-light); }
[data-theme="dark"] .hinter-role { background: #2d2a1a; }
.role-emoji { font-size: 1.4rem; }
.role-label { font-size: 0.72rem; color: var(--text-sub); font-weight: 600; }
.role-names { font-size: 0.9rem; font-weight: 700; }

/* Word Reveal */
.quiz-word-reveal {
  text-align: center;
  padding: 20px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #e8ecd8, #d4dbc2);
  border-radius: 14px;
}
[data-theme="dark"] .quiz-word-reveal {
  background: linear-gradient(135deg, #2d3328, #353d30);
}
.quiz-word-label { font-size: 0.78rem; color: var(--text-sub); margin-bottom: 8px; }
.quiz-word {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 4px;
}

/* Hint Form */
.quiz-hint-instruction {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 12px;
  color: var(--text);
}
.quiz-hint-warning { color: var(--warning); font-size: 0.78rem; }

.quiz-input-row {
  display: flex;
  gap: 8px;
}
.quiz-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border .2s;
}
.quiz-input:focus { border-color: var(--accent); }
.quiz-submit-btn {
  padding: 12px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: .2s;
}
.quiz-submit-btn:hover { opacity: .85; }
.quiz-submit-btn:disabled { opacity: .5; cursor: not-allowed; }

.quiz-hint-error {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fff3f3;
  border-radius: 10px;
  color: var(--wrong);
  font-size: 0.85rem;
  font-weight: 600;
}
[data-theme="dark"] .quiz-hint-error { background: #3a2020; }

/* Hint Done */
.quiz-hint-done {
  text-align: center;
  padding: 20px;
  background: #e8f5e9;
  border-radius: 12px;
  margin-top: 12px;
}
[data-theme="dark"] .quiz-hint-done { background: #1e3020; }
.quiz-my-hint {
  margin-top: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

/* Waiting */
.quiz-waiting {
  text-align: center;
  padding: 30px 20px;
}
.quiz-waiting-anim { font-size: 2.5rem; margin-bottom: 12px; animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.quiz-waiting-sub { font-size: 0.8rem; color: var(--text-sub); margin-top: 8px; }
.quiz-refresh-btn {
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--accent-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}

/* Hints Display */
.quiz-hints-display {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-hint-card {
  padding: 14px 16px;
  background: #fff8e1;
  border-radius: 12px;
  border-left: 4px solid #ffc107;
}
[data-theme="dark"] .quiz-hint-card { background: #2d2a1a; border-left-color: #ffc107; }
.quiz-hint-from {
  font-size: 0.75rem;
  color: var(--text-sub);
  font-weight: 600;
  margin-bottom: 4px;
}
.quiz-hint-text { font-size: 1.05rem; font-weight: 700; }

/* Result */
.quiz-result {
  text-align: center;
  padding: 24px 20px;
  border-radius: 14px;
  margin-top: 12px;
}
.quiz-result.correct {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
}
.quiz-result.wrong {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
}
[data-theme="dark"] .quiz-result.correct { background: linear-gradient(135deg, #1e3020, #2a4030); }
[data-theme="dark"] .quiz-result.wrong { background: linear-gradient(135deg, #3a2020, #4a2a2a); }
.quiz-result-icon { font-size: 3rem; margin-bottom: 10px; }
.quiz-result-text { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.quiz-result-word {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.5);
  border-radius: 12px;
  margin-bottom: 16px;
}
[data-theme="dark"] .quiz-result-word { background: rgba(0,0,0,0.2); }
.quiz-result-label { font-size: 0.82rem; color: var(--text-sub); }
.quiz-result-answer { font-size: 1.3rem; font-weight: 800; }
.quiz-result-hints { margin-top: 12px; }
.quiz-result-guess {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-sub);
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.78rem;
  color: var(--text-sub);
}

/* Mobile */
@media (max-width: 480px) {
  .header-title { font-size: 1rem; }
  .quiz-word { font-size: 1.6rem; }
}
