/* === VARIABLES GLOBALES === */
:root {
    --neon-green: #00ff9f;
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    --neon-red: #ff0033;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --card-bg: #111111;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --blood-red: #8b0000;
    --matrix-green: #00ff41;
}

/* === RESET Y ESTILOS BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

body {
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
}

/* === EFECTO MATRIX BACKGROUND === */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
}

.app-title {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    position: relative;
}

.app-title h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    letter-spacing: 3px;
}

.app-title p {
    font-size: 1.2rem;
    color: var(--neon-blue);
    opacity: 0.9;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.panel {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 0 30px rgba(0, 255, 159, 0.2);
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    border: 1px solid var(--neon-green);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 255, 159, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 40px rgba(0, 255, 159, 0.4);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--neon-green);
    position: relative;
    z-index: 1;
}

.panel-title {
    font-size: 1.8rem;
    color: var(--neon-green);
    font-weight: 700;
    text-shadow: 0 0 5px var(--neon-green);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--neon-blue);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--neon-green);
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--neon-green);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.btn {
    padding: 15px 30px;
    background: rgba(0, 255, 159, 0.2);
    color: var(--neon-green);
    border: 2px solid var(--neon-green);
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background: rgba(0, 255, 159, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.5);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.btn-secondary:hover {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.results-container {
    flex: 1;
    border: 2px solid rgba(0, 255, 159, 0.3);
    border-radius: 10px;
    padding: 20px;
    overflow-y: auto;
    max-height: 400px;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.results-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--neon-green);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.tarjeta-item {
    background: rgba(0, 255, 159, 0.1);
    border-left: 5px solid var(--neon-green);
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.tarjeta-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    background: rgba(0, 255, 159, 0.15);
    border-left-color: var(--neon-blue);
}

.panel-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 1;
}

/* Estilos para la tarjeta */
.card-preview {
    background: linear-gradient(135deg, #0a0a0a, #111111);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border: 1px solid var(--neon-green);
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-height: 240px;
}

.card-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,255,159,0.1) 0%, transparent 70%);
    z-index: -1;
}

.card-chip {
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, var(--neon-green), #00cc7f);
    border-radius: 8px;
    margin-bottom: 25px;
    position: relative;
    box-shadow: 0 0 10px var(--neon-green);
}

.card-chip::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 5px;
}

.card-number {
    font-size: 1.8rem;
    letter-spacing: 2px;
    margin-bottom: 25px;
    font-family: monospace;
    text-shadow: 0 0 5px var(--neon-green);
    color: var(--neon-green);
}

.card-details {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.card-holder {
    font-size: 1.1rem;
}

.card-expiry {
    font-size: 1.1rem;
}

.card-type {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 1.5rem;
    opacity: 0.8;
}

.card-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.card-input-row {
    display: flex;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.card-input-field {
    flex: 1;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 255, 159, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    position: relative;
    z-index: 3;
}

.card-input-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.card-input-field:focus {
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 159, 0.5);
    background: rgba(0, 0, 0, 0.7);
}

.card-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300ff9f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    position: relative;
    z-index: 3;
}

.generator-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.quantity-input {
    width: 120px;
}

.generate-btn {
    flex: 1;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 255, 159, 0.3);
    border-radius: 50%;
    border-top-color: var(--neon-green);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--neon-pink);
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--neon-blue);
    animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
    0% { clip-path: inset(20% 0 65% 0); }
    20% { clip-path: inset(60% 0 5% 0); }
    40% { clip-path: inset(35% 0 40% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(15% 0 70% 0); }
    100% { clip-path: inset(50% 0 30% 0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(65% 0 20% 0); }
    20% { clip-path: inset(5% 0 60% 0); }
    40% { clip-path: inset(40% 0 35% 0); }
    60% { clip-path: inset(5% 0 80% 0); }
    80% { clip-path: inset(70% 0 15% 0); }
    100% { clip-path: inset(30% 0 50% 0); }
}

/* Scrollbar personalizado */
.results-container::-webkit-scrollbar {
    width: 8px;
}

.results-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.results-container::-webkit-scrollbar-thumb {
    background: var(--neon-green);
    border-radius: 10px;
}

.results-container::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .app-title h1 {
        font-size: 2rem;
    }
    
    .panel {
        padding: 20px;
    }
    
    .card-input-row {
        flex-direction: column;
    }
    
    .card-input-field {
        width: 100%;
    }
    
    .generator-controls {
        flex-direction: column;
    }
    
    .quantity-input {
        width: 100%;
    }
}