/* Matrix Toolkit Custom Styles */

:root {
    --matrix-purple: #7C4DFF;
    --matrix-blue: #448AFF;
    --matrix-green: #00E676;
    --matrix-orange: #FF6E40;
}

/* 酷炫的渐变背景 */
.sidebar-brand-text {
    background: linear-gradient(135deg, var(--matrix-purple), var(--matrix-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 1.5em;
}

/* 代码块样式优化 */
.highlight {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

pre {
    border-radius: 8px;
    padding: 1em;
    background: #1e1e1e !important;
}

code {
    border-radius: 4px;
    padding: 2px 6px;
    background: rgba(124, 77, 255, 0.1);
    color: var(--matrix-purple);
    font-family: 'Fira Code', 'Consolas', monospace;
}

/* 导航栏渐变 */
.sidebar-tree {
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, var(--matrix-purple), var(--matrix-blue)) 1;
}

/* 链接悬停效果 */
a:hover {
    color: var(--matrix-purple) !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 表格美化 */
table {
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

thead {
    background: linear-gradient(135deg, var(--matrix-purple), var(--matrix-blue));
    color: white;
}

tbody tr:nth-child(even) {
    background-color: rgba(124, 77, 255, 0.05);
}

tbody tr:hover {
    background-color: rgba(124, 77, 255, 0.1);
    transition: background-color 0.3s ease;
}

/* 提示框美化 */
.admonition {
    border-radius: 8px;
    padding: 1em;
    margin: 1em 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admonition.note {
    border-left: 4px solid var(--matrix-blue);
    background-color: rgba(68, 138, 255, 0.1);
}

.admonition.warning {
    border-left: 4px solid var(--matrix-orange);
    background-color: rgba(255, 110, 64, 0.1);
}

.admonition.tip {
    border-left: 4px solid var(--matrix-green);
    background-color: rgba(0, 230, 118, 0.1);
}

/* 按钮样式 */
.btn, button {
    border-radius: 6px;
    padding: 0.5em 1em;
    background: linear-gradient(135deg, var(--matrix-purple), var(--matrix-blue));
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn:hover, button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(124, 77, 255, 0.3);
}

/* 标题渐变效果 */
h1 {
    background: linear-gradient(135deg, var(--matrix-purple), var(--matrix-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

h2::before {
    content: "▶ ";
    color: var(--matrix-purple);
    margin-right: 0.5em;
}

/* 搜索框美化 */
.search-input {
    border-radius: 20px;
    border: 2px solid var(--matrix-purple);
    padding: 0.5em 1em;
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.2);
    outline: none;
}

/* 侧边栏当前项高亮 */
.sidebar-tree .current > .reference {
    background: linear-gradient(90deg, 
        rgba(124, 77, 255, 0.2), 
        transparent
    );
    border-left: 3px solid var(--matrix-purple);
    padding-left: 0.5em;
}

/* 脚注样式 */
.footnote {
    border-top: 2px solid var(--matrix-purple);
    padding-top: 1em;
    margin-top: 2em;
}

/* 版本切换器 */
.version-switcher {
    border-radius: 6px;
    padding: 0.5em;
    background: rgba(124, 77, 255, 0.1);
    border: 1px solid var(--matrix-purple);
}

/* API 文档表格 */
.field-list {
    border-radius: 8px;
    overflow: hidden;
}

.field-list dt {
    background: linear-gradient(135deg, 
        rgba(124, 77, 255, 0.1), 
        rgba(68, 138, 255, 0.1)
    );
    padding: 0.5em;
    font-weight: bold;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.85em;
    border-radius: 12px;
    background: var(--matrix-purple);
    color: white;
    margin: 0 0.2em;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.content {
    animation: fadeIn 0.5s ease-out;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--matrix-purple), var(--matrix-blue));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--matrix-purple);
}

/* 代码复制按钮 */
.copybtn {
    background: var(--matrix-purple) !important;
    border-radius: 4px !important;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.copybtn:hover {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar-brand-text {
        font-size: 1.2em;
    }
    
    h1 {
        font-size: 1.8em;
    }
}
