body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f7fb;
}

.prediction-section {
  padding: 60px 20px;
}

.container {
  max-width: 1100px;
  margin: auto;
}

h1 {
  text-align: center;
  margin-bottom: 40px;
  color: #003f9e;
}

.nickname-box {
  text-align: center;
  margin-bottom: 40px;
}

.nickname-box input {
  padding: 12px 20px;
  width: 300px;
  border-radius: 30px;
  border: 1px solid #ccc;
  font-size: 16px;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colonne */
    gap: 20px;
    margin-top: 20px;
}

.match-card {
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: #000;
    transition: transform 0.2s, box-shadow 0.2s;
}

.match-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.match-card .flag {
    font-size: 1.4em;       /* leggermente più grande della scritta */
    margin-right: 6px;      /* piccolo spazio tra bandiera e nome */
    vertical-align: middle;
}

/* Colori sobri per i diversi percorsi */
.match-card.path-A { background-color: #c0d6e4; } /* azzurro tenue */
.match-card.path-B { background-color: #d6e3c4; } /* verde oliva chiaro */
.match-card.path-C { background-color: #f2e5c8; } /* sabbia chiaro */
.match-card.path-D { background-color: #e6d6f0; } /* lavanda chiaro */

.teams {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    margin-bottom: 10px;
}

.team {
    font-weight: bold;
}

.score-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.score-inputs input {
    width: 50px;
    text-align: center;
    font-size: 16px;
    padding: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
}
.match-card h3 {
  margin: 0 0 10px;
  color: #002b7f;
}

.match-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}





.submit-box {
  text-align: center;
  margin-top: 40px;
}

.submit-box button {
  padding: 14px 40px;
  border-radius: 40px;
  border: none;
  background: #0057b8;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.submit-box button:hover {
  background: #003f9e;
}

.message {
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
  color: #c0392b;
}
.path-A { border-top: 6px solid #0057b8; }
.path-B { border-top: 6px solid #009688; }
.path-C { border-top: 6px solid #e67e22; }
.path-D { border-top: 6px solid #c0392b; }
.points-box {
  margin: 60px 0;
  padding: 40px;
  background: linear-gradient(160deg, #002b7f, #0057b8);
  border-radius: 20px;
  color: #fff;
  text-align: center;
}

.points-box h2 {
  margin-bottom: 40px;
  font-size: 26px;
}

.points-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.point-card {
  background: rgba(255,255,255,0.1);
  padding: 30px 20px;
  border-radius: 16px;
  width: 250px;
  backdrop-filter: blur(6px);
  transition: 0.2s;
}

.point-card:hover {
  transform: translateY(-5px);
}

.point-number {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 15px;
}

.exact .point-number {
  color: #00ffcc;
}

.winner .point-number {
  color: #ffffff;
}

.zero .point-number {
  color: #ff6b6b;
}

.point-card h3 {
  margin-bottom: 10px;
}

.point-card p {
  font-size: 14px;
  opacity: 0.9;
}
.summary-box {
  margin: 40px 0;
  padding: 20px 30px;
  background: #f0f8ff; /* azzurro chiaro */
  border-radius: 12px;
  color: #003366;
}

.summary-box h2 {
  margin-bottom: 20px;
}

.summary-cards {
  display: grid;
  gap: 15px;
}

.summary-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-radius: 12px;
  background: #e6f0ff; /* colore di default, può cambiare col path */
  font-weight: 500;
}

.summary-card.path-A { background: #d0e7ff; }
.summary-card.path-B { background: #c0dcff; }
.summary-card.path-C { background: #b0d1ff; }
.summary-card.path-D { background: #a0c6ff; }

.summary-team {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-team img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 2px;
}

.summary-score {
  font-weight: bold;
  font-size: 16px;
}
.nickname-error {
    color: #c00;
    font-size: 0.9em;
    margin-top: 5px;
}
/* Messaggio di errore sotto il nickname */
.error-message {
    color: #ff4d4f;           /* Rosso vivo per evidenziare l'errore */
    background: #fff0f0;      /* Sfondo leggermente rosato */
    border: 1px solid #ff4d4f;
    padding: 6px 10px;
    border-radius: 6px;
    margin-top: 6px;
    font-size: 14px;
}

/* Input nickname con bordo rosso se c'è errore */
input#nickname.error {
    border: 2px solid #ff4d4f;
    outline: none;
}

.confirmation-box {
    text-align: center;
    background-color: #e6f2ff;       /* azzurro chiaro sobrio */
    border-radius: 12px;
    padding: 30px 20px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.confirmation-box h3 {
    color: #0072c6;                   /* azzurro Italia più deciso */
    margin-bottom: 15px;
}

.confirmation-box p {
    margin: 8px 0;
    font-size: 16px;
}

.btn-return {
    display: inline-block;
    padding: 10px 25px;
    background-color: #0072c6;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    margin-top: 15px;
    transition: 0.3s;
}

.btn-return:hover {
    background-color: #005a99;
}
.confirmation-card {
    max-width: 560px;
    margin: 60px auto;
    padding: 40px 35px;
    background: linear-gradient(135deg, #f4fbf9, #e8f5f2);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    text-align: center;
    animation: fadeIn 0.6s ease-in-out;
}

.success-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.confirmation-card h2 {
    margin-bottom: 15px;
    color: #0d3c30;
    font-size: 22px;
}

.confirmation-text {
    font-size: 16px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.reminder-text {
    font-size: 15px;
    background: rgba(13, 60, 48, 0.06);
    padding: 18px;
    border-radius: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #1b5e4b;
}

.classifica-button {
    display: inline-block;
    padding: 12px 28px;
    background: #0d3c30;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.classifica-button:hover {
    background: #145c48;
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.highlight-link {
    font-weight: 600;
    color: #0d3c30;
    text-decoration: underline;
}
.podio {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
}

.podio-item {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    background: #f4f4f4;
    width: 140px;
}

.medaglia {
    font-size: 40px;
}

.classifica-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    margin: 5px auto;
    max-width: 500px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.hidden {
    display: none;
}