/* ===== Number Hunt QR スタイル ===== */

.nhqr-wrapper {
  all: initial;
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", sans-serif !important;
  line-height: 1.6;
}

.nhqr-wrapper * {
  box-sizing: border-box !important;
}

.nhqr-hidden {
  display: none !important;
}

/* ===== 共通ボタン ===== */
.nhqr-wrapper button {
  font-family: inherit !important;
  cursor: pointer !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: bold !important;
  transition: all 0.2s !important;
  outline: none !important;
}

.nhqr-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  padding: 15px 40px !important;
  font-size: 1.2em !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
}

.nhqr-btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6) !important;
}

.nhqr-btn-secondary {
  background: #95a5a6 !important;
  color: white !important;
  padding: 12px 30px !important;
  font-size: 1em !important;
}

.nhqr-btn-secondary:hover {
  background: #7f8c8d !important;
}

.nhqr-btn-danger {
  background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%) !important;
  color: white !important;
  padding: 12px 30px !important;
  font-size: 1em !important;
}

.nhqr-btn-danger:hover {
  background: linear-gradient(135deg, #d62839 0%, #e34c3c 100%) !important;
}

.nhqr-btn-success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
  color: white !important;
  padding: 12px 30px !important;
  font-size: 1em !important;
}

.nhqr-btn-success:hover {
  background: linear-gradient(135deg, #0f8a7e 0%, #32d96d 100%) !important;
}

.nhqr-btn-copy {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
  color: white !important;
  padding: 12px 20px !important;
  font-size: 1em !important;
}

button:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* ===== ① 設定画面（セットアップ） ===== */
#nhqr-setup {
  min-height: 100vh !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 20px !important;
}

.nhqr-setup-card {
  background: white !important;
  border-radius: 20px !important;
  padding: 40px !important;
  max-width: 600px !important;
  width: 100% !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
}

.nhqr-setup-card h1 {
  color: #667eea !important;
  font-size: 2.5em !important;
  margin: 0 0 10px 0 !important;
  text-align: center !important;
}

.nhqr-subtitle {
  text-align: center !important;
  color: #95a5a6 !important;
  font-size: 1.1em !important;
  margin: 0 0 30px 0 !important;
}

.nhqr-setup-group {
  margin: 25px 0 !important;
}

.nhqr-setup-group label {
  display: block !important;
  font-size: 1.2em !important;
  font-weight: bold !important;
  color: #2c3e50 !important;
  margin-bottom: 15px !important;
  text-align: center !important;
}

.nhqr-number-control {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 20px !important;
}

.nhqr-number-control select {
  font-size: 1.2em !important;
  padding: 10px 20px !important;
  border-radius: 8px !important;
  border: 2px solid #667eea !important;
  background: white !important;
  color: #2c3e50 !important;
  font-weight: bold !important;
  cursor: pointer !important;
  min-width: 200px !important;
}

/* ===== ② ロビー画面 ===== */
#nhqr-lobby {
  min-height: 100vh !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  padding: 20px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.nhqr-lobby-card {
  background: white !important;
  border-radius: 20px !important;
  padding: 50px !important;
  max-width: 800px !important;
  width: 100% !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
}

.nhqr-lobby-card h2 {
  color: #667eea !important;
  font-size: 2em !important;
  margin: 0 0 30px 0 !important;
  text-align: center !important;
}

.nhqr-lobby-content {
  text-align: center !important;
}

.nhqr-lobby-center {
  margin: 0 auto !important;
}

.nhqr-qr-container {
  background: white !important;
  padding: 20px !important;
  border-radius: 15px !important;
  display: inline-block !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
  margin: 20px 0 !important;
}

.nhqr-url-container {
  margin-top: 20px !important;
}

.nhqr-url-container p {
  color: #2c3e50 !important;
  font-weight: bold !important;
  margin-bottom: 10px !important;
}

.nhqr-url-box {
  display: flex !important;
  gap: 10px !important;
  margin-top: 10px !important;
}

.nhqr-url-box input {
  flex: 1 !important;
  padding: 12px !important;
  border: 2px solid #ddd !important;
  border-radius: 8px !important;
  font-size: 0.9em !important;
  font-family: monospace !important;
}

/* ===== ③ ゲーム進行画面 ===== */
#nhqr-game {
  min-height: 100vh !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  padding: 20px !important;
}

.nhqr-game-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  padding: 30px !important;
  text-align: center !important;
  border-radius: 15px 15px 0 0 !important;
  margin-bottom: 0 !important;
}

