/* Modern X/Twitter inspired timeline styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #000000;
  color: #e7e9ea;
  line-height: 1.4;
  padding: 20px 0;
}

h1 {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 2rem;
  color: #ffffff;
  letter-spacing: -0.5px;
}

/* Timeline container */
.timeline {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

/* Central timeline line */
.timeline::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: calc(100% - 60px);
  background: #bbb;
  z-index: 0;
}

/* Container for each timeline item */
.container {
  padding: 0 0 30px 0;
  position: relative;
  width: 50%;
  transition: all 0.3s ease;
}

/* Remove any old dot pseudo-element */
.container::before {
  content: none;
}

/* Style the .dot element to be centered on the timeline */
.dot {
  position: absolute;
  top: 20px;
  width: 20px;
  height: 20px;
  background: #fff;
  border: 4px solid #2196F3;
  border-radius: 50%;
  z-index: 2;
  box-sizing: border-box;
}

/* Position dot for left containers - move even closer to center */
.left .dot {
  right: -10px;
}

/* Position dot for right containers - move even closer to center */
.right .dot {
  left: -10px;
}

/* Align left/right content */
.left .content {
  margin-left: 0;
  margin-right: 0;
}

.right .content {
  margin-right: 0;
  margin-left: 0;
}

/* Left side positioning */
.left {
  left: 0;
  padding-right: 40px;
}

.left::after {
  right: -9px;
}

/* Right side positioning */
.right {
  left: 50%;
  padding-left: 40px;
}

.right::after {
  left: -9px;
}

.container:hover::after {
  transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.4);
}

/* Content cards */
.content {
  padding: 15px 18px;
  background: rgba(22, 24, 28, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid #2f3336;
  border-radius: 16px;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.content:hover {
  background: rgba(22, 24, 28, 0.95);
  border-color: #1d9bf0;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(29, 155, 240, 0.15);
}

/* Typography */
.content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1d9bf0;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.content p {
  font-size: 0.95rem;
  color: #e7e9ea;
  margin-bottom: 16px;
  font-weight: 400;
  line-height: 1.5;
}

/* Images */
.content img {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 12px;
  border: 1px solid #2f3336;
  transition: all 0.3s ease;
  display: block;
  margin: 0 auto;
}

.content img:hover {
  transform: scale(1.02);
  border-color: #1d9bf0;
  box-shadow: 0 4px 12px rgba(29, 155, 240, 0.2);
}

/* Connection lines from dots to content */
.left .content::before {
  content: '';
  position: absolute;
  right: -22px;
  top: 28px;
  width: 22px;
  height: 1px;
  background: #536471;
  z-index: 2;
}

.right .content::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 28px;
  width: 22px;
  height: 1px;
  background: #536471;
  z-index: 2;
}

/* Ad container styling */
.ad-container {
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  padding: 10px;
  text-align: center;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
}

.timeline-ad {
  margin: 40px auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Make sure ads don't interfere with timeline */
.timeline-ad .adsbygoogle {
  min-height: 250px;
}

/* Mobile ad adjustments */
@media screen and (max-width: 768px) {
  .ad-container {
    margin: 15px auto;
    padding: 8px;
  }
  
  .timeline-ad {
    margin: 30px auto;
  }
  
  body {
    padding: 10px 0;
  }
  
  h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding: 0 20px;
  }
  
  .timeline {
    padding: 0 15px;
  }
  
  .timeline::before {
    left: 30px;
    transform: none;
    top: 20px;
    height: calc(100% - 20px);
  }
  
  .container {
    width: 100%;
    padding-left: 60px !important;
    padding-right: 15px !important;
    left: 0 !important;
  }
  
  .dot {
    left: 8px !important;
    right: auto !important;
  }
  
  .left .content::before,
  .right .content::before {
    left: -38px !important;
    right: auto !important;
    width: 38px !important;
  }
  
  .content {
    padding: 12px 15px;
  }
  
  .content img {
    max-width: 100%;
  }
}

/* Loading animation for new items */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  animation: fadeInUp 0.6s ease forwards;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #000000;
}

::-webkit-scrollbar-thumb {
  background: #536471;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1d9bf0;
}