body {
  font-family: "Helvetica Neue", sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 2rem;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
  min-height: 100vh;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #3498db;
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline-padding {
  height: 120px;
}

.year-group {
  clear: both;
  margin-bottom: 60px;
}

.year-header {
  cursor: pointer;
  color: #007bff;
  text-decoration: underline;
  text-align: center;
  font-size: 24px;
  margin: 40px 0 10px;
  border-bottom: 2px solid #aaa;
  padding-bottom: 4px;
}
.year-header:hover {
  color: #0056b3;
}

.year-btn.active {
  background-color: #007bff !important;
  color: white;
  font-weight: bold;
}

.entry {
  position: relative;
  width: 40%;
  background: white;
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  clear: both;
}

.entry.left {
  float: left;
  text-align: right;
  margin-left: 10%;
  margin-right: auto;
}

.entry.right {
  float: right;
  text-align: left;
  margin-right: 10%;
  margin-left: auto;
}

.entry.left::after {
  content: "";
  position: absolute;
  top: 20px;
  right: -15px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent transparent white;
}

.entry.right::after {
  content: "";
  position: absolute;
  top: 20px;
  left: -15px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent white transparent transparent;
}

.entry img {
  max-width: 100%;
  margin-top: 8px;
  border-radius: 6px;
}

img {
  max-width: 100%;
  height: auto;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.3s;
}

img:active {
  transform: scale(0.98);
}

#imageModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#imageModal img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  border-radius: 10px;
}

#year-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 10px 0;
  z-index: 900;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

.fixed-buttons {
  position: fixed;
  right: 16px;
  bottom: 80px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fixed-buttons button {
  padding: 10px;
  font-size: 14px;
  min-width: 100px;
}

@media (max-width: 600px) {
  input[type="text"],
  button,
  #uploadWidgetBtn {
    width: 90% !important;
    max-width: 100%;
    margin: 5px auto;
    display: block;
  }

  .timeline .entry {
    width: 90%;
    margin: 10px auto;
    font-size: 15px;
  }

  .year-header {
    font-size: 1.4rem;
  }
}

@media screen and (max-width: 768px) {
  .entry, .entry.right, .entry.left {
    width: 100%;
    left: 0 !important;
    float: none;
    text-align: left;
  }
  .timeline::before {
    left: 20px;
  }
  .entry::after {
    display: none;
  }
}
