/* ==========================================
   Menu de Configurações do Jogo AAA (Ctrl + Y)
   ========================================== */
.panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  visibility: visible;
}
.panel-backdrop.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.dev-panel {
  background: linear-gradient(155deg, rgba(20, 29, 47, 0.98), rgba(9, 14, 26, 0.99));
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 22px;
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  padding: 22px 24px;
  box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.95), 0 0 40px rgba(56, 189, 248, 0.18);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: scale(1);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}
.panel-backdrop.hidden .dev-panel {
  transform: scale(0.95);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.panel-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-title-area h2 {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-shortcut {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.btn-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.08);
}

.panel-subtitle {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

/* Abas do Menu Gamer */
.game-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  overflow-x: auto;
}
.game-tabs::-webkit-scrollbar {
  height: 4px;
}
.game-tabs::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

.game-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.game-tab-btn:hover {
  color: #fff;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
}
.game-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.45), rgba(56, 189, 248, 0.25));
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

/* Conteúdo das Abas */
.game-tab-contents {
  overflow-y: auto;
  max-height: calc(88vh - 220px);
  padding-right: 4px;
}
.game-tab-contents::-webkit-scrollbar {
  width: 6px;
}
.game-tab-contents::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.25);
  border-radius: 6px;
}

.tab-pane {
  display: none;
  animation: fadeInTab 0.2s ease;
}
.tab-pane.active {
  display: block;
}
@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Grid de Cards */
.effects-grid {
  display: grid;
  gap: 12px;
}
.effects-grid.three-cols {
  grid-template-columns: repeat(3, 1fr);
}
.effects-grid.five-cols {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
@media (max-width: 680px) {
  .effects-grid.three-cols, .effects-grid.five-cols {
    grid-template-columns: 1fr;
  }
}

.effect-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
}
.effect-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(30, 41, 59, 0.85);
  transform: translateY(-2px);
}
.effect-card.active {
  border-color: #38bdf8;
  background: linear-gradient(145deg, rgba(14, 116, 144, 0.35), rgba(15, 23, 42, 0.9));
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.card-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
}
.effect-card.active .card-tag {
  color: #38bdf8;
}
.card-status-badge {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  display: none;
}
.effect-card.active .card-status-badge {
  display: inline-block;
}
.effect-card.active .card-status-badge::after {
  content: "✓ ATIVO";
}

.card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
}
.card-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
  flex: 1;
}

.btn-test-preview {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-test-preview:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* Barra de Controle de Áudio */
.audio-control-bar {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.audio-vol-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #cbd5e1;
  white-space: nowrap;
}
.audio-vol-label strong {
  color: #38bdf8;
}
.game-slider {
  flex: 1;
  max-width: 300px;
  accent-color: #38bdf8;
  cursor: pointer;
}

/* Rodapé do Painel */
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 14px;
}
.status-summary-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.status-summary-pills .pill {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 700;
}
.saved-tag {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

.footer-buttons {
  display: flex;
  gap: 8px;
}
.btn-save {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  color: #fff;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
}
.btn-save:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

/* Toast Notification */
.toast-notify {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid #10b981;
  color: #10b981;
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 18px rgba(16, 185, 129, 0.35);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 300;
}
.toast-notify.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 520px) {
  .panel-backdrop {
    padding: 8px;
  }
  .dev-panel {
    padding: 16px 14px;
    max-height: 94dvh;
    border-radius: 18px;
    gap: 10px;
  }
  .game-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    flex-wrap: nowrap;
  }
  .game-tab-btn {
    padding: 6px 12px;
    font-size: 11px;
    flex-shrink: 0;
  }
  .effects-grid.five-cols, .effects-grid.three-cols {
    grid-template-columns: 1fr;
  }
  .panel-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .footer-buttons {
    width: 100%;
  }
  .footer-buttons .btn {
    flex: 1;
  }
}
