* {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    font-size: 14px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

#column-headers {
    display: flex;
    justify-content: center; /* Center the items */
    margin-bottom: 10px;
    font-weight: bold;
}

.header-jibu, .header-other {
    width: calc(50% - 30px); /* Same width as event containers */
}

.header-jibu {
    text-align: right;
    padding-right: 20px; /* Add some space from the center */
}

.header-other {
    text-align: left;
    padding-left: 20px; /* Add some space from the center */
}

#timeline {
    position: relative;
    padding: 20px 0;
}

#timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 12px; /* Make space for the arrow */
    bottom: 0;
    width: 2px;
    background-color: #ccc;
    transform: translateX(-50%);
    z-index: -1; /* Place line behind year labels */
}

#timeline::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid #ccc; /* Upward-pointing arrow */
}

.year {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-bottom: 10px;
}

.year-label {
    position: absolute; /* Keep it centered */
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 1px 8px;
    z-index: 1;
    font-size: 14px;
    font-weight: bold;
}

.year::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0px; /* Adjust for border triangle */
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 10px solid #ccc;
}

.events-container {
    width: calc(50% - 30px);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.jibu-container {
    justify-content: flex-end; /* Align events to the right */
}

.event {
    width: 120px;
    position: relative;
    padding: 4px 8px;
    background-color: #f0f0f0;
    border-radius: 6px;
    font-size: 12px;
}
