/* General Body & Container Styling */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.07);
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header and Navigation Bar */
.main-header {
    background-color: #1A1A1A;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo img {
    height: 45px; /* Sedikit lebih kecil di mobile */
    width: auto;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: #fff;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 0.9em; /* Ukuran font disesuaikan */
}

.nav-links a:hover {
    color: #00BFFF;
    text-decoration: none;
}

.nav-links a.nav-button {
    background-color: #00BFFF;
    color: #1A1A1A;
    padding: 8px 15px;
    border-radius: 20px;
}

/* Main Content Wrapper */
.main-content {
    padding: 10px;
}

/* Form Styling */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
fieldset { border: 1px solid #ddd; padding: 20px; border-radius: 8px; margin-bottom: 20px; }
legend { padding: 0 10px; font-weight: 700; }
button { background-color: #007bff; color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 1em; }
button:hover { background-color: #0056b3; }

/* Table Styling */
.user-table { display: block; overflow-x: auto; white-space: nowrap; width: 100%; border-collapse: collapse; margin-top: 20px; }
.user-table th, .user-table td { border: 1px solid #ddd; padding: 12px; text-align: left; }
.user-table th { background-color: #f2f2f2; font-weight: 700; }
.user-table tr:nth-child(even){ background-color: #f9f9f9; }
.user-table a.delete { color: #dc3545; }

* Athlete Profile Styling */
.profile-container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: flex-start; }
.profile-header { text-align: center; margin-bottom: 20px; }
.profile-header img {
    width: 150px;
    height: 150px;
    border-radius: 8px; /* Kotak dengan sudut melengkung, bukan elips */
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.main-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; text-align: center; margin-bottom: 20px; }
.stat-item { background: #f9f9f9; padding: 15px; border-radius: 8px; }
.stat-item h4 { margin: 0 0 5px 0; color: #555; font-size: 0.8em; }
.stat-item p { margin: 0; font-size: 1.3em; font-weight: 700; color: #00BFFF; }
.compare-form { background: #f0f8ff; padding: 10px; border-radius: 8px; text-align: center; margin-top: 20px; font-size: 0.9em; }
.compare-form label, .compare-form select, .compare-form button { margin-bottom: 5px; display: block; width: 100%; box-sizing: border-box; }
.comparison-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 5px; font-size: 0.9em; }
.comparison-grid .vs { font-size: 1.2em; font-weight: bold; color: #ccc; }
.comparison-value.athlete2 { color: #E53935 !important; }
.chart-container { position: relative; width: 100%; min-height: 400px; }

/* Styling untuk bagian baru */
.trophy-case h2, .performance-chart h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    /* ... (semua kode @media dari sebelumnya tetap sama) ... */
    .profile-container { grid-template-columns: 1fr; }
    .chart-container { margin-top: 30px; height: 50vh; }
    .main-stats { grid-template-columns: 1fr; }
}

/* =========================================== */
/* MEDIA QUERY FOR MOBILE DEVICES (RESPONSIVE) */
/* =========================================== */
@media (max-width: 992px) {
    .profile-container {
        grid-template-columns: 1fr; /* Stack profile info and chart vertically */
    }
    .chart-container {
        height: 50vh; /* Adjust chart height for mobile */
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    .nav-links a {
        display: block;
        padding: 10px;
        border-bottom: 1px solid #333;
    }
    .nav-links a.nav-button {
        border-radius: 0;
        margin-top: 10px;
    }
    .main-stats {
        grid-template-columns: 1fr; /* Stack stats vertically */
    }
}