/* 第三方源页面样式 */
.sources-page {
    padding: 100px 0 80px;
    min-height: calc(100vh - 200px);
    background-color: var(--bg-light);
}

.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.page-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.source-editor-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.source-editor-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.source-editor-btn span {
    font-size: 18px;
}

.sources-container {
    max-width: 1200px;
    margin: 0 auto;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 16px;
}

/* 源卡片 */
.source-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.source-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.source-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-light);
}

.source-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.source-description {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}

.source-url {
    font-size: 12px;
    color: var(--primary-color);
    word-break: break-all;
    margin-top: 5px;
}

.source-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.source-status.active {
    background-color: #4caf50;
    color: white;
}

.source-status.inactive {
    background-color: #f44336;
    color: white;
}

.source-status.checking {
    background-color: #ff9800;
    color: white;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.source-toggle {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.source-toggle:hover {
    background-color: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.source-toggle:active {
    transform: translateY(0);
}

/* 分类列表 */
.categories-list {
    margin-top: 25px;
}

.category-item {
    margin-bottom: 25px;
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.category-description {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}

.category-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.category-toggle:hover {
    color: var(--secondary-color);
}

/* 工具列表 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.tool-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background-color: var(--bg-light);
}

.tool-info {
    flex: 1;
    min-width: 0;
}

.tool-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-version {
    font-size: 12px;
    color: var(--text-light);
}

.tool-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    margin-top: 8px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
    border: 1px solid var(--border-color);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding-top: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sources-page {
        padding: 80px 0 60px;
    }

    .page-title {
        font-size: 32px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    .page-actions {
        margin-top: 20px;
    }

    .source-editor-btn {
        padding: 10px 24px;
        font-size: 14px;
    }

    .source-card {
        padding: 20px;
    }

    .source-header {
        flex-direction: column;
        gap: 15px;
    }

    .source-header > div:last-child {
        width: 100%;
        justify-content: space-between;
    }

    .source-toggle {
        padding: 6px 16px;
        font-size: 13px;
    }

    .source-title {
        font-size: 20px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }
}

