/* Testata partita live */
.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;      /* mai andare a capo */
    padding: 5px 5px;
    max-width: 100%;
    margin: 0 auto 10px auto;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    overflow-x: auto;       /* scroll orizzontale se necessario */
}

.team, .scoreboard {
    display: flex;
    flex-direction: column; /* logo sopra nome, punteggio verticale */
    align-items: center;
    flex: 0 0 auto;         /* larghezza minima necessaria per non comprimere troppo */
    margin: 0 5px;
    color:#2a70b8;
}

.team-wrapper {
    display: flex;
    flex-direction: column; /* logo sopra nome */
    align-items: center;
}

.team-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 5px;
    max-width: 20vw; /* scala con larghezza schermo */
}

.team-name {
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    max-width: 20vw;
    word-wrap: break-word;
}

.scoreboard .stadium {
    font-size: 1.0em;
    margin: 10px 10px auto;
}

.scoreboard .datetime {
    font-size: 0.7em;
    color: #666;
    margin: 5px 0;
}

.scoreboard .score {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    margin: 10px 0;

    color: #0077ff; /* blu principale */
    text-shadow: 
        0 0 4px #00aaff,
        0 0 8px #33ccff,
        0 0 12px #99e6ff;
}



/* Ridimensionamento fluido per mobile */
@media (max-width: 500px) {
    .team-logo { width: 60px; height: 60px; }
    .team-name { font-size: 0.8rem; }
    .scoreboard .score { font-size: 2.4rem; }
    .scoreboard .time { font-size: 0.9rem; }
}

@media (max-width: 350px) {
    .team-logo { width: 35px; height: 35px; }
    .team-name { font-size: 0.7rem; }
    .scoreboard .score { font-size: 1.5rem; }
    .scoreboard .time { font-size: 0.8rem; }
}

body {
    font-family: Arial, sans-serif;
    margin:0;
    padding:0;
    background:#f9f9f9;
    background: url("sfondo.jpeg") no-repeat center center fixed;
    background-size: cover;
}

header {
    text-align:center;
    padding:10px;
}

header h1 { margin:0; font-size:20px;}
header h2 { margin:5px 0; font-size:14px;}
header h3 { margin:5px 0; font-size:22px; font-weight:bold;}

.container {
    display:flex;
    flex-direction:column;
    padding:5px;
}

ul {
    list-style:none;
    padding:0;
    margin:10;
    text-align:center
}

li.titolare {
    font-weight:bold;
}



.eventi-tabella th {
    background: #a1acb7;
    color: #d13737;
    padding: 8px;
    text-align: center;
    font-size: 16px;
}

.eventi-tabella {
    width: 100%;
    border-collapse: collapse;
}

.eventi-tabella td {
    padding: 5px 10px;
    font-size: 15px;
    vertical-align: top;
    min-height: 24px;
}

.evento-casa {
    text-align: left;
    width: 50%;
    background: #e4f5ff66;
}

.evento-ospite {
    text-align: right;
    width: 50%;
    background: #e4f5ff66;
}

.time-rosso {
    color: red;
    font-weight: bold;
    font-size: 1.2rem; /* puoi regolare la dimensione */
}

.blink {
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}
.sostituzione {
    line-height: 1.2;
    margin-bottom: 4px;
}

.sostituzione .entrata {
/*    font-weight: bold; */
    color: black;
}

.sostituzione .uscita {
    font-size: 0.9em;
    color: #999;
    margin-left: 20px; /* leggero rientro */
}

.sostituzione .freccia {
    margin-right: 4px;
    color: #555;
}

/* Mobile: impila i due blocchi */
@media (max-width: 500px){
    .formazioni {
        flex-direction: column;
    }
    .team-formation {
        margin-bottom: 10px;
    }
}
.formazioni-wrapper {
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.1); /* sfondo semitrasparente generale */
    padding: 10px;
    border-radius: 10px;
    overflow-x: auto; /* se schermo piccolo scrolla orizzontalmente */
}

.formazione-block li {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 4px;
    color: #fff;
}

.maglia {
    display: inline-block;
    width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    background: rgba(255,255,255,0.2);
    margin-right: 6px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9em;
    color: #ffa33a;
}

.nome {
    flex: 1;
}

.anno {
    font-weight: 300;
    color: #ddd;
    margin-left: 10px;
    font-size: 0.8em; /* leggermente più piccolo */
    font-style: italic; /* inclinato */
}

li.riserve-titolo {
    margin-top: 25px;
    font-style: italic;
    color: #ccc;
    text-decoration: underline;
}

.formazione-block {
    flex: 1 1 50%;
    padding: 10px;
    border-radius: 10px;
    background: rgb(0 0 0 / 48%);
}

.formazione-block h3 {
    text-align: center;
    color: #faffcc;
    font-size: 1.2em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    margin-bottom: 10px;
}

/* Mantieni blocchi affiancati anche su mobile */
@media (max-width: 500px){
    .formazioni-wrapper {
        flex-direction: row; /* sempre affiancati */
        overflow-x: auto;
    }
}
.allenatore .nome {
    font-weight: bold;
    color: #ffa33a; /* dorato per evidenziarlo */
    font-style: normal;
    text-align: left;
    display: block;
    margin-top: 6px;
}
.no-partita-card {
    max-width: 400px;
    margin: 50px auto;
    padding: 25px 20px;
    background: rgba(0,0,0,0.5);
    border-radius: 15px;
    text-align: center;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    font-family: 'Arial', sans-serif;
}

.no-partita-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px #000;
}

.no-partita-card p {
    font-size: 1rem;
    color: #ddd;
    margin: 5px 0;
}

.no-partita-card .icon {
    font-size: 3rem;
    margin-top: 15px;
    animation: bounce 1.2s infinite alternate;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}
.btn-main {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
}

.btn-main:hover {
    background: linear-gradient(135deg, #0056b3, #003f7f);
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.5);
}
.top-bar, .bottom-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #ffe271;  /* azzurro */
    
    height: 30px;
    width: 100%;
    position: fixed;
    left: 0;
    z-index: 1000;
}

.top-bar {
    top: 0;
}

.bottom-bar {
    bottom: 0;
}

.top-bar a, .bottom-bar a {
    color: #4b71b1;
    font-size: 15px;
    text-decoration: none;
}

.top-bar a:hover, .bottom-bar a:hover {
    color: #ff7d00;  /* effetto hover giallo */
}

/* Spazio tra contenuto e barre */
body {
    padding-top: 30px;   /* spazio per top-bar */
    padding-bottom: 30px; /* spazio per bottom-bar */
}
