
:root {
  --header-height: 60px;
  --footer-height: 40px;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  background-repeat: repeat;
  background-size: cover; /* Changed back to cover for better filling */
  color: #FFD700;
  font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  padding-bottom: var(--footer-height);
}

.suggestion {
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.suggestion:hover {
  background-color: #eee;
}
header, footer {
  background: #0b0f2a;
  padding: 15px;
  text-align: center;
}

footer {
  padding: 10px;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--footer-height);
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  box-shadow: var(--shadow-glow);
  z-index: 100;
  box-sizing: border-box;
  text-align: center;
}

footer p {
  font-size: 0.8em;
  color: #999;
  margin-top: 5px;
}
nav a {
  color: #f3f3f3;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
}
main {
  padding: 40px 20px;
  text-align: center;
}
table {
  border: 2px solid #FFFF00;
  box-shadow: 0 0 15px #FFFF00;
  width: 100%;
  max-width: 1000px;
  margin: 20px auto;
  border-collapse: collapse;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}
th, td {
  border: 1px solid #FFFF00;
  box-shadow: 0 0 5px #FFFF00;
  padding: 12px;
  text-align: center;
}
th {
  background-color: #162447;
  color: #ffffff;
}
select, input, button {
  transition: all 0.3s ease;
  padding: 10px;
  margin: 5px;
  background-color: #1c2e4a;
  color: #ffffff;
  border: 1px solid mistyrose;
  border-radius: 6px;
  font-size: 14px;
}
button:hover {
  transform: scale(1.05);
  background-color: #FFD700;
  color: #0b0f2a;
  box-shadow: 0 0 10px #FFFF00;
}

#kp-summary a:hover .kp-icon {
  text-shadow: 0 0 10px #FFD700;
}

/* Background watermark removed */

/* Style for weather icons in hourly forecast */
#hourlyTable svg {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  display: inline-block;
}

/* Ensure SVG icons are visible */
#hourlyTable span[title] svg {
  display: inline-block;
  margin: 0 auto;
}

/* Print styles - make all text black for better visibility when printed */
@media print {
  /* Override all colors to black for printing */
  body {
    background: white !important;
    color: black !important;
  }
  
  /* General table styles for print */
  table, th, td {
    border-color: black !important;
    color: black !important;
    background-color: white !important;
    box-shadow: none !important;
  }
  
  /* Specific hourly forecast styles for print */
  #hourlyTableBlock, #hourlyTable {
    color: black !important;
    background-color: white !important;
  }
  
  #hourlyTable th,
  #hourlyTable td {
    color: black !important;
    border: 1px solid black !important;
    background-color: white !important;
    box-shadow: none !important;
  }
  
  #hourlyTable .wind-value {
    color: black !important;
    background-color: white !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  
  #hourlyTableBlock h2 {
    color: black !important;
    text-shadow: none !important;
  }
  
  /* Make sure all text in the hourly forecast is black */
  #hourlyTable * {
    color: black !important;
  }
  
  /* Weather icons should be visible */
  #hourlyTable span[title] {
    color: black !important;
    text-shadow: none !important;
  }
  
  /* Use the data-print-icon attribute to display text instead of emoji for better printing */
  #hourlyTable span[data-print-icon]::before {
    content: attr(data-print-icon);
    display: inline-block;
    color: black !important;
    font-weight: bold;
  }
  
  #hourlyTable span[data-print-icon] {
    font-size: 0 !important; /* Hide the emoji */
  }
  
  /* Hide SVG icons when printing and show text instead */
  #hourlyTable span[data-print-icon] svg {
    display: none;
  }
  
  /* Ensure proper table layout for printing */
  @page {
    size: landscape;
  }
  
  #hourlyTable {
    border-collapse: collapse !important;
    width: 100% !important;
    margin: 20px 0 !important;
    page-break-inside: avoid !important;
  }
  
  #hourlyTable th,
  #hourlyTable td {
    border: 1px solid black !important;
    padding: 8px !important;
    text-align: center !important;
  }
}

/* Footer Styles */
.footer-container {
  background: var(--card-bg, rgba(28, 46, 74, 0.8));
  border-top: 1px solid var(--card-border, rgba(255, 215, 0, 0.3));
  margin-top: 30px;
  padding: 20px; /* Restored to original value */
  text-align: center;
  box-shadow: var(--shadow-glow, 0 0 15px rgba(255, 215, 0, 0.5));
}

