/* 随机链接插件样式 */

/* 基础样式 */
.random-links {
    margin: 15px 0;
    padding: 0;
}

.random-links-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* 默认样式 (style-default) */
.style-default .random-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.style-default .random-link-item {
    margin: 8px 0;
    padding: 5px 0;
}

.style-default .random-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: normal;
}

.style-default .random-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.style-default .random-link-description {
    color: #666;
    font-size: 12px;
}

/* 最小化样式 (style-minimal) */
.style-minimal .random-links-title {
    font-size: 14px;
    font-weight: normal;
    color: #555;
    margin-bottom: 8px;
}

.style-minimal .random-link-item {
    margin: 3px 0;
}

.style-minimal .random-link {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.style-minimal .random-link:hover {
    color: #000;
    text-decoration: underline;
}

.style-minimal .random-link-description {
    color: #999;
    font-size: 11px;
}

/* 现代样式 (style-modern) */
.style-modern .random-links-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #3498db;
}

.style-modern .random-link-item {
    margin: 10px 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.style-modern .random-link-item:hover {
    background: #e9ecef;
}

.style-modern .random-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
}

.style-modern .random-link:hover {
    color: #3498db;
}

.style-modern .random-link-description {
    color: #6c757d;
    font-size: 13px;
    margin-top: 4px;
}

/* 列表模板 (template-list) */
.template-list .random-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 按钮模板 (template-button) */
.template-button .random-links-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.template-button .random-link-button {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.template-button .random-link-button:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* 按钮模板 - 最小化样式 */
.style-minimal .template-button .random-link-button {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

.style-minimal .template-button .random-link-button:hover {
    background: #e9ecef;
    color: #000;
}

/* 按钮模板 - 现代样式 */
.style-modern .template-button .random-link-button {
    background: linear-gradient(45deg, #3498db, #2980b9);
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.style-modern .template-button .random-link-button:hover {
    background: linear-gradient(45deg, #2980b9, #1f4e79);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 卡片模板 (template-card) */
.template-card .random-links-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.template-card .random-link-card {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.template-card .random-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.template-card .card-title {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: block;
    margin-bottom: 8px;
}

.template-card .card-title:hover {
    color: #3498db;
}

.template-card .card-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* 卡片模板 - 现代样式 */
.style-modern .template-card .random-link-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.style-modern .template-card .random-link-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #3498db;
}

/* 文本模板样式 */
.template-text .random-links-text {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    font-size: 14px;
    line-height: 1.6;
    align-items: center !important;
}

.template-text .random-links-text a {
    color: #0073aa;
    text-decoration: none;
    white-space: nowrap !important;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.template-text .random-links-text a:hover {
    color: #005a87;
    text-decoration: underline;
    background-color: #f0f8ff;
}

.template-text .random-links-text .random-links-text-item:not(:last-child)::after {
    content: " | ";
    color: #999;
    margin-left: 4px;
}

/* 文本模板 - 最小化样式 */
.style-minimal .template-text .random-links-text {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    font-size: 13px;
    line-height: 1.5;
    align-items: center !important;
}

.style-minimal .template-text .random-links-text a {
    color: #666;
    white-space: nowrap !important;
    padding: 2px 4px;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.style-minimal .template-text .random-links-text a:hover {
    color: #333;
    background-color: #f8f8f8;
}

.style-minimal .template-text .random-links-text .random-links-text-item:not(:last-child)::after {
    content: " | ";
    color: #ccc;
    margin-left: 2px;
}

/* 文本模板 - 现代样式 */
.style-modern .template-text .random-links-text {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    font-size: 15px;
    color: #2c3e50;
    align-items: center !important;
}

.style-modern .template-text .random-links-text a {
    color: #3498db;
    font-weight: 500;
    white-space: nowrap !important;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.05) 100%);
}

.style-modern .template-text .random-links-text a:hover {
    color: #2980b9;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(52, 152, 219, 0.1) 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.style-modern .template-text .random-links-text .random-links-text-item:not(:last-child)::after {
    content: " | ";
    color: #bdc3c7;
    margin-left: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .template-card .random-links-cards {
        grid-template-columns: 1fr;
    }
    
    .template-button .random-links-buttons {
        flex-direction: column;
    }
    
    .template-button .random-link-button {
        text-align: center;
        width: 100%;
    }
    
    .template-text .random-links-text {
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
    }
    
    .template-text .random-links-text a {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .random-links-title {
        font-size: 16px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.random-links {
    animation: fadeIn 0.3s ease-in-out;
}

/* 无障碍支持 */
.random-links a:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.random-links a:focus:not(:focus-visible) {
    outline: none;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .random-links a {
        text-decoration: underline;
    }
    
    .template-button .random-link-button {
        border: 2px solid currentColor;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .random-links-title {
        color: #e9ecef;
    }
    
    .style-default .random-link {
        color: #6ab0f3;
    }
    
    .style-default .random-link:hover {
        color: #8cc4f7;
    }
    
    .style-modern .random-link-item {
        background: #343a40;
    }
    
    .style-modern .random-link-item:hover {
        background: #495057;
    }
    
    .template-card .random-link-card {
        background: #343a40;
        border-color: #495057;
    }
    
    .template-button .random-link-button {
        background: #495057;
    }
    
    .template-button .random-link-button:hover {
        background: #6c757d;
    }
}