/* german-detective.css - Styles for the German Number Detective game
   Focuses on audio listening, tile composition, visual cards, and mystery modes. */

:root {
  --det-purple: #6c5ce7;
  --det-purple-light: #a29bfe;
  --det-purple-bg: #f5f3ff;
  --det-green: #00b894;
  --det-green-bg: #e6fbf3;
  --det-blue: #0984e3;
  --det-blue-bg: #f0f7ff;
  --det-amber: #ff9f43;
  --det-amber-bg: #fff8ee;
}

/* ---------- Level Row ---------- */
.det-levels-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 14px;
}

.det-level-btn {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.det-level-btn:hover {
  border-color: var(--det-purple-light);
  color: var(--det-purple);
}

.det-level-btn.active {
  background: linear-gradient(135deg, var(--det-purple), var(--det-purple-light));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.25);
}

/* ---------- Mystery Audio Card ---------- */
.mystery-card {
  width: 100%;
  max-width: 740px;
  background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%);
  border: 3px solid #ede8ff;
  border-radius: 26px;
  padding: 22px 24px;
  box-shadow: 0 8px 26px rgba(108, 92, 231, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
}

.mystery-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.mascot-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--det-purple);
  background: var(--det-purple-bg);
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid #e0d9ff;
}

.mode-toggle-btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-toggle-btn.secret-on {
  border-color: var(--det-amber);
  background: var(--det-amber-bg);
  color: #b35900;
}

/* Audio Player Controls */
.audio-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-audio-main {
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  min-height: 56px;
  padding: 10px 28px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--det-purple), #8c7ae6);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(108, 92, 231, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-audio-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(108, 92, 231, 0.45);
}

.btn-audio-main:active {
  transform: translateY(0);
}

.btn-audio-slow {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  min-height: 52px;
  padding: 10px 20px;
  border: 2px solid #e0d9ff;
  border-radius: 16px;
  background: #ffffff;
  color: var(--det-purple);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.btn-audio-slow:hover {
  background: var(--det-purple-bg);
  border-color: var(--det-purple-light);
}

/* Word Presentation in Card */
.word-display-box {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mystery-secret-banner {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--muted);
  background: #f1f2f6;
  padding: 12px 28px;
  border-radius: 18px;
  border: 2px dashed #b2bec3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.revealed-word-text {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.btn-peek-word {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border: 2px dashed #b2bec3;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  margin-top: -6px;
}

.btn-peek-word:hover {
  border-color: var(--det-purple);
  color: var(--det-purple);
}

/* ---------- Tile Composer Stage ---------- */
.composer-stage {
  width: 100%;
  max-width: 740px;
  background: #ffffff;
  border: 3px solid #dfe6e9;
  border-radius: 24px;
  padding: 18px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.composer-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
}

/* Answer Slots Row */
.slots-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  flex-wrap: wrap;
  width: 100%;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 20px;
  border: 2px dashed #dfe6e9;
}

.word-slot {
  min-width: 90px;
  min-height: 52px;
  padding: 8px 16px;
  border-radius: 16px;
  border: 2px dashed #b2bec3;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #a0aec0;
  position: relative;
  transition: all 0.2s ease;
}

.word-slot.filled {
  border: none;
  background: transparent;
  padding: 0;
}

/* Word Tiles (Bank and Placed) */
.word-tile {
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  min-height: 52px;
  padding: 8px 20px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  animation: popIn 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.word-tile:hover {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.06);
}

.word-tile:active {
  transform: translateY(0) scale(0.96);
}

/* Tile color variants matching German role */
.tile-ones {
  background: linear-gradient(135deg, #00b894, #55efc4);
  color: #ffffff;
  border: 2px solid #00a884;
}

.tile-tens {
  background: linear-gradient(135deg, #0984e3, #74b9ff);
  color: #ffffff;
  border: 2px solid #0870c2;
}

.tile-und {
  background: linear-gradient(135deg, #b2bec3, #dfe6e9);
  color: #2d3436;
  border: 2px solid #95a5a6;
}

.tile-teen {
  background: linear-gradient(135deg, #a29bfe, #6c5ce7);
  color: #ffffff;
  border: 2px solid #5f4ed8;
}

.tile-special {
  background: linear-gradient(135deg, #fdcb6e, #ffeaa7);
  color: #634a00;
  border: 2px solid #e0ad47;
}

/* Placed tile close hint */
.slot-tile {
  position: relative;
}

.slot-tile::after {
  content: '×';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--soft-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 17px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.slot-tile:hover::after {
  opacity: 1;
}

/* Word Bank Grid */
.tiles-bank-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-top: 6px;
}

.word-tile.used-tile {
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(0.8);
  transform: scale(0.94);
}

/* ---------- Visual Blocks Mini Display ---------- */
.det-visual-blocks-drawer {
  width: 100%;
  max-width: 740px;
  background: #fdfdfd;
  border: 2px dashed #dfe6e9;
  border-radius: 18px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.det-visual-summary {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: center;
  min-height: 60px;
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .revealed-word-text {
    font-size: 1.9rem;
  }
  .mystery-card {
    padding: 18px 14px;
  }
  .btn-audio-main {
    min-height: 50px;
    padding: 8px 20px;
    font-size: 1rem;
  }
  .word-tile {
    font-size: 1rem;
    padding: 8px 14px;
  }
}

.solution-breakdown.gone,
.gone {
  display: none !important;
}
