body {
    margin: 0;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Prevent scrollbars for clean layout */
    background: linear-gradient(135deg, #001f3f, #0074d9, #7fdbff);
    background-size: 400% 400%;
    animation: gradientAnimation 10s ease infinite;
    font-family: 'Orbitron', sans-serif;
    color: white;
  }

  html {
    height: 100%;
    overflow: hidden;
  }
  
  @keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
 

  #logo-container {
    position: fixed;
    top: 40%;
    left: 45%;
    /* transform: translate(-50%, -50%); */
    transition: all 1s ease-in-out;
    z-index: 1000;
  }
  
  #logo {
    width: 183px;
    height: 160px;
    cursor: pointer;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
  }

  #news-container {
    text-align: center;
    max-width: 800px;
    padding: 40px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
  }

  #news-container:hover {
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.7);
    transform: scale(1.02);
  }

  #news-container a, 
  #news-container a:visited {
    color: whitesmoke;
    font-size: 0.9em;
  }
  
  #headline {
    font-size: 2.4em;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 2s forwards;
  }
  
  #summary {
    font-size: 1.24em;
    opacity: 0;
    animation: fadeIn 2s forwards;
  }
  
  @keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
  }
  
  #line {
    width: 0; /* Start with no width for animation */
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    margin: 10px auto; /* Center it */
    margin-bottom: 40px !important;
    opacity: 0;
    animation: lineIn 1s forwards;
  }
  
  /* Animation for the line to expand */
  @keyframes lineIn {
    0% { width: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { width: 80%; opacity: 1; }
  }


  /* Sliding in from the right */
@keyframes slideInRight {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
  }
  
  /* Sliding out to the left */
  @keyframes slideOutLeft {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-100%); opacity: 0; }
  }
  

  .hidden {
    visibility: hidden;
    opacity: 0;
  }

/* Archive Button */
#archive-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid rgba(0, 255, 255, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2000;
  font-size: 20px;
}

#archive-button:hover {
  background: rgba(0, 255, 255, 0.2);
  border-color: rgba(0, 255, 255, 1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
  transform: scale(1.1);
}

/* Archive Panel */
#archive-panel {
  position: fixed;
  left: -300px;
  top: 0;
  width: 280px;
  height: 100vh;
  background: rgba(0, 20, 40, 0.95);
  border-right: 2px solid rgba(0, 255, 255, 0.6);
  box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
  transition: left 0.4s ease;
  z-index: 1002;
  overflow-y: auto;
  backdrop-filter: blur(10px);
  visibility: visible;
  opacity: 1;
}

#archive-panel.show {
  left: 0;
}

#archive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.5);
}

#archive-header h3 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  color: #00ffff;
  font-size: 1.2em;
}

#archive-close {
  cursor: pointer;
  font-size: 24px;
  color: #00ffff;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 50%;
  transition: background 0.3s ease;
}

#archive-close:hover {
  background: rgba(255, 0, 0, 0.3);
}

#archive-list {
  padding: 15px;
}

.archive-item {
  padding: 12px 15px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #ffffff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9em;
}

.archive-item:hover {
  background: rgba(0, 255, 255, 0.1);
  border-color: rgba(0, 255, 255, 0.6);
  box-shadow: 0 2px 10px rgba(0, 255, 255, 0.3);
  transform: translateX(5px);
}

.archive-item.current {
  background: rgba(0, 255, 255, 0.2);
  border-color: rgba(0, 255, 255, 0.8);
}

.archive-item-title {
  font-weight: bold;
  margin-bottom: 4px;
}

.archive-item-subtitle {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.7);
}

/* Mobile and Tablet Responsive Design */
@media screen and (max-width: 768px) {
  html, body {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
  }

  body {
    padding: 10px;
    box-sizing: border-box;
  }

  #logo-container {
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
  }
  
  #logo {
    width: 120px;
    height: 105px;
  }

  #news-container {
    max-width: 95%;
    padding: 25px 20px;
    margin: 0 auto;
    border-radius: 10px;
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
  }

  #headline {
    font-size: 1.8em;
    margin-bottom: 15px;
    line-height: 1.2;
  }
  
  #summary {
    font-size: 1em;
    line-height: 1.4;
  }

  #line {
    margin-bottom: 25px !important;
  }

  #news-container a, 
  #news-container a:visited {
    font-size: 0.85em;
  }

  #archive-button {
    bottom: 15px;
    left: 15px;
    width: 45px;
    height: 45px;
    font-size: 18px;
    z-index: 2000;
    position: fixed !important;
  }

  #archive-panel {
    width: 260px;
    left: -280px;
  }

  #archive-header {
    padding: 15px;
  }

  #archive-header h3 {
    font-size: 1.1em;
  }

  #archive-list {
    padding: 12px;
  }

  .archive-item {
    padding: 10px 12px;
    font-size: 0.85em;
  }
}

/* Small Mobile Phones */
@media screen and (max-width: 480px) {
  #logo-container {
    top: 30%;
  }

  #logo {
    width: 100px;
    height: 87px;
  }

  #news-container {
    padding: 20px 15px;
    max-width: 98%;
    max-height: 55vh;
    overflow-y: auto;
    position: relative;
  }

  #headline {
    font-size: 1.5em;
    margin-bottom: 12px;
  }
  
  #summary {
    font-size: 0.9em;
  }

  #line {
    margin-bottom: 20px !important;
  }
}

/* Adjust logo positioning after animation for mobile */
@media screen and (max-width: 768px) {
  /* Override the JavaScript positioning for mobile */
  #logo-container.mobile-positioned {
    top: 15px !important;
    right: 15px !important;
    left: auto !important;
    transform: none !important;
  }
  
  #logo-container.mobile-positioned #logo {
    width: 80px;
    height: 70px;
  }
}

@media screen and (max-width: 480px) {
  #logo-container.mobile-positioned {
    top: 10px !important;
    right: 10px !important;
  }
  
  #logo-container.mobile-positioned #logo {
    width: 60px;
    height: 52px;
  }
}
