:root {
    --bg-main: #f4f7fb;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --primary-blue: #1d4ed8;
    --primary-yellow: #f59e0b;
    --success-green: #10b981;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Fondo animado de Partículas */
.safety-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #f4f7fb 0%, #e2e8f0 100%);
    overflow: hidden;
    pointer-events: none;
}

.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(29, 78, 216, 0.04); /* Azul muy sutil */
    animation: animateBG 25s linear infinite;
    bottom: -150px;
    border-radius: 20%;
}

.circles li:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.circles li:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; }
.circles li:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.circles li:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; }
.circles li:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.circles li:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; background: rgba(245, 158, 11, 0.04); }
.circles li:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; }
.circles li:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s; }
.circles li:nth-child(9) { left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 35s; background: rgba(245, 158, 11, 0.04); }
.circles li:nth-child(10) { left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 11s; }

@keyframes animateBG {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 20%;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

.hub-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Cabecera */
.hub-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.logo-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 24px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    z-index: 2;
}

.logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.pulse-ring {
    position: absolute;
    inset: -12px;
    border-radius: 35px;
    border: 2px solid var(--primary-blue);
    opacity: 0;
    animation: pulseRing 3s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 0; }
}

.hub-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.hub-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.header-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.security-badge, .author-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.security-badge {
    background: #ecfdf5;
    color: var(--success-green);
    border: 1px solid #a7f3d0;
}

.author-badge {
    background: #eff6ff;
    color: var(--primary-blue);
    border: 1px solid #bfdbfe;
}

/* Secciones y Tarjetas */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    display: block;
    width: 8px;
    height: 24px;
    background: var(--primary-blue);
    border-radius: 4px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overflow: hidden;
}

.active-card:nth-child(1) { animation-delay: 0.1s; }
.active-card:nth-child(2) { animation-delay: 0.2s; }
.disabled-card:nth-child(1) { animation-delay: 0.3s; }
.disabled-card:nth-child(2) { animation-delay: 0.4s; }

.active-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.12);
    border-color: #cbd5e1;
}

/* Mockups de Login (Miniaturas) */
.card-image-header {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: transform 0.5s ease;
}

.mockup-vpo .mockup-bg { background-color: #1a2332; }
.mockup-docs .mockup-bg { background-color: #0066cc; } /* Azul Backus */
.mockup-acadia .mockup-bg { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }
.acadia-logo { background: #f59e0b; color: #0f172a; font-size: 1.2rem; border-radius: 8px; }

.active-card:hover .mockup-bg {
    transform: scale(1.05);
}

.mockup-window {
    position: relative;
    z-index: 2;
    background: #ffffff;
    width: 140px;
    border-radius: 8px;
    padding: 15px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.active-card:hover .mockup-window {
    transform: translateY(5px) scale(1.08);
}

.m-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}
.shield-logo {
    background: #2563eb;
    color: white;
    font-size: 1.2rem;
    border-radius: 50%;
}
.meerkat-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.m-title {
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2px;
    text-align: center;
}
.m-subtitle {
    font-size: 5px;
    color: #64748b;
    margin-bottom: 12px;
    text-align: center;
}
.m-input {
    width: 100%;
    height: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    margin-bottom: 6px;
    background: #f8fafc;
}
.m-button {
    width: 100%;
    height: 18px;
    background: #3b82f6;
    color: white;
    font-size: 7px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-top: 6px;
}

.floating-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.95);
    z-index: 3;
}

.card-content {
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    flex-grow: 1;
}

.disabled-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.gray-icon { background: #f1f5f9; color: #94a3b8; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

.status-badge.success {
    color: var(--success-green);
    border: 1px solid #d1fae5;
}

.status-badge.pending {
    background: #f8fafc;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.status-badge.dev {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: blink 2s infinite;
}

.card-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.card-action {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

.blue-text { color: var(--primary-blue); }
.yellow-text { color: var(--primary-yellow); }

.card-action i {
    transform: translateX(0);
    transition: transform 0.3s ease;
}
.active-card:hover .card-action i {
    transform: translateX(5px);
}

/* Tarjetas Inactivas */
.disabled-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    pointer-events: none;
}

.progress-container {
    height: 4px;
    background: #e2e8f0;
    width: 100%;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

.hub-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Animaciones */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* OPTIMIZACIÓN EXTREMA PARA CELULARES (MOBILE FIRST) */
@media (max-width: 768px) {
    .hub-container { 
        padding: 1.5rem 1rem; 
        gap: 2rem; 
    }
    
    .logo-wrapper {
        width: 80px; 
        height: 80px; 
        padding: 10px; 
        margin-bottom: 1rem;
        border-radius: 20px;
    }
    
    .pulse-ring {
        inset: -8px;
    }

    .hub-header h1 { 
        font-size: 1.8rem; 
        margin-bottom: 0.25rem;
    }
    
    .hub-header p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .header-badges {
        flex-direction: column;
        gap: 0.5rem;
    }

    .apps-grid { 
        grid-template-columns: 1fr; 
        gap: 1.25rem;
    }
    
    .card-image-header {
        height: 140px; /* Imagen más pequeña en celular */
    }
    
    .card-content {
        padding: 1.25rem 1.25rem 0.5rem 1.25rem;
    }
    
    .card-content h2 {
        font-size: 1.25rem;
    }
    
    .card-content p {
        font-size: 0.9rem;
    }
    
    .card-action {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }
}
