/* A站插件下载器 - 前端样式 */

/* 浮动按钮 */
.apd-floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 9998;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.apd-floating-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    bottom: 35px;
}

.apd-floating-button:active {
    transform: scale(0.95);
}

.apd-floating-button svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* 模态框 */
.apd-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.apd-modal-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(51, 65, 85, 0.98) 100%);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(100, 116, 139, 0.4);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    color: #f1f5f9;
}

.apd-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    background: rgba(100, 116, 139, 0.2);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    transition: all 0.2s ease;
    padding: 0;
}

.apd-modal-close:hover {
    background: rgba(100, 116, 139, 0.4);
    color: #f1f5f9;
}

.apd-modal-close svg {
    width: 20px;
    height: 20px;
}

.apd-modal-header {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(100, 116, 139, 0.3);
    padding-bottom: 1.5rem;
}

.apd-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.apd-modal-header p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* 下载选项 */
.apd-modal-body {
    min-height: 150px;
}

.apd-download-option {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.apd-download-option:last-child {
    margin-bottom: 0;
}

.apd-download-option:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15);
}

.apd-option-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.apd-option-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.apd-option-icon-img {
    width: 40px;
    height: 40px;
    margin-right: 0.75rem;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.apd-option-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0;
}

.apd-option-desc {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0.5rem 0 0 2.25rem;
}

/* 加载状态 */
.apd-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.apd-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: apd-spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes apd-spin {
    to {
        transform: rotate(360deg);
    }
}

.apd-loading p {
    color: #94a3b8;
    font-size: 0.9375rem;
    margin: 0;
}

/* 错误状态 */
.apd-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: #fca5a5;
    text-align: center;
    font-size: 0.9375rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .apd-floating-button {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }
    
    .apd-floating-button:hover {
        bottom: 23px;
    }
    
    .apd-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .apd-modal-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .apd-modal-header h2 {
        font-size: 1.25rem;
    }
    
    .apd-modal-close {
        width: 32px;
        height: 32px;
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .apd-floating-button {
        width: 44px;
        height: 44px;
    }
    
    .apd-modal-content {
        padding: 1.25rem;
    }
}
