/* 文档页面样式 */
.doc-container {
    padding-top: 6rem;
    min-height: calc(100vh - 200px);
}

.doc-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 2rem;
}

/* 侧边栏样式 */
.doc-sidebar {
    width: 280px;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    height: fit-content;
    position: sticky;
    top: 8rem;
}

.sidebar-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar-link:hover {
    background: #f1f5f9;
    color: #3b82f6;
    transform: translateX(5px);
}

.sidebar-link.active {
    background: #eff6ff;
    color: #3b82f6;
    font-weight: 600;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.sidebar-footer strong {
    color: #0f172a;
}

/* 文档主内容区域 */
.doc-main {
    flex: 1;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    max-width: calc(100% - 300px); /* 限制最大宽度，减去侧边栏宽度和间隙 */
}

.doc-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.doc-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1rem 0;
}

.doc-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.doc-method {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.doc-method.post {
    background: #dcfce7;
    color: #166534;
}

.doc-method.get {
    background: #dbeafe;
    color: #1e40af;
}

.doc-url {
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-family: monospace;
    cursor: pointer;
    transition: background 0.2s ease;
}

.doc-url:hover {
    background: #e2e8f0;
}

/* 文档章节样式 */
.doc-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1rem 0;
}

.section-desc {
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

.section-content p {
    color: #64748b;
    line-height: 1.7;
    margin: 0 0 1rem 0;
}

/* 参数表格样式 */
.params-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.params-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 2fr;
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
}

.params-body {
    display: flex;
    flex-direction: column;
}

.param-cell {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.875rem;
    word-break: break-word; /* 防止长内容溢出 */
}

.param-cell:last-child {
    border-right: none;
}

.param-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 2fr;
}

.param-row:last-child .param-cell {
    border-bottom: none;
}

.required-param {
    color: #dc2626;
    font-weight: 600;
    cursor: pointer;
}

