* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0090d6;
    font-size: 2.2rem;
}

.abstract {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0090d6;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #0090d6;
    box-shadow: 0 0 0 3px #5fbb47;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}

@media (min-width: 980px) {
    .checkbox-group {
        grid-template-columns: 1fr 1fr;
    }
}

.checkbox-item {
    display: block;
    background: #fcfcfc;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 6px 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.checkbox-item > label,
.checkbox-item > input,
.checkbox-item > .tooltip-icon {
    vertical-align: middle;
}

.checkbox-item label {
    font-weight: 600;
    cursor: pointer;
    margin-left: 6px;
}

.subset-control {
    margin: 8px 0 0 26px;
    border-left: 3px solid #00579c;
    padding: 8px 10px;
    background: #f4f9ff;
    border-radius: 5px;
}

.subset-control > div {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.subset-mode-select {
    margin-left: 4px;
    padding: 4px 8px;
    font-size: 0.9rem;
}

.subset-range {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.subset-range-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.subset-range input[type="number"] {
    width: 120px;
    padding: 6px;
    border: 1px solid #c7d5e5;
    border-radius: 5px;
}

.subset-range input[type="range"] {
    width: 100%;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: all;
}

.subset-range input[type="range"]::-webkit-slider-thumb,
.subset-range input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00579c;
    border: 2px solid #fff;
    box-shadow: 0 0 4px rgba(0,0,0,0.25);
    cursor: pointer;
}

.subset-dual-slider {
    width: 100%;
    min-width: 250px;
}

.dual-range-wrapper {
    position: relative;
    width: 100%;
    height: 42px;
    margin-bottom: 10px;
}

.dual-range-track {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #d6eaff;
    z-index: 0;
}

.dual-range-wrapper input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    z-index: 1;
    background: transparent;
    pointer-events: auto;
}

.subset-range-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.subset-range-values-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.subset-range-value {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 600;
}

.subset-range-value {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 600;
}

.subset-range-label {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 600;
}

.subset-control button {
    border: 1px solid #00579c;
    background: #fff;
    color: #00579c;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.subset-control button:hover {
    background: #dbf0ff;
}

.subset-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 4px !important;
    max-height: 200px !important;
    overflow: auto !important;
    padding-right: 4px !important;
}

.subset-grid label {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    font-size: 0.9rem;
}


.url-preview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    font-family: monospace;
    word-break: break-all;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
    background-image: linear-gradient(to right, #e3f2fd, #f5f5f5);
}

.download-btn {
    background-color: #0090d6;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
    background-color: #00579c;
}

.download-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hidden {
    display: none !important;
}

#dataset-info {
    background: #e3f2fd;
    border-left: 4px solid #0090d6;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 6px 6px 0;
}

.tooltip-icon {
    font-size: 0.9em;
    color: #555;
    display: inline-block;
}

.tooltip-icon:hover {
    color: #2c3e50;
}

.variable-description {
    font-size: 0.9em;
    color: #888;
    display: block;
    margin-top: 4px;
    margin-left: 26px;
}


#map-section {
    margin-bottom: 1rem;
}

#map-section .map-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
    flex-wrap: wrap;
}

.small-btn {
    color: #fff;
    background: #0090d6;
    border: 1px solid #00579c;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.small-btn:hover {
    background: #00579c;
}

#map-hint {
    color: #333;
    font-size: 0.85rem;
}


@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

.row-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 768px) {
    .row-grid {
        grid-template-columns: 1fr;
    }
}

#user-name-error {
    margin-top: 5px;
    font-size: 0.9em;
}

.poc-banner {
  background-color: #fff4e5;
  border-bottom: 2px solid #ff9800;
  color: #663c00;
  padding: 14px 20px;
  text-align: center;
  font-size: 0.95rem;
}

.info-links {
    display: flex;
    flex-direction: column;
}


.info-links-title {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.05rem;
    border-bottom: 3px solid #0090d6;
    padding-bottom: 4px;
    margin-bottom: 10px;
    display: inline-block;
}

.logo-section {
  margin-bottom: 30px;
  padding: 20px 0;
  border-bottom: 2px solid #e1e4e8;
}

