* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Arial', sans-serif;
  background-color: #f4f6f8;
  color: #333;
}

header {
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
  display: flex;
  align-items: center;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

.header-logo {
  max-height: 50px;
  max-width: 180px;
  width: auto;
  height: auto;
}

.header-title {
  flex: 1;
  text-align: center;
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
}

main {
  flex: 1;
}

.table-container {
  width: 100%;
  max-width: 900px;
  margin: 1rem auto;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

hr {
  margin-top: 4px;
  margin-bottom: 4px;
}

th, td {
  padding: 0.5rem;
  text-align: center;
  border: 1px solid #ddd;
}

th {
  background-color: #0070c0;
  background-image: linear-gradient(90deg, #02adfd, #5642ff);
  
  color: white;
  font-weight: bold;
  text-align: left;
}

th.other {
  background-color: #00a070;
  background-image: linear-gradient(90deg, #96c93d, #00b09b);
}

.section-row td {
  background-color: #e8f2fc;
  font-weight: bold;
  text-align: left;
  color: #00457c;
  border-top: 2px solid #0070c0;
}

.link-button {
  display: flex;
  height: 3rem;
  padding: 0 2px;
  align-items: center;
  border-radius: 4px;
  transition: all 150ms ease-in-out;
  color: #fff;
  line-height: 17px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-decoration: none;
  justify-content: center;
}

.link-button {
  background-image: linear-gradient(45deg, #5642ff, #02edfd);
}

.link-button:hover {
  background-image: linear-gradient(90deg, #02edfd, #5642ff);
  box-shadow: 0 2px 8px -1px rgba(0,0,0,0.3);
}

.link-button.other {
  background-image: linear-gradient(45deg, #00b09b, #96c93d);
}

.link-button.other:hover {
  background-image: linear-gradient(90deg, #96c93d, #00b09b);
}

.link-button.legacy {
  background-image: linear-gradient(45deg, #606060, #c0c0c0);
}

.link-button.legacy:hover {
  background-image: linear-gradient(90deg, #c0c0c0, #606060);
}

.release-notes {
  display: inline-block;
  margin-top: -10px;
  background: #fff;
  border: 1px solid #0070c0;
  border-radius: 3px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  color: #0070c0;
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: all 0.2s ease-in-out;
}

a.release-notes:hover {
  background-color: #0070c0;
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.release-notes.other {
  border: 1px solid #00a070;
  color: #00a070;
}

a.release-notes.other:hover {
  background-color: #00a070;
  color: white;
}

.release-notes.legacy {
  border: 1px solid #707070;
  color: #707070;
}

a.release-notes.legacy:hover {
  background-color: #707070;
  color: white;
}

footer {
  margin-top: auto;
  text-align: center;
  padding: 0.5rem 1rem;
  background-color: #e0e0e0;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  th, td {
    padding: 0.7rem;
    font-size: 0.9rem;
  }

  .header-logo {
    max-height: 40px;
    max-width: 140px;
  }

  .header-title {
    font-size: 1.1rem;
  }
}

.popup {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
}

.popup-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  width: 90%;
  max-width: 1200px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  animation: fadeIn 0.3s ease;
}

.popup-close {
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  color: #0070c0;
  cursor: pointer;
}

.popup-close:hover {
  color: #00457c;
}

.popup pre {
  background-color: #f6f8fa;
  padding: 1rem;
  border-radius: 5px;
  max-height: 60vh;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: Consolas, monospace;
  font-size: 0.9rem;
}

.popup-content.pdf {
  background-color: #fff;
  margin: 3% auto;
  padding: 0.5rem 1rem 1rem;
  border-radius: 8px;
  width: 90%;
  max-width: 1200px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  animation: fadeIn 0.3s ease;
}

.popup-content.pdf h3 {
  text-align: center;
  color: #00457c;
  margin-bottom: 0.5rem;
}

.popup-content.pdf iframe {
  flex: 1;
  width: 100%;
  border: none;
  border-radius: 6px;
}

.popup-close {
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  color: #0070c0;
  cursor: pointer;
}

.popup-close:hover {
  color: #00457c;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
