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

:root {
  --bg-color: #050505;
  --card-bg: rgba(20, 20, 25, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --accent-primary: #646cff;
  --accent-secondary: #00d2ff;
  --accent-success: #00ffaa;
  --accent-danger: #ff5050;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(20px);
  --scrollbar-track: rgba(255, 255, 255, 0.02);
  --scrollbar-thumb: rgba(100, 108, 255, 0.3);
  --scrollbar-thumb-hover: rgba(100, 108, 255, 0.8);
  
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(circle at 15% 0%, rgba(100, 108, 255, 0.12) 0%, transparent 35%),
    radial-gradient(circle at 85% 100%, rgba(0, 210, 255, 0.08) 0%, transparent 35%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; transition: background 0.2s ease; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

#app {
  width: 100%;
  max-width: 1400px;
  padding: 2rem;
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto 1fr;
  gap: 1.5rem;
}

/* Header & Logos */
.header {
  grid-column: span 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
}

.title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-glow-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-glow-wrapper::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--accent-primary);
  filter: blur(20px);
  opacity: 0.4;
  border-radius: 50%;
  z-index: -1;
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.3; transform: scale(0.9); }
  100% { opacity: 0.6; transform: scale(1.1); }
}

.title-group h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.subtitle { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }

/* Cards & Interactions */
.card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glow-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(100, 108, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Stat Cards */
.stat-card {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.stat-value { font-size: 1.7rem; font-weight: 700; margin-top: 0.5rem; display: flex; align-items: center; gap: 8px; }

.stat-change { font-size: 0.85rem; font-weight: 600; padding: 4px 8px; border-radius: 8px; background: rgba(0, 255, 170, 0.1); color: var(--accent-success); }

/* Charts */
.chart-main { grid-column: span 3; height: 420px; display: flex; flex-direction: column;}
.chart-side { grid-column: span 1; height: 420px; display: flex; flex-direction: column;}

.chart-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.chart-titles h3 { font-size: 1.2rem; font-weight: 600; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px;}

.chart-container { position: relative; flex: 1; width: 100%; min-height: 0; }

.interactive-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 0 rgba(100, 108, 255, 0.7);
  animation: pulseDot 2s infinite;
}

.pulse-dot.green { background: var(--accent-success); box-shadow: 0 0 0 0 rgba(0, 255, 170, 0.7); }

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(inherit, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(inherit, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(inherit, 0); }
}

/* User Profile */
.user-profile.card { padding: 8px 16px; border-radius: 40px; display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-color); }
.user-details { display: flex; flex-direction: column; }
.user-name { font-weight: 600; font-size: 0.9rem; }
.user-rank { font-size: 0.75rem; color: var(--accent-success); font-weight: 500;}

/* Market List */
.market-list { max-height: 380px; overflow-y: auto; padding-right: 8px; }
.coin-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,0.03); transition: all 0.2s ease; border-radius: 12px;}
.coin-item:hover { background: rgba(255, 255, 255, 0.03); transform: translateX(4px); }
.coin-info { display: flex; align-items: center; gap: 14px; }
.coin-info img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.coin-name { font-weight: 600; font-size: 0.95rem; }
.coin-symbol { color: var(--text-muted); font-size: 0.75rem; letter-spacing: 0.5px; }
.price-value { font-weight: 600; font-size: 1rem; text-align: right;}
.price-change { font-size: 0.8rem; font-weight: 600; text-align: right; margin-top: 2px;}

/* Botón transparente */
.btn-icon { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 8px; transition: 0.2s; }
.btn-icon:hover { color: var(--text-main); background: rgba(255,255,255,0.1); }

/* Nix Engine Card */
.nix-engine-card {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(20,20,25,0.6) 0%, rgba(100, 108, 255, 0.05) 100%);
  border-top: 1px solid rgba(100, 108, 255, 0.3);
}

.engine-stats {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.engine-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.8rem;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
}

