.athlete-header {
    border-radius: 16px;
    background: linear-gradient(90deg, #14559B 0%, #090F1D 80.77%);
    box-shadow: 0 0 2px 0 #FFF;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.athlete-image {
    width: 120px;       
    height: 120px;      
    border-radius: 50%; 
    object-fit: cover; 
    display: block;
}

.athlete-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.athlete-name h1 {
    margin: 0;
    color: var(--WF-Base-300, #E2E7F0);
    font-size: 50px;
    font-style: normal;
    letter-spacing: 0.6px;
}

.country {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--WF-Text-Muted);
}

.country img {
    width: 20px;
}

.athlete-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-row {
    display: flex;
    gap: 10px;
}

.stat {
    position: relative;
    width: 100px;
    height: 50px;

    padding-left: 8px;
    padding-right: 8px;

    border-radius: 12px;
    background: #1B1D32;
    box-shadow: 0 0 2px 0 #FFF;

    display: flex;
    align-items: center;
}

.stat-icon {
    height: 30px;
    flex-shrink: 0;
}

.stat-value {
    position: absolute;

    left: calc(
        8px +            
        30px +         
        10px             
    );
    right: 8px;        

    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2px;

    font-size: 24px;
    font-weight: 600;
    color: #CBD2E0;
}

.stat-value small {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.5;
}

#birthdate{
    width:120px;
}

.fav {
    border: none;
    position: relative;
    width: 50px;
    height: 50px;

    border-radius: 8px;
    background: #1B1D32;
    box-shadow: 0 0 2px 0 #FFF;

    display: flex;
    align-items: center;
    cursor: pointer;
    justify-content: center;
    align-self: flex-end;
}

.fav img {
    width: 35px;
}

.grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr; 
    gap: 24px;
    height: 960px; 
}

.card.ratings { grid-row: 1; grid-column: 1; }
.card.cards   { grid-row: 2; grid-column: 1; }

.right-column {
    display: grid;
    grid-template-rows: repeat(3, 1fr); 
    gap: 24px;
    grid-row: 1 / span 2; 
}

.card {
    background: var(--WF-Base-900);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 0 2px 0 #FFF;
}

.card h2{
    color: #5FA9EE;
    font-size: 25px;
    font-style: normal;
    font-weight: 700;
    line-height: 130%; 
    margin : 0;
}

.cards-season {
    display: flex;
    flex: 1;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.cards-season img {
    max-width: 250px; 
    height: auto;
    border-radius: 6px;
}

.cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cards-dots {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: auto;
}

.cards-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--WF-Base-500);
    opacity: 0.4;
    cursor: pointer;
}

.cards-dots span.active {
    background: #f5c400;
    opacity: 1;
}

.card-img {
    position: relative; 
    display: inline-block; 
    border-radius: 6px;
    overflow: hidden; 
}

.card-img img {
    width: 100%;
    display: block;
    border-radius: 6px;
}

.card-label {
    position: absolute;
    inset: 0; 
    background: rgba(0,0,0,0.65);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card-img:hover .card-label {
    opacity: 1;
}

overall-bar span {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
}

.card.ratings {
    position: relative;           
    display: flex;
    flex-direction: column;
    align-items: center;          
    justify-content: center;      
    padding-left: 10%;            
    padding-right: 10%;
    min-height: 300px;           
    box-sizing: border-box;
}

.card.ratings h2 {
    position: absolute;           
    top: 16px;                    
    left: 16px;                  
    margin: 0;
}

.cards-season-label {
    bottom: 12px;
    left: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--WF-Text-Muted);
    letter-spacing: 0.5px;
}

.rating-container {
    width: 100%;                  
}

.ratings-columns {
  display: flex;
  gap: 60px; 
}

.category-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.group-title {
  font-size: 20px;
  font-weight: 800;
  color:white;
}

.group-value {
  font-size: 22px;
  font-weight: 800;
  color: #ffcc00;
}

.progress {
  position: relative;
  height: 12px;
  border-radius: 8px;
  background: #333;
}

.progress-fill {
  background: #ffcc00;
  width: 0%;
  height: 100%;
  border-radius: 8px;
  transition: width 0.5s ease;
}

.sub-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
}

.overall-rating {
    width: 70%;
    margin: 0 auto 64px auto; 
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.overall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.overall-title {
    font-size: 24px;
    font-weight: 800;
    color: white;
}

.overall-value {
    font-size: 24px;
    font-weight: 800;
}

.overall-progress {
    height: 14px; 
}

.ratings-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    opacity: 0.9;
    position: relative;
    bottom: -50px;
}

.best-rating {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 180px;
}

