/* API页面样式 */
/* 禁用页面加载动画的类 */
.no-animation .hero-title,
.no-animation .hero-description,
.no-animation .hero-actions {
    animation: none !important;
}

/* 禁用页面加载时的透明度过渡 */
.no-animation {
    opacity: 1 !important;
}

.api-hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
}

.api-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
}

.api-hero .hero-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 40px;
}

.api-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.api-content {
    padding: 80px 0;
}

.api-category {
    margin-bottom: 80px;
}

.category-header {
    text-align: center;
    margin-bottom: 48px;
}

.category-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.category-desc {
    font-size: 1.1rem;
    color: #666;
    max-width: 500px;
    margin: 0 auto;
}

.api-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.empty-category {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
    color: #999;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 2px dashed rgba(0, 0, 0, 0.1);
}

.empty-category i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 20px;
    display: block;
}

.empty-category h4 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
}

.empty-category p {
    font-size: 1rem;
    color: #999;
    margin: 0;
}

.api-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.api-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.12);
}

.api-status {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.api-status.available {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.api-status.unavailable {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.api-info {
    flex: 1;
}

.api-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 12px;
}

.api-desc {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.api-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.api-method {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-method.get {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.api-method.post {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.api-url {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.85rem;
    color: #666;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
}

.api-params {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.param-tag {
    background: rgba(0, 0, 0, 0.08);
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.meta-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.api-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-test,
.btn-docs {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
    min-width: 60px;
}

.btn-test {
    background: #000;
    color: white;
}

.btn-test:hover {
    background: #333;
}

.btn-docs {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-docs:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

/* 测试弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0 8px;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 0 24px 24px;
}

.test-url,
.test-params,
.test-result {
    margin-bottom: 20px;
}

.test-url label,
.test-params label,
.test-result label {
    display: block;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.test-url code {
    display: block;
    background: rgba(0, 0, 0, 0.05);
    padding: 12px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #666;
    word-break: break-all;
}

#testParams {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    resize: vertical;
    background: #fff;
}

#testParams:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.2);
}

.test-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-send,
.btn-clear {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-send {
    background: #000;
    color: white;
}

.btn-send:hover {
    background: #333;
}

.btn-clear {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-clear:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

#testResult {
    background: rgba(0, 0, 0, 0.05);
    padding: 16px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.85rem;
    color: #666;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
    margin: 0;
}

/* 弹窗动画 */
.modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