.engine-stat:last-child { border-bottom: none; padding-bottom: 0; }
.stat-lbl { color: var(--text-muted); font-size: 0.9rem; font-weight: 500;}
.stat-val { font-size: 1rem; font-weight: 700; color: #fff; }
.stat-val.highlight { color: var(--accent-secondary); text-shadow: 0 0 10px rgba(0, 210, 255, 0.4); }
.stat-val small { font-size: 0.7rem; color: var(--text-muted); font-weight: 400;}

.engine-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: rgba(100, 108, 255, 0.1);
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 12px;
  transition: all 0.2s ease;
  border: 1px solid rgba(100, 108, 255, 0.2);
}

.engine-link:hover {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 0 20px rgba(100, 108, 255, 0.4);
}

/* Utils & Fallbacks */
.loading-skeleton-box { background: linear-gradient(90deg, rgba(20,20,20,0.5), rgba(255,255,255,0.05), rgba(20,20,20,0.5)); background-size: 200% 100%; animation: shimmer 2s infinite; }
.error-content { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 1rem; text-align: center;}

/* =========================================
   SETTINGS BUTTON & MODAL
   ========================================= */
.settings-btn {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  margin-right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.settings-btn:hover {
  border-color: var(--accent-primary);
  background: rgba(100, 108, 255, 0.1);
  box-shadow: 0 0 15px rgba(100, 108, 255, 0.2);
}

/* ⚠️ MODAL OVERLAY - Z-Index corregido para TradeConfirmationModal */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important; /* ✅ Máximo z-index para estar encima de todo */
  animation: fadeIn 0.2s ease !important;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid rgba(100, 108, 255, 0.3);
  box-shadow: 0 0 40px rgba(0,0,0,0.8), 0 0 20px rgba(100, 108, 255, 0.1);
  border-radius: 24px;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 1.5rem; 
}

.modal-header h3 { 
  font-size: 1.3rem; 
  font-weight: 600; 
  color: #fff; 
}

.close-btn { 
  background: none; 
  border: none; 
  color: var(--text-muted); 
  font-size: 1.5rem; 
  cursor: pointer; 
  padding: 4px; 
  line-height: 1; 
  transition: 0.2s; 
}

.close-btn:hover { 
  color: #fff; 
  transform: scale(1.1); 
}

/* =========================================
   FORM STYLES
   ========================================= */
.form-section { margin-bottom: 1.5rem; }

.form-section h4 { 
  font-size: 0.85rem; 
  color: var(--accent-secondary); 
  text-transform: uppercase; 
  letter-spacing: 1px; 
  margin-bottom: 1rem; 
}

.form-group { margin-bottom: 1rem; }

.form-group label { 
  display: block; 
  font-size: 0.85rem; 
  color: var(--text-muted); 
  margin-bottom: 0.5rem; 
}

.form-group input[type="number"], 
.form-group input[type="text"], 
.form-group input[type="color"] {
  width: 100%; 
  padding: 10px 12px; 
  border-radius: 8px; 
  border: 1px solid var(--border-color); 
  background: rgba(0, 0, 0, 0.3); 
  color: var(--text-main); 
  font-family: inherit; 
  font-size: 0.9rem; 
  transition: all 0.2s ease;
}

.form-group input:focus { 
  outline: none; 
  border-color: var(--accent-primary); 
  background: rgba(100, 108, 255, 0.05); 
  box-shadow: 0 0 0 3px rgba(100, 108, 255, 0.2); 
}

.form-group input.error { border-color: var(--accent-danger); }
.form-group input[type="color"] { height: 40px; padding: 4px; cursor: pointer; }

.checkbox-label { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  cursor: pointer; 
  color: var(--text-muted); 
}

.checkbox-label input[type="checkbox"] { 
  width: 18px; 
  height: 18px; 
  accent-color: var(--accent-primary); 
  cursor: pointer; 
}

.field-error { 
  display: block; 
  font-size: 0.75rem; 
  color: var(--accent-danger); 
  margin-top: 0.4rem; 
}