.logos-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.partner-logo {
  max-height: 80px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.partner-logo:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.logo-caption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  max-width: 250px;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .logos-container {
    justify-content: center;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .logo-section {
    padding: 15px 0;
    margin-bottom: 20px;
  }
  
  .logos-container {
    flex-direction: column;
    gap: 25px;
  }
  
  .logo-item {
    width: 100%;
  }
  
  .partner-logo {
    max-height: 60px;
  }
  
  .logo-caption {
    font-size: 0.8rem;
    max-width: 100%;
  }
}

.subset-card {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  padding: 25px;
  margin-top: 25px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.subset-card .form-group {
  margin-bottom: 18px;
}
.subset-card .info-links,
.subset-card #map-section,
.subset-card .subset-control {
  margin-top: 5px;
}

.button-row {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}

.alt-download-btn {
    flex: 1;
    padding: 14px 10px;
    background: #f8fafc;
    background-image: none !important;
    color: #64748b;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: not-allowed;
    transition: all 0.2s ease;
}

.alt-download-btn:not(:disabled) {
    background: #ffffff;
    background-image: none !important;
    color: #0284c7;
    border-color: #0284c7;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.15);
}

.alt-download-btn:not(:disabled):hover {
    background: #f0f9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(2, 132, 199, 0.2);
}

.alt-download-btn:not(:disabled):active {
    transform: translateY(0);
    background: #e0f2fe;
}

.alt-download-btn[data-tooltip] {
    cursor: help;
}

.alt-download-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 100;
}

.alt-download-btn[data-tooltip]:hover::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
    z-index: 100;
}

.info-links-title.section-title {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.05rem;
    border-bottom: 3px solid #0090d6;
    padding-bottom: 4px;
    margin-bottom: 10px;
    display: inline-block;
}

.info-links-items {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.citation-item {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.citation-label {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

#citation-doi-link {
    word-break: break-all;
    color: #00579c;
    text-decoration: underline;
}

#citation-doi-link:hover {
    color: #0090d6;
}

@keyframes citationHighlight {
    0% { background-color: #fff3cd; border-radius: 4px; }
    100% { background-color: transparent; }
}

.citation-highlight {
    animation: citationHighlight 1.5s ease-out;
    display: inline-block;
    padding: 2px 4px;
}

.download-button-group {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background-color: #f8fafc;
    width: 100%;
}

#download-buttons-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.info-column {
    flex: 0 1 calc(66.666% - 10px);
    display: flex;
    flex-direction: column;
    gap: 5px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.info-item {
  font-size: 0.9em;
  color: #555;
  word-break: break-word;
  white-space: normal;
}

.info-item a {
  color: #00579c;
  text-decoration: underline;
}

.info-item a:hover {
  color: #0090d6;
}

.download-button-group button {
    flex: 0 0 calc(33.333% - 10px);
    padding: 14px 10px;
    background: #f8fafc;
    background-image: none !important;
    color: #64748b;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: not-allowed;
    transition: all 0.2s ease;
    margin: 0;
    box-sizing: border-box;
}

.download-button-group button:not(:disabled) {
    background: #ffffff;
    background-image: none !important;
    color: #0284c7;
    border-color: #0284c7;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.15);
}

.download-button-group button:not(:disabled):hover {
    background: #f0f9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(2, 132, 199, 0.2);
}

.download-button-group button:not(:disabled):active {
    transform: translateY(0);
    background: #e0f2fe;
}

@media (max-width: 768px) {
    .download-button-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .download-button-group button {
        flex: 1;
        width: auto;
    }

    .info-column {
        flex: 1;
        width: auto;
        align-items: flex-start;
    }
}

.mp-download-btn {
    display: block;
    width: 100%;
    padding: 14px 10px;
    background: #ffffff;
    background-image: none !important;
    color: #0284c7;
    border: 2px solid #0284c7;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.15);
    transition: all 0.2s ease;
    margin: 0;
    text-align: center;
}

.mp-download-btn:hover {
    background: #f0f9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(2, 132, 199, 0.2);
}

.mp-download-btn:active {
    transform: translateY(0);
    background: #e0f2fe;
}