body {
    background: aliceblue;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    margin: 0;
    padding: 0;
}

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

h2 {
    text-align: center;
    color: #3F51B5;
    margin: 5px 0 10px 0;
    font-size: 1.3rem;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    border: 2px solid #ccc;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    background: white;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    opacity: 0.85;
}

.filter-btn.active {
    box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
}

.filter-btn[data-category="all"] {
    border-color: #3F51B5;
    color: #3F51B5;
}
.filter-btn[data-category="all"].active {
    background: #3F51B5;
    color: white;
}

.filter-btn[data-category="milestone"] {
    border-color: #1976D2;
    color: #1976D2;
}
.filter-btn[data-category="milestone"].active {
    background: #1976D2;
    color: white;
}

.filter-btn[data-category="prediction"] {
    border-color: #E65100;
    color: #E65100;
}
.filter-btn[data-category="prediction"].active {
    background: #E65100;
    color: white;
}

.filter-btn[data-category="reality"] {
    border-color: #C62828;
    color: #C62828;
}
.filter-btn[data-category="reality"].active {
    background: #C62828;
    color: white;
}

#timeline {
    width: 100%;
    height: 320px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

#event-details {
    margin-top: 10px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 40px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
}

#event-details .detail-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

#event-details .detail-category {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
}

#event-details .detail-category.milestone { background: #1976D2; }
#event-details .detail-category.prediction { background: #E65100; }
#event-details .detail-category.reality { background: #C62828; }

#event-details .detail-status {
    font-weight: 700;
    margin-left: 6px;
}
#event-details .detail-status.failed { color: #C62828; }
#event-details .detail-status.pending { color: #F57C00; }

#event-details .detail-notes {
    margin-top: 6px;
    color: #333;
}

/* vis-timeline item overrides */
.vis-item.milestone {
    background-color: #1976D2;
    border-color: #0D47A1;
    color: white;
}

.vis-item.prediction {
    background-color: #FF7043;
    border-color: #E65100;
    color: white;
}

.vis-item.reality {
    background-color: #C62828;
    border-color: #8E0000;
    color: white;
}

.vis-item .vis-item-overflow {
    overflow: visible;
}

.vis-item .vis-item-content {
    white-space: nowrap;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Tooltip styling */
.vis-tooltip {
    background-color: #333 !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    max-width: 300px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    line-height: 1.4 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}
