* {
  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: 30px;
  width: 100%;
}

.obs-section {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 500px;
}

#taf-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background-color: #0f172a;
  color: #f8fafc;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

#taf-input:focus {
  border-color: #38bdf8;
}

#taf-btn {
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: none;
  background-color: #0284c7;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

#taf-btn:hover {
  background-color: #0369a1;
}

#taf-btn:disabled {
  background-color: #475569;
  cursor: not-allowed;
}

.taf-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1rem;
}

.taf-card {
  background: #1e293b;
  border-radius: 12px;
  padding: 1.25rem;
  color: #f8fafc;
  border: 1px solid #334155;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.taf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #334155;
  padding-bottom: 0.75rem;
}

.taf-title h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #38bdf8;
}

.taf-title span {
  font-size: 0.82rem;
  color: #94a3b8;
}

.taf-validity {
  background: #0f172a;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #334155;
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
}

.taf-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fcst-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fcst-block {
  background: #0f172a;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  border-left: 4px solid #3b82f6;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.fcst-block.becmg {
  border-left-color: #f59e0b;
}

.fcst-block.tempo {
  border-left-color: #ec4899;
}

.fcst-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 0.4rem;
}

.fcst-type-badge {
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-base { background: #1e3a8a; color: #93c5fd; }
.badge-becmg { background: #78350f; color: #fde68a; }
.badge-tempo { background: #831843; color: #fbcfe8; }

.fcst-time-range {
  font-size: 0.82rem;
  color: #94a3b8;
  font-family: monospace;
}

.fcst-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.fcst-item {
  display: flex;
  flex-direction: column;
}

.fcst-label {
  font-size: 0.72rem;
  color: #94a3b8;
}

.fcst-value {
  font-size: 0.95rem;
  font-weight: 600;
}

.cloud-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.cloud-pill {
  background: #1e293b;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.raw-taf {
  font-family: monospace;
  font-size: 0.8rem;
  background: #090d16;
  padding: 0.75rem;
  border-radius: 6px;
  color: #a7f3d0;
  word-break: break-all;
  line-height: 1.4;
}

.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;
}

.taf-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: #0f172a;
  border-radius: 8px;
  border: 1px solid #334155;
  margin-top: 0.5rem;
}

.taf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  white-space: nowrap;
}

.taf-table th,
.taf-table td {
  padding: 0.6rem 0.8rem;
  border: 1px solid #1e293b;
  text-align: center;
}

.taf-table th {
  background-color: #1e293b;
  color: #38bdf8;
  font-family: monospace;
}

.cell-label {
  position: sticky;
  left: 0;
  background-color: #1e293b;
  color: #f8fafc;
  font-weight: bold;
  text-align: left !important;
  z-index: 2;
  min-width: 120px;
}

.taf-table th.cell-label {
  background-color: #0f172a;
  z-index: 3;
}

.cell-change {
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  margin-top: 0.3rem;
  font-size: 0.78rem;
}

.change-tag {
  font-weight: bold;
  font-size: 0.7rem;
  display: block;
}

.cell-change.change-color-0 {
  background-color: rgba(59, 130, 246, 0.15);
  border: 1px dashed #3b82f6 !important;
  color: #93c5fd;
}
.cell-change.change-color-0 .change-tag { color: #60a5fa; }

.cell-change.change-color-1 {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px dashed #ef4444 !important;
  color: #fca5a5;
}
.cell-change.change-color-1 .change-tag { color: #f87171; }

.cell-change.change-color-2 {
  background-color: rgba(234, 179, 8, 0.15);
  border: 1px dashed #eab308 !important;
  color: #fde047;
}
.cell-change.change-color-2 .change-tag { color: #facc15; }

.cell-change.change-color-3 {
  background-color: rgba(34, 197, 94, 0.15);
  border: 1px dashed #22c55e !important;
  color: #86efac;
}
.cell-change.change-color-3 .change-tag { color: #4ade80; }

.cell-change.change-color-4 {
  background-color: rgba(249, 115, 22, 0.15);
  border: 1px dashed #f97316 !important;
  color: #fdba74;
}
.cell-change.change-color-4 .change-tag { color: #fb923c; }

.cell-change.change-color-5 {
  background-color: rgba(236, 72, 153, 0.15);
  border: 1px dashed #ec4899 !important;
  color: #fbcfe8;
}
.cell-change.change-color-5 .change-tag { color: #f472b6; }

.model-title {
    font-weight: bold;
    text-align: center;
    font-size: 1.2rem;
    color: #38bdf8;
    margin-bottom: 12px;
}

label.vedurRun {
    display: block;
    text-align: center;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 600;
}

select.vedurRun {
    display: block;
    margin: 0 auto 16px auto;
    padding: 0.65rem 2.5rem 0.65rem 1rem;

    background-color: #0f172a;
    color: #f8fafc;

    border: 1px solid #334155;
    border-radius: 8px;

    font-size: 0.95rem;
    font-weight: 600;

    cursor: pointer;
    outline: none;

    transition: border-color .2s ease,
                box-shadow .2s ease,
                background-color .2s ease;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    min-width: 180px;

    background-image:
        linear-gradient(45deg, transparent 50%, #38bdf8 50%),
        linear-gradient(135deg, #38bdf8 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px;
    background-repeat: no-repeat;
}

select.vedurRun:hover {
    border-color: #38bdf8;
    background-color: #111c31;
}

select.vedurRun:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

#vedurImage{
    display:block;
    margin:10px auto;
    border-radius:8px;

    width:auto;
    height:auto;

    max-width:90vw;
    max-height:98vh;
}

.simbolos-image{
    width:clamp(180px, 20vw, 300px);
    height:auto;
    display:block;
    margin:10px auto;
    border-radius:8px;
}

.taf-temps {
  display: flex;
  gap: 1.5rem;
  background: #0f172a;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid #334155;
  font-size: 0.9rem;
  font-weight: 600;
}

.temp-max {
  color: #ef4444;
}

.temp-min {
  color: #38bdf8;
}

.cloud-type-badge {
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.cloud-type-badge.cb {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.cloud-type-badge.tcu {
  color: #f97316;
  background: rgba(249, 115, 22, 0.15);
}