.modal-actions { 
  display: flex; 
  gap: 1rem; 
  justify-content: flex-end; 
  margin-top: 1.5rem; 
  padding-top: 1.5rem; 
  border-top: 1px dashed rgba(255,255,255,0.1); 
}

.btn-secondary { 
  padding: 10px 20px; 
  border-radius: 12px; 
  border: 1px solid var(--border-color); 
  background: transparent; 
  color: var(--text-main); 
  cursor: pointer; 
  font-weight: 500; 
  font-family: inherit; 
  transition: all 0.2s ease; 
}

.btn-secondary:hover { 
  border-color: var(--text-muted); 
  background: rgba(255,255,255,0.05); 
}

.btn-primary { 
  padding: 10px 20px; 
  border-radius: 12px; 
  border: none; 
  background: var(--accent-primary); 
  color: white; 
  cursor: pointer; 
  font-weight: 600; 
  font-family: inherit; 
  transition: all 0.2s ease; 
  box-shadow: 0 4px 15px rgba(100, 108, 255, 0.3); 
}

.btn-primary:hover:not(:disabled) { 
  background: var(--accent-secondary); 
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.4); 
  transform: translateY(-2px); 
}

.btn-primary:disabled { 
  opacity: 0.5; 
  cursor: not-allowed; 
  box-shadow: none; 
}

/* Modal Scrollbar */
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* =========================================
   ANIMACIONES ESCALONADAS DE CARGA
   ========================================= */
