/* ============================================================
   METAHUB ?? style.css
   Extraído de index.html. No modificar la lógica ni los valores.
   ============================================================ */

/* Custom Scrollbar for Light Theme */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.2);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.4);
}

/* Toast Animation */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.toast-animate {
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Nav Animations */
.nav-active-dot {
    transition: all 0.3s ease;
    transform: scale(0);
}
.active-tab .nav-active-dot {
    transform: scale(1);
}

.blue-gradient {
    background: linear-gradient(135deg, #4db8ff 0%, #0070f3 100%);
}

/* Hide scrollbar for tabs content to look cleaner */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ====================================
   AUTH SCREEN ?? CLEAN UI
==================================== */
#auth-screen { background: #f4f7fb; }

.auth-card {
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid #e8eef5;
    box-shadow: 0 24px 64px -12px rgba(0,0,0,0.08), 0 4px 12px -2px rgba(0,0,0,0.04);
}
.auth-tab-active {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-radius: 10px;
}
.auth-tab-inactive {
    background: transparent;
    color: #94a3b8;
}
.auth-input-wrap {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input-wrap:focus-within {
    border-color: #0070f3;
    box-shadow: 0 0 0 3px rgba(0,112,243,0.08);
    background: #ffffff;
}
.auth-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
}
.auth-input-wrap input::placeholder { color: #94a3b8; font-weight: 400; }
.auth-btn-primary {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #4db8ff 0%, #0070f3 100%);
    color: white;
    border-radius: 14px;
    padding: 14px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 24px -6px rgba(0,112,243,0.45);
    text-align: center;
}
.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -6px rgba(0,112,243,0.5);
}
.auth-btn-primary:active { transform: translateY(0); }

/* ====================================
   PROFILE DROPDOWN
==================================== */
#profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 230px;
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 20px;
    box-shadow: 0 20px 50px -8px rgba(0,0,0,0.12), 0 4px 12px -2px rgba(0,0,0,0.05);
    z-index: 60;
    overflow: hidden;
}
#profile-dropdown.open {
    display: block;
    animation: dropIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)  scale(1); }
}

/* ====================================
   LOADING OVERLAY
==================================== */
#loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(244,247,251,0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
}
#loading-overlay.active { display: flex; }
.mh-spinner {
    width: 46px;
    height: 46px;
    border: 3px solid #e2e8f0;
    border-top-color: #0070f3;
    border-radius: 50%;
    animation: mhSpin 0.65s linear infinite;
}
@keyframes mhSpin { to { transform: rotate(360deg); } }

/* ====================================
   PLATAFORMA HUB ?? FADE-IN
==================================== */
@keyframes hubFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
#plataforma-hub.tab-content:not(.hidden) {
    animation: hubFadeIn 0.3s ease both;
}

/* Hub ?? Tarjetas financieras */
.hub-finance-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 20px 22px;
    box-shadow: 0 4px 20px -6px rgba(0,0,0,0.06);
    flex: 1;
    min-width: 0;
}
.hub-payout-bar-track {
    height: 7px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
    margin-top: 10px;
}
.hub-payout-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(.4,0,.2,1);
}

/* Hub ?? Botones de herramientas */
.hub-tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 20px 28px;
    box-shadow: 0 4px 20px -6px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    text-decoration: none;
    flex: 1;
    min-width: 140px;
    text-align: center;
}
.hub-tool-btn:hover {
    border-color: rgba(0,112,243,0.25);
    box-shadow: 0 10px 30px -8px rgba(0,112,243,0.12);
    transform: translateY(-2px);
}
.hub-tool-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* Hub ?? Etiqueta de sección carrusel */
.hub-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.hub-section-label .label-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Hub ?? Input editable de meta de retiro */
.hub-goal-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.hub-goal-input {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    background: transparent;
    border: none;
    outline: none;
    width: 90px;
    line-height: 1;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}
