* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-nav {
  width: 100%;
  background-color: #1e1e1e;
  display: flex;
  border-bottom: 1px solid #333;
}

.nav-btn {
  flex: 1;
  text-align: center;
  padding: 16px 0;
  color: #a0a0a0;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.2s, color 0.2s;
}

.nav-btn:hover {
  background-color: #2a2a2a;
  color: #ffffff;
}

.nav-btn.active {
  color: #3b82f6;
  background-color: #181818;
  border-bottom: 3px solid #3b82f6;
}

.content-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 20px;
  width: 100%;
}

.control-panel-main {
  width: 100%;
  max-width: 1100px;
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-group label {
  font-size: 0.95rem;
  color: #b0b0b0;
  min-width: 140px;
  font-weight: 600;
}

select {
  background-color: #2a2a2a;
  color: #ffffff;
  border: 1px solid #444;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

select:focus {
  border-color: #3b82f6;
}

.checkbox-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.model-option {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #2a2a2a;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #3d3d3d;
  font-size: 0.9rem;
}

.model-option input[type="checkbox"] {
  accent-color: #3b82f6;
  cursor: pointer;
}

.time-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #1e1e1e;
  justify-content: center;
  margin-top: 8px;
  padding: 12px 0;
  border-top: 1px solid #2a2a2a;
  border-bottom: 1px solid #333;
  width: 100%;
  max-width: 1100px;
  border: 1px solid #333;
  border-radius: 8px;
}

.time-nav button {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  background-color: #0284c7;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.time-nav button:hover {
  background-color: #0369a1;
}

#forecast-hour-label {
  font-size: 1rem;
  font-weight: bold;
  color: #38bdf8;
  font-family: monospace;
  min-width: 160px;
  text-align: center;
}

.images-container {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.model-card-img {
  width: 100%;
  display: flex;
  justify-content: center;
  background: #181818;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px;
  overflow: hidden;
}

.model-card-img img {
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 100px);
  object-fit: contain;
  border-radius: 4px;
}

.not-available-msg {
  padding: 20px;
  color: #ef4444;
  font-size: 0.9rem;
  text-align: center;
}

.main-footer {
  text-align: center;
  padding: 16px;
  background-color: #1e1e1e;
  border-top: 1px solid #333;
  color: #888;
  font-size: 0.85rem;
}

.main-footer a {
  color: #3b82f6;
  text-decoration: none;
}

.main-footer a:hover {
  text-decoration: underline;
}

#preload-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #3b82f6;
  background-color: transparent;
  color: #3b82f6;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

#preload-btn:hover {
  background-color: #3b82f6;
  color: #ffffff;
}

#preload-btn:disabled {
  border-color: #555;
  color: #888;
  cursor: not-allowed;
  background-color: transparent;
}

.hidden { display: none !important; }

.meteogram-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.95);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.meteogram-modal-content {
  background: #1e293b;
  color: #f8fafc;
  width: 95vw;
  height: 90vh;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.meteogram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #334155;
}

.meteogram-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meteogram-controls input, .meteogram-controls select, .meteogram-controls button {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #fff;
}

.meteogram-controls button {
  background: #2563eb;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 28px;
  cursor: pointer;
}

.meteogram-loading {
  text-align: center;
  padding: 20px;
  font-weight: bold;
  color: #38bdf8;
}

.date-picker-input {
  background-color: #2a2a2a;
  color: #ffffff;
  border: 1px solid #444;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.date-picker-input:focus {
  border-color: #3b82f6;
}

.models-limit-info {
  font-size: 0.85rem;
  color: #aaa;
  margin-left: 10px;
  align-self: center;
}

.model-select-btn.disabled-model {
  background-color: #6b7280; 
  color: #d1d5db; 
  border-color: #4b5563; 
  opacity: 0.7;
}

.model-select-btn.disabled-model:hover {
  background-color: #4b5563; 
}

.meteogram-scroll-container {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  background: #0f172a;
  border-radius: 6px;
  padding: 0;
}

.meteogram-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  color: #f8fafc;
  font-size: 13px;
  text-align: center;
}

.meteogram-table th, 
.meteogram-table td {
  padding: 8px 10px;
  border-right: 1px solid #334155;
  border-bottom: 1px solid #334155;
  white-space: nowrap;
}

.meteogram-table .sticky-col {
  position: sticky;
  left: 0;
  background-color: #1e293b;
  z-index: 20;
  font-weight: bold;
  text-align: left;
  border-right: 2px solid #475569;
}

.meteogram-table thead tr:nth-child(1) td {
  background-color: #1e293b;
  font-weight: bold;
  color: #38bdf8;
}

.meteogram-table thead tr:nth-child(2) td {
  background-color: #1e293b;
  color: #f1f5f9;
}

.meteogram-table thead tr:nth-child(3) td {
  background-color: #1e293b;
  color: #fbbf24;
  font-size: 11px;
}

.meteogram-table tbody tr:nth-child(even) {
  background-color: #131d31;
}

.meteogram-table tbody tr:nth-child(odd) {
  background-color: #0f172a;
}

.meteogram-table td.day-border,
.meteogram-table th.day-border {
  border-left: 2px solid #38bdf8 !important;
}

.daily-card {
  flex: 1;
  text-align: center;
  font-size: 11px;
  border-right: 1px dashed #475569;
  padding: 0 4px;
}

.daily-card .day-title {
  font-weight: bold;
  color: #38bdf8;
  margin-bottom: 2px;
}

.daily-card .temp-range {
  color: #f1f5f9;
}

.daily-card .sun-times {
  color: #fbbf24;
  font-size: 10px;
}

.weather-icons-track {
  position: relative;
  width: 100%;
  height: 25px;
  display: flex;
  pointer-events: none;
  z-index: 10;
  margin-bottom: 5px;
}

.weather-icon-item {
  flex: 1;
  text-align: center;
  font-size: 14px;
}

.weather-icon {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
}

.meteogram-table tbody tr td.night-cell {
  background-color: #0b1120 !important;
  color: #94a3b8;
}

#model-selector-buttons {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.model-select-btn {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
}

.model-select-btn:hover,
.model-select-btn.active {
    background-color: #007bff;
    color: #ffffff;
    border-color: #0056b3;
}

.model-separator {
  display: inline-block;
  width: 3px;
  height: 30px;
  background-color: #475569;
  margin: 0 6px;
  vertical-align: middle;
}
