﻿.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    background: var(--glass-hover);
}

.card-clickable {
    cursor: pointer;
}

.card-clickable:hover {
    transform: translateY(-2px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--c-primary);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--c-secondary);
    color: #fff;
}

.btn-secondary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-soft {
    background: rgba(var(--c-primary-rgb), 0.12);
    color: var(--c-primary);
}

.btn-soft:hover {
    background: rgba(var(--c-primary-rgb), 0.2);
}

.btn-soft-secondary {
    background: rgba(var(--c-secondary-rgb), 0.12);
    color: var(--c-secondary);
}

.btn-soft-secondary:hover {
    background: rgba(var(--c-secondary-rgb), 0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--text-light);
}

.btn-ghost:hover {
    color: var(--c-primary);
    background: rgba(var(--c-primary-rgb), 0.08);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    transition: var(--transition);
    background: #fff;
    color: var(--text);
    font-family: inherit;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
    cursor: pointer;
}

.form-select:hover {
    border-color: var(--c-primary);
}

.form-select option {
    padding: 10px 12px;
    background: #fff;
    color: var(--text);
    border-radius: 0;
}

.form-select option:hover,
.form-select option:checked {
    background: linear-gradient(0deg, rgba(var(--c-primary-rgb), 0.12) 0%, rgba(var(--c-primary-rgb), 0.12) 100%);
    color: var(--c-primary);
}

.custom-select {
    position: relative;
    display: inline-block;
    min-width: fit-content;
}

.custom-select-btn {
    padding: 9px 12px;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    font-size: 13px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: width 0.2s ease;
    white-space: nowrap;
}

.custom-select-btn:hover {
    border-color: var(--c-primary);
}

.custom-select-btn.open {
    border-color: var(--c-primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb), 0.15);
}

.custom-select-btn i {
    color: var(--text-muted);
    font-size: 10px;
    transition: var(--transition);
}

.custom-select-btn.open i {
    transform: rotate(180deg);
    color: var(--c-primary);
}

.custom-select-list {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    min-width: 100%;
    width: max-content;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-select.open .custom-select-list {
    display: block;
    animation: selectDropIn 0.15s ease;
}

@keyframes selectDropIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select-item {
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    white-space: nowrap;
}

.custom-select-item:last-child {
    border-bottom: none;
}

.custom-select-item:hover {
    background: rgba(var(--c-primary-rgb), 0.06);
    color: var(--c-primary);
}

.custom-select-item.selected {
    background: rgba(var(--c-primary-rgb), 0.1);
    color: var(--c-primary);
    font-weight: 500;
}

.custom-select-item.selected::before {
    content: '✓';
    margin-right: 8px;
    font-size: 11px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb), 0.15);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.grid {
    display: grid;
    gap: 14px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.tag {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
}

.tag-success {
    background: #d1fae5;
    color: #047857;
}

.tag-danger {
    background: #fecaca;
    color: #dc2626;
}

.tag-warning {
    background: #fef3c7;
    color: #b45309;
}

.tag-info {
    background: rgba(var(--c-secondary-rgb), 0.15);
    color: var(--c-secondary);
}

.tag-primary {
    background: var(--c-primary);
    color: #fff;
}

.tag-secondary {
    background: var(--c-secondary);
    color: #fff;
}

.link-secondary {
    color: var(--c-secondary);
}

.link-secondary:hover {
    color: var(--c-primary);
}

.text-secondary {
    color: var(--c-secondary);
}

.bg-secondary {
    background: var(--c-secondary);
}

.border-secondary {
    border-color: var(--c-secondary);
}

.icon-box {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    background: var(--c-primary);
    flex-shrink: 0;
}

.icon-box-sm {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.icon-box-lg {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 11px;
}

.stat-card {
    text-align: center;
    padding: 18px 14px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text);
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    padding: 10px 8px;
    text-align: left;
}

th {
    color: var(--text-light);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
}

tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

tbody tr:hover {
    background: rgba(var(--c-primary-rgb), 0.03);
}

.code-editor {
    border-radius: var(--radius);
    overflow: hidden;
    background: #1a1e29;
}

.code-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #232836;
    border-bottom: 1px solid #2d3548;
}

.code-lang {
    font-size: 11px;
    color: #8b949e;
}

.code-btn {
    padding: 4px 8px;
    border-radius: 4px;
    border: none;
    background: #21262d;
    color: #8b949e;
    font-size: 11px;
    cursor: pointer;
}

