/* ============================================================
   EXILIO ESTELAR — Estilos personalizados (complementan Tailwind)
   ============================================================ */

/* Scanline overlay para estética de terminal */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 212, 255, 0.015) 2px,
        rgba(0, 212, 255, 0.015) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* BARRAS DE RECURSOS */
.resource-bar {
    height: 6px;
    background: #1e3a5f;
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.resource-bar-fill {
    height: 100%;
    transition: width 0.6s ease-out;
    position: relative;
}

.resource-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 2px; height: 100%;
    background: rgba(255,255,255,0.4);
    animation: bar-pulse 2s ease-in-out infinite;
}

@keyframes bar-pulse {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 1; }
}

/* Estados de recursos */
.status-optimal  .resource-bar-fill { background: #10b981; }
.status-stable   .resource-bar-fill { background: #00d4ff; }
.status-critical .resource-bar-fill { background: #f59e0b; }
.status-emergency .resource-bar-fill { background: #ef4444; animation: danger-flash 1s ease-in-out infinite; }

@keyframes danger-flash {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* Texto de estado */
.status-optimal  .status-label { color: #10b981; }
.status-stable   .status-label { color: #00d4ff; }
.status-critical .status-label { color: #f59e0b; }
.status-emergency .status-label { color: #ef4444; }

/* PANELES TIPO CONSOLA */
.console-panel {
    background: #0a1628;
    border: 1px solid #1e3a5f;
    position: relative;
}

.console-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00d4ff40, transparent);
}

/* BOTONES */
.btn-primary {
    background: transparent;
    border: 1px solid #00d4ff;
    color: #00d4ff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.btn-primary:hover:not(:disabled) {
    background: #00d4ff15;
    box-shadow: 0 0 12px #00d4ff30;
}

.btn-primary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-danger {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-danger:hover:not(:disabled) {
    background: #ef444415;
    box-shadow: 0 0 12px #ef444430;
}

.btn-safe {
    border-color: #10b981;
    color: #10b981;
}

.btn-safe:hover:not(:disabled) {
    background: #10b98115;
}

/* CHOICE CARDS (opciones de evento) */
.choice-card {
    border: 1px solid #1e3a5f;
    background: #050811;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.choice-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 3px; height: 100%;
    background: #1e3a5f;
    transition: background 0.2s ease;
}

.choice-card:hover {
    border-color: #00d4ff50;
    background: #00d4ff08;
}

.choice-card:hover::before {
    background: #00d4ff;
}

.choice-card:active {
    transform: scale(0.99);
}

/* FORMULARIOS */
.form-input {
    background: #050811;
    border: 1px solid #1e3a5f;
    color: #d1d5db;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    padding: 0.625rem 0.875rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: #00d4ff60;
    box-shadow: 0 0 0 1px #00d4ff20;
}

.form-input::placeholder {
    color: #4a6fa5;
}

.form-label {
    display: block;
    font-size: 0.7rem;
    color: #4a6fa5;
    letter-spacing: 0.1em;
    margin-bottom: 0.375rem;
    text-transform: uppercase;
}

/* ALERTAS */
.alert {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    border-left: 3px solid;
    font-family: 'JetBrains Mono', monospace;
}

.alert-error   { background: #ef444410; border-color: #ef4444; color: #fca5a5; }
.alert-success { background: #10b98110; border-color: #10b981; color: #6ee7b7; }
.alert-warn    { background: #f59e0b10; border-color: #f59e0b; color: #fcd34d; }
.alert-info    { background: #00d4ff10; border-color: #00d4ff; color: #7dd3fc; }

/* HISTORIA / LOG */
.history-entry {
    border-left: 2px solid #1e3a5f;
    padding-left: 1rem;
    position: relative;
}

.history-entry::before {
    content: '';
    position: absolute;
    left: -5px; top: 0.5rem;
    width: 8px; height: 8px;
    background: #1e3a5f;
    border-radius: 50%;
}

.history-entry:first-child::before { background: #00d4ff; }

/* GLITCH EFFECT para titulos importantes */
@keyframes glitch {
    0%   { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 0); }
    20%  { clip-path: inset(40% 0 30% 0); transform: translate(3px, 0); }
    40%  { clip-path: inset(60% 0 10% 0); transform: translate(0, 0); }
    60%  { clip-path: inset(10% 0 80% 0); transform: translate(3px, 0); }
    80%  { clip-path: inset(80% 0 5% 0);  transform: translate(-3px, 0); }
    100% { clip-path: inset(0% 0 100% 0); transform: translate(0, 0); }
}

/* LOADING SPINNER tipo consola */
.console-loading {
    display: inline-block;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* RESPONSIVE UTILITIES */
@media (max-width: 640px) {
    .choice-card { padding: 0.75rem; }
    .console-panel { padding: 0.875rem; }
}

/* SCROLLBAR */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: #050811; }
::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #2a4f7a; }