.hub-goal-input::-webkit-outer-spin-button,
.hub-goal-input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.hub-goal-input:focus {
    background: #f8fafc;
    border-radius: 8px;
    padding: 2px 6px;
    outline: 2px solid rgba(0,112,243,0.2);
}
.hub-edit-btn {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.hub-edit-btn:hover { background: #eff6ff; border-color: rgba(0,112,243,0.3); color: #0070f3; }

/* ================================================
   REEL CARDS ?? Diseño premium 9:16 (referencia imagen)
================================================ */
.reel-card {
    flex: none;
    width: 172px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e8eef4;
    box-shadow: 0 6px 24px -8px rgba(0,0,0,0.10);
    overflow: hidden;
    scroll-snap-align: start;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.18s;
}
.reel-card:hover {
    border-color: rgba(0,112,243,0.2);
    box-shadow: 0 14px 32px -8px rgba(0,112,243,0.14);
    transform: translateY(-3px);
}
/* Área de video 9:16 */
.reel-thumb {
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, #dbeafe 0%, #e0f2fe 50%, #ede9fe 100%);
}
.reel-thumb video,
.reel-thumb iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Badge VIP ?? esquina superior izquierda */
.reel-vip-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(6px);
    color: #1d4ed8;
    font-size: 9px;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 99px;
    letter-spacing: 0.02em;
    z-index: 3;
    border: 1px solid rgba(219,234,254,0.8);
}
/* Botón play ?? triángulo azul sólido sin círculo */
.reel-play-icon {
    font-size: 32px;
    color: #2563eb;
    filter: drop-shadow(0 4px 12px rgba(37,99,235,0.30));
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s;
    z-index: 2;
    margin-left: 4px; /* compensación óptica del triángulo */
}
.reel-play-icon:hover {
    transform: scale(1.12);
    filter: drop-shadow(0 6px 16px rgba(37,99,235,0.40));
}
/* Badge duración */
.reel-dur-badge {
    position: absolute;
    bottom: 9px;
    right: 9px;
    background: rgba(15,23,42,0.78);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    z-index: 3;
}
/* Info debajo del video */
.reel-info {
    padding: 10px 12px 8px;
    border-bottom: 1px solid #f1f5f9;
}
.reel-filename {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.reel-resolution {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}
/* Botón descargar ?? azul, estilo imagen */
.reel-dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 11px 0;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    background: #ffffff;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.reel-dl-btn:hover { background: #eff6ff; }
.reel-dl-btn.downloaded {
    color: #16a34a;
    background: #f0fdf4;
}
.reel-dl-btn.downloaded:hover { background: #dcfce7; }

/* ================================================
   WEEK FILTER BUTTONS
================================================ */
.week-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.week-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 99px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}
.week-btn:hover:not(.active-week) {
    border-color: rgba(0,112,243,0.3);
    color: #0070f3;
    background: #f0f7ff;
}
.week-btn.active-week {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(22,163,74,0.30);
}
.week-dl-badge {
    font-size: 9px;
    font-weight: 800;
    background: rgba(255,255,255,0.22);
    border-radius: 99px;
    padding: 2px 7px;
    letter-spacing: 0.01em;
}
.week-btn:not(.active-week) .week-dl-badge {
    background: #f1f5f9;
    color: #475569;
}
/* Barra de progreso de semana */
.week-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #f1f5f9;
}
.week-progress-track {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}
.week-progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width 0.4s cubic-bezier(.4,0,.2,1);
}

/* Modal de link de afiliado */
#hub-link-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 900;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#hub-link-modal.open { display: flex; }
#hub-link-modal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(4px);
}
#hub-link-modal .modal-card {
    position: relative;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 24px 60px -12px rgba(0,0,0,0.2);
    padding: 28px;
    width: 100%;
    max-width: 420px;
    z-index: 901;
    animation: hubFadeIn 0.25s ease both;
}
.hub-url-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-top: 12px;
}
.hub-url-input:focus {
    border-color: rgba(0,112,243,0.4);
    box-shadow: 0 0 0 3px rgba(0,112,243,0.08);
    background: #fff;
}

/* ====================================
   LINK PORTAL CARDS (Stripchat / Chaturbate)
==================================== */
.link-portal-card {
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.link-portal-card:hover {
    box-shadow: 0 12px 30px -8px rgba(0,112,243,0.12);
    transform: translateY(-1px);
}
.link-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 99px;
}
.portal-chevron {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: background 0.2s, transform 0.2s;
}
.link-portal-card:hover .portal-chevron {
    transform: translateX(2px);
}

/* ====================================
   VIDEOCURSOS ?? VIDEO CARDS
==================================== */
.video-course-card {
    flex: none;
    width: 260px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px -6px rgba(0,0,0,0.06);
    overflow: hidden;
    scroll-snap-align: start;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.video-course-card:hover {
    border-color: rgba(0,112,243,0.2);
    box-shadow: 0 10px 30px -8px rgba(0,112,243,0.12);
    transform: translateY(-2px);
}
.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #e8f0fe 0%, #dbeafe 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-thumb video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}
.video-thumb .play-btn {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: transform 0.15s, box-shadow 0.15s;
    z-index: 2;
    cursor: pointer;
}
.video-thumb .play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.16);
}
.video-thumb .duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15,23,42,0.75);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    z-index: 2;
}
.video-thumb .number-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
    z-index: 2;
}


/* ============================================================
   GESTOR DE ENLACES ? Inventario por plataforma
   ============================================================ */

/* Formulario para aadir links */
.inv-add-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
}

/* Inputs del formulario de inventario */
.inv-input {
    background: #fdfdfe;
    border: 1.5px solid #e8edf2;
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    outline: none;
    width: 100%;
}
.inv-input:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}
.inv-input:focus {
    border-color: #0070f3;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.09);
}
.inv-input::placeholder {
    color: #b0bbc9;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Fila de un link en el inventario */
.inv-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1.5px solid #f1f5f9;
    border-radius: 14px;
    padding: 12px 14px;
    transition: border-color 0.2s, box-shadow 0.15s;
}
.inv-row:hover {
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* cono izquierdo de la fila */
.inv-row-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #eff6ff;
    color: #0070f3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Texto dentro de la fila */
.inv-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.inv-row-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.inv-row-url {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Botones de accin (copiar / abrir / eliminar) */
.inv-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.inv-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.inv-copy-btn  { color: #475569; }
.inv-copy-btn:hover  { background: #eff6ff; border-color: #bfdbfe; color: #0070f3; }
.inv-open-btn  { color: #475569; }
.inv-open-btn:hover  { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.inv-del-btn   { color: #94a3b8; }
.inv-del-btn:hover   { background: #fff1f2; border-color: #fecdd3; color: #ef4444; }

/* Estado vaco del inventario */
.inv-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    border: 1.5px dashed #e2e8f0;
    border-radius: 14px;
    text-align: center;
    background: #fafafa;
}
