/* API页面样式 */

.providers-section {
    margin: 3rem 0;
}

.provider-info {
    margin: 2rem 0;
}

.provider-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.provider-icon {
    font-size: 2.5rem;
}

.provider-details h3 {
    margin: 0;
    color: #333;
}

.provider-details p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.base-url {
    font-size: 0.8rem;
}

.base-url code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

.apis-section {
    margin: 2rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.apis-grid {
    display: grid;
    gap: 1.5rem;
}

.api-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.api-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.api-method {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

.api-method.GET {
    background: #d4edda;
    color: #155724;
}

.api-method.POST {
    background: #cce5ff;
    color: #004085;
}

.api-method.PUT {
    background: #fff3cd;
    color: #856404;
}

.api-method.DELETE {
    background: #f8d7da;
    color: #721c24;
}

.api-info {
    flex: 1;
}

.api-info h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.api-description {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.api-details {
    margin: 1rem 0;
}

.api-endpoint {
    margin-bottom: 1rem;
}

.api-endpoint code {
    background: #f8f9fa;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
}

.api-params, .api-headers {
    margin-bottom: 1rem;
}

.params-list, .headers-list {
    margin: 0.5rem 0 0 0;
    padding-left: 1.2rem;
}

.params-list li, .headers-list li {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.params-list code, .headers-list code {
    background: #f8f9fa;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-family: monospace;
}

.api-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: monospace;
    resize: vertical;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.test-result {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.result-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
}

.tab-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.tab-content {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.tab-pane {
    display: none;
    padding: 1rem;
}

.tab-pane.active {
    display: block;
}

.tab-pane pre {
    margin: 0;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}