/* ==========================================================================
   LabEstudos - Palavras Cruzadas Interativas
   Design System: Clean Corporativo, Acessibilidade & Interface Clara
   ========================================================================== */

/* Layout Geral Centralizado */
.crossword-wrapper {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 16px 60px;
}

/* --------------------------------------------------------------------------
   Barra Superior & Navegação Minimalista (Substitui Breadcrumb Longo)
   -------------------------------------------------------------------------- */
.cw-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.cw-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.cw-back-btn:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  background: #eff6ff;
  transform: translateX(-2px);
}

.cw-back-btn .material-symbols-outlined {
  font-size: 18px;
}

.cw-btn-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--body-text);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.cw-btn-help:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  background: #eff6ff;
}

.cw-btn-help .material-symbols-outlined {
  font-size: 18px;
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Cabeçalho Limpo do Desafio
   -------------------------------------------------------------------------- */
.cw-header {
  text-align: center;
  margin-bottom: 24px;
}

.cw-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  border: 1px solid var(--primary-border);
}

.cw-header-badge .material-symbols-outlined {
  font-size: 16px;
}

.cw-header-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--dark-heading);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.cw-header-desc {
  font-size: 0.98rem;
  color: var(--muted-text);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
}

.crossword-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Palco Central do Jogo
   -------------------------------------------------------------------------- */
.crossword-stage {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  position: relative;
}

@media (max-width: 640px) {
  .crossword-stage {
    padding: 16px;
    gap: 18px;
  }
}

/* Barra de Ferramentas / HUD */
.crossword-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bg-subtle);
}

.hud-stat-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  color: var(--dark-heading);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

