/* File input auto height for manage_leaderboard.html */
.file-input-auto-height {
    height: auto;
}
/* Fallback for profile pictures if image fails to load */
.profile-picture-fallback {
    background-image: url('/static/images/profile/default.jpg');
    background-size: cover;
    background-position: center;
}
/* Custom Styles for Bunvaru Challenge */

/* Base Styles */
body {
    background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
    font-family: 'Roboto', sans-serif;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation Styles */
.navbar-custom {
    background-color: #ff7f50;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: #fff;
}

.navbar-nav .nav-link {
    color: #fff;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-nav .nav-link:hover {
    color: #ffe4b5;
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* Profile Picture Styles */
.profile-picture {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

/* Card Styles */
.card-header {
    background-color: #20b2aa;
    color: #fff;
}

/* Section Titles */
.leaderboard-title,
.section-title {
    margin-top: 20px;
    margin-bottom: 20px;
    color: #20b2aa;
    border-bottom: 3px solid #ff7f50;
    display: inline-block;
    padding-bottom: 5px;
}

/* Table Styles */
.table-responsive {
    max-height: 500px;
    overflow-y: auto;
}

.table thead th {
    background-color: #ff7f50;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Accordion Styles */
.accordion-button {
    background-color: #20b2aa;
    color: #fff;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background-color: #ff7f50;
    color: #fff;
}

.accordion-body {
    background-color: #f8f9fa;
}

/* Button Styles */
.btn-custom {
    background-color: #ff7f50;
    color: #fff;
    border: none;
    transition: background-color 0.3s;
    padding: 8px 16px;
    font-weight: 500;
}

.btn-custom:hover {
    background-color: #e76e3c;
    color: #fff;
}

.btn-primary {
    background-color: #ff7f50;
    border: none;
}

.btn-primary:hover {
    background-color: #e76e3c;
}

/* Footer Styles */
footer {
    background-color: #20b2aa;
    color: #fff;
    padding: 15px 0;
    margin-top: auto;
}

.footer-text {
    margin: 0;
    font-size: 1rem;
}

/* Medal Colors */
.medal-gold {
    color: #FFD700;
}

.medal-silver {
    color: #C0C0C0;
}

.medal-bronze {
    color: #CD7F32;
}

/* Additional Decorative Elements */
.medal-icon {
    font-size: 1.2rem;
    margin-right: 5px;
}

.age-plus {
    font-size: 0.7em;
    color: #6c757d;
    vertical-align: super;
}

/* Upload Container Styles */
.upload-container {
    background-color: #20b2aa;
    padding: 15px;
    border-radius: 5px;
}

.upload-container label {
    color: #fff;
    font-weight: 500;
}

/* Alert Styles */
.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Password Form Styles */
.password-card {
    max-width: 500px;
    margin: auto;
}

.password-header {
    background-color: #20b2aa;
    color: #fff;
    text-align: center;
}

.password-title {
    color: #20b2aa;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff7f50;
    display: inline-block;
    padding-bottom: 5px;
}

/* Medal Achievers Styles */
.medal-section {
    margin-top: 30px;
}

.medal-section h2 {
    color: #20b2aa;
    border-bottom: 3px solid #ff7f50;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

.card-title {
    color: #20b2aa;
}

.list-group-item {
    background-color: #fff;
}

.list-group-item .text-warning,
.list-group-item .text-secondary {
    font-size: 1.2rem;
}

/* Form Styles */
.form-control,
.form-select {
    margin-bottom: 10px;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.4rem;
    }

    .profile-picture {
        width: 30px;
        height: 30px;
    }

    .leaderboard-title,
    .section-title {
        font-size: 1.5rem;
    }

    .accordion-button {
        font-size: 1rem;
    }

    .footer-text {
        font-size: 0.9rem;
    }

    .medal-section h2 {
        font-size: 1.5rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .btn-custom {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Utility Classes */
.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-end {
    justify-content: flex-end;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

.bg-light {
    background-color: #f8f9fa;
}

.p-2 {
    padding: 0.5rem;
}

.rounded {
    border-radius: 0.25rem;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.border-0 {
    border: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.ms-2 {
    margin-left: 0.5rem;
}

.my-4 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.my-5 {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.g-2 {
    gap: 0.5rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error States */
.error {
    color: #dc3545;
    font-size: 0.875em;
}
