:root {
  --primary-color: #004AAD;
  --secondary-color: #2c3e50;
  --accent-color: #1abc9c;
  --background-color: #ecf0f1;
  --text-color: #34495e;
  --card-background: #ffffff;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  line-height: 1.6;
}

h1 {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--secondary-color);
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  padding-top: 10px;
  flex-grow: 1;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

label {
  margin-bottom: 10px;
  font-weight: bold;
  color: var(--secondary-color);
}

input[type="text"] {
  padding: 12px;
  border: none;
  border-bottom: 2px solid var(--primary-color);
  font-size: 16px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--card-background);
  transition: border-color 0.3s ease;
}

input[type="text"]:focus {
  border-color: var(--accent-color);
}

button[type="submit"] {
  background-color: var(--primary-color);
  border: none;
  border-radius: 5px;
  color: white;
  font-size: 18px;
  padding: 12px;
  text-align: center;
  width: 100%;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
  background-color: var(--accent-color);
}

.footer {
  text-align: center;
  padding: 20px;
  background-color: var(--secondary-color);
  color: white;
  margin-top: 20px;
}

.footer a {
  color: var(--accent-color);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.disclaimer {
  font-size: 12px;
  color: #bdc3c7;
  margin-top: 10px;
}

.go-back-link {
  position: absolute;
  top: 20px;
  left: 20px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 5px;
  background-color: var(--card-background);
  border: 1px solid var(--primary-color);
  transition: all 0.3s ease-in-out;
  margin-bottom: 20px;
  z-index: 1000;
}

.go-back-link:hover {
  background-color: var(--primary-color);
  color: white;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin-left: -10px;
  margin-right: -10px;
}

.card {
  background-color: var(--card-background);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  flex-basis: calc(50% - 20px);
  margin: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease-in-out;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  /* Add these properties for vertical centering */
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 200px; /* Adjust this value as needed */
  position: relative; /* Add this line */
}

.card:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.card-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.card-description {
  font-size: 14px;
  color: var(--text-color);
  line-height: 1.4;
}

.tag-beta, .tag-deprecated {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  display: inline-block;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.tag-beta {
  background-color: var(--accent-color);
  color: white;
}

.tag-deprecated {
  background-color: #95a5a6;
  color: white;
}


.text-section p {
  margin: 0 0 1rem 0;
  line-height: 1.6;
}

#spinner {
  border: 16px solid #ecf0f1;
  border-top: 16px solid var(--primary-color);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 2s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

pre, code {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 10px;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  overflow-x: auto;
}

.long-url {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (max-width: 800px) {
  h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .container {
    padding: 15px;
    padding-top: 60px;
  }

  .card {
    flex-basis: 100%;
    margin: 10px 0;
  }

  .go-back-link {
    font-size: 14px;
    padding: 6px 12px;
    top: 15px;
    left: 15px;
  }

  input[type="text"], button[type="submit"] {
    font-size: 16px;
  }

  .card-title {
    font-size: 20px;
  }

  .card-description {
    font-size: 13px;
  }

  #spinner {
    width: 40px;
    height: 40px;
    border-width: 8px;
  }
}


/* New styles for the header */
.main-header {
  background-color: var(--card-background);
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.main-header .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.logo-container {
  display: flex;
  align-items: center;
}

.header-logo {
  height: 45px; /* Standardized height */
  width: auto;
  display: block; /* This ensures the image is treated as a block element */
}


.nav-links ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.nav-links li {
  margin-left: 20px;
}

.nav-links a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.go-back-link {
  position: absolute;
  top: 70px; /* Adjusted to be below the fixed header */
  left: 20px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 5px;
  background-color: var(--card-background);
  border: 1px solid var(--primary-color);
  transition: all 0.3s ease-in-out;
  z-index: 999;
}

.go-back-link:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Responsive styles */
@media (max-width: 800px) {
  .main-header .header-container {
    flex-direction: column;
    padding: 10px;
  }

  .logo-container {
    margin-bottom: 10px;
  }

  .nav-links ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links li {
    margin: 5px 10px;
  }

  .header-logo {
    height: 50px;
  }

  .container {
    padding-top: 10px; /* Increased for mobile to accommodate the larger header and go-back link */
  }

  .go-back-link {
    top: 100px; /* Adjusted for mobile */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }
}

/* New styles for the file input and submit button */
input[type="file"] {
    opacity: 0;
    position: absolute;
    z-index: -1;
}

label[for="file-input"] {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

label[for="file-input"]:hover {
    background-color: var(--accent-color);
}

input[type="submit"] {
    background-color: var(--accent-color);
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 18px;
    padding: 12px 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

input[type="submit"]:hover {
    background-color: var(--primary-color);
}

.file-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

#file-upload-text {
    margin-top: 10px;
    color: var(--text-color);
    font-size: 14px;
    text-align: center;
}

.custom-file-label {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.custom-file-label:hover {
    background-color: var(--accent-color);
}