.hud-pill.highlight {
  background: #eff6ff;
  color: var(--primary);
  border-color: var(--primary-border);
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-hud {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.btn-hint {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.btn-hint:hover:not(:disabled) {
  background: #fde68a;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-check {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.btn-check:hover:not(:disabled) {
  background: #dbeafe;
  color: var(--primary-hover);
}

.btn-reset {
  background: #f1f5f9;
  color: var(--muted-text);
  border: 1px solid #e2e8f0;
}

.btn-reset:hover {
  background: #e2e8f0;
  color: var(--dark-heading);
}

.btn-hud:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}


.active-clue-banner {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1e3a8a;
  transition: var(--transition);
}

.active-clue-badge {
  background: var(--primary);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.active-clue-text {
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.45;
  color: #1e293b;
  flex: 1;
}

/* --------------------------------------------------------------------------
   Corpo Principal do Jogo (Grade + Painel de Dicas)
   -------------------------------------------------------------------------- */
.crossword-game-body {
  display: grid;
  grid-template-columns: auto minmax(280px, 340px);
  gap: 28px;
  align-items: start;
}

@media (max-width: 950px) {
  .crossword-game-body {
    grid-template-columns: 1fr;
  }
}

/* Container da Grade */
.grid-container-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  user-select: none;
}

.crossword-grid {
  --cell-size: clamp(26px, calc((100vw - 48px) / var(--grid-cols, 11) - 4px), 42px);
  display: grid;
  gap: 3px;
  background: transparent;
  padding: 4px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .crossword-wrapper {
    padding: 12px 10px 48px;
    width: 100%;
    box-sizing: border-box;
  }

  .cw-header-title {
    font-size: 1.45rem;
  }

  .crossword-stage {
    padding: 12px 8px;
    gap: 14px;
    border-radius: var(--radius-md, 12px);
  }

  .crossword-hud {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 12px;
  }

  .hud-stat-group {
    justify-content: space-between;
    width: 100%;
  }

  .hud-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
  }

  .btn-hud {
    padding: 8px 4px;
    font-size: 0.78rem;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 3px;
  }

  .btn-hud .material-symbols-outlined {
    font-size: 18px;
  }

  .grid-container-card {
    padding: 10px 4px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .crossword-grid {
    --cell-size: clamp(24px, calc((100vw - 32px) / var(--grid-cols, 11) - 3px), 36px);
    gap: 2px;
    padding: 2px;
  }

  .cw-cell {
    font-size: 0.95rem;
    border-radius: 4px;
    border-width: 1.5px;
  }
}

@media (max-width: 380px) {
  .crossword-grid {
    --cell-size: min(28px, 7.8vw);
    gap: 1.5px;
  }

  .cw-cell {
    font-size: 0.82rem;
  }

  .btn-hud {
    font-size: 0.72rem;
    padding: 6px 2px;
  }
}

/* Células da Grade */
.cw-cell {
  position: relative;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--dark-heading);
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  user-select: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Células Bloqueadas/Vazias são completamente invisíveis */
.cw-cell.block {
  visibility: hidden;
  pointer-events: none;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.cw-cell:not(.block):hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* Destaque da palavra inteira ativa */
.cw-cell.in-active-word {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
}

/* Destaque da célula sob foco atual */
.cw-cell.focused {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
  z-index: 2;
  transform: scale(1.06);
}

.cw-cell.solved-cell {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  color: #15803d !important;
}

.cw-cell.revealed-cell {
  background: #fef3c7 !important;
  border-color: #fcd34d !important;
  color: #b45309 !important;
  animation: pulseHint 0.5s ease-out;
}

.cw-cell.wrong-cell {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
  animation: shakeCell 0.4s ease;
}

.cw-cell.wave-success {
  animation: wordSuccessWave 0.65s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.hint-penalty-badge {
  font-size: 0.68rem;
  font-weight: 800;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 1px 5px;
  border-radius: 9999px;
  margin-left: 2px;
}

.cell-num {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  line-height: 1;
  pointer-events: none;
  z-index: 3;
}

.cw-cell.focused .cell-num {
  color: rgba(255, 255, 255, 0.95);
}

/* Hidden Real Input for Mobile Keyboard support */
#cw-hidden-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  top: -1000px;
  left: -1000px;
}

/* --------------------------------------------------------------------------
   Painel de Dicas (Horizontais & Verticais)
   -------------------------------------------------------------------------- */
.clues-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.clues-panel::-webkit-scrollbar {
  width: 6px;
}

.clues-panel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.clues-group {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
}

.clues-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-heading);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.clues-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.clue-item {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--body-text);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid transparent;
}

.clue-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.clue-item.active {
  background: #eff6ff;
  border-color: var(--primary-border);
  color: var(--primary);
  font-weight: 600;
}

.clue-item.solved {
  opacity: 0.7;
  text-decoration: line-through;
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.clue-item.just-solved {
  animation: clueSolvedPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.clue-item.solved .clue-number-badge {
  background: #16a34a;
  color: #ffffff;
}

.clue-number-badge {
  background: #e2e8f0;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 20px;
}

.clue-check-icon {
  font-size: 13px !important;
  display: none;
}

.clue-item.solved .clue-check-icon {
  display: inline-block;
}

.clue-item.active .clue-number-badge {
  background: var(--primary);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Modal de Celebração / Vitória
   -------------------------------------------------------------------------- */
.crossword-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.crossword-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.crossword-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.crossword-modal-backdrop.open .crossword-modal-card {
  transform: scale(1);
}

.modal-trophy-icon {
  width: 72px;
  height: 72px;
  background: #fef3c7;
  color: #d97706;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 40px;
  box-shadow: 0 0 0 8px #fef9c3;
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 24px;
  background: #f8fafc;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.modal-stat-item strong {
  display: block;
  font-size: 1.25rem;
  color: var(--dark-heading);
}

.modal-stat-item span {
  font-size: 0.78rem;
  color: var(--muted-text);
}

/* Modais Customizados: Como Jogar & Confirmação de Reinício */
.modal-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
}

.modal-icon-badge.warning {
  background: #fef2f2;
  color: #ef4444;
  box-shadow: 0 0 0 6px #fee2e2;
}

.modal-icon-badge.info {
  background: #eff6ff;
  color: var(--primary);
  box-shadow: 0 0 0 6px #dbeafe;
}

.how-to-play-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin: 20px 0 24px;
}

.how-to-play-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.how-to-play-item .material-symbols-outlined {
  color: var(--primary);
  font-size: 22px;
  margin-top: 2px;
  flex-shrink: 0;
}

.how-to-play-item strong {
  display: block;
  font-size: 0.92rem;
  color: var(--dark-heading);
  margin-bottom: 2px;
}

.how-to-play-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--body-text);
  line-height: 1.45;
}

