/* ============================================
   GENGAR CYBERPUNK THEME v2.0
   Paleta: #A07CF0 (morado eléctrico), #0a0a0f (negro profundo)
   ============================================ */

/* === Base === */
body {
  background: #0a0a0f !important;
  background-image:
    radial-gradient(ellipse at 15% 50%, rgba(160, 124, 240, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 20%, rgba(160, 124, 240, 0.04) 0%, transparent 50%) !important;
  font-family: 'Inter', -apple-system, sans-serif !important;
  color: #c9d1d9 !important;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb { background: rgba(160, 124, 240, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(160, 124, 240, 0.5); }
* { scrollbar-width: thin; scrollbar-color: rgba(160, 124, 240, 0.3) #0a0a0f; }

/* === Typography === */
h1, h2, h3, h4 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 600;
  color: #e0d4f5;
}

a { color: #A07CF0; transition: color 0.2s; }
a:hover { color: #c4b0f7; }

/* ============================================
   HEADER — Sticky + Glassmorphism + Glitch
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(160, 124, 240, 0.12);
  padding: 12px 0;
  margin: 0 0 30px 0;
}

header h1, a#a-title h1 {
  color: #A07CF0 !important;
  font-family: 'Fira Code', monospace !important;
  font-weight: 700;
  font-size: 18px;
  margin: 0;
  letter-spacing: 0.02em;
  text-shadow: 0 0 15px rgba(160, 124, 240, 0.3) !important;
  position: relative;
}

header h1:before { content: none; }

/* Glitch hover en título */
a#a-title:hover h1 {
  animation: glitch 0.3s ease-in-out;
}

@keyframes glitch {
  0%, 100% { text-shadow: 0 0 15px rgba(160, 124, 240, 0.3); transform: translate(0); }
  20% { text-shadow: -2px 0 #A07CF0, 2px 0 #7c3aed; transform: translate(-1px, 1px); }
  40% { text-shadow: 2px 0 #A07CF0, -2px 0 #7c3aed; transform: translate(1px, -1px); }
  60% { text-shadow: -1px 0 #c4b0f7, 1px 0 #6d28d9; transform: translate(-1px, 0); }
  80% { text-shadow: 1px 0 #A07CF0, -1px 0 #7c3aed; transform: translate(1px, 1px); }
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.header-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.header-logo {
  height: 42px;
  width: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(160, 124, 240, 0.4));
}

.header-tagline {
  color: #5a4d73;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  margin: 0;
}

.header-nav { display: flex; gap: 6px; }

.header-nav a {
  color: #7a6b99;
  text-decoration: none;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.header-nav a:hover {
  color: #A07CF0;
  background: rgba(160, 124, 240, 0.06);
  border-color: rgba(160, 124, 240, 0.2);
}

.nav-prompt { color: #A07CF0; margin-right: 3px; }

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: #4a4458;
  margin-bottom: 24px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(160, 124, 240, 0.08);
}

.breadcrumbs a {
  color: #A07CF0;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #c4b0f7;
  text-decoration: underline;
}

.breadcrumbs .separator {
  color: #3a3450;
  margin: 0 8px;
}

.breadcrumbs .current {
  color: #7a6b99;
}

/* ============================================
   INDEX FOLIO — Contenedor principal inicio
   ============================================ */
.index-folio {
  background: #111118;
  border: 1px solid rgba(160, 124, 240, 0.1);
  border-radius: 14px;
  padding: 36px 40px;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.index-folio::before {
  content: 'GENGAR // ATTACK LAB';
  position: absolute;
  top: 14px;
  right: 20px;
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: rgba(160, 124, 240, 0.12);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.index-folio::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 124, 240, 0.3), transparent);
}

/* ============================================
   OS SELECTOR — Dual Boot
   ============================================ */
.os-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.os-card {
  position: relative;
  background: rgba(16, 16, 24, 0.8);
  border: 1px solid rgba(160, 124, 240, 0.15);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.os-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(ellipse at center, rgba(160, 124, 240, 0.03) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.os-card:hover::before { opacity: 1; }

.os-card:hover {
  border-color: rgba(160, 124, 240, 0.5);
  box-shadow:
    0 0 20px rgba(160, 124, 240, 0.15),
    0 0 40px rgba(160, 124, 240, 0.05),
    inset 0 0 30px rgba(160, 124, 240, 0.03);
  transform: translateY(-2px);
}

.os-card.active {
  border-color: #A07CF0;
  box-shadow:
    0 0 20px rgba(160, 124, 240, 0.2),
    0 0 40px rgba(160, 124, 240, 0.08);
}

.os-card.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: #A07CF0;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(160, 124, 240, 0.5);
}

.os-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 8px rgba(160, 124, 240, 0.3));
}

.os-card-title {
  font-family: 'Fira Code', monospace !important;
  font-size: 16px;
  font-weight: 600;
  color: #e0d4f5;
  margin: 0 0 4px 0;
  letter-spacing: 0.05em;
}

.os-card-sub {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: #5a4d73;
  margin: 0;
}

.os-card-count {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: #A07CF0;
  margin-top: 8px;
  display: block;
}

/* Glitch hover en OS cards */
.os-card:hover .os-card-title {
  animation: glitch 0.4s ease-in-out;
}

/* ============================================
   CARDS GRID
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 0;
}

/* === Glassmorphism Cards === */
.card {
  background: rgba(16, 16, 24, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(160, 124, 240, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(160, 124, 240, 0.45);
  box-shadow:
    0 0 20px rgba(160, 124, 240, 0.2),
    0 0 40px rgba(160, 124, 240, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Filtro morado unificador para imágenes */
.card-img {
  height: 120px;
  object-fit: contain;
  display: block;
  margin: 18px auto 0;
  filter: sepia(30%) hue-rotate(230deg) brightness(90%) saturate(120%) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: filter 0.3s;
}

.card:hover .card-img {
  filter: sepia(10%) hue-rotate(230deg) brightness(100%) saturate(130%) drop-shadow(0 4px 16px rgba(160, 124, 240, 0.3));
}

.card-body {
  padding: 16px 18px 18px;
}

.card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 10px 0;
  color: #e0d4f5;
}

/* === Category Badges === */
.card-category {
  display: inline-block;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.card-category.windows {
  background: rgba(160, 124, 240, 0.08);
  color: #A07CF0;
  border: 1px solid rgba(160, 124, 240, 0.15);
}

.card-category.linux {
  background: rgba(160, 124, 240, 0.08);
  color: #c4b0f7;
  border: 1px solid rgba(160, 124, 240, 0.15);
}

.card-date {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: #4a4458;
  margin: 0;
}

/* === Terminal Tags === */
.card-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.card-tag {
  display: inline-block;
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: #7a6b99;
  background: rgba(160, 124, 240, 0.04);
  border: 1px solid rgba(160, 124, 240, 0.1);
  padding: 2px 8px;
  border-radius: 3px;
  transition: all 0.2s;
}

.card:hover .card-tag {
  color: #A07CF0;
  border-color: rgba(160, 124, 240, 0.3);
  text-shadow: 0 0 6px rgba(160, 124, 240, 0.25);
}

/* ============================================
   WRITEUP FOLIO — Expediente Secreto
   ============================================ */
.writeup-folio {
  background: #111118;
  border: 1px solid rgba(160, 124, 240, 0.12);
  border-radius: 12px;
  padding: 40px 48px;
  margin: 0 auto;
  max-width: 860px;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
}

.writeup-folio::before {
  content: 'CLASSIFIED';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: rgba(160, 124, 240, 0.15);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.writeup-folio h1 {
  font-family: 'Inter', sans-serif !important;
  font-size: 26px;
  color: #A07CF0;
  margin-top: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(160, 124, 240, 0.1);
}

.writeup-folio h2 {
  color: #c4b0f7;
  font-size: 20px;
  margin-top: 32px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(160, 124, 240, 0.06);
}

.writeup-folio h3 {
  color: #A07CF0;
  font-size: 16px;
  margin-top: 24px;
}

.writeup-folio img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(160, 124, 240, 0.1);
  margin: 16px 0;
}

.writeup-folio blockquote {
  border-left: 3px solid #A07CF0;
  background: rgba(160, 124, 240, 0.04);
  padding: 12px 20px;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
  color: #9a8cb5;
  font-size: 14px;
}

.writeup-folio hr {
  border: none;
  border-top: 1px solid rgba(160, 124, 240, 0.08);
  margin: 32px 0;
}

/* ============================================
   TERMINAL — Bloques de Código Kali
   ============================================ */
pre {
  background: #000000 !important;
  border: 1px solid rgba(160, 124, 240, 0.15);
  border-radius: 8px;
  position: relative;
  padding-top: 32px !important;
}

pre::before {
  content: 'user@gengar:~$';
  position: absolute;
  top: 8px;
  left: 14px;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: #A07CF0;
  opacity: 0.6;
}

pre code {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: #e2e8f0 !important;
  font-family: 'Fira Code', monospace !important;
  font-size: 13px;
}

code {
  font-family: 'Fira Code', monospace !important;
  font-size: 0.88em;
  background: rgba(160, 124, 240, 0.08);
  border: 1px solid rgba(160, 124, 240, 0.12);
  border-radius: 4px;
  padding: 2px 6px;
  color: #c4b0f7;
}

/* ============================================
   GENGAR MASCOTA — Flotante + Glow Pulsante
   ============================================ */
.gengar-mascot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  pointer-events: none;
  animation: levitate 3s ease-in-out infinite;
}

.gengar-mascot img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(160, 124, 240, 0.5));
  opacity: 0.9;
}

.gengar-mascot::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(160, 124, 240, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes levitate {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.8; transform: translateX(-50%) scale(1.2); }
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 1px solid rgba(160, 124, 240, 0.08);
  padding: 20px 0;
  margin-top: 50px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-content p {
  color: #3a3450;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  margin: 0;
}

.footer-prompt { color: #A07CF0; }

.footer-links { display: flex; gap: 16px; }

.footer-links a {
  color: #3a3450;
  text-decoration: none;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  transition: color 0.2s;
}

.footer-links a:hover { color: #A07CF0; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .header-content { flex-direction: column; gap: 12px; }
  .header-left { flex-direction: column; text-align: center; gap: 8px; }
  .header-info { align-items: center; }

  .os-selector { grid-template-columns: 1fr; gap: 12px; }
  .os-card { padding: 20px 16px; }

  .cards-grid { grid-template-columns: 1fr; }

  .writeup-folio { padding: 24px 20px; }

  .footer-content { flex-direction: column; gap: 10px; text-align: center; }

  .index-folio { padding: 20px 16px; }

  .gengar-mascot { bottom: 12px; right: 12px; }
  .gengar-mascot img { width: 72px; height: 72px; }
}
