/* 新增导航栏样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    transition: background-color var(--transition-normal),border-color var(--transition-normal);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body {
    padding-top: 80px;
}

body.dark-mode .header {
    background-color: rgba(30,34,51,0.9);
    border-bottom: 1px solid var(--border-dark);
    box-shadow: var(--shadow-dark-sm);
}

.header .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto; 
}

.logo {
	cursor: pointer;
}

.logo-icon {
    width: 160px; 
    height: auto; 
    max-width: 100%; 
    display: block; 
    margin: 0 auto; 
    transition: all 0.3s ease;
}

.auth-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .auth-btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 登录按钮样式 */
.login-btn {
    color: #1e88e5;
    border: 1px solid #1e88e5;
    background-color: transparent;
}

.login-btn:hover {
    background-color: #1e88e5;
    color: white;
}

body.dark-mode .login-btn {
    color: #90caf9;
    border-color: #90caf9;
}

body.dark-mode .login-btn:hover {
    background-color: #90caf9;
    color: #121824;
}

/* 注册按钮样式 */
.register-btn {
    color: white;
    background-color: #1e88e5;
    border: 1px solid #1e88e5;
}

.register-btn:hover {
    background-color: #1565c0;
    border-color: #1565c0;
}

body.dark-mode .register-btn {
    background-color: #90caf9;
    border-color: #90caf9;
    color: #121824;
}

body.dark-mode .register-btn:hover {
    background-color: #64b5f6;
    border-color: #64b5f6;
}

/* 个人中心按钮样式 */
.user-center-btn {
    color: #1e88e5;
    border: 1px solid #1e88e5;
    background-color: transparent;
}

.user-center-btn:hover {
    background-color: #1e88e5;
    color: white;
}

body.dark-mode .user-center-btn {
    background-color: #90caf9;
    border-color: #90caf9;
    color: #121824;
}

body.dark-mode .user-center-btn:hover {
    background-color: #64b5f6;
    border-color: #64b5f6;
}

/* 回到顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #1e88e5;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 99;
}

.back-to-top:hover {
    background-color: #1565c0;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body.dark-mode .back-to-top {
    background-color: #90caf9;
    color: #121824;
}

body.dark-mode .back-to-top:hover {
    background-color: #64b5f6;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-right {
        display: none;
    }
    
    .header-inner {
		height: 60px
	}
	
    .logo-icon {
        width: 100px;
        height: 30px
    }
    
    .header .container {
        padding: 0 16px;
    }
}

/* API状态指示器动画 */
@keyframes status-pulse-normal {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes status-pulse-error {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

@keyframes status-pulse-maintenance {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* 在线测试结果区域样式 */
.response-area {
    font-size: 16px; 
}

.links-header {
    text-align: center;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s forwards 0.3s;
    background: #fff; 
    border-radius: 12px; 
    padding: 40px 30px; 
    border: 1px solid #e5e7eb; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

.links-header h1 {
    margin-bottom: 16px; 
    font-size: 36px; 
    font-weight: 800; 
    color: #1f2937;
}

.links-header p {
    font-size: 18px; 
    color: #666; 
    margin: 0;
}

.links-apply {
    text-align: left;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s forwards 0.3s;
    background: #fff; 
    border-radius: 12px; 
    padding: 40px 30px; 
    border: 1px solid #e5e7eb; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}
/* 阿里巴巴矢量图标 */
.icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
}

/* ====================================
   API在线测试样式
   ==================================== */

/* API测试网格布局 */
.api-test-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    min-height: 300px;
}

/* API测试表单 */
.api-test-form {
    display: flex;
    flex-direction: column;
}

.api-test-form .form-group {
    margin-bottom: 16px;
}

.api-test-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #4b5563;
    font-size: 14px;
}

.api-test-form .form-group label .req-star {
    color: #dc2626;
    margin-left: 2px;
}

.api-test-form .form-group input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background-color: #f7f8fc;
    transition: all 0.2s;
    color: #1f2937;
}

.api-test-form .form-group input:focus {
    outline: none;
    border-color: #4a69bd;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.1);
}

.api-test-form .test-btn {
    width: 100%;
    height: 44px;
    background: #4a69bd;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    margin-top: 8px;
}

.api-test-form .test-btn:hover {
    background: #3a59ad;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* API测试结果区域 */
.api-test-result {
    display: flex;
    flex-direction: column;
    min-height: 300px;
    max-height: 400px;
}

.api-test-result .response-box {
    flex: 1;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 16px;
    border-radius: 8px;
    overflow-y: auto;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid #333;
    height: 100%;
}

#response-output {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    min-height: 50px;
    color: #d4d4d4;
}

/* 响应区域的图片样式 */
#response-output img {
    max-width: 100%;
    max-height: 300px;
    display: block;
    margin: 10px auto;
    border-radius: 4px;
}

