:root {
    /*--primary-color: #4361ee;*/
    /*--secondary-color: #3f37c9;*/
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
}

.category-header {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(67, 97, 238, 0.2);
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.07);
    margin-bottom: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
}

.property-item, .method-item {
    border-bottom: 1px solid #eee;
    padding: 1.25rem 0;
    transition: background-color 0.2s;
}

.property-item:hover, .method-item:hover {
    background-color: rgba(67, 97, 238, 0.03);
}

.property-item:last-child, .method-item:last-child {
    border-bottom: none;
}

.property-item h6, .method-item h6 {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.property-item p, .method-item p {
    color: #666;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.code-example {
    background-color: #2d3748;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 0.75rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
    position: relative;
}

.code-example::before {
    content: "示例代码";
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255,255,255,0.1);
    color: #a0aec0;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-bottom-left-radius: 8px;
}

.example-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border: none;
    color: white;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-top: 0.75rem;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(67, 97, 238, 0.3);
}

.example-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.4);
}


.badge-category {
    background: linear-gradient(135deg, var(--success-color), #3a86ff);
    color: white;
    font-size: 0.7rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    border-radius: 0 0 20px 20px;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-top: 2rem;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.expandable-toc {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
}

.toc-content {
    display: none;
    margin-top: 1rem;
}

.toc-list {
    list-style-type: none;
    padding-left: 0;
}

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

.toc-list a:hover {
    color: var(--primary-color);
}

.toc-sublist {
    list-style-type: none;
    padding-left: 1.5rem;
    margin-top: 0.25rem;
}

.toc-sublist li {
    margin-bottom: 0.25rem;
}

.toc-sublist a {
    font-size: 0.9rem;
    color: #777;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }

    .stats {
        flex-direction: column;
    }
}

.method-signature {
    font-family: 'Consolas', 'Monaco', monospace;
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.property-table, .method-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.property-table th, .method-table th {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid rgba(67, 97, 238, 0.2);
}

.property-table td, .method-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

.property-table tr:hover, .method-table tr:hover {
    background-color: rgba(67, 97, 238, 0.03);
}