.footer-sections {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px; /* Restored to original value */
}

.footer-section {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.footer-section h3 {
  color: var(--primary-color, #FFD700);
  font-size: 1.1em;
  margin-bottom: 10px;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.footer-links a {
  color: var(--text-light, #ffffff);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
  background: rgba(28, 46, 74, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.footer-links a:hover {
  background: var(--primary-color, #FFD700);
  color: var(--secondary-dark, #162447);
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.footer-attribution {
  font-size: 0.9em;
  color: var(--primary-color, #FFD700);
  margin-top: 15px; /* Restored to original value */
}

.footer-attribution a {
  color: var(--accent-color, #00c6ff);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-attribution a:hover {
  text-decoration: underline;
  text-shadow: 0 0 5px rgba(0, 198, 255, 0.5);
}

.footer-copyright {
  font-size: 0.8em;
  color: #999;
  margin-top: 10px; /* Restored to original value */
}

/* Responsive footer adjustments */
@media (max-width: 768px) {
  .footer-sections {
    flex-direction: column;
    align-items: center;
  }
  
  .footer-section {
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
  }
}

/* Print styles for footer */
@media print {
  .footer-container {
    background: none !important;
    border-top: 1px solid #000 !important;
    box-shadow: none !important;
    color: #000 !important;
  }
  
  .footer-section h3,
  .footer-attribution,
  .footer-copyright {
    color: #000 !important;
    text-shadow: none !important;
  }
  
  .footer-attribution a {
    color: #000 !important;
    text-decoration: underline !important;
  }
}

/* Navigation Header */
.nav-header {
  background: var(--card-bg, rgba(28, 46, 74, 0.8));
  border-bottom: 1px solid var(--card-border, rgba(255, 215, 0, 0.3));
  box-shadow: var(--shadow-glow, 0 0 15px rgba(255, 215, 0, 0.5));
  padding: 15px;
  height: var(--header-height);
  width: 100%;
  box-sizing: border-box;
  animation: fade-in 0.5s ease-out;
  transition: all 0.3s ease;
  outline: none; /* Remove default focus outline */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* Style for focused header */
.nav-header:focus {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  border-bottom: 1px solid var(--primary-color, #FFD700);
}

/* Removed scrolled class - header stays fixed */

.nav-links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
}

.header-selectors {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.header-selectors .form-group {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-selectors .form-group label {
  font-size: 0.9em;
  color: #FFD700;
  white-space: nowrap;
  margin: 0;
}

.header-selectors .form-group select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 4px;
  color: #FFD700;
  padding: 4px 8px;
  font-size: 0.85em;
  min-width: 120px;
}

.header-selectors .form-group select:focus {
  outline: none;
  border-color: #FFD700;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.header-selectors .form-group select option {
  background: rgba(28, 46, 74, 0.9);
  color: #FFD700;
}

.language-icon {
  font-size: 1.1em;
  margin-right: 5px;
}

.nav-link {
  color: var(--primary-color, #FFD700);
  text-decoration: none;
  padding: 2px 15px;
  border-radius: 7px;
  border: 1px solid var(--card-border, rgba(255, 215, 0, 0.3));
  background: var(--secondary-color, #1c2e4a);
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
  display: inline-flex;
  align-items: center;
}

.nav-link:hover {
  background: var(--primary-color, #FFD700);
  color: var(--secondary-dark, #162447);
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments for navigation header */
@media (max-width: 768px) {
  .nav-header {
    padding: 8px 10px;
    flex-direction: column;
    gap: 8px;
    min-height: auto;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 100%;
  }
  
  .nav-link {
    text-align: center;
    margin-bottom: 5px;
  }
  
  .header-selectors {
    justify-content: center;
    width: 100%;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .header-selectors .form-group {
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }
  
  .header-selectors .form-group select {
    min-width: 100px;
    font-size: 0.8em;
  }
  
  .container {
    margin-top: calc(var(--header-height) + 20px); /* Reduced margin for better spacing */
  }
  
  .nav-header {
    padding: 10px; /* Slightly reduced padding on mobile */
    height: auto; /* Allow header to expand on mobile */
    min-height: var(--header-height);
  }
}

/* Print styles for navigation header */
@media print {
  .nav-header {
    display: none;
  }
  
  .container {
    margin-top: 0; /* Reset the top margin for printing */
  }
}
