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

:root {
    --bg-dark: #05070a;
    --bg-dark-secondary: #0a0f18;
    --bg-glass: rgba(10, 15, 24, 0.55);
    --bg-glass-light: rgba(20, 28, 40, 0.4);
    --accent-cyan: #06b6d4;
    --accent-cyan-hover: #22d3ee;
    --accent-purple: #6366f1;
    --accent-purple-hover: #818cf8;
    --accent-pink: #d946ef;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --card-glow: 0 0 20px rgba(6, 182, 212, 0.15);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: radial-gradient(circle at 30% 0%, #0a0f1a 0%, #030507 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Partículas de fondo (efecto estrellas) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 60px 120px, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0)),
        radial-gradient(3px 3px at 90px 80px, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px, 150px 150px, 250px 250px;
    pointer-events: none;
    z-index: 0;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.4);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* Contenedor principal */
.main-wrapper {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* Efectos de Glassmorphism cristalino */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 8px 32px 0 rgba(6, 182, 212, 0.1);
}

.glass-nav {
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Navegación */
.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.nav-brand:hover {
    filter: drop-shadow(0 0 12px var(--accent-cyan));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0.8rem;
    border-radius: 12px;
    background: transparent;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(4px);
}

/* Insignias de la barra de navegación */
.balance-badge {
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(4px);
}

.cart-badge {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--accent-purple);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.cart-badge:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
    border-color: var(--accent-purple-hover);
    color: #fff;
}

.cart-count {
    background: var(--accent-purple);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 12px;
}

/* Botones Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

.btn-cyan {
    background: linear-gradient(135deg, var(--accent-cyan), #0891b2);
    color: #fff;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cyan:hover {
    background: linear-gradient(135deg, var(--accent-cyan-hover), var(--accent-cyan));
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

.btn-purple {
    background: linear-gradient(135deg, var(--accent-purple), #4f46e5);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-purple:hover {
    background: linear-gradient(135deg, var(--accent-purple-hover), var(--accent-purple));
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.btn-emerald {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-emerald:hover {
    background: linear-gradient(135deg, #34d399, var(--success));
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-block {
    display: flex;
    width: 100%;
}

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

/* Alertas cristalinas */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.5);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

/* Formularios cristalinos */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.form-control::placeholder {
    color: #4b5563;
}

/* Tarjetas del catálogo con efecto cristalino */
.cc-card {
    height: 280px;
    border-radius: 24px;
    padding: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

/* Efecto de brillo cristalino al hover */
.cc-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px -12px rgba(6, 182, 212, 0.3);
    border-color: rgba(6, 182, 212, 0.4);
}

/* Efecto de vidrio esmerilado overlay */
.cc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0) 40%,
            rgba(255, 255, 255, 0.03) 60%,
            rgba(255, 255, 255, 0) 100%);
    border-radius: 24px;
    pointer-events: none;
    z-index: 1;
}

.cc-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.cc-card:hover::after {
    opacity: 1;
}

/* Contenido de la tarjeta (por encima del overlay) */
.cc-card>* {
    position: relative;
    z-index: 2;
}

/* Chip de la tarjeta con efecto 3D */
.cc-chip {
    width: 48px;
    height: 36px;
    background: linear-gradient(135deg, #e8b54e 0%, #c9952e 50%, #b07d20 100%);
    border-radius: 10px;
    position: relative;
    margin: 0.5rem 0;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3), 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.cc-chip::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 8px;
    right: 8px;
    bottom: 5px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
}

/* Número de tarjeta con glow */
.cc-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    letter-spacing: 3px;
    color: #fff;
    margin: 0.5rem 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Precio badge cristalino */
.cc-price-badge {
    position: absolute;
    bottom: 5rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    padding: 0.35rem 1rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 800;
    color: #FFD700;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid rgba(255, 215, 0, 0.25);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Modal cristalino */
.modal-content {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: auto;
    background: rgba(5, 7, 10, 0.6);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 5px rgba(6, 182, 212, 0.2);
    }

    100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
    }
}

.animated {
    animation: fadeIn 0.5s ease forwards;
}

/* Filtros container cristalino */
.filters-container {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .cc-card {
        height: 260px;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .balance-badge,
    .cart-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Tooltip para License DL */
.license-tooltip {
    position: relative;
    cursor: help;
}

.license-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Flecha del tooltip */
.license-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.95) transparent transparent transparent;
    margin-bottom: 2px;
    z-index: 1000;
}

.license-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff !important;
    border: none;
}

.license-btn.locked {
    background: linear-gradient(135deg, #4b5563, #374151);
    opacity: 0.8;
    cursor: not-allowed;
}

.license-btn.locked:hover {
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, #4b5563, #374151);
}