.modal-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.modal-action-row button {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-modal-cancel {
  background: #ffffff;
  color: var(--body-text);
  border: 1px solid var(--border-color);
}

.btn-modal-cancel:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-modal-danger {
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #dc2626;
}

.btn-modal-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}


/* --------------------------------------------------------------------------
   Seção Educativa (Glossário Completo)
   -------------------------------------------------------------------------- */
.crossword-educational-section {
  margin-top: 50px;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.glossary-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.glossary-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.glossary-term {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.glossary-def {
  font-size: 0.92rem;
  color: var(--body-text);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Animações
   -------------------------------------------------------------------------- */
@keyframes pulseHint {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes wordSuccessWave {
  0% {
    transform: scale(1);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  35% {
    transform: scale(1.16);
    background-color: #10b981 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
    z-index: 10;
  }

  70% {
    transform: scale(1.05);
    background-color: #d1fae5 !important;
    border-color: #34d399 !important;
    color: #065f46 !important;
  }

  100% {
    transform: scale(1);
  }
}

@keyframes clueSolvedPop {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.04);
    background-color: #dcfce7;
    border-color: #86efac;
  }

  100% {
    transform: scale(1);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --------------------------------------------------------------------------
   Cards da Listagem de Categorias (Aprimoramentos de Layout & Mobile)
   -------------------------------------------------------------------------- */
.cw-game-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.cw-game-card .lab-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.cw-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cw-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-text);
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.cw-meta-pill .material-symbols-outlined {
  font-size: 13px;
  color: var(--primary);
}

.cw-game-card .lab-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark-heading);
  margin-bottom: 8px;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cw-game-card .lab-card-desc {
  font-size: 0.88rem;
  color: var(--muted-text);
  line-height: 1.5;
  margin-bottom: 14px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cw-game-card .lab-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.cw-game-card .lab-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.cw-btn-play {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.cw-btn-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-text);
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.cw-btn-details:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  background: #eff6ff;
}

.cw-btn-details .material-symbols-outlined {
  font-size: 16px;
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Modal de Detalhes e Conceitos do Desafio
   -------------------------------------------------------------------------- */
.cw-detail-modal-card {
  max-width: 540px;
  width: 100%;
  text-align: left;
  padding: 28px 24px;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.cw-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.cw-modal-header-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cw-modal-close {
  background: transparent;
  border: none;
  color: var(--muted-text);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cw-modal-close:hover {
  background: #f1f5f9;
  color: var(--dark-heading);
}

.cw-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark-heading);
  margin-bottom: 6px;
  line-height: 1.3;
}

.cw-modal-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.cw-modal-desc {
  font-size: 0.92rem;
  color: var(--body-text);
  line-height: 1.6;
  margin-bottom: 20px;
}

.cw-modal-concepts {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.cw-modal-concepts h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark-heading);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cw-modal-concepts h4 .material-symbols-outlined {
  font-size: 18px;
  color: var(--primary);
}

.cw-modal-concept-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cw-concept-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  background: #ffffff;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

.cw-concept-pill .material-symbols-outlined {
  font-size: 14px;
  color: var(--secondary);
}

.cw-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
}

@media (max-width: 640px) {
  .cw-game-card .lab-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .cw-card-meta {
    width: 100%;
  }

  .cw-game-card .lab-card-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cw-btn-play {
    width: 100%;
    min-height: 44px;
  }

  .cw-btn-details {
    width: 100%;
    min-height: 40px;
  }

  .cw-detail-modal-card {
    padding: 20px 16px;
    margin: 12px;
  }

  .cw-modal-actions {
    flex-direction: column-reverse;
  }

  .cw-modal-actions .btn-modal-cancel,
  .cw-modal-actions .lab-btn-primary {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}