#profile,
.challenges-table td a:hover,
.profile-details a:hover {
    color: #fff;
}

.challenges-table td a,
.profile-details a {
    text-decoration: none;
    transition: color 0.3s;
}

#profile {
    padding: 20px;
    background-color: rgba(43, 27, 23, 0.8);
}

.user-banner {
    text-align: center;
    margin-bottom: 50px;
    background-image: url('bd_bg_3.jpg');
    background-size: cover;
    background-position: center;
    padding: 50px 20px;
    border: 2px solid var(--bd-red);
    border-radius: 10px;
    position: relative;
}

.card,
.profile-card {
    border: 2px solid var(--bd-red);
}

.user-banner h1 {
    font-size: 3em;
    color: var(--bd-red);
    text-shadow: 2px 2px #000;
    display: inline-flex;
    align-items: center;
}

.user-banner h1 i {
    margin-right: 15px;
    font-size: 1.2em;
    color: var(--bd-red);
}

.profile-card {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 50px;
    background-color: rgba(var(--bd-red-rgb), 0.15);
    border-radius: 10px;
    box-shadow: 0 10px 15px #000;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-details {
    text-align: center;
    margin-bottom: 20px;
}

.profile-details p {
    font-size: 1.3em;
    margin: 10px 0;
}

.profile-details a {
    color: #f7ff00;
}

.stats-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.card {
    background-color: rgba(43, 27, 23, 0.9);
    border-radius: 10px;
    margin: 10px;
    padding: 20px 30px;
    text-align: center;
    width: 230px;
    max-width: 300px;
    transition: 0.3s;
}

.card h3 {
    font-size: 1.5em;
    color: var(--bd-red);
    margin-bottom: 10px;
    font-family: 'Fira Code', monospace;
}

.card p {
    font-size: 2em;
    color: #fff;
    font-family: 'Fira Code', monospace;
}

.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 10px;
}

.progress-circle svg {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-circle circle {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
}

.progress-circle circle:first-child {
    stroke: var(--bd-red);
    opacity: 0.2;
}

.progress-circle circle:nth-child(2) {
    stroke: var(--bd-red);
    stroke-dasharray: 283;
    stroke-dashoffset: calc(283 - (283 * var(--percentage)) / 100);
}

.progress-circle .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-circle .progress-text p:first-child {
    font-size: 1.5em;
    color: var(--bd-red);
}

.progress-circle .progress-text p:last-child,
.stats-bar div::after {
    font-size: 0.9em;
    color: #fff;
    font-family: 'Fira Code', monospace;
}

.submission-stats {
    text-align: center;
    margin-bottom: 50px;
}

.submission-stats h3 {
    font-size: 2em;
    color: var(--bd-red);
    margin-bottom: 20px;
}

.stats-bar {
    display: flex;
    width: 80%;
    max-width: 800px;
    margin: 0 auto;
    height: 30px;
    border: 2px solid var(--bd-red);
    border-radius: 5px;
    overflow: visible;
    position: relative;
}

.fail-bar,
.success-bar {
    text-align: center;
    line-height: 30px;
    color: #fff;
    font-weight: 700;
    position: relative;
}

.success-bar {
    background-color: rgba(0, 128, 0, 0.7);
}

.fail-bar {
    background-color: rgba(128, 0, 0, 0.7);
}

.stats-bar div::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2b1b17;
    padding: 5px 10px;
    border: 1px solid var(--bd-red);
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    white-space: nowrap;
    z-index: 10;
    transition: opacity 0.3s;
}

.stats-bar div:hover::after {
    opacity: 1;
    visibility: visible;
}

.awards-list,
.challenge-list {
    margin-bottom: 50px;
}

.awards-list h3,
.challenge-list h3 {
    font-size: 2em;
    color: var(--bd-red);
    margin-bottom: 20px;
    text-align: center;
}

.awards-table,
.challenges-table {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-collapse: collapse;
    background-color: rgba(43, 27, 23, 0.9);
}

.awards-table th,
.challenges-table th {
    padding: 15px;
    border: 1px solid var(--bd-red);
    color: #fff;
    text-align: center;
    background-color: rgba(var(--bd-red-rgb), 0.15);
    font-size: 1.2em;
    font-family: 'Rajdhani', sans-serif;
}

.awards-table td,
.challenges-table td {
    font-family: Georgia, serif;
    padding: 15px;
    border: 1px solid var(--bd-red);
    color: #fff;
    text-align: center;
}

.awards-table tbody tr:nth-child(2n),
.challenges-table tbody tr:nth-child(2n) {
    background-color: rgba(var(--bd-red-rgb), 0.1);
}

.awards-table tbody tr:hover,
.challenges-table tbody tr:hover {
    background-color: rgba(var(--bd-red-rgb), 0.3);
    transition: 0.3s ease;
    transform: scale(1.01);
}

.challenges-table tbody tr:hover {
    cursor: pointer;
}

.challenges-table td a {
    color: var(--bd-red);
}

.awards-table td i {
    margin-right: 5px;
    font-size: 1.2em;
}

.awards-table td .gold {
    color: gold;
}

.awards-table td .silver {
    color: silver;
}

.awards-table td .bronze {
    color: #cd7f32;
}

@media (max-width: 768px) {
    .user-banner h1 {
        font-size: 2em;
    }

    .profile-card {
        padding: 20px;
    }

    .stats-cards {
        flex-direction: column;
    }

    .card {
        width: 100%;
    }

    .progress-circle {
        margin: 20px 0;
    }

    .awards-table td,
    .awards-table th,
    .challenges-table td,
    .challenges-table th {
        padding: 10px;
    }
}

#submissions {
    text-align: center;
    padding: 80px 20px;
}

#submissions .card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: nowrap;
    max-width: 800px;
    margin: 0 auto;
}

.submission-card {
    width: 250px;
    height: 180px;
    background: linear-gradient(145deg, rgba(var(--bd-red-rgb), 0.15), rgba(43, 27, 23, 0.8));
    border: 2px solid var(--bd-red);
    border-radius: 10px;
    box-shadow: 0 0 10px #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px;
    font-family: Cinzel, serif;
    transition: 0.3s;
    position: relative;
}

.success-card {
    background: rgba(0, 128, 0, 0.15);
    border: 2px solid #22ca22;
    color: #22ca22;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.3), inset 0 0 10px rgba(0, 255, 0, 0.05);
    transition: all 0.3s ease-in-out;
    font-weight: bold;
}

.success-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 18px rgba(0, 255, 0, 0.6), inset 0 0 15px rgba(0, 255, 0, 0.1);
    background: rgba(0, 128, 0, 0.2);
    color: #5fff5f;
}

.failed-card {
    background: linear-gradient(145deg, #5a1d1a, #401211);
    border: 2px solid var(--bd-red);
    color: var(--bd-red);
}

.failed-card:hover {
    box-shadow: 0 0 15px var(--bd-red);
}

.submission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--bd-red);
}

.submission-card.failed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--bd-red);
}

.submission-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px #000;
    color: inherit;
    font-family: 'Rajdhani', sans-serif;
}

.submission-card .percentage {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px #000;
    color: inherit;
    font-family: 'Fira Code', monospace;
}

@media screen and (max-width: 600px) {
    #submissions .card-container {
        flex-direction: column;
        gap: 20px;
    }

    .submission-card {
        width: 90%;
    }
}
