* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #27ae60;
    --border-color: #bdc3c7;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding-bottom: 40px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border-radius: 0 0 12px 12px;
}

h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 10px 15px;
    min-width: 150px;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.95rem;
}

.search-section {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    max-width: 800px;
    margin: 0 auto 25px;
}

.search-box input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 1.2rem;
}

.result-count {
    text-align: center;
    color: #666;
    font-size: 1rem;
    margin-bottom: 10px;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.case-tree {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
    max-height: 600px;
    overflow-y: auto;
}

.details-panel {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
    position: relative;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.tree-item {
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s;
}

.tree-item:hover {
    background-color: #f8f9fa;
}

.tree-item.active {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--secondary-color);
}

.tree-header {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.tree-header:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.tree-header.level1 {
    background-color: rgba(44, 62, 80, 0.05);
    font-size: 1.2rem;
    color: var(--primary-color);
}

.tree-header.level2 {
    background-color: rgba(52, 152, 219, 0.05);
    padding-left: 25px;
    font-size: 1.1rem;
}

.tree-header.level3 {
    padding-left: 40px;
    font-size: 1rem;
}

.tree-header.level4 {
    padding-left: 55px;
    font-size: 0.95rem;
    color: #666;
}

.toggle-icon {
    color: #7f8c8d;
    transition: transform 0.3s;
}

.toggle-icon.rotated {
    transform: rotate(90deg);
}

.tree-children {
    display: none;
    padding-left: 20px;
}

.tree-children.expanded {
    display: block;
}

.detail-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

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

.detail-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.detail-label i {
    margin-right: 8px;
    color: var(--secondary-color);
}

.detail-value {
    padding-left: 25px;
    line-height: 1.7;
}

.detail-value ul {
    list-style-type: none;
    padding-left: 0;
}

.detail-value li {
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}

.detail-value li:last-child {
    border-bottom: none;
}

.highlight {
    background-color: #fffacd;
    padding: 2px 4px;
    border-radius: 3px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #bdc3c7;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: #7f8c8d;
    font-size: 0.9rem;
}

.search-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.search-example {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.search-example:hover {
    background-color: rgba(52, 152, 219, 0.2);
}

.matched-case {
    background-color: rgba(255, 250, 205, 0.3) !important;
}

.case-path {
    background-color: rgba(236, 240, 241, 0.5);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #555;
}

.case-path i {
    color: var(--secondary-color);
    margin: 0 5px;
}

.legal-articles {
    background-color: rgba(52, 152, 219, 0.05);
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.legal-articles ul {
    list-style-type: none;
    padding-left: 0;
}

.legal-articles li {
    padding: 8px 0;
    border-bottom: 1px dashed #bdc3c7;
}

.legal-articles li:last-child {
    border-bottom: none;
}

.legal-articles .article-num {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.85rem;
    margin-right: 8px;
}

.explanation-text {
    background-color: rgba(39, 174, 96, 0.05);
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    line-height: 1.8;
}

.level-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.level-badge.level1 {
    background-color: rgba(44, 62, 80, 0.1);
    color: var(--primary-color);
}

.level-badge.level2 {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
}

.level-badge.level3 {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.level-badge.level4 {
    background-color: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.copy-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--light-color);
    display: flex;
    justify-content: flex-end;
}

.copy-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background-color: var(--success-color);
}

.copy-btn.copied i {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(150%);
    transition: transform 0.3s ease-out;
}

.copy-notification.show {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .stats-bar {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-item {
        margin-bottom: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .copy-section {
        justify-content: center;
    }
}