/* base */
body {
    font-family: Arial;
    margin: 20px;
    background: #f4f6f9;
}
h1 {
    text-align: center;
}

/* card */
.card {
    background: white;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* badge */
.badge {
    display: inline-block;
    background: #eef3ff;
    color: #1a73e8;
    padding: 4px 8px;
    margin-right: 5px;
    border-radius: 8px;
    font-size: 0.85em;
}

.badges {
    margin-bottom: 10px;
}

/* table */
table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}
th:nth-child(1), td:nth-child(1) { width: 8%; }   /* posizione */
th:nth-child(2), td:nth-child(2) { width: 42%; }  /* atleta */
th:nth-child(3), td:nth-child(3) { width: 30%; }  /* società */
th:nth-child(4), td:nth-child(4) { width: 20%; }  /* punti */
table.athlete-points th:nth-child(1), table.athlete-points td:nth-child(1) { width: 30%; }   /* evento */
table.athlete-points th:nth-child(2), table.athlete-points td:nth-child(2) { width: 30%; }  /* data */
table.athlete-points th:nth-child(4), table.athlete-points td:nth-child(3) { width: 20%; }  /* filler */
table.athlete-points th:nth-child(4), table.athlete-points td:nth-child(4) { width: 10%; }  /* posizione */
table.athlete-points th:nth-child(5), table.athlete-points td:nth-child(5) { width: 10%; }  /* punti */
table.couple-points th:nth-child(1), table.couple-points td:nth-child(1) { width: 30%; }   /* evento */
table.couple-points th:nth-child(2), table.couple-points td:nth-child(2) { width: 30%; }  /* data */
table.couple-points th:nth-child(4), table.couple-points td:nth-child(3) { width: 20%; }  /* filler */
table.couple-points th:nth-child(4), table.couple-points td:nth-child(4) { width: 10%; }  /* posizione */
table.couple-points th:nth-child(5), table.couple-points td:nth-child(5) { width: 10%; }  /* punti */
th {
    background: #2c3e50;
    color: white;
    padding: 10px;
}
td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
tr:hover {
    background: #f5f8ff;
}

/* total */
.total-row {
    font-weight: bold;
    background: #f0f3f7;
}
.total-row td {
    text-align: right;
}

/* filters */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
select, input {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* top 3 */
.top1 { background: #ffd700; } /* gold */
.top2 { background: #c0c0c0; } /* silver */
.top3 { background: #cd7f32; } /* bronze */

/* medals */
.gold { background: #ffd70033; }
.silver { background: #c0c0c033; }
.bronze { background: #cd7f3233; }

/* home */
.home-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 6px;
    transition: 0.2s;
}
.home-link:hover {
    background-color: #eaf2ff;
    color: #1a73e8;
}

/* athlete */
.athlete-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 6px;
    transition: 0.2s;
}
.athlete-link:hover {
    background-color: #eaf2ff;
    color: #1a73e8;
}
.athlete-header {
    text-align: center;
    margin-bottom: 20px;
}
.athlete-name {
    font-size: 1.8em;
    font-weight: bold;
}
.athlete-academy {
    color: #666;
    font-style: italic;
}

/* couple */
.couple-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 6px;
    transition: 0.2s;
}
.couple-link:hover {
    background-color: #eaf2ff;
    color: #1a73e8;
}
.couple-header {
    text-align: center;
    margin-bottom: 20px;
}
.couple-name {
    font-size: 1.8em;
    font-weight: bold;
}
.couple-academy {
    color: #666;
    font-style: italic;
}

/* acdemy */
.academy {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

/* event */
.event {
    text-align: left;
    font-weight: 600;
}

/* date */
.date {
    color: #666;
    font-size: 0.85em;
}

/* highlight */
.highlight {
    position: relative;
    box-shadow: inset 0 0 0 2px #1a73e8;
}
.highlight::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(26, 115, 232, 0.08);
    pointer-events: none;
}
.highlight td:first-child {
    border-left: 4px solid #1a73e8;
}

/* position */
.position {
    text-align: center;
}

/* points */
.points {
    text-align: right;
}

/* logo */
.home-title img {
    height: 100px;
    width: auto;
    vertical-align: middle;
}

/* watermark */
.watermark {
    position: fixed;
    bottom: 10px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
    font-size: 0.8em;
    color: #555;
    z-index: 1000;
}

.watermark img {
    height: 28px;
    width: auto;
}

/* effetto hover leggero */
.watermark:hover {
    opacity: 1;
}

/* mobile */
@media (max-width: 600px) {
    .watermark {
        bottom: 5px;
        right: 8px;
        font-size: 0.7em;
    }

    .watermark img {
        height: 22px;
    }
}