.api-container {
    display: flex;
    gap: 1.5rem;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.api-sidebar {
    width: 260px;
    border-right: 1px solid #e9ecef;
    padding-right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.api-main-menu,
.api-submenu {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0.75rem;
}

.api-main-group {
    margin-bottom: 0.5rem;
}

.api-main-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.api-main-item,
.api-sub-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    color: #555;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.api-main-item {
    justify-content: space-between;
}

.api-main-arrow {
    font-size: 0.8rem;
    opacity: 0.7;
}

.api-submenu-group {
    margin-top: 0.25rem;
    padding-left: 1.25rem;
    display: none;
}

.api-submenu-group.active {
    display: block;
}

.api-main-item i,
.api-sub-item i {
    width: 18px;
    text-align: center;
}

.api-main-item:hover,
.api-main-item.active {
    background: #667eea;
    color: #fff;
}

.api-sub-item:hover,
.api-sub-item.active {
    background: #eef1ff;
    color: #445;
}

.api-content {
    flex: 1;
    padding: 0.5rem 0 0 0.5rem;
}

.api-view {
    display: none;
}

.api-view.active {
    display: block;
}

.api-section-header h2 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.api-section-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.api-token-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    background: #f8f9ff;
    border: 1px solid #e0e3ff;
    font-size: 0.9rem;
}

.api-token-label {
    color: #555;
}

.api-token-value {
    font-family: Consolas, Monaco, monospace;
    color: #333;
    word-break: break-all;
}

.api-token-block {
    max-width: 1200px;
    margin: 0.75rem auto 1.5rem;
    border-radius: 8px;
    background: #f8f9ff;
    border: 1px solid #e0e3ff;
    padding: 0.4rem 0.75rem 0.6rem;
}

.api-token-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.2rem 0;
}

.api-token-row + .api-token-row {
    border-top: 1px dashed #dde3ff;
}

.api-permission-status {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    justify-content: center;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.permission-item {
    flex: 1 1 0;
    max-width: none;
    background: #f8f9ff;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e3ff;
}

.permission-label {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.4rem;
}

.permission-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.api-plan-compare {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.plan-column {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.plan-column.vip {
    border-color: #ffd54f;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.25);
}

.plan-column.plan-merged {
    flex: 1 1 auto;
}

.plan-header-row {
    display: flex;
    justify-content: space-between;
    gap: 0;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.plan-header-empty {
    flex: 0 0 140px; /* 与行内标签列同宽，保证对齐 */
    color: transparent;
}

.plan-header-col {
    flex: 1 1 0;
    text-align: center;
}

.plan-header {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.plan-features {
    list-style: none;
    font-size: 0.9rem;
}

.plan-features li {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-top: 1px dashed #e0e0e0;
}

.plan-features-merged {
    padding-top: 0.25rem;
}

.plan-features-merged li {
    display: flex;
    align-items: center;
}

.plan-row-label {
    flex: 0 0 140px; /* 与 plan-header-empty 同宽 */
    color: #555;
}

.plan-row-value {
    flex: 1 1 0;
    text-align: center;
}

.plan-features li:first-child {
    border-top: none;
}

.api-apply-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.apply-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    border: 1px solid #e9ecef;
}

.apply-card h3 {
    margin-bottom: 0.5rem;
}

.apply-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.btn-apply-test {
    padding: 0.65rem 1.3rem;
}

.apply-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #777;
}

.vip-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.vip-plan {
    padding: 0.55rem 0.4rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.vip-plan:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.vip-plan.selected {
    border-color: #667eea;
    background: #667eea;
    color: #fff;
}

.install-block {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.install-block h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.code-block {
    background: #1e1e1e;
    color: #e0e0e0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

.install-tip {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.5rem;
}

.api-intro-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.api-intro-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    border: 1px solid #e9ecef;
}

.api-intro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.api-intro-title {
    font-weight: 600;
}

.api-intro-tag {
    font-size: 0.8rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: #e3f2fd;
    color: #1976d2;
}

.api-intro-body {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.api-intro-body pre {
    margin-top: 0.5rem;
}

.api-intro-body code {
    background: #f1f3f4;
    padding: 0.1rem 0.2rem;
    border-radius: 4px;
}

.api-intro-body pre.code-block {
    padding: 0;
    background: transparent;
}

.api-intro-body pre.code-block code {
    display: block;
    background: #1e1e1e;
    color: #e0e0e0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

.api-result-section {
    margin-top: 0.6rem;
    border-top: 1px dashed #dde3ff;
    padding-top: 0.5rem;
}

.api-result-header {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #446;
    user-select: none;
}

.api-result-header:hover {
    color: #2c3e98;
}

.api-result-toggle-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 1px solid #ccd5ff;
    font-size: 0.8rem;
    line-height: 1;
    background: #f5f7ff;
}

.api-result-title {
    font-weight: 500;
}
