:root {
    /* Tema Oscuro Hacker / Neon */
    --primary-color: #8b5cf6;
    /* Violeta Neón Brillante */
    --secondary-color: #ec4899;
    /* Rosa Neón */
    --accent-color: #22d3ee;
    /* Cyan Eléctrico */

    --bg-color: #0f172a;
    /* Azul Noche Profundo (Mejor que negro puro) */
    --card-bg: rgba(30, 41, 59, 0.7);
    /* Semitransparente para efecto glow */

    --text-color: #f1f5f9;
    /* Blanco Casi Puro (Muy legible) */
    --text-muted: #cbd5e1;
    /* Gris claro para subtítulos */

    --border-color: rgba(139, 92, 246, 0.3);
    /* Bordes violetas sutiles */
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);

    --success-color: #34d399;
    --error-color: #f87171;

    --neon-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    --transition: all 0.3s ease;
}



* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;

    /* Fondo con brillos sutiles */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15), transparent 25%);
}

.container {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    /* Sombra profunda */
    width: 100%;
    max-width: 650px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    /* Efecto vidrio ahumado */
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    /* Borde superior iluminado */
    animation: floatEntry 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

/* Efecto borde sutil superior */
.container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.logo {
    display: inline-block;
    margin-bottom: 1rem;
    position: relative;
}

.logo-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.6));
}

/* Títulos */
h1 {
    color: #fff;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.badge {
    font-size: 0.4em;
    vertical-align: super;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-text-fill-color: white;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
    animation: pulse 2s infinite;
}

/* User Info Bar */
.user-info-bar {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.5rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    border-radius: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tab-button:hover {
    color: var(--text-color);
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

/* Inputs Oscuros pero legibles */
input,
select,
textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.8);
    /* Fondo muy oscuro pero no negro total */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    color: #ffffff !important;
    /* Texto BLANCO FORZADO */
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

input::placeholder {
    color: #94a3b8;
    /* Placeholder visible pero no intrusivo */
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    background: rgba(15, 23, 42, 1);
}

/* Advanced Buttons */
/* Botones Neon */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    z-index: 1;
}

.btn {
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Cards & Results */
.results {
    margin-top: 2rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.card-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.25rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    animation: slideInRight 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--text-muted);
}

.card-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.status-approved {
    border-left: none;
}

.status-approved::before {
    background: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.status-approved strong {
    color: var(--success-color);
    text-shadow: 0 0 5px rgba(16, 185, 129, 0.4);
}

.status-declined {
    border-left: none;
}

.status-declined::before {
    background: var(--error-color);
    box-shadow: 0 0 10px var(--error-color);
}

.status-declined strong {
    color: var(--error-color);
}

.status-error {
    border-left: none;
}

.status-error::before {
    background: #f59e0b;
}

/* Animations */
@keyframes galaxyMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes starsMove {
    from {
        background-position: 0 0, 40px 60px, 130px 270px;
    }

    to {
        background-position: -550px -550px, -310px -290px, -120px -280px;
    }
}

@keyframes floatEntry {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.8;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Market Specific Styles */
.market-grid {
    padding: 1.5rem;
}

.table-container {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.stock-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-color);
}

.stock-table th {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.2rem;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.stock-table td {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stock-table tr:hover {
    background: rgba(139, 92, 246, 0.05);
}

/* Larger BIN Numbers */
.bin-text {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    /* MAS GRANDE */
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.price-tag {
    background: rgba(52, 211, 153, 0.1);
    color: var(--success-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 1.1rem;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.bank-name {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.95rem;
}

.card-level {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.level-CLASSIC {
    background: #64748b !important;
    color: #fff !important;
}

.level-GOLD {
    background: #eab308 !important;
    color: #000 !important;
}

.level-PLATINUM {
    background: #94a3b8 !important;
    color: #000 !important;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.5);
}

.level-BUSINESS {
    background: #8b5cf6 !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.level-SIGNATURE {
    background: #ec4899 !important;
    color: #fff !important;
}

/* Inventory Card Enhancements */
.inv-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.inv-card:hover {
    transform: translateY(-5px);
}

.inv-data-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.inv-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.inv-val {
    font-weight: 600;
    font-size: 0.95rem;
}

.holder-preview {
    font-size: 0.8rem;
    color: #fff;
    font-weight: 600;
}

.zip-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.data-badge {
    display: inline-block;
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-color);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    text-transform: uppercase;
    font-weight: bold;
}

/* Custom Modal (Premium Alerts) */
.market-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.market-modal {
    background: #1e293b;
    border: 1px solid var(--primary-color);
    border-radius: 1.25rem;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.market-modal i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.modal-icon-error {
    color: var(--error-color);
    filter: drop-shadow(0 0 10px rgba(248, 113, 113, 0.5));
}

.modal-icon-success {
    color: var(--success-color);
    filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.5));
}

.modal-icon-warning {
    color: #f59e0b;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
}

.market-modal h2 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.market-modal p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-btn {
    padding: 0.8rem 2.5rem;
    border-radius: 10px;
    border: none;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
}

.modal-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    margin-right: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- VERSIÓN PARA CELULARES (RESPONSIVE) --- */
@media screen and (max-width: 768px) {

    /* Contenedor principal sin bordes en móvil para ganar espacio */
    .container {
        padding: 1.2rem;
        border-radius: 0;
        margin: 0;
        max-width: 100% !important;
        border: none;
        backdrop-filter: none;
    }

    /* Header del Market: Apilar logo y navegación */
    .market-header {
        flex-direction: column !important;
        padding: 1rem !important;
        text-align: center;
        gap: 1rem;
    }

    .market-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Tablas: Permitir scroll horizontal para que no se rompa el diseño */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .stock-table th,
    .stock-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Grillas: Una sola columna en teléfonos */
    .pricing-grid,
    .crypto-grid,
    .inventory-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    /* Botones y Modales */
    .modal-btn {
        width: 100%;
        margin: 5px 0;
    }

    .market-modal {
        width: 95%;
        padding: 20px;
    }

    .bin-text {
        font-size: 1rem;
    }
}

/* Ajustes para pantallas muy pequeñas (iPhone SE, etc) */
@media screen and (max-width: 400px) {
    h1 {
        font-size: 1.6rem !important;
    }

    .logo-icon {
        font-size: 2.5rem;
    }

    .nav-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}