/* Styles pour le système de classement avancé */

/* Conteneur du Panthéon de la Fortune */
.pantheon-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--card-bg) 100%);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    padding: 20px;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.pantheon-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB4PSIwIiB5PSIwIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxjaXJjbGUgY3g9IjIiIGN5PSIyIiByPSIxIiBmaWxsPSJyZ2JhKDI1NSwgMjU1LCAyNTUsIDAuMDUpIi8+PC9wYXR0ZXJuPjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI3BhdHRlcm4pIi8+PC9zdmc+');
    opacity: 0.1;
}

/* En-tête du Panthéon */
.pantheon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.pantheon-title-container {
    position: relative;
}

.pantheon-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-tertiary);
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 184, 0, 0.5);
    position: relative;
}

.pantheon-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-tertiary);
    border-radius: 3px;
}

.pantheon-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 10px;
}

.pantheon-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.pantheon-info-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: scale(1.1);
}

/* Section des champions */
.pantheon-champions {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-top: 30px;
}

.champion-container {
    position: relative;
    width: 48%;
    background: rgba(13, 20, 60, 0.6);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.champion-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
    background-size: cover;
    background-position: center;
    filter: blur(1px);
}

.champion-container.mastery {
    border: 1px solid rgba(77, 255, 180, 0.3);
}

.champion-container.mastery::before {
    background: radial-gradient(ellipse at center, rgba(77, 255, 180, 0.2) 0%, rgba(13, 20, 60, 0) 70%);
}

.champion-container.absolute {
    border: 1px solid rgba(255, 77, 107, 0.3);
}

.champion-container.absolute::before {
    background: radial-gradient(ellipse at center, rgba(255, 77, 107, 0.2) 0%, rgba(13, 20, 60, 0) 70%);
}

.champion-crown {
    position: absolute;
    top: -10px;
    color: var(--accent-tertiary);
    font-size: 24px;
    filter: drop-shadow(0 0 5px rgba(255, 184, 0, 0.7));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.champion-avatar-frame {
    position: relative;
    margin-top: 10px;
    margin-bottom: 15px;
}

.champion-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.champion-container.mastery .champion-avatar {
    background: linear-gradient(135deg, #4dffb4, #00a67a);
    color: var(--primary-bg);
    box-shadow: 0 0 20px rgba(77, 255, 180, 0.5);
}

.champion-container.absolute .champion-avatar {
    background: linear-gradient(135deg, #ff4d6b, #b30022);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(255, 77, 107, 0.5);
}

.champion-aura {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    border-radius: 50%;
    z-index: 1;
    opacity: 0.3;
    animation: pulse-aura 3s infinite;
}

@keyframes pulse-aura {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.4;
    }
}

.mastery-aura {
    background: radial-gradient(ellipse at center, rgba(77, 255, 180, 1) 0%, rgba(77, 255, 180, 0) 70%);
    animation: pulse-mastery 4s infinite;
}

.absolute-aura {
    background: radial-gradient(ellipse at center, rgba(255, 77, 107, 1) 0%, rgba(255, 77, 107, 0) 70%);
    animation: pulse-absolute 3s infinite;
}

@keyframes pulse-mastery {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.4;
    }
}

@keyframes pulse-absolute {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.5;
    }
}

.champion-info {
    width: 100%;
    text-align: center;
}

.champion-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.champion-container.mastery .champion-title {
    color: var(--success-green);
}

.champion-container.absolute .champion-title {
    color: var(--failure-red);
}

.champion-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.champion-score {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.champion-score span {
    font-weight: 700;
    font-size: 18px;
}

.champion-container.mastery .champion-score span {
    color: var(--success-green);
}

.champion-container.absolute .champion-score span {
    color: var(--failure-red);
}

.champion-epithet {
    font-style: italic;
    color: var(--accent-tertiary);
    font-size: 14px;
    margin-top: 5px;
}

/* Panneau de classement amélioré */
.leaderboard-panel.advanced {
    background: rgba(24, 42, 112, 0.8);
    padding: 25px;
}

.leaderboard-title-container {
    display: flex;
    flex-direction: column;
}

.leaderboard-tabs.dual-tabs {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.leaderboard-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.leaderboard-tab i {
    font-size: 14px;
}

/* Filtres avancés */
.leaderboard-filters {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-options {
    display: flex;
    gap: 10px;
}

.filter-option {
    padding: 6px 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.filter-option.active {
    background: var(--accent-color);
    color: var(--primary-bg);
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.3);
}

/* Conteneur du tableau de classement */
.leaderboard-content-container {
    margin-top: 30px;
    position: relative;
}

.leaderboard-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.leaderboard-content.active {
    display: block;
}

/* Section du podium */
.podium-section {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 30px;
    height: 200px;
    position: relative;
}

.podium-position {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
}

.podium-position.position-1 {
    height: 200px;
    z-index: 3;
}

.podium-position.position-2 {
    height: 170px;
    z-index: 2;
}

.podium-position.position-3 {
    height: 150px;
    z-index: 1;
}

.podium-position:hover {
    transform: translateY(-10px);
}

.podium-crown {
    position: absolute;
    top: -25px;
    color: var(--accent-tertiary);
    font-size: 24px;
    filter: drop-shadow(0 0 5px rgba(255, 184, 0, 0.7));
    animation: float 3s ease-in-out infinite;
}

.podium-avatar-container {
    position: relative;
}

.podium-rank {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-color);
    z-index: 2;
}

.podium-position.position-1 .podium-rank {
    background: var(--accent-tertiary);
    color: var(--primary-bg);
}

.podium-position.position-2 .podium-rank {
    background: #c0c0c0;
    color: var(--primary-bg);
}

.podium-position.position-3 .podium-rank {
    background: #cd7f32;
    color: var(--primary-bg);
}

.podium-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-bg);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
}