/* 代码块样式 */
.code-block {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.code-block pre {
    margin: 0;
    color: #f1f5f9;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre; /* 保持代码格式 */
}

/* 页面导航 */
.doc-navigation {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.nav-link:hover:not(.disabled) {
    background: #f1f5f9;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 支付测试页面样式 */
.demo-container {
    padding-top: 6rem;
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.demo-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.demo-header {
    text-align: center;
    margin-bottom: 2rem;
}

.demo-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.demo-subtitle {
    color: #64748b;
    font-size: 1.125rem;
}

.demo-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.order-info {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.order-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.order-row:last-child {
    margin-bottom: 0;
}

.order-label {
    font-weight: 500;
    color: #64748b;
}

.order-value {
    font-weight: 600;
    color: #0f172a;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.step-item.active .step-number {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.step-item.active .step-text {
    color: #3b82f6;
    font-weight: 600;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.step-text {
    color: #94a3b8;
    font-size: 0.875rem;
}

.pay-amount {
    text-align: center;
    margin-bottom: 2rem;
}

.amount-label {
    font-size: 1.125rem;
    color: #64748b;
    margin-right: 0.5rem;
}

.amount-value {
    font-size: 2rem;
    font-weight: 700;
    color: #dc2626;
}

.amount-input {
    font-size: 2rem;
    font-weight: 700;
    color: #dc2626;
    border: none;
    background: transparent;
    outline: none;
    width: 120px;
    text-align: center;
}

.payment-methods {
    margin-bottom: 2rem;
}

.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.method-item {
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.method-item:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
}

.method-item.click_active {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.method-icon {
    margin-bottom: 0.5rem;
}

.method-icon img {
    max-width: 100%;
    height: 32px;
    object-fit: contain;
}

.method-name {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.pay-action {
    text-align: center;
}

.pay-note {
    color: #94a3b8;
    margin-bottom: 1rem;
}

/* 公告中心页面样式 */
.notice-container {
    padding-top: 6rem;
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.notice-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.notice-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
}

.notice-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.notice-subtitle {
    color: #64748b;
    font-size: 1.125rem;
}

.content-container {
    display: flex;
    gap: 2rem;
}

/* 公告侧边栏 */
.notice-sidebar {
    width: 280px;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    height: fit-content;
    position: sticky;
    top: 8rem;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 0.5rem;
}

.category-item.active .category-link {
    background: #eff6ff;
    color: #3b82f6;
    font-weight: 600;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.category-link:hover {
    background: #f1f5f9;
    color: #3b82f6;
    transform: translateX(5px);
}

/* 公告主内容区域 */
.notice-main {
    flex: 1;
}

.category-section {
    display: none;
}

.category-section.active {
    display: block;
}

.announcement-item {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

.announcement-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.announcement-header {
    margin-bottom: 1rem;
}

.announcement-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.75rem 0;
}

.announcement-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-date {
    color: #94a3b8;
    font-size: 0.875rem;
}

.announcement-type {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.announcement-content {
    margin-bottom: 1rem;
}

.announcement-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.announcement-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-views {
    color: #94a3b8;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .doc-wrapper {
        padding: 0 1.5rem;
    }

    .doc-sidebar {
        width: 240px;
    }

    .doc-main {
        max-width: 100%; /* 在小屏幕上允许占满宽度 */
    }

    .content-container {
        padding: 0 1.5rem;
    }

    .notice-sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .doc-container {
        padding-top: 5rem;
    }

    .doc-wrapper {
        flex-direction: column;
        padding: 0 1rem;
        gap: 1.5rem;
    }

    .doc-sidebar {
        width: 100%;
        position: static;
        max-width: 100%;
    }

    .doc-main {
        padding: 1.5rem;
        max-width: 100%;
    }

    .doc-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .doc-title {
        font-size: 1.75rem;
    }

    .doc-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .params-header,
    .param-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .param-cell:nth-child(n+3) {
        display: none;
    }

    .doc-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-link {
        justify-content: center;
        width: 100%;
    }

    /* 支付测试页面响应式 */
    .demo-container {
        padding-top: 5rem;
    }

    .demo-wrapper {
        padding: 1rem;
    }

    .demo-content {
        padding: 1.5rem;
    }

    .methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .amount-value {
        font-size: 1.5rem;
    }

    .amount-input {
        font-size: 1.5rem;
        width: 100px;
    }

    /* 公告中心页面响应式 */
    .notice-container {
        padding-top: 5rem;
    }

    .notice-wrapper {
        padding: 0 1rem;
    }

    .content-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .notice-sidebar {
        width: 100%;
        position: static;
    }

    .announcement-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .announcement-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .step-indicator {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .doc-container {
        padding-top: 4rem;
    }

    .doc-wrapper {
        padding: 0 0.75rem;
        gap: 1rem;
    }

    .doc-sidebar,
    .doc-main {
        padding: 1rem;
        border-radius: 0.75rem;
        max-width: 100%;
    }

    .doc-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .code-block {
        padding: 1rem;
    }

    .params-header,
    .param-row {
        grid-template-columns: 1fr;
    }

    .param-cell:nth-child(2) {
        display: none;
    }

    /* 支付测试页面响应式 */
    .demo-container {
        padding-top: 4rem;
    }

    .demo-wrapper {
        padding: 0.75rem;
    }

    .demo-content {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .order-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .methods-grid {
        grid-template-columns: 1fr;
    }

    .amount-value {
        font-size: 1.25rem;
    }

    .amount-input {
        font-size: 1.25rem;
        width: 80px;
    }

    /* 公告中心页面响应式 */
    .notice-container {
        padding-top: 4rem;
    }

    .notice-wrapper {
        padding: 0 0.75rem;
    }

    .notice-header {
        padding: 1rem 0;
    }

    .notice-title {
        font-size: 1.75rem;
    }

    .notice-sidebar,
    .notice-main {
        padding: 1rem;
        border-radius: 0.75rem;
    }
}