/* ==========================================================================
   CHILD PATHSHALA DATA & ESCAPE DETECTIVE STUDIO ENGINE CSS
   State-of-the-art interactive mystery, data table & escape puzzle studio
   ========================================================================== */

:root {
  --dt-bg: #090d16;
  --dt-card-bg: rgba(17, 24, 39, 0.85);
  --dt-border: rgba(148, 163, 184, 0.15);
  --dt-accent: #f59e0b;
  --dt-accent-rgb: 245, 158, 11;
  --dt-cyan: #06b6d4;
  --dt-emerald: #10b981;
  --dt-rose: #f43f5e;
  --dt-indigo: #6366f1;
}

.dt-wrapper {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  min-height: 560px;
  background: radial-gradient(circle at 50% 10%, #1e1b4b 0%, #090d16 80%);
  border: 1px solid var(--dt-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(245, 158, 11, 0.1);
  color: #f8fafc;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  box-sizing: border-box;
}

/* Studio HUD Header */
.dt-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--dt-border);
}

.dt-case-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 9999px;
  color: #fbbf24;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dt-hud-stats {
  display: flex;
  gap: 12px;
}

.dt-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dt-border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

/* Prompt Banner */
.dt-prompt-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-left: 5px solid var(--dt-accent);
  border-radius: 16px;
  padding: 18px 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.dt-prompt-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.dt-prompt-sub {
  font-size: 0.9rem;
  color: #94a3b8;
}

/* ==========================================================================
   DATA TABLE MODE STYLES
   ========================================================================== */
.dt-table-container {
  background: var(--dt-card-bg);
  border: 1px solid var(--dt-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.dt-dossier-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 1rem;
}

.dt-dossier-table th {
  background: rgba(30, 41, 59, 0.9);
  color: #38bdf8;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(56, 189, 248, 0.2);
}

.dt-dossier-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-weight: 500;
  transition: background-color 0.2s;
}

.dt-dossier-table tr:last-child td {
  border-bottom: none;
}

.dt-dossier-table tr:hover td {
  background: rgba(245, 158, 11, 0.08);
}

/* Question Area */
.dt-question-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 24px;
}

.dt-question-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
  text-align: center;
}

.dt-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.dt-option-btn {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 16px 20px;
  color: #f1f5f9;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.dt-option-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.4);
}

.dt-option-btn.correct {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border-color: #34d399 !important;
  color: #fff !important;
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6) !important;
}

.dt-option-btn.wrong {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
  border-color: #f87171 !important;
  color: #fff !important;
  animation: dt-shake 0.4s ease;
}

/* ==========================================================================
   ESCAPE ROOM PUZZLE MODE STYLES
   ========================================================================== */
.dt-vault-status {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.dt-lock-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid var(--dt-border);
  border-radius: 16px;
  min-width: 110px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-lock-indicator.unlocked {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.dt-lock-indicator.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
  transform: scale(1.05);
}

.dt-lock-icon {
  font-size: 2.2rem;
  transition: transform 0.3s ease;
}

.dt-lock-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
}

.dt-lock-indicator.active .dt-lock-title {
  color: #fbbf24;
}

.dt-lock-indicator.unlocked .dt-lock-title {
  color: #34d399;
}

/* Clue Dossier Box */
.dt-dossier-box {
  background: linear-gradient(135deg, rgba(20, 24, 38, 0.95) 0%, rgba(10, 14, 26, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

.dt-dossier-stamp {
  position: absolute;
  top: 16px;
  right: 20px;
  padding: 4px 12px;
  border: 2px dashed rgba(245, 158, 11, 0.4);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: rotate(3deg);
}

.dt-clues-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0 24px;
}

.dt-clue-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px 18px;
  border-radius: 12px;
  border-left: 4px solid var(--dt-cyan);
  font-size: 1.05rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.dt-clue-icon {
  font-size: 1.25rem;
  color: var(--dt-cyan);
  flex-shrink: 0;
}

/* Escape Answer Input Form */
.dt-input-group {
  display: flex;
  gap: 12px;
  max-width: 540px;
  margin: 0 auto;
}

.dt-input-field {
  flex: 1;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  outline: none;
  transition: all 0.2s;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dt-input-field:focus {
  border-color: var(--dt-accent);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dt-unlock-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  border: none;
  border-radius: 14px;
  padding: 16px 28px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 20px -4px rgba(245, 158, 11, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dt-unlock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -4px rgba(245, 158, 11, 0.7);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.dt-unlock-btn:active {
  transform: translateY(0);
}

/* Detective Victory Overlay */
.dt-victory-overlay {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.95) 100%);
  border: 2px solid var(--dt-accent);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(245, 158, 11, 0.25);
  animation: dt-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dt-badge-icon {
  font-size: 5rem;
  margin-bottom: 16px;
  display: inline-block;
  animation: dt-float 3s ease-in-out infinite;
}

@keyframes dt-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

@keyframes dt-pop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes dt-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 640px) {
  .dt-wrapper {
    padding: 16px;
  }
  .dt-input-group {
    flex-direction: column;
  }
  .dt-unlock-btn {
    justify-content: center;
  }
  .dt-vault-status {
    gap: 10px;
  }
  .dt-lock-indicator {
    padding: 10px 14px;
    min-width: 80px;
  }
}