.card {
  animation: cardEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* Retrasos para que entren en cascada */
.stat-card:nth-of-type(1) { animation-delay: 0.1s; }
.stat-card:nth-of-type(2) { animation-delay: 0.2s; }
.stat-card:nth-of-type(3) { animation-delay: 0.3s; }
.stat-card:nth-of-type(4) { animation-delay: 0.4s; }
.chart-main { animation-delay: 0.3s; }
.chart-side { animation-delay: 0.4s; }
.glow-hover[style*="grid-column: span 3"] { animation-delay: 0.5s; } /* Lista de monedas */
.nix-engine-card { animation-delay: 0.6s; }

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================
   TRANSICIÓN DEL MODAL DE NIX.JS - CORREGIDO
   ========================================= */
.modal-enter-active,
.modal-leave-active {
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-enter-from,
.modal-leave-to {
  opacity: 0;
}

.modal-enter-from .modal-content,
.modal-leave-to .modal-content {
  transform: scale(0.95) translateY(20px);
}

/* ✅ FIX: Asegurar que el modal sea visible durante y después de la transición */
.modal-enter-active .modal-overlay,
.modal-enter-to .modal-overlay {
  opacity: 1 !important;
  visibility: visible !important;
}

.modal-enter-active .modal-content,
.modal-enter-to .modal-content {
  opacity: 1 !important;
  transform: none !important;
}

/* =========================================
   BORDE MÁGICO PARA NIX ENGINE
   ========================================= */
.nix-engine-card {
  position: relative;
  z-index: 1;
  overflow: visible; /* Permitir que el glow salga */
}

.nix-engine-card::before {
  content: '';
  position: absolute;
  inset: -2px; /* Ligeramente más grande que la tarjeta */
  border-radius: 26px;
  background: linear-gradient(60deg, var(--accent-primary), var(--accent-secondary), var(--accent-success), var(--accent-primary));
  background-size: 300% 300%;
  z-index: -1;
  animation: borderGlow 4s linear infinite;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.nix-engine-card:hover::before {
  opacity: 1;
  inset: -3px;
  filter: blur(8px); /* Se vuelve un resplandor al hacer hover */
}

@keyframes borderGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* =========================================
   TIMEFRAME TABS
   ========================================= */
.timeframe-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.time-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-btn:hover {
    color: var(--text-main);
}

.time-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* =========================================
   QUICK ACTIONS EN MONEDAS (HOVER)
   ========================================= */
.quick-action-wrapper {
    position: relative;
}

.coin-actions {
    position: absolute;
    right: 100px; /* Se sitúa antes del precio */
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.quick-action-wrapper:hover .coin-actions {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.quick-action-wrapper:hover .coin-price {
    opacity: 0.3; /* Atenúa el precio para destacar el botón */
}

.btn-trade {
    background: rgba(100, 108, 255, 0.15);
    border: 1px solid rgba(100, 108, 255, 0.4);
    color: var(--accent-primary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-trade:hover {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 15px rgba(100, 108, 255, 0.3);
}

/* =========================================
   TRADE PANEL SLIDE-OUT - Z-Index ajustado
   ========================================= */
.trade-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999 !important; /* ✅ Menor que modal-overlay (99999) */
    display: flex;
    justify-content: flex-end;
}

.trade-panel {
    background: var(--card-bg);
    border-left: 1px solid var(--border-color);
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    padding: 2rem;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    margin-bottom: 1.5rem;
}

.trade-input-group {
    margin-bottom: 1.5rem;
}

.trade-input-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.trade-input-group input {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 8px;
    font-size: 1.1rem;
}

.trade-input-group input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Transición Nix.js Slide Right */
.slide-right-enter-active,
.slide-right-leave-active {
    transition: opacity 0.3s ease;
}
.slide-right-enter-active .trade-panel,
.slide-right-leave-active .trade-panel {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-right-enter-from,
.slide-right-leave-to {
    opacity: 0;
}
.slide-right-enter-from .trade-panel,
.slide-right-leave-to .trade-panel {
    transform: translateX(100%);
}

/* =========================================
   SUCCESS MODAL (TRADE CONFIRMATION) - CORREGIDO
   ========================================= */
.success-modal {
    text-align: center;
    max-width: 400px;
    display: flex !important; /* ✅ Forzar display flex */
    flex-direction: column;
    align-items: center;
    opacity: 1 !important; /* ✅ Forzar visibilidad */
    visibility: visible !important;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 255, 170, 0.1);
    color: var(--accent-success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 30px rgba(0, 255, 170, 0.2);
}

.success-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.success-message {
    color: var(--text-muted);
    line-height: 1.5;
}

.success-message strong {
    color: #fff;
}

/* =========================================
   ERROR BOUNDARY STYLES
   ========================================= */
.error-boundary-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at center, rgba(255, 80, 80, 0.1) 0%, transparent 60%);
}

.error-boundary-content {
    max-width: 450px;
    text-align: center;
    border-color: rgba(255, 80, 80, 0.3);
    box-shadow: 0 0 40px rgba(255, 80, 80, 0.1);
}

.error-icon {
    margin-bottom: 1.5rem;
    animation: pulseError 2s infinite;
}

.error-boundary-content h2 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.error-details {
    color: var(--accent-danger);
    background: rgba(255, 80, 80, 0.1);
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 80, 80, 0.2);
}

@keyframes pulseError {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* =========================================
    EMERGENCY FIX - MODAL VISIBILITY
   ========================================= */
/* Estas reglas aseguran que el modal SIEMPRE sea visible cuando existe */
.modal-overlay[style*="modal"],
div.modal-overlay {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 99999 !important;
}

.modal-overlay .modal-content.success-modal {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* =========================================
   MODAL OVERLAY - FORZAR VISIBILIDAD
   ========================================= */
.modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    animation: fadeIn 0.2s ease !important;
}

.modal-content.success-modal {
    background: var(--card-bg) !important;
    border: 1px solid rgba(0, 255, 170, 0.3) !important;
    box-shadow: 0 0 60px rgba(0, 255, 170, 0.2) !important;
    border-radius: 24px !important;
    padding: 2.5rem !important;
    width: 90% !important;
    max-width: 420px !important;
    text-align: center !important;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Override transiciones Nix.js */
.modal-enter-active,
.modal-enter-to,
.modal-leave-active {
    opacity: 1 !important;
}

.modal-enter-active .modal-overlay,
.modal-enter-to .modal-overlay {
    display: flex !important;
    visibility: visible !important;
}