/* 深色模式适配 */
body.dark-mode .api-test-form .form-group input {
    background-color: rgba(30, 34, 51, 0.5);
    border-color: var(--border-dark);
    color: var(--text-primary-dark);
}

body.dark-mode .api-test-form .form-group input:focus {
    background-color: rgba(30, 34, 51, 0.8);
    border-color: #90caf9;
    box-shadow: 0 0 0 3px rgba(144, 202, 249, 0.2);
}

body.dark-mode .api-test-form .test-btn {
    background: #1e88e5;
}

body.dark-mode .api-test-form .test-btn:hover {
    background: #1565c0;
}

body.dark-mode .api-test-result .response-box {
    border-color: #444;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .api-test-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .api-test-result {
        min-height: 250px;
        order: 1;
    }
    
    .api-test-form {
        order: 2;
    }
}

/* ====================================
   原有内联样式的替代样式
   ==================================== */

/* 请求信息中的代码块样式 */
.doc-left .code-block {
    background: #f7f8fc;
    padding: 16px;
    border-radius: 8px;
    margin-top: 8px;
    margin-bottom: 20px;
    font-family: 'Fira Code', 'Courier New', monospace;
    word-break: break-all;
    font-size: 14px;
    color: #1f2937;
}

body.dark-mode .doc-left .code-block {
    background-color: rgba(30, 34, 51, 0.5);
    color: var(--text-primary-dark);
    border: 1px solid var(--border-dark);
}

/* 请求参数和状态码表格样式 */
.doc-left .api-table {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.doc-left .api-table table {
    width: 100%;
    border-collapse: collapse;
}

.doc-left .api-table thead {
    background: #f7f8fc;
    border-bottom: 1px solid #e5e7eb;
}

.doc-left .api-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #1f2937;
}

.doc-left .api-table td {
    padding: 12px 16px;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
}

.doc-left .api-table tr:last-child td {
    border-bottom: none;
}

.doc-left .api-table .text-center {
    text-align: center;
    color: #9ca3af;
}

.doc-left .api-table .required-field {
    color: #dc2626;
    font-weight: 600;
}

.doc-left .api-table .status-code {
    color: #1f2937;
    font-weight: 600;
}

/* 深色模式适配 */
body.dark-mode .doc-left .api-table {
    border-color: var(--border-dark);
}

body.dark-mode .doc-left .api-table thead {
    background: rgba(30, 34, 51, 0.7);
    border-bottom-color: var(--border-dark);
}

body.dark-mode .doc-left .api-table th {
    color: var(--text-primary-dark);
}

body.dark-mode .doc-left .api-table td {
    color: var(--text-secondary-dark);
    border-bottom-color: var(--border-dark);
}

body.dark-mode .doc-left .api-table .text-center {
    color: #9ca3af;
}

body.dark-mode .doc-left .api-table .status-code {
    color: var(--text-primary-dark);
}

/* 调用示例标签样式 */
.doc-left .code-tabs {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.doc-left .tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #1f2937;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.doc-left .tab-btn:hover {
    color: #4a69bd;
}

.doc-left .tab-btn.active {
    color: #4a69bd;
    border-bottom-color: #4a69bd;
}

.doc-left .code-panel {
    display: none;
}

.doc-left .code-panel.active {
    display: block;
}

.doc-left .code-panel pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0;
}

body.dark-mode .doc-left .tab-btn {
    color: var(--text-primary-dark);
}

body.dark-mode .doc-left .tab-btn:hover {
    color: #90caf9;
}

body.dark-mode .doc-left .tab-btn.active {
    color: #90caf9;
    border-bottom-color: #90caf9;
}