.nhqr-game-header h2 {
  color: white !important;
  margin: 0 !important;
  font-size: 2em !important;
}

.nhqr-game-status {
  background: white !important;
  padding: 30px !important;
  border-radius: 0 0 15px 15px !important;
  margin-bottom: 20px !important;
}

.nhqr-game-status h3 {
  color: #2c3e50 !important;
  margin: 0 0 20px 0 !important;
  font-size: 1.5em !important;
}

/* ===== ④ 結果表示ポップアップ ===== */
#nhqr-result-popup {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 9999 !important;
}

.nhqr-result-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.7) !important;
}

.nhqr-result-content {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: white !important;
  border-radius: 20px !important;
  max-width: 800px !important;
  width: 90% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5) !important;
}

.nhqr-result-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  padding: 30px !important;
  border-radius: 20px 20px 0 0 !important;
  text-align: center !important;
}

.nhqr-result-header h2 {
  color: white !important;
  margin: 0 !important;
  font-size: 2em !important;
}

.nhqr-result-body {
  padding: 30px !important;
}

.nhqr-result-footer {
  padding: 20px 30px !important;
  text-align: center !important;
  border-top: 2px solid #eee !important;
}

/* ===== 情報セクション（共通） ===== */
.nhqr-info-section {
  margin: 20px 0 !important;
  padding: 20px !important;
  background: #f8f9fa !important;
  border-radius: 10px !important;
  border-left: 4px solid #667eea !important;
}