.podium-position.position-1 .podium-avatar {
    width: 80px;
    height: 80px;
    font-size: 32px;
    background: linear-gradient(135deg, var(--accent-tertiary), #ffce45);
    box-shadow: 0 0 20px rgba(255, 184, 0, 0.6);
}

.podium-position.position-2 .podium-avatar {
    background: linear-gradient(135deg, #c0c0c0, #e0e0e0);
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}

.podium-position.position-3 .podium-avatar {
    background: linear-gradient(135deg, #cd7f32, #e9bc85);
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
}

.podium-section.absolute .podium-position.position-1 .podium-avatar {
    background: linear-gradient(135deg, var(--failure-red), #ff8c9e);
    box-shadow: 0 0 20px rgba(255, 77, 107, 0.6);
}

.podium-info {
    text-align: center;
    margin-top: 5px;
}

.podium-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 14px;
}

.podium-position.position-1 .podium-name {
    font-size: 16px;
}

.podium-score {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 16px;
}

.podium-position.position-1 .podium-score {
    font-size: 24px;
    color: var(--accent-tertiary);
}

.podium-section.absolute .podium-position.position-1 .podium-score {
    color: var(--failure-red);
}

/* Table avancée */
.advanced-table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.advanced-table thead {
    background: rgba(13, 20, 60, 0.8);
}

.advanced-table th {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 15px;
    text-align: left;
}

.advanced-table tr {
    background: rgba(13, 20, 60, 0.4);
    transition: background 0.2s ease;
}

.advanced-table tr:nth-child(even) {
    background: rgba(13, 20, 60, 0.5);
}

.advanced-table tr:hover {
    background: rgba(13, 20, 60, 0.7);
}

.current-user {
    background: rgba(0, 200, 255, 0.1) !important;
    border-left: 3px solid var(--accent-color);
    position: relative;
}

.current-user-indicator {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    font-size: 10px;
    background: var(--accent-color);
    color: var(--primary-bg);
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 600;
}

.outcome {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
}

.outcome.secured {
    background: rgba(77, 255, 180, 0.1);
    color: var(--success-green);
}

.outcome.defeat {
    background: rgba(255, 77, 107, 0.1);
    color: var(--failure-red);
}

/* Pagination */
.leaderboard-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Message du classement */
.leaderboard-message {
    margin-top: 20px;
    padding: 15px;
    background: rgba(13, 20, 60, 0.5);
    border-radius: 10px;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

.mastery-message {
    border-left: 3px solid var(--success-green);
}

.absolute-message {
    border-left: 3px solid var(--failure-red);
}

/* Toast de notification de nouveau champion */
.champion-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(13, 20, 60, 0.9);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    backdrop-filter: blur(10px);
}

.champion-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.champion-toast.hidden {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bg);
    font-size: 20px;
    animation: pulse 2s infinite;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--accent-tertiary);
    margin-bottom: 5px;
}

.toast-description {
    font-size: 14px;
    color: var(--text-secondary);
}

.toast-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* Modale d'information du Panthéon */
.pantheon-explanation {
    text-align: center;
}

.pantheon-explanation p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.pantheon-explanation p strong {
    color: var(--text-primary);
}

.champion-explanation {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.champion-type {
    flex: 1;
    background: rgba(13, 20, 60, 0.5);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.champion-type i {
    font-size: 24px;
    margin-bottom: 10px;
}

.champion-type.mastery i {
    color: var(--success-green);
}

.champion-type.absolute i {
    color: var(--failure-red);
}

.champion-type h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.champion-type p {
    font-size: 14px;
    color: var(--text-secondary);
}

.pantheon-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Adaptations mobiles supplémentaires */
@media (max-width: 768px) {
    .pantheon-champions {
        flex-direction: column;
        align-items: center;
    }
    
    .champion-container {
        width: 100%;
    }
    
    .leaderboard-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .champion-explanation {
        flex-direction: column;
    }
    
    .podium-section {
        height: auto;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .podium-position {
        height: auto !important;
    }
    
    .podium-position.position-1 {
        order: 1;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .podium-position.position-2 {
        order: 2;
    }
    
    .podium-position.position-3 {
        order: 3;
    }
    
    .leaderboard-filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .advanced-table th:nth-child(4),
    .advanced-table td:nth-child(4) {
        display: none;
    }
}

/* Styles pour le détail d'un champion */
.champion-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 15px;
}

.champion-avatar-large.mastery {
    background: linear-gradient(135deg, #4dffb4, #00a67a);
    color: var(--primary-bg);
    box-shadow: 0 0 20px rgba(77, 255, 180, 0.5);
}

.champion-avatar-large.absolute {
    background: linear-gradient(135deg, #ff4d6b, #b30022);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(255, 77, 107, 0.5);
}

.champion-name-large {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.champion-epithet-large {
    font-style: italic;
    color: var(--accent-tertiary);
    margin-bottom: 15px;
}

.champion-score-large {
    font-size: 18px;
    margin-bottom: 20px;
}

.champion-score-large span {
    font-weight: 700;
    font-size: 24px;
    color: var(--accent-color);
}

.champion-narrative {
    background: rgba(13, 20, 60, 0.5);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.5;
}

.champion-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 20px;
}

.champion-stat {
    text-align: center;
}

.champion-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
