/* 全局基础样式 */
.zibei-list, .zibei-show, .zibei-compare {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Microsoft YaHei", sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 标题样式 */
.zibei-list h1, .zibei-show h1, .zibei-compare h1 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 24px;
}

.section h3 {
    color: #2980b9;
    border-left: 4px solid #3498db;
    padding-left: 12px;
    margin: 25px 0 15px;
    font-size: 18px;
}

/* 搜索表单 */
.search-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.form-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-item label {
    font-weight: 600;
    color: #555;
}

.form-item input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

.btn-search, .btn-compare, .btn-add, .btn-back {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-search {
    background: #3498db;
    color: white;
}

.btn-compare {
    background: #2ecc71;
    color: white;
}

.btn-add {
    background: #e67e22;
    color: white;
}

.btn-back {
    background: #95a5a6;
    color: white;
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
}

.btn-search:hover, .btn-compare:hover, .btn-add:hover, .btn-back:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* 列表页样式 */
.func-buttons {
    margin: 15px 0;
    display: flex;
    gap: 10px;
}

.branch-item {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s;
}

.branch-item:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.branch-item h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.branch-item h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.branch-item h3 a:hover {
    color: #3498db;
}

.tanghao {
    color: #7f8c8d;
    font-size: 14px;
    margin-left: 10px;
}

.info {
    color: #666;
    font-size: 14px;
    margin: 0 0 10px;
}

.zibei-preview {
    color: #333;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    font-family: "SimSun", serif;
}

.list-tips {
    color: #7f8c8d;
    margin: 0 0 15px;
    font-size: 14px;
}

.empty {
    text-align: center;
    padding: 50px 0;
    color: #95a5a6;
    background: #f8f9fa;
    border-radius: 6px;
}

.pages {
    text-align: center;
    margin: 20px 0;
}

/* 详情页样式 */
.branch-header {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.basic-info {
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
}

.section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.section:last-child {
    border-bottom: none;
}

.content {
    padding: 0 10px;
    line-height: 1.8;
}

.path {
    color: #2c3e50;
    font-weight: 600;
    margin: 10px 0;
}

.time-nodes {
    margin: 15px 0;
    padding-left: 20px;
}

.time-nodes h4 {
    margin: 0 0 10px;
    color: #34495e;
}

.node {
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 2px solid #3498db;
}

.time {
    font-weight: 600;
    color: #2980b9;
    margin-right: 10px;
}

.event {
    color: #555;
}

.zibei-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.zibei-item {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    border: 1px solid #eee;
}

.generation {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.char {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    font-family: "SimSun", serif;
}

.source-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.action-buttons {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

/* 对比页样式 */
.selected-branches {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.branch-tag {
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.branch-tag .remove {
    color: #e74c3c;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
}

.similarity-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.similarity-item span {
    white-space: nowrap;
}

.progress {
    flex: 1;
    height: 10px;
    background: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
    min-width: 200px;
}

.bar {
    height: 100%;
    background: #3498db;
    transition: width 1s ease;
}

.rate {
    color: #2980b9;
    font-weight: 600;
    min-width: 50px;
}

.tip {
    color: #7f8c8d;
    font-size: 14px;
}

.zibei-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.zibei-table th, .zibei-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.zibei-table th {
    background: #f8f9fa;
    color: #2c3e50;
}

.zibei-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* 图表容器 */
.chart-container {
    width: 100%;
    margin: 20px 0;
    position: relative;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .search-form, .form-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-item input {
        width: 100%;
    }
    
    .zibei-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .similarity-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .progress {
        width: 100%;
    }
}