.nhqr-info-label {
  font-size: 0.9em !important;
  font-weight: bold !important;
  color: #667eea !important;
  margin-bottom: 8px !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

.nhqr-info-value {
  font-size: 1.1em !important;
  color: #2c3e50 !important;
  font-weight: bold !important;
  word-break: break-all !important;
}

/* ===== 以前の先生画面スタイル（互換性のため残す） ===== */
.nhqr-teacher-root {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.nhqr-teacher-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.nhqr-teacher-card h2 {
  color: #667eea !important;
  font-size: 2.2em !important;
  text-align: center !important;
  margin: 0 0 10px 0 !important;
}

.nhqr-subtitle {
  text-align: center;
  color: #95a5a6;
  font-size: 1em;
  margin: 0 0 30px 0 !important;
}

/* 設定セクション */
.nhqr-settings-section {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.nhqr-setting-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.nhqr-setting-label {
  font-weight: 900;
  font-size: 15px;
  color: #495057;
}

.nhqr-setting-select {
  padding: 10px 14px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  background: white;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
}

.nhqr-setting-select:hover,
.nhqr-setting-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

/* 設定表示（児童画面で先生が設定した内容を表示） */
.nhqr-setting-display {
  padding: 12px 16px;
  background: linear-gradient(135deg, #f4cf5f 0%, #d4af37 100%);
  border: 2px solid #d4af37;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
  color: #0f1e3a;
  text-align: center;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

/* ボタングループ */
.nhqr-button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 30px 0;
  flex-wrap: wrap;
}

/* 情報セクション */
.nhqr-info-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.nhqr-info-label {
  font-weight: bold;
  color: #495057;
  font-size: 0.95em;
  margin-bottom: 8px;
  display: block;
}

.nhqr-info-value {
  font-family: "Courier New", monospace;
  background: white;
  padding: 12px 15px;
  border-radius: 8px;
  border: 2px solid #dee2e6;
  font-size: 1em;
  word-break: break-all;
  color: #212529;
}

/* QRコード */
.nhqr-qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 12px;
  border: 3px dashed #dee2e6;
  min-height: 280px;
}

.nhqr-qr-placeholder {
  color: #adb5bd;
  font-size: 1.1em;
  text-align: center;
}

#nhqr-qr-code {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 結果テーブル */
.nhqr-results-section {
  margin-top: 30px;
}

.nhqr-results-section h3 {
  color: #495057 !important;
  font-size: 1.5em !important;
  margin: 0 0 15px 0 !important;
}

.nhqr-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 2px solid #dee2e6;
}

.nhqr-results-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.nhqr-results-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.nhqr-results-table th {
  padding: 15px 12px;
  text-align: left;
  font-weight: bold;
  font-size: 1em;
}

.nhqr-results-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 0.95em;
}

.nhqr-results-table tbody tr:hover {
  background: #f8f9fa;
}

.nhqr-no-data {
  text-align: center !important;
  color: #adb5bd !important;
  font-style: italic;
  padding: 30px !important;
}

.nhqr-note {
  color: #6c757d;
  font-size: 0.9em;
  margin-top: 10px;
  text-align: center;
}

/* ===== 児童画面（プレイヤー） ===== */
.nhqr-player-root {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

/* 電子黒板ヘッダー */
.nhqr-eb-header {
  position: relative;
  background: #1e3a5f;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.3);
  padding: clamp(16px, 2.5vh, 24px);
  margin-bottom: 12px;
  overflow: hidden;
}

/* ゴールドライン */
.nhqr-eb-header::before,
.nhqr-eb-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d4af37, #f4cf5f, #d4af37);
  z-index: 1;
}
.nhqr-eb-header::before { top: 0; }
.nhqr-eb-header::after { bottom: 0; }

.nhqr-eb-title {
  font-weight: 900 !important;
  font-size: clamp(20px, 3vw, 26px) !important;
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  text-align: center !important;
  margin: 0 0 12px 0 !important;
}

.nhqr-eb-status {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* バッジ */
.nhqr-badge-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.nhqr-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: bold;
}

.nhqr-badge-live {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
}

.nhqr-badge-practice {
  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  color: white;
}

.nhqr-badge-id {
  background: #e9ecef;
  color: #495057;
}

/* 注意書き */
.nhqr-practice-notice {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  color: #856404;
  font-size: 0.9em;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* コントロール */
.nhqr-eb-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  justify-content: center;
}

.nhqr-eb-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nhqr-eb-label {
  font-weight: 900;
  font-size: 14px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nhqr-eb-input {
  padding: 10px 14px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  min-width: 180px;
  transition: all 0.2s;
  outline: none;
}

.nhqr-eb-input:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* 難易度ボタン */
.nhqr-difficulty-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nhqr-diff-btn {
  padding: 10px 14px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  border: 2px solid transparent !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.nhqr-diff-btn.nhqr-active {
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}

.nhqr-btn-easy {
  background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%) !important;
  color: white !important;
}

.nhqr-btn-normal {
  background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%) !important;
  color: white !important;
}

.nhqr-btn-hard {
  background: linear-gradient(135deg, #ff5722 0%, #ff6f43 100%) !important;
  color: white !important;
}

/* アクションボタン */
.nhqr-eb-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nhqr-btn-eb {
  padding: 12px 20px !important;
  border-radius: 14px !important;
  border: 2px solid white !important;
  background: white !important;
  color: #1e3a5f !important;
  font-weight: 900 !important;
  font-size: 15px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.15) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nhqr-btn-eb:hover {
  background: #f8f9fa !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25) !important;
}

.nhqr-btn-start {
  background: linear-gradient(135deg, #f4cf5f 0%, #d4af37 100%) !important;
  border-color: #d4af37 !important;
  color: #0f1e3a !important;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3) !important;
}

.nhqr-btn-start:hover {
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4) !important;
}

.nhqr-btn-retire {
  background: #95a5a6 !important;
  border-color: #95a5a6 !important;
  color: white !important;
}

.nhqr-btn-retire:hover {
  background: #7f8c8d !important;
}

/* プレイエリア */
.nhqr-play-area {
  position: relative;
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1);
  overflow: hidden;
}

.nhqr-play-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d4af37, #f4cf5f, #d4af37);
  z-index: 1;
}

.nhqr-play-area:fullscreen {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f0f2f5 100%);
  padding: 10px;
  overflow: auto;
}

/* 拡大縮小UI */
.nhqr-zoom-controls {
  display: none;
}

.nhqr-play-area:fullscreen .nhqr-zoom-controls {
  display: flex;
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 2147483647;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #dee2e6;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.20);
  backdrop-filter: blur(8px);
}

.nhqr-zoom-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #dee2e6;
  background: white;
  font-weight: 900;
  color: #2c3e50;
}

.nhqr-zoom-btn {
  padding: 10px 14px !important;
  border-radius: 12px !important;
  border: 2px solid #667eea !important;
  background: white !important;
  color: #667eea !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.10) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nhqr-zoom-btn:hover {
  background: #667eea !important;
  color: #d4af37 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.25) !important;
}

/* スクリーン */
.nhqr-screen {
  position: relative;
  padding: 18px;
  min-height: 520px;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

/* ゲーム画面 */
.nhqr-game-screen {
  display: block;
}

/* HUD（ヘッドアップディスプレイ） */
.nhqr-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 3px solid #e9ecef;
}

.nhqr-stage-info {
  font-size: 1.5em;
  font-weight: bold;
  color: #667eea;
}

