* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.status-bar {
    background-color: #f0f0f0;
    color: white;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: #35424a;
    color: white;
    padding: 20px;
}

header h1 {
    margin: 0;
    margin-bottom: 10px;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

button {
    padding: 8px 15px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #3367d6;
}

button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

main {
    padding: 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.input-section {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.stats-section {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.history-section {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
}

h2 {
    margin-bottom: 15px;
    color: #1a73e8;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    resize: vertical;
}

.result-box {
    margin-top: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    min-height: 50px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}

.history-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: white;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}

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

.history-text {
    margin-bottom: 10px;
}

.history-result {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.history-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.history-meta {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.labels-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.current-labels, .add-label {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}

.labels-list {
    list-style: none;
    margin-top: 10px;
}

.label-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.label-actions {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

#newLabelInput {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.high-probability, .high-score {
    font-weight: bold;
    color: #e53935;
    background-color: #ffebee;
    padding: 2px 5px;
    border-radius: 3px;
}

.timestamp {
    font-size: 12px;
    color: #888;
    margin-left: 10px;
}

.tag-percent {
    display: inline-block;
    margin-right: 10px;
    background: #e8f4fc;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.tag-selector {
    margin-top: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tag-button {
    background: #e8f4fc;
    color: #333;
    border: 1px solid #bbd8e8;
}

.tag-button.selected {
    background: #4caf50;
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-left: 10px;
}

.status-pending {
    background: #ffeb3b;
    color: #333;
}

.status-tagged {
    background: #2196f3;
    color: white;
}

.status-trained {
    background: #4caf50;
    color: white;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table th, .stats-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.stats-table th {
    background-color: #f2f2f2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .menu {
        margin-top: 10px;
    }
    
    .labels-container {
        grid-template-columns: 1fr;
    }
    
    .label-actions {
        grid-column: 1;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    section {
        padding: 15px;
    }
    
    textarea {
        height: 100px;
    }
    
    .menu button {
        padding: 6px 10px;
        font-size: 14px;
    }
}
