/* Resident Evil DBG - Sistema Atmosférico de Skins y Tematización v1 */

/* ============================================================
   TEMA 1: SPENCER MANSION (RE1) - Caoba, Terciopelo y Oro Vintage
   ============================================================ */
.re-theme-spencer {
  --bg: #090505;
  --panel: linear-gradient(180deg, #170707 0%, #0d0404 100%);
  --panel2: #1e0b0b;
  --line: rgba(216, 168, 77, 0.4);
  --line2: rgba(216, 168, 77, 0.15);
  --gold: #e5b548;
  --text: #f3ece0;
  --muted: #a49782;
  --ecg-fine: #34d399;
  --ecg-caution: #f59e0b;
  --ecg-danger: #ef4444;
  
  background: radial-gradient(circle at 50% 30%, #200707 0%, #080202 70%, #020000 100%) !important;
  font-family: 'Outfit', 'Times New Roman', Times, serif !important;
}

.re-theme-spencer .panel,
.re-theme-spencer .brand,
.re-theme-spencer .topbar,
.re-theme-spencer .table-zone,
.re-theme-spencer .player-card,
.re-theme-spencer .right-rail .panel {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.75), inset 0 0 15px rgba(216, 168, 77, 0.05) !important;
}

/* ============================================================
   TEMA 2: R.P.D. POLICE STATION (RE2) - Azul Acero Cepillado, CRT e Industrial
   ============================================================ */
.re-theme-rpd {
  --bg: #030811;
  --panel: linear-gradient(180deg, #091322 0%, #040912 100%);
  --panel2: #0f1c30;
  --line: rgba(59, 130, 246, 0.5);
  --line2: rgba(59, 130, 246, 0.15);
  --gold: #60a5fa;
  --text: #e0e7ff;
  --muted: #94a3b8;
  --ecg-fine: #00ffff;
  --ecg-caution: #fbbf24;
  --ecg-danger: #f87171;

  background: radial-gradient(circle at 50% 30%, #081a30 0%, #02070f 75%, #000105 100%) !important;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

.re-theme-rpd .panel,
.re-theme-rpd .brand,
.re-theme-rpd .topbar,
.re-theme-rpd .table-zone,
.re-theme-rpd .player-card,
.re-theme-rpd .right-rail .panel {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 25px rgba(59, 130, 246, 0.04) !important;
  animation: crt-flicker-effect 0.15s infinite alternate steps(6);
}

@keyframes crt-flicker-effect {
  0% { opacity: 0.992; }
  100% { opacity: 1; }
}

/* RPD Scanlines */
.re-theme-rpd::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0.45;
}

/* ============================================================
   TEMA 3: RACCOON CITY IN FLAMES (RE3) - Fuego, Humo y Apocalipsis Analógico
   ============================================================ */
.re-theme-raccoon {
  --bg: #090200;
  --panel: linear-gradient(180deg, #130602 0%, #070100 100%);
  --panel2: #210d05;
  --line: rgba(239, 68, 68, 0.45);
  --line2: rgba(249, 115, 22, 0.15);
  --gold: #f97316;
  --text: #fee2e2;
  --muted: #ca8a04;
  --ecg-fine: #fb7185;
  --ecg-caution: #f97316;
  --ecg-danger: #dc2626;

  background: radial-gradient(circle at 50% 30%, #2f0e04 0%, #0d0300 70%, #000000 100%) !important;
  font-family: 'Courier New', Courier, monospace !important;
}

.re-theme-raccoon .panel,
.re-theme-raccoon .brand,
.re-theme-raccoon .topbar,
.re-theme-raccoon .table-zone,
.re-theme-raccoon .player-card,
.re-theme-raccoon .right-rail .panel {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.85), 0 0 15px rgba(249, 115, 22, 0.15) !important;
  position: relative;
}

/* Raccoon City Rising Embers & Flame effect */
.re-theme-raccoon::after {
  content: " ";
  display: block;
  position: fixed;
  bottom: 0; left: 0; right: 0; height: 180px;
  background: linear-gradient(to top, rgba(249, 115, 22, 0.15) 0%, rgba(239, 68, 68, 0.05) 50%, rgba(0,0,0,0) 100%);
  pointer-events: none;
  z-index: 100;
  animation: fire-pulse 4s infinite ease-in-out;
}

@keyframes fire-pulse {
  0%, 100% { opacity: 0.7; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* ============================================================
   ESTILOS PREMIUM COMUNES A LOS SKINS
   ============================================================ */

/* Contenedor del selector de skin superior */
.skin-selector-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--line2);
  margin-right: 6px;
  font-family: inherit;
}

.skin-selector-container span {
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--gold);
}

.skin-selector-select {
  background: #000 !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.skin-selector-select:hover {
  border-color: var(--gold) !important;
  box-shadow: 0 0 5px var(--gold);
}

/* Lienzo de combate (Salpicadura de Sangre Canvas Overlay) */
.combat-cinematic-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  pointer-events: none;
}

/* Capa de Flash de disparo */
.gunfire-flash-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: #fff;
  z-index: 999998;
  opacity: 0;
  pointer-events: none;
}

.gunfire-flash-overlay.active {
  animation: flash-gun 0.22s ease-out forwards;
}

@keyframes flash-gun {
  0% { opacity: 0.85; }
  100% { opacity: 0; }
}

/* Sacudida de Pantalla */
.screen-shake-active {
  animation: shake-screen-frame 0.35s cubic-bezier(.36,.07,.19,.97) both;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

@keyframes shake-screen-frame {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, -2px, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 4px, 0); }
  40%, 60% { transform: translate3d(6px, -4px, 0); }
}

/* Efecto de partículas en ECG de salud */
.ecg-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  animation: float-particle 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes float-particle {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.9;
  }
  100% {
    transform: translateY(-40px) scale(0.2);
    opacity: 0;
  }
}

/* ============================================================
   ESTILOS DEL MALETÍN DE REJILLA (Attache Case)
   ============================================================ */
.maletin-container {
  background: linear-gradient(180deg, #1b1c1e 0%, #101112 100%);
  border: 3px solid #555;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.9);
  padding: 12px;
  margin-bottom: 12px;
  font-family: inherit;
  animation: admin-fade-in 0.3s ease-out;
}

.re-theme-spencer .maletin-container {
  border-color: #d8a84d;
  background: linear-gradient(180deg, #251010 0%, #0d0404 100%);
}

.re-theme-rpd .maletin-container {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #0d1b2e 0%, #050a12 100%);
}

.re-theme-raccoon .maletin-container {
  border-color: #f97316;
  background: linear-gradient(180deg, #2b1105 0%, #0d0300 100%);
}

.maletin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 6px;
}

.maletin-header h4 {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--gold);
  letter-spacing: 1px;
}

.maletin-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, 34px);
  gap: 3px;
  background: #000;
  padding: 4px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.05);
}

.maletin-cell {
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 2px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  transition: all 0.2s ease;
}

.maletin-cell.occupied {
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.maletin-cell.occupied:hover {
  filter: brightness(1.2);
  cursor: pointer;
}

.maletin-cell.empty::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, transparent 80%);
}

.maletin-warning {
  background: linear-gradient(90deg, #7f1d1d 0%, #991b1b 50%, #7f1d1d 100%);
  border: 2px solid #ef4444;
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: bold;
  text-align: center;
  margin-top: 10px;
  animation: pulse-hazard-border 1.5s infinite ease-in-out;
}
