/* Estilos adicionales para mejorar la experiencia */

/* Animaciones mejoradas para partículas */
@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Efectos de pulso para elementos de carga */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mejoras para el contenedor del pájaro */
#parrotContainer {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Estilos específicos para el display del pájaro */
#parrotDisplay {
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Efectos de hover mejorados para tarjetas */
.security-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.5);
}

/* Mejoras para el terminal */
.terminal-overlay {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.terminal-input:focus {
    outline: none;
    box-shadow: none;
}

/* Efectos de escritura para el terminal */
.terminal-response {
    animation: typewriter 0.5s ease-in-out;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

/* Mejoras para dispositivos móviles */
@media (max-width: 480px) {
    #parrotDisplay {
        font-size: 4px;
        line-height: 0.6;
    }
    
    .terminal-overlay {
        width: 95%;
        height: 80%;
    }
    
    .floating-terminal-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}

/* Efectos de carga para comandos */
.terminal-loading {
    animation: pulse 1s infinite;
}

.terminal-loading::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Scrollbar personalizado para el terminal */
#terminalOutput::-webkit-scrollbar {
    width: 6px;
}

#terminalOutput::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

#terminalOutput::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 3px;
}

#terminalOutput::-webkit-scrollbar-thumb:hover {
    background: #00cccc;
}

/* Efectos de entrada para elementos */
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejoras para el efecto glitch */
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    animation: glitch-1 0.5s infinite;
    color: #ff0000;
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2 0.5s infinite;
    color: #00ff00;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-2px, -2px); }
    20% { transform: translate(2px, 2px); }
    30% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    50% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    70% { transform: translate(-2px, 2px); }
    80% { transform: translate(2px, -2px); }
    90% { transform: translate(-2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(2px, 2px); }
    20% { transform: translate(-2px, -2px); }
    30% { transform: translate(2px, -2px); }
    40% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    70% { transform: translate(2px, -2px); }
    80% { transform: translate(-2px, 2px); }
    90% { transform: translate(2px, 2px); }
}

/* Barras de scroll personalizadas */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 15, 35, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00ffff, #0f3460);
    border-radius: 10px;
    border: 2px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #00cccc, #0a2a50);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

::-webkit-scrollbar-corner {
    background: rgba(15, 15, 35, 0.3);
}

/* Para Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #00ffff rgba(15, 15, 35, 0.3);
}

/* Modal mejorado con scroll interno */
.modal-content {
    background: rgba(15, 15, 35, 0.95);
    margin: 2% auto;
    padding: 30px;
    border: 2px solid #00ffff;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    color: white;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.3);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Mejorar el formulario para mejor scroll */
#purchaseForm {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

/* Saldo del usuario */
.user-balance {
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.balance-amount {
    font-size: 1.5em;
    color: #00ff00;
    font-weight: bold;
}

.insufficient-funds {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff0000;
}

.insufficient-funds .balance-amount {
    color: #ff0000;
}

/* Botón de recarga de saldo */
.recharge-btn {
    background: linear-gradient(45deg, #00ff00, #008800);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    margin-top: 10px;
}

.recharge-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 255, 0, 0.4);
}