.code-btn:hover {
    background: #30363d;
    color: #c9d1d9;
}

.code-btn.active {
    background: #007acc;
    color: #fff;
}

.code-content {
    padding: 14px;
    color: #c9d1d9;
    font-size: 12px;
    line-height: 1.6;
    overflow: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-height: 80px;
    resize: vertical;
}

/* 代码语法高亮配色 - 高对比度鲜艳方案 */
.hljs { background: transparent !important; color: #f0f6fc !important; }
.hljs-keyword, .hljs-meta .hljs-keyword, .hljs-template-tag, .hljs-template-variable, .hljs-type, .hljs-variable.language_ { color: #ff6b9d !important; font-weight: 600; }
.hljs-title, .hljs-title.class_, .hljs-title.class_.inherited__, .hljs-title.function_ { color: #c792ea !important; }
.hljs-attr, .hljs-attribute, .hljs-literal, .hljs-meta, .hljs-number, .hljs-operator, .hljs-selector-attr, .hljs-selector-class, .hljs-selector-id, .hljs-variable { color: #89ddff !important; }
.hljs-meta .hljs-string, .hljs-regexp, .hljs-string { color: #c3e88d !important; }
.hljs-built_in, .hljs-symbol { color: #ffcb6b !important; }
.hljs-code, .hljs-comment, .hljs-formula { color: #6b7a8f !important; font-style: italic; }
.hljs-name, .hljs-quote, .hljs-selector-pseudo, .hljs-selector-tag { color: #c3e88d !important; }
.hljs-function { color: #82aaff !important; }
.hljs-class { color: #ffcb6b !important; }
.hljs-property { color: #89ddff !important; }
.hljs-tag { color: #f07178 !important; }
.hljs-section { color: #82aaff !important; font-weight: 700; }

.code-inline {
    background: rgba(var(--c-primary-rgb), 0.1);
    color: var(--c-primary);
    padding: 3px 7px;
    border-radius: 4px;
    font-size: var(--font-size-small);
    font-family: 'CustomFont', monospace;
    font-weight: var(--font-weight-medium);
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    margin: 12px 0 8px;
    font-weight: 500;
}

.markdown-content h1 {
    font-size: 1.4em;
}

.markdown-content h2 {
    font-size: 1.2em;
}

.markdown-content h3 {
    font-size: 1.1em;
}

.markdown-content p {
    margin: 8px 0;
}

.markdown-content ul,
.markdown-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.markdown-content li {
    margin: 4px 0;
}

.markdown-content code {
    background: rgba(var(--c-primary-rgb), 0.1);
    color: var(--c-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.markdown-content pre {
    background: #0d1117;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    overflow-x: auto;
}

.markdown-content pre code {
    background: none;
    color: #c9d1d9;
    padding: 0;
}

.markdown-content blockquote {
    border-left: 3px solid var(--c-primary);
    padding-left: 12px;
    margin: 10px 0;
    color: var(--text-light);
}

.markdown-content a {
    color: var(--c-primary);
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid #e5e7eb;
    padding: 8px;
    text-align: left;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.markdown-content {
    overflow: hidden;
    word-break: break-word;
}

/* 全站语法高亮优化 - VSCode风格 */
.hljs {
    background: #1e1e1e !important;
    color: #d4d4d4 !important;
}

.hljs-keyword {
    color: #569cd6 !important;
    font-weight: 500;
}

.hljs-string {
    color: #ce9178 !important;
}

.hljs-number {
    color: #b5cea8 !important;
}

.hljs-comment {
    color: #6a9955 !important;
    font-style: italic;
}

.hljs-function {
    color: #dcdcaa !important;
}

.hljs-class {
    color: #4ec9b0 !important;
}

.hljs-variable {
    color: #9cdcfe !important;
}

.hljs-property {
    color: #9cdcfe !important;
}

.hljs-attr {
    color: #9cdcfe !important;
}

.hljs-tag {
    color: #569cd6 !important;
}

.hljs-name {
    color: #4ec9b0 !important;
}

.hljs-attribute {
    color: #9cdcfe !important;
}

.hljs-literal {
    color: #569cd6 !important;
}

.hljs-built_in {
    color: #4ec9b0 !important;
}

.hljs-type {
    color: #4ec9b0 !important;
}

.hljs-params {
    color: #9cdcfe !important;
}

.hljs-meta {
    color: #569cd6 !important;
}

.hljs-title {
    color: #dcdcaa !important;
}

.hljs-section {
    color: #dcdcaa !important;
}

.hljs-selector-tag {
    color: #569cd6 !important;
}

.hljs-selector-id {
    color: #d7ba7d !important;
}

.hljs-selector-class {
    color: #d7ba7d !important;
}

.hljs-regexp {
    color: #d16969 !important;
}

.hljs-operator {
    color: #d4d4d4 !important;
}

.hljs-punctuation {
    color: #d4d4d4 !important;
}

.hljs-symbol {
    color: #b5cea8 !important;
}

.hljs-bullet {
    color: #b5cea8 !important;
}

.hljs-link {
    color: #3794ff !important;
    text-decoration: underline;
}

.hljs-emphasis {
    font-style: italic;
}

.hljs-strong {
    font-weight: bold;
}

.hljs-deletion {
    color: #d16969 !important;
    background: #3f1d1d !important;
}

.hljs-addition {
    color: #b5cea8 !important;
    background: #1d3f1d !important;
}

.json-value {
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s;
    padding: 0 2px;
    margin: 0 -2px;
}

.json-value:hover {
    background: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.json-copied {
    background: rgba(34, 197, 94, 0.2) !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3) !important;
}

.json-long-string {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 100%;
}

.json-string-preview,
.json-string-full {
    word-break: break-all;
    white-space: pre-wrap;
}

.json-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 10px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--c-primary);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.json-expand-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--c-primary);
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(var(--c-primary-rgb), 0.1);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.3s;
}

.user-btn span {
    transition: opacity 0.3s, max-height 0.3s;
}

.user-btn:hover {
    background: rgba(var(--c-primary-rgb), 0.15);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: var(--transition);
    z-index: 200;
    overflow: hidden;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 9px 14px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
}

.user-dropdown a:hover {
    background: rgba(var(--c-primary-rgb), 0.08);
    color: var(--c-primary);
}

.section-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.section-title i {
    color: var(--c-primary);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

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

.info-label {
    color: var(--text-light);
}





.toast {
    padding: 12px 18px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    animation: toastIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast-close {
    margin-left: auto;
    cursor: pointer;
    color: var(--text-muted);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    min-width: 320px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.2s ease;
}

.modal-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-title i {
    color: var(--c-primary);
}

.modal-body {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.chart-bar {
    transition: var(--transition);
    cursor: pointer;
    border-radius: 4px 4px 0 0;
}

.chart-bar:hover {
    filter: brightness(1.1);
}

.footer {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-light);
    font-size: 12px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.25s ease backwards;
}

/* 首页筛选栏 */
.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-categories {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.filter-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-box {
    position: relative;
    width: 140px;
}

/* API详情页头部 */
.api-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.api-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.api-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .header {
        padding: 8px 12px;
    }

    /* 手机端隐藏logo文字，只保留图标 */
    .logo span,
    .logo-text {
        display: none;
    }

    .logo {
        font-size: 14px;
    }

    .nav {
        gap: 2px;
    }

    .nav a,
    .user-btn {
        padding: 7px 10px;
    }

    .nav a span,
    .user-btn span {
        display: none;
    }

    /* 导航栏按钮（登录按钮）隐藏文字 */
    .nav .btn span {
        display: none;
    }

    .nav a i,
    .user-btn i,
    .btn i {
        margin: 0;
    }

    /* 保留特定按钮内的span文字 */
    .qty-btn span,
    .btn span[style*="display:inline"],
    #submit-btn .btn-text {
        display: inline;
    }

    .bg-shape {
        transform: scale(0.5);
    }

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

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

    .container {
        padding: 12px;
    }

    .card {
        padding: 12px;
    }

    /* 首页筛选栏移动端 */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-categories {
        flex: none;
        justify-content: flex-start;
    }

    .filter-controls {
        justify-content: space-between;
    }

    .search-box {
        flex: 1;
        width: auto;
    }

    /* API详情页头部移动端 */
    .api-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .api-header-actions {
        justify-content: flex-start;
    }

    .api-header-actions .btn span {
        display: inline;
    }

    /* 表格横向滚动 */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
    }

    table {
        min-width: 600px;
    }

    /* 代码块优化 */
    .code-content {
        font-size: 11px;
    }

    /* 公告侧边栏移动端优化 - 全宽显示 */
    .announcement-sidebar {
        width: 100% !important;
        right: -100% !important;
        border-radius: 0 !important;
    }

    .announcement-sidebar.open {
        right: 0 !important;
    }

    .announcement-btn {
        font-size: 12px;
        padding: 10px 6px;
    }

    .announcement-timeline {
        padding: 0;
    }

    .announcement-timeline::before {
        display: none;
    }

    .timeline-item {
        width: 100% !important;
        margin-left: 0 !important;
        text-align: left !important;
        padding-left: 24px;
    }

    .timeline-item::before {
        left: 0 !important;
        right: auto !important;
    }

    .timeline-item .timeline-time {
        justify-content: flex-start !important;
    }

    /* 弹窗优化 */
    .modal-box {
        min-width: auto;
        width: 95%;
        padding: 16px;
    }

    .popup-announcement-box {
        width: 95%;
        padding: 16px;
    }

    /* 按钮组优化 */
    .btn-sm {
        padding: 5px 8px;
        font-size: 11px;
    }

    /* 统计卡片优化 */
    .stat-value {
        font-size: 1.3rem;
    }

    /* 表单优化 */
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 14px;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(var(--c-primary-rgb), 0.25);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--c-primary-rgb), 0.4);
}

.code-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.code-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.code-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.code-content::-webkit-scrollbar-corner {
    background: transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--c-primary-rgb), 0.25) transparent;
}

/* 公告按钮和侧边栏 */
.announcement-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--c-primary);
    color: #fff;
    padding: 12px 8px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 999;
    box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    writing-mode: vertical-rl;
    font-size: 13px;
    font-weight: 500;
}

.announcement-btn:hover {
    padding-right: 12px;
}

.announcement-sidebar {
    position: fixed;
    right: -800px;
    top: 0;
    bottom: 0;
    width: 800px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    border-radius: 16px 0 0 16px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.announcement-sidebar.open {
    right: 0;
}

.announcement-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    z-index: 10;
}

.announcement-header h3 {
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.announcement-close {
    cursor: pointer;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.announcement-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
}

.announcement-section {
    padding: 20px;
}

.announcement-section-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.announcement-timeline {
    position: relative;
    padding: 0 20px;
}

.announcement-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--c-primary), rgba(var(--c-primary-rgb), 0.2));
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    width: calc(50% - 20px);
}

.timeline-item:nth-child(odd) {
    margin-left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    margin-left: calc(50% + 20px);
    text-align: left;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--c-primary);
    border: 3px solid var(--glass);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb), 0.15);
}

.timeline-item:nth-child(odd)::before {
    right: -26px;
}

.timeline-item:nth-child(even)::before {
    left: -26px;
}

.timeline-item.type-warning::before {
    background: var(--warning);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.timeline-item.type-danger::before {
    background: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.timeline-item.type-success::before {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.timeline-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.timeline-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.timeline-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.timeline-content {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 8px;
    text-align: left;
}

.timeline-time {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.timeline-item:nth-child(odd) .timeline-time {
    justify-content: flex-end;
}

.announcement-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 999;
    display: none;
}

.announcement-overlay.show {
    display: block;
}

.popup-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 2px dashed rgba(var(--c-primary-rgb), 0.3);
}

.popup-notice {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 弹窗公告 */
.popup-announcement {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10002;
    align-items: center;
    justify-content: center;
}

.popup-announcement.show {
    display: flex;
}

.popup-announcement-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.3s ease;
}

.popup-announcement-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.popup-announcement-title i {
    color: var(--c-primary);
}

.popup-announcement-content {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.popup-announcement-content * {
    font-family: 'CustomFont', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.popup-announcement-content p {
    margin: 8px 0;
}

.popup-announcement-content h1,
.popup-announcement-content h2,
.popup-announcement-content h3 {
    margin: 12px 0 8px;
    font-weight: 500;
}

.popup-announcement-content ul,
.popup-announcement-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.popup-announcement-content a {
    color: var(--c-primary);
    text-decoration: none;
}

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

.popup-announcement-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 20px rgba(var(--c-primary-rgb), 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 30px rgba(var(--c-primary-rgb), 0.5);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1);
}

.back-to-top.scrolling {
    animation: backToTopPulse 0.3s ease;
}

@keyframes backToTopPulse {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(0) scale(1.1);
    }
}

@media (max-width: 768px) {
    .back-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
        font-size: 16px;
    }
}
    

