/* Estilos Personalizados - Web App Psicología Oscura 6 en 1 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg-main: #090D16;
  --bg-card: #0F172A;
  --bg-card-hover: #1E293B;
  --accent-cyan: #06B6D4;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --accent-rose: #F43F5E;
  --accent-purple: #8B5CF6;
  --text-primary: #F8FAFC;
  --text-muted: #94A3B8;
  --border-subtle: #1E293B;
}

* {
  font-family: 'Plus Jakarta Sans', sans-serif;
  box-sizing: border-box;
}

code, pre, .mono {
  font-family: 'JetBrains Mono', monospace;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #090D16;
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #06B6D4;
}

/* Glassmorphism & Tactical Cards */
.glass-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(30, 41, 59, 0.8);
  transition: all 0.25s ease;
}

.glass-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.tactical-glow {
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.15);
}

.tactical-glow-emerald {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.15);
}

.tactical-glow-rose {
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.15);
}

/* Flashcard 3D Flip System */
.flip-card-container {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  min-height: 480px;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

.flip-card-inner.flipped {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 1rem;
  padding: 2rem;
}

.flip-card-front {
  background: linear-gradient(145deg, #0F172A, #1E293B);
  border: 1px solid #334155;
}

.flip-card-back {
  background: linear-gradient(145deg, #131E38, #0B132B);
  border: 1px solid #06B6D4;
  transform: rotateY(180deg);
}

/* Navigation Tabs Active State */
.nav-tab {
  transition: all 0.2s ease;
  position: relative;
}

.nav-tab.active {
  color: #06B6D4;
  background: rgba(6, 182, 212, 0.1);
  border-bottom: 2px solid #06B6D4;
}

/* Badge Glows */
.badge-critic {
  background: rgba(244, 63, 94, 0.15);
  color: #F43F5E;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-shield {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pnl {
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: #22D3EE;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Animation utilities */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

.animate-pulse-glow {
  animation: pulseGlow 3s infinite ease-in-out;
}

/* Print / Export Mode */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .no-print, header, nav, footer, #searchModal {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .glass-card {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
    box-shadow: none !important;
  }
}

@keyframes fadeViewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-view {
  animation: fadeViewIn 0.35s ease-out forwards;
}


/* LIGHT MODE MAGIC OVERRIDE */
html.light-theme {
  filter: invert(1) hue-rotate(180deg);
  background: #fff;
}
html.light-theme img,
html.light-theme video,
html.light-theme canvas,
html.light-theme .preserve-color {
  filter: invert(1) hue-rotate(180deg);
}
