/* 随机内联链接样式 - Random Links Injector */
.random-inline-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 3px;
    background-color: rgba(0, 123, 255, 0.1);
    transition: all 0.3s ease;
    margin: 0 2px;
    display: inline-block;
}

.random-inline-link:hover {
    color: #0056b3;
    background-color: rgba(0, 123, 255, 0.2);
    text-decoration: underline;
    transform: translateY(-1px);
}

.random-inline-link:visited {
    color: #6f42c1;
}

.random-inline-link:active {
    transform: translateY(0);
}

.random-inline-link:focus {
    outline: 2px solid rgba(0, 123, 255, 0.5);
    outline-offset: 2px;
}

/* 高级样式效果 */
.random-inline-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.random-inline-link:hover::before {
    left: 100%;
}

/* 不同类型的随机链接样式 */
.random-inline-link.type-primary {
    color: #007bff;
    border-bottom: 1px dotted rgba(0, 123, 255, 0.3);
}

.random-inline-link.type-secondary {
    color: #6c757d;
    border-bottom: 1px dotted rgba(108, 117, 125, 0.3);
}

.random-inline-link.type-success {
    color: #28a745;
    border-bottom: 1px dotted rgba(40, 167, 69, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .random-inline-link {
        font-size: 0.9em;
        padding: 1px 3px;
    }

    .random-inline-link:hover {
        transform: none;
        /* 移动设备上禁用悬浮变换效果 */
    }
}

@media (max-width: 480px) {
    .random-inline-link {
        font-size: 0.85em;
        padding: 1px;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .random-inline-link {
        color: #0000EE;
        background: none;
        text-decoration: underline;
    }

    .random-inline-link:hover {
        color: #551A8B;
        background: #FFFF99;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    .random-inline-link {
        transition: none;
    }

    .random-inline-link:hover {
        transform: none;
    }

    .random-inline-link::before {
        transition: none;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .random-inline-link {
        color: #4dabf7;
    }

    .random-inline-link:hover {
        color: #74c0fc;
        box-shadow: 0 2px 4px rgba(77, 171, 247, 0.3);
    }

    .random-inline-link.type-primary {
        color: #4dabf7;
        border-bottom-color: rgba(77, 171, 247, 0.3);
    }

    .random-inline-link.type-secondary {
        color: #adb5bd;
        border-bottom-color: rgba(173, 181, 189, 0.3);
    }

    .random-inline-link.type-success {
        color: #51cf66;
        border-bottom-color: rgba(81, 207, 102, 0.3);
    }
}

/* 打印样式 */
@media print {
    .random-inline-link {
        color: black !important;
        background: none !important;
        text-decoration: underline !important;
        transform: none !important;
        box-shadow: none !important;
    }

    .random-inline-link::before {
        display: none;
    }

    /* 在打印时显示链接地址 */
    .random-inline-link::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}