body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
}
.main-header {
    background-color: #004d99;
    color: white;
    padding: 20px;
    text-align: center;
}
.main-header h1, .main-header h2 {
    margin: 0;
}
.navbar {
    display: flex;
    justify-content: center;
    background-color: #333;
    padding: 10px 0;
}
.navbar a {
    color: white;
    padding: 14px 20px;
    text-decoration: none;
    text-align: center;
}
.navbar a:hover {
    background-color: #575757;
}
.container {
    width: 80%;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.main-footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    background-color: #333;
    color: white;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
th {
    background-color: #004d99;
    color: white;
}
tr:nth-child(even) {
    background-color: #f2f2f2;
}
/* Styling untuk Podium */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin: 40px auto;
    height: 300px;
}

.podium-place {
    width: 30%;
    margin: 0 1%;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.podium-place .rank {
    font-size: 3em;
    font-weight: bold;
}

.podium-place .name {
    font-size: 1.4em;
    font-weight: bold;
    margin-top: 10px;
}

.podium-place .team {
    font-size: 1em;
    margin-top: 5px;
    opacity: 0.9;
}

/* Peringkat 1 (Emas) */
.first-place {
    height: 100%;
    background: linear-gradient(145deg, #ffd700, #f0c400);
    order: 2;
}

/* Peringkat 2 (Perak) */
.second-place {
    height: 80%;
    background: linear-gradient(145deg, #c0c0c0, #a9a9a9);
    order: 1;
}

/* Peringkat 3 (Perunggu) */
.third-place {
    height: 60%;
    background: linear-gradient(145deg, #cd7f32, #b8732e);
    order: 3;
}
/* Styling untuk detail di podium */
.podium-detail {
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: bold;
    background-color: rgba(0,0,0,0.2);
    padding: 5px;
    border-radius: 5px;
    display: inline-block;
}
/* Media Query untuk layar dengan lebar maksimal 768px (ukuran HP/Tablet) */
@media screen and (max-width: 768px) {

    /* Membuat header (logo dan teks) tersusun ke bawah */
    .header-content {
        flex-direction: column;
    }

    .header-text {
        text-align: center;
        margin-top: 10px;
    }

    /* Membuat menu navigasi tersusun ke bawah */
    .navbar {
        flex-direction: column;
    }

    .navbar a {
        padding: 10px;
        border-bottom: 1px solid #444;
    }

    /* Agar container tidak terlalu mepet ke tepi layar */
    .container {
        width: 95%;
    }

    /* Agar form di halaman manajemen lebih rapi di HP */
    .management-form input {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* GAYA UNTUK HALAMAN LIVE SCORE CRITERIUM */
.live-container { padding: 15px; }
.sprint-selector-bar {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    text-align: center;
}
#active-sprint-title {
    font-size: 2.5em;
    color: #d9534f;
    margin: 10px 0;
}
.live-criterium-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
}
.live-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}
.live-section h3 {
    margin-top: 0;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}
#athlete_list_container {
    flex-grow: 1; /* Agar list mengisi ruang tersedia */
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px; /* Jarak untuk scrollbar */
}
.athlete-button {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 1.1em;
    text-align: left;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    border-radius: 5px;
    transition: background-color 0.2s, border-color 0.2s;
}
.athlete-button:hover {
    background-color: #e9e9e9;
    border-color: #ccc;
}
.athlete-button.selected {
    background-color: #ffc107;
    color: #333;
    border-color: #f0b400;
    font-weight: bold;
}
#current_sprint_results {
    list-style-type: none;
    padding: 0;
    font-size: 1.2em;
    flex-grow: 1;
}
#current_sprint_results li {
    background-color: #f0f8ff;
    padding: 12px;
    margin-bottom: 8px;
    border-left: 5px solid #004d99;
    border-radius: 5px;
}
.btn-action {
    padding: 12px 18px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    color: white;
}
#save_sprint {
    background-color: #5cb85c;
    font-weight: bold;
}
#undo_last {
    background-color: #f0ad4e;
}

/* CSS untuk HP (Responsif) */
@media screen and (max-width: 992px) {
    .live-criterium-grid {
        grid-template-columns: 1fr; /* Ubah jadi 1 kolom */
    }
    #active-sprint-title {
        font-size: 2em;
    }
}