.best-title {
    font-size: 12px;
    color: var(--WF-Text-Muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.best-value {
    font-size: 18px;
    font-weight: 700;
}

.best-progress {
    height: 4px;
    width: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.best-progress-fill {
    height: 100%;
    border-radius: 4px;
    opacity: 0.8;
}

.rating-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    text-align: right;
    max-width: 320px;
}

.trend-icon {
    height: 25px;
}

.trend-text {
    font-size: 13px;
    color: var(--WF-Text-Muted);
}

.prize-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.prize-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    background: #1B1D32;
    box-shadow: 0 0 2px 0 #FFF;
    padding: 10px;
    cursor: pointer;
}

.prize-item img {
    width: 24px;
    height: 24px;
}

.prize-item .value {
    font-size: 18px;
    font-weight: 600;
}

.prize-item .label {
    font-size: 12px;
    opacity: 0.7;
}

.modal-prize {
    width: 720px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-prize-section {
    margin-top: 20px;
}

.modal-prize-section h4 {
    margin-bottom: 10px;
    font-size: 14px;
    opacity: 0.7;
}

.modal-prize-section .prize-grid {
    grid-template-columns: repeat(4, 1fr);
}

.modal {
    position: fixed;       
    inset: 0;              
    background: rgba(0,0,0,0.5); 
    display: none;        
    justify-content: center;
    align-items: center;
    z-index: 1000;         
}

.modal.open {
    display: flex;
}

.modal-content {
    background: var(--WF-Base-900);
    border-radius: var(--radius);
    padding: 24px;
    max-height: 80vh;
    overflow-y: auto;
    width: 720px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.similar-top {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.similar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1B1D32;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
}

.similar-photo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.similar-info {
    flex: 1;
}

.similar-name {
    font-size: 14px;
    font-weight: 600;
}

.similar-nation {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.7;
}

.similar-nation img {
    width: 16px;
}

.similar-score {
    font-size: 14px;
    font-weight: 700;
}

.similar-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.similar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1B1D32;
    border-radius: 12px;
    padding: 10px;
}

.similar-bar {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.similar-bar-fill {
    height: 100%;
    border-radius: 8px;
}

.score-elite { color: #006400; }
.score-great { color: #008000; }
.score-verygood { color: #9ACD32; }
.score-good { color: #FFD700; }
.score-ok { color: #FFA500; }
.score-low { color: #cd1800; }

.bar-elite { background-color: #006400; }
.bar-great { background-color: #008000; }
.bar-verygood { background-color: #9ACD32; }
.bar-good { background-color: #FFD700; }
.bar-ok { background-color: #FFA500; }
.bar-low { background-color: #cd1800; }

#statsRadar {
    margin-top: 16px;
    width: 100%;
    height: 260px;
    max-height: 260px;
}

.modal-stats {
    width: 1100px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 50%;  
    vertical-align: middle;
    margin-right: 6px;
    cursor: pointer;
    appearance: none; 
    border: 2px solid #ccc;
    position: relative;
}

.color-checkbox:checked {
    background-color: currentColor; 
    border-color: currentColor;
}

.stats-toggles {
    padding-bottom: 15px;
}

.stats-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stats-block {
    background: #1B1D32;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 0 2px #fff;
}

.stats-block.large {
    position: relative;
}

#statsRadarModal {
    height: 300px;
    max-height: 300px;
}

#skiShootCanvas {
    height: 350px;
    max-height: 350px;
}

#shootCanvas {
    height: 350px;
    max-height: 350px;
}

#rankingCanvas {
    height: 300px;
    max-height: 300px;
}


/* === RESPONSIVE === */
@media (max-width: 1240px) {
    .grid {
        grid-template-rows: auto; 
        height: auto;   
    }

    .card.ratings {
        min-height: 400px;
    }

    .card.ratings h2 {
        font-size: 20px;  
    }

    .overall-title {
        font-size: 20px; 
    }

    .overall-value {
        font-size: 20px;  
    }

    .ratings-columns {
        gap: 10px; 
    }

    .category-row {
        font-size: 14px; 
    }

    .progress {
        height: 10px; 
    }

    .overall-progress {
        height: 12px; 
    }

    .ratings-footer {
        bottom: -10px; 
    }

}



@media (max-width: 768px) {
    .athlete-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
        gap: 16px;
    }

    .athlete-info {
        flex-direction: column;
        gap: 12px;
    }

    .athlete-name h1 {
        font-size: 32px;
    }

    .athlete-stats {
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
    }

    .stats-row {
        flex-direction: column;
        gap: 8px;
    }

    .stat {
        width: 100%;
        justify-content: center;
        gap: 12px;
    }

    .stat-value{
        display: flex;
        justify-content: center;
        align-items: flex-end;
        gap: 2px;
        font-size: 24px;
        font-weight: 600;
        color: #CBD2E0;
        left: 0px;
        right: 0px;
        position: relative;
    }

    .grid {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        gap: 16px;
        height: auto;
        grid-template-rows: auto; 
    }

    .right-column {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .ratings-columns {
        flex-direction: column;
        gap: 16px;
    }

    .card.ratings {
        min-height: 500px;
    }

    .overall-rating {
        width: 100%;
        margin-bottom: 32px;
    }

    .cards-season img {
        max-width: 100%;
    }

    .cards-dots {
        justify-content: center;
    }

    .modal-prize,
    .modal-stats {
        width: 95%;
        padding: 16px;
    }

    #statsRadarModal,
    #skiShootCanvas,
    #shootCanvas,
    #rankingCanvas {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .athlete-name h1 {
        font-size: 24px;
    }

    .group-title {
        font-size: 18px;
    }

    .group-value,
    .overall-title,
    .overall-value {
        font-size: 18px;
    }

    .card h2 {
        font-size: 20px;
    }

    .ratings-footer {
        flex-direction: column;
        align-items: center;
        bottom: -30px;
    }

    .best-rating,
    .rating-trend {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}
