/* Enhanced Modern Timeline Styles for StormPigs */
.modern-timeline-wrapper {
  width: 100%;
  height: 340px;
  border: 1px solid #EB0;
  background: black;
  position: relative;
  overflow: hidden;
}

.timeline-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  font-size: 12px;
  color: #666600;
}

.zoom-btn, .fit-btn {
  background: #6630dd;
  color: #ffdd00;
  border: none;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  min-width: 30px;
}

.zoom-btn:hover, .fit-btn:hover {
  background: #0056b3;
}

.event-count {
  margin-left: auto;
  color: #999;
  font-style: italic;
}


.modern-timeline-container {
  width: 100%;
  height: 340px;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: #666600 #000;
  position: relative;
}

.modern-timeline-container::-webkit-scrollbar {
  height: 8px;
}

.modern-timeline-container::-webkit-scrollbar-track {
  background: #000;
}

.modern-timeline-container::-webkit-scrollbar-thumb {
  background: #666600;
  border-radius: 4px;
}

.modern-timeline-svg {
  position: relative;
  height: 100%;
  min-width: 100%;
}

.main-timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: #666600;
  transform: translateY(-50%);
  z-index: 5;
}

.vertical-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
}

.marker-line {
  width: 1px;
  height: 100%;
  background: #444;
}

.year-marker .marker-line {
  background: #666600;
  width: 2px;
}

.month-marker .marker-line {
  background: #333;
  height: 30%;
  top: 35%;
}

.marker-label {
  position: absolute;
  top: 10px;
  left: 5px;
  color: #EB0;
  font-size: 11px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  white-space: nowrap;
}

.modern-timeline-track {
  position: relative;
  height: 100%;
  min-width: 100%;
}

.modern-timeline-base {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #5b4a08 0%, #EFBF04 50%, #5b4a08 100%);
  transform: translateY(-50%);
  z-index: 1;
}

.modern-year-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 2;
}

.modern-year-marker {
  position: absolute;
  top: 0;
  height: 100%;
  transform: translateX(-50%);
}

.modern-year-label {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: #666600;
  font-size: 11px;
  font-weight: bold;
  background: black;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #333;
  white-space: nowrap;
}

.modern-year-line {
  position: absolute;
  top: 35px;
  left: 50%;
  width: 1px;
  height: calc(100% - 70px);
  background: #333;
  transform: translateX(-50%);
}

.modern-events-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 10;
}

.modern-timeline-event {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 15;
}

.modern-timeline-event:hover .modern-event-card {
  transform: translateX(-50%) translateY(-5px);
  box-shadow: 0 8px 25px rgba(235, 191, 4, 0.4);
  z-index: 20;
}

.modern-timeline-event.selected .modern-event-card {
  border-color: #FFD74D;
  box-shadow: 0 0 20px rgba(255, 215, 77, 0.6);
}

.modern-event-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 12;
}

.modern-event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EFBF04;
  border: 2px solid #666600;
  position: relative;
  z-index: 13;
}

.modern-event-line {
  position: absolute;
  left: 50%;
  width: 1px;
  background: #666600;
  transform: translateX(-50%);
  z-index: 11;
}

.modern-event-stickpin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  background: #EB0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 0 4px rgba(235, 187, 0, 0.6);
}

.modern-event-stickpin:hover {
  background: #FFD700;
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.modern-event-card {
  position: absolute;
  width: 160px;
  background: #1a1a1a;
  border: 1px solid #666600;
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 16;
  box-sizing: border-box;
  left: 50%;
  transform: translateX(-50%);
  opacity: 1;
  pointer-events: all;
}

.modern-event-card:hover {
  background: #2a2a2a;
  border-color: #EB0;
  box-shadow: 0 2px 8px rgba(235, 187, 0, 0.3);
}

/* Edge positioning adjustments */
.modern-timeline-event[data-position="left"] .modern-event-card {
  left: 5px;
  transform: none;
}

.modern-timeline-event[data-position="right"] .modern-event-card {
  left: auto;
  right: 5px;
  transform: none;
}

/* Ensure cards stay within viewport */
.modern-timeline-event .modern-event-card {
  max-width: 160px;
  white-space: normal;
  word-wrap: break-word;
}

.modern-event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.modern-event-header h3 {
  margin: 0;
  color: #EFBF04;
  font-size: 13px;
  font-weight: bold;
}

.modern-event-year {
  color: #666600;
  font-size: 11px;
}

.modern-event-crew {
  color: #999;
  font-size: 10px;
  margin-bottom: 6px;
  line-height: 1.3;
  max-height: 26px;
  overflow: hidden;
}

.modern-event-actions {
  text-align: center;
}

.modern-play-button {
  background: #6630dd;
  color: #ffdd00;
  border: none;
  padding: 3px 6px;
  font-size: 9px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color 0.3s ease;
}

.modern-play-button:hover {
  background: #0056b3;
}

/* Event Detail Modal */
.modern-event-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modern-event-content {
  background: #1a1a1a;
  border: 2px solid #666600;
  border-radius: 12px;
  padding: 24px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  margin: 20px;
}

.modern-close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #666600;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modern-close-btn:hover {
  color: #FFD74D;
}

.modern-detail-container {
  position: relative;
}

.modern-detail-image-float {
  float: right;
  margin: 0 0 16px 16px;
  clear: right;
}

.modern-detail-image-float img {
  width: 500px;
  height: 375px;
  border: 2px solid #666600;
  border-radius: 6px;
  object-fit: cover;
}

.modern-detail-header h2 {
  color: #EFBF04;
  margin: 0 0 8px 0;
  font-size: 20px;
}

.modern-detail-date {
  color: #666600;
  margin: 0 0 20px 0;
  font-size: 14px;
}

.modern-detail-section {
  margin-bottom: 16px;
}

.modern-detail-section h4 {
  color: #666600;
  margin: 0 0 8px 0;
  font-size: 14px;
}

.modern-detail-section p {
  color: #ccc;
  margin: 0;
  line-height: 1.4;
  font-size: 13px;
}

.modern-song-list {
  white-space: pre-wrap;
  word-break: break-word;
}

.modern-detail-actions {
  text-align: center;
  margin-top: 20px;
}

.modern-detail-play-button {
  background: #6630dd;
  color: #ffdd00;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.modern-detail-play-button:hover {
  background: #0056b3;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modern-timeline-wrapper {
    height: 320px;
  }
  
  .timeline-controls {
    font-size: 11px;
    padding: 6px 8px;
  }
  
  .modern-event-card {
    width: 140px;
    padding: 8px;
    font-size: 10px;
  }
  
  .modern-event-content {
    margin: 10px;
    padding: 16px;
  }
  
  .modern-year-label {
    font-size: 9px;
  }
  
  .modern-event-dot {
    width: 6px;
    height: 6px;
  }
}
