/* ==== Reset & Base ==== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', sans-serif;
  background: #f7f9fc;
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3 {
  color: #123860;
  margin-bottom: 1rem;
}

/* ==== Container ==== */
.container, main {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==== Form Elements ==== */
form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label {
  font-weight: 600;
  margin-bottom: 4px;
  color: #333;
}

input[type="text"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border 0.2s, box-shadow 0.2s;
  background: #fff;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49,130,206,0.2);
  outline: none;
}

/* ==== File Inputs ==== */
.file-label {
  margin-top: 10px;
  font-weight: 600;
}

/* ==== Score Grid ==== */
.scores-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

/* ==== Buttons ==== */
button {
  background-color: #3182ce;
  color: white;
  padding: 12px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background-color: #2563eb;
}

/* ==== Links ==== */
a {
  color: #3182ce;
  text-decoration: none;
  font-weight: 500;
  margin-top: 20px;
  display: inline-block;
}

a:hover {
  text-decoration: underline;
}


.archivio-link {
  margin-top: 20px;
  font-size: 1rem;
  background: linear-gradient(135deg, #d9e8ff, #f0f6ff);
  padding: 12px 20px;
  border-radius: 12px;
  display: inline-block;
  color: #2563eb;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(49, 130, 206, 0.25);
  border: 1px solid #a8c4ff;
  cursor: pointer;
  text-align: center;
  user-select: none;
}

.archivio-link:hover,
.archivio-link:focus {
  background: linear-gradient(135deg, #a8c4ff, #c7d9ff);
  box-shadow: 0 6px 15px rgba(49, 130, 206, 0.4);
  color: #1e40af;
  outline: none;
}

/* ==== Flight Details Section ==== */
#flightDetails p {
  margin: 6px 0;
}

.score-list {
  background-color: #edf6ff;
  padding: 15px;
  border-radius: 12px;
  margin-top: 10px;
  font-size: 0.95rem;
}

.score-list span {
  display: inline-block;
  min-width: 110px;
  color: #1a202c;
}

/* ==== Video Section ==== */
#video {
  border-radius: 10px;
  margin-top: 10px;
}

/* ==== Responsive Map ==== */
#map {
  height: 400px;
  border-radius: 12px;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ==== Responsive ==== */
@media (max-width: 600px) {
  .scores-row {
    grid-template-columns: 1fr;
  }

  .container, main {
    margin: 20px;
    padding: 16px;
  }

  h1 {
    font-size: 1.5rem;
  }

  button {
    font-size: 1rem;
    padding: 10px 14px;
  }
}
/* ==== Loading Overlay ==== */
#loadingOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.spinner {
  border: 6px solid #e2e8f0;
  border-top: 6px solid #3182ce;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}