.nhqr-timer-display {
  font-size: 1.5em;
  font-weight: bold;
  color: #eb3349;
}

/* グリッド */
.nhqr-number-grid {
  display: grid;
  gap: 12px;
  margin: auto;
  justify-content: center;
}

.nhqr-number-cell {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 3px solid #64b5f6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  color: #1976d2;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.nhqr-number-cell:hover {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.nhqr-number-cell:active {
  transform: scale(0.95);
}

/* カウントダウン */
.nhqr-countdown-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  z-index: 100;
}

.nhqr-countdown-overlay.nhqr-show {
  display: flex;
}

.nhqr-countdown-number {
  font-size: 8em;
  font-weight: bold;
  color: #667eea;
  animation: nhqr-pulse 0.5s ease-in-out;
}

@keyframes nhqr-pulse {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 終了モーダル */
.nhqr-end-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  z-index: 200;
}

.nhqr-end-overlay.nhqr-show {
  display: flex;
}

.nhqr-end-content {
  text-align: center;
  max-width: 400px;
  padding: 30px;
}

.nhqr-end-icon {
  font-size: 5em;
  margin-bottom: 20px;
}

.nhqr-end-title {
  font-size: 2em !important;
  color: #667eea !important;
  margin: 0 0 15px 0 !important;
  font-weight: bold !important;
}

.nhqr-end-message {
  font-size: 1.1em;
  color: #6c757d;
  margin: 0 0 30px 0 !important;
}

/* ===== レスポンシブ ===== */
@media (max-width: 1200px) {
  .nhqr-eb-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .nhqr-eb-control-group {
    width: 100%;
  }
  
  .nhqr-eb-input {
    width: 100%;
  }
  
  .nhqr-difficulty-buttons {
    width: 100%;
  }
  
  .nhqr-diff-btn {
    flex: 1;
  }
  
  .nhqr-eb-actions {
    width: 100%;
  }
  
  .nhqr-btn-eb {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .nhqr-teacher-card,
  .nhqr-eb-header,
  .nhqr-play-area {
    padding: 20px;
  }

  .nhqr-teacher-card h2,
  .nhqr-eb-title {
    font-size: 1.8em !important;
  }

  .nhqr-button-group {
    flex-direction: column;
  }

  .nhqr-button-group button {
    width: 100%;
  }

  .nhqr-number-cell {
    font-size: 1.5em;
  }

  .nhqr-countdown-number {
    font-size: 6em;
  }
  
  .nhqr-screen {
    min-height: 400px;
  }
  
  .nhqr-difficulty-buttons {
    flex-direction: column;
  }
  
  .nhqr-eb-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .nhqr-teacher-root,
  .nhqr-player-root {
    padding: 10px;
  }

  .nhqr-hud {
    flex-direction: column;
    gap: 10px;
  }
}

/* ===== エラー画面 ===== */
.nhqr-error-screen {
  max-width: 600px !important;
  margin: 80px auto !important;
  padding: 60px 40px !important;
  text-align: center !important;
  background: white !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

.nhqr-error-icon {
  font-size: 120px !important;
  margin-bottom: 30px !important;
  animation: nhqrShake 0.5s ease-in-out !important;
}

@keyframes nhqrShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.nhqr-error-title {
  font-size: 28px !important;
  font-weight: bold !important;
  color: #1e3a5f !important;
  margin-bottom: 20px !important;
}

.nhqr-error-message {
  font-size: 18px !important;
  color: #555 !important;
  line-height: 1.8 !important;
  margin-bottom: 20px !important;
}

.nhqr-error-note {
  font-size: 14px !important;
  color: #999 !important;
  padding: 20px !important;
  background: #f8f9fa !important;
  border-radius: 10px !important;
  border-left: 4px solid #667eea !important;
}

/* ===== 警告通知 ===== */
.nhqr-warning-notice {
  background: #fff3cd !important;
  border: 2px solid #ffc107 !important;
  border-radius: 8px !important;
  padding: 20px !important;
  margin: 20px 0 !important;
  color: #856404 !important;
  font-size: 16px !important;
  line-height: 1.8 !important;
}

.nhqr-warning-notice strong {
  display: block !important;
  margin-bottom: 10px !important;
  font-size: 18px !important;
  color: #d63384 !important;
}

.nhqr-warning-notice code {
  background: #fff !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  font-family: 'Courier New', monospace !important;
  color: #d63384 !important;
  font-size: 14px !important;
  font-weight: bold !important;
}
