/* ============================================
   GAME.CSS - Styles du jeu
   Prix, prédiction, stats, leaderboard, history, missions
   ============================================ */

/* =====================================
   NOUVEAU DESIGN - SECTION JEU V2
   ===================================== */

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.section-icon {
    font-size: 16px;
}

.section-title.clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.section-title.clickable:hover {
    color: var(--primary-color);
}

.section-help {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.section-title.clickable:hover .section-help {
    opacity: 1;
}

.section-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

/* ----------------
   CRYPTO ROW
   ---------------- */
.crypto-row {
    background: var(--background-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
    border: none;
    border-left: 3px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.crypto-row.btc {
    border-left-color: #f7931a;
}

.crypto-row.eth {
    border-left-color: #627eea;
}

.crypto-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.crypto-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.crypto-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.crypto-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    align-self: center;
}

.crypto-icon svg {
    width: 36px;
    height: 36px;
}

.crypto-icon.btc {
    /* Background géré par le SVG */
}

.crypto-icon.eth {
    /* Background géré par le SVG */
}

.crypto-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.crypto-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.challenge-icon {
    font-size: 14px;
    animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.crypto-price {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Status badge */
.crypto-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.crypto-status.available {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.crypto-status.pending {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
}

.crypto-status.won {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.crypto-status.lost {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Boutons de pari */
.crypto-actions {
    display: flex;
    gap: 10px;
}

.bet-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.bet-btn.up {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.bet-btn.up:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.bet-btn.down {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.bet-btn.down:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.bet-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.bet-icon {
    font-size: 16px;
}

.bet-text {
    font-size: 14px;
}

/* Pari en cours - Design grille */
.crypto-pending {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pending-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.pending-item.direction {
    background: rgba(255, 255, 255, 0.03);
}

.pending-item.direction.up {
    background: rgba(255, 255, 255, 0.03);
}

.pending-item.timer {
    background: rgba(255, 255, 255, 0.03);
    grid-column: span 2;
}

.pending-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.pending-value {
    font-size: 15px;
    font-weight: 600;
}

.pending-value.down {
    color: #ef4444;
}

.pending-value.up {
    color: #10b981;
}

.pending-value.time {
    color: #00d4ff;
}

/* Ancien CSS pour compatibilité (à supprimer plus tard) */
.pending-direction {
    display: none;
}

.pending-details {
    display: none;
}

/* ----------------
   MISSIONS TOGGLE (Nouveau design)
   ---------------- */
.missions-container {
    margin-top: 0;
}

.missions-toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.missions-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 3px;
}

.missions-toggle-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.missions-toggle-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.missions-toggle-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
}

.missions-counter-badge {
    font-size: 12px;
    background: var(--secondary-color);
    color: var(--background);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* ----------------
   CRYPTO TOGGLE (BTC / ETH / Spectre)
   ---------------- */
.crypto-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 12px;
    gap: 3px;
}

.crypto-toggle-btn {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.crypto-toggle-btn:hover:not(.locked) {
    color: rgba(255, 255, 255, 0.8);
}

.crypto-toggle-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
}

/* Couleurs spécifiques par crypto */
.crypto-toggle-btn.active[data-crypto="btc"] {
    color: #f7931a;
}

.crypto-toggle-btn.active[data-crypto="eth"] {
    color: #627eea;
}

.crypto-toggle-btn.active[data-crypto="spectre"] {
    color: #8b5cf6;
}

/* État locked pour Spectre */
.crypto-toggle-btn.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.crypto-toggle-btn .toggle-icon {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crypto-toggle-btn .toggle-icon svg {
    width: 16px;
    height: 16px;
}

/* Indicateur Spectre actif (point pulsant) */
.spectre-active-dot {
    width: 6px;
    height: 6px;
    background: #8b5cf6;
    border-radius: 50%;
    animation: spectrePulse 1.5s ease-in-out infinite;
}

@keyframes spectrePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Icône lock pour Spectre inactif */
.spectre-lock-icon {
    font-size: 10px;
    opacity: 0.6;
}

/* ----------------
   CARTE SPECTRE
   ---------------- */
.crypto-row.spectre {
    border-left-color: #8b5cf6;
    display: none; /* Caché par défaut, affiché via JS */
}

.crypto-row.spectre.visible {
    display: block;
}

.crypto-row.spectre.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(109, 40, 217, 0.05));
}

/* Badge points Spectre */
.spectre-points-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(139, 92, 246, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #a78bfa;
    font-weight: 600;
}

/* Wrapper pour statut + badge Spectre */
.crypto-status-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

/* État Spectre locked (pas de spectre actif) */
.spectre-locked-state {
    text-align: center;
    padding: 24px 16px;
    color: #6b7280;
}

.spectre-locked-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.spectre-locked-text {
    font-size: 14px;
    line-height: 1.5;
    font-style: italic;
}

/* Icône crypto Spectre (fond violet) */
.crypto-icon.spectre {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.crypto-icon.spectre svg {
    width: 28px;
    height: 28px;
}

/* Responsive mobile */
@media (max-width: 480px) {
    .crypto-toggle-btn {
        padding: 8px 8px;
        font-size: 12px;
        gap: 4px;
    }
    
    .crypto-toggle-btn .toggle-text {
        display: none; /* Cacher le texte sur mobile, garder juste l'icône */
    }
    
    .crypto-toggle-btn .toggle-icon {
        font-size: 16px;
    }
}

/* Responsive mobile */
@media (max-width: 480px) {
    .crypto-row {
        padding: 12px;
    }
    
    .crypto-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .crypto-name {
        font-size: 15px;
    }
    
    .crypto-price {
        font-size: 12px;
    }
    
    .bet-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .bet-icon {
        font-size: 14px;
    }
    
    .pending-details {
        flex-direction: column;
        gap: 4px;
    }
}

/* ----------------
   MISSIONS COMPACTES (Nouveau design)
   ---------------- */
.missions-container .missions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.missions-container .mission-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--background-card);
    border-radius: 8px;
    border-left: none;
    transition: all 0.2s ease;
}

.missions-container .mission-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.missions-container .mission-item.completed {
    border-left: 3px solid var(--success-color);
    padding-left: 9px; /* Compenser le border pour garder l'alignement */
}

/* S'assurer que le style s'applique aussi aux hebdo */
#weeklyMissionsContainer .mission-item.completed {
    border-left: 3px solid var(--success-color);
    padding-left: 9px;
}

.missions-container .mission-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.missions-container .mission-info {
    flex: 1;
    min-width: 0;
}

.missions-container .mission-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-color);
    margin-bottom: 0;
}

/* Masquer description uniquement pour quotidiennes */
#dailyMissionsContainer .mission-description {
    display: none;
}

/* Garder description visible pour hebdo (avec progression) */
#weeklyMissionsContainer .mission-description {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
    margin-bottom: 0;
}

.missions-container .mission-progress-bar {
    height: 4px;
    margin-top: 4px;
    margin-bottom: 0;
}

.missions-container .mission-progress-text {
    display: none; /* Masquer le texte de progression */
}

.missions-container .mission-reward {
    flex-shrink: 0;
}

.missions-container .reward-preview {
    font-size: 12px;
    color: var(--secondary-color);
    font-weight: 600;
}

.missions-container .reward-preview .reward-icon {
    font-size: 12px;
}

.missions-container .btn-claim {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 12px;
}

/* Status icon pour missions complètes */
.missions-container .mission-status {
    font-size: 16px;
    flex-shrink: 0;
}

/* Compteurs cachés (remplacés par le badge toggle) */
#dailyMissionsCounter,
#weeklyMissionsCounter {
    display: none;
}

/* ----------------
   RACE TO TARGET
   ---------------- */
.race-section {
    background: var(--background-card);
    border-radius: 12px;
    border-left: 3px solid #00d4ff;
    margin-bottom: 10px;
    overflow: hidden;
}

/* Version Expanded */
.race-expanded {
    padding: 16px;
}

.race-section .section-title {
    margin-bottom: var(--spacing-md);
}

/* =====================================
   RACE COLLAPSED (version mini)
   ===================================== */
.race-collapsed {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.race-collapsed:hover {
    background: rgba(255, 255, 255, 0.03);
}

.race-collapsed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.race-collapsed-question {
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.race-collapsed-status {
    font-size: 11px;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.race-collapsed-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.race-collapsed-bar-left {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #34d399);
    transition: width 0.3s ease;
    border-radius: 4px 0 0 4px;
}

.race-collapsed-bar-right {
    height: 100%;
    background: linear-gradient(90deg, #f87171, var(--error-color));
    flex: 1;
    border-radius: 0 4px 4px 0;
}

.race-collapsed-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
}

.race-collapsed-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.race-collapsed-label.left {
    color: var(--success-color);
}

.race-collapsed-label.right {
    color: var(--error-color);
}

.race-collapsed-percent {
    font-weight: 700;
}

.race-collapsed-target {
    color: var(--text-secondary);
}

.race-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
}

.race-loading,
.race-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-size: 14px;
}

.race-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.race-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-color);
}

.race-participants {
    font-size: 12px;
    color: var(--text-secondary);
}

.race-question {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    text-align: center;
}

.race-options {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.race-option {
    flex: 1;
    padding: 14px 10px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.race-option.up {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.race-option.up:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: translateY(-2px);
}

.race-option.down {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.race-option.down:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
}

.race-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.3);
}

.race-option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.race-option.disabled:hover {
    transform: none;
}

.race-option-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.race-option.up .race-option-value {
    color: #10b981;
}

.race-option.down .race-option-value {
    color: #ef4444;
}

.race-option-percent {
    font-size: 12px;
    color: var(--text-secondary);
}

.race-voted {
    text-align: center;
    font-size: 13px;
    color: #10b981;
    padding: 8px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
}

.race-early-bird {
    text-align: center;
    font-size: 12px;
    color: var(--secondary-color);
}

/* Race résolu */
.race-result {
    text-align: center;
    padding: 16px;
}

.race-result-winner {
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 8px;
}

.race-result-user {
    font-size: 14px;
    color: var(--text-secondary);
}

.race-result-user.won {
    color: #10b981;
}

.race-result-user.lost {
    color: #ef4444;
}

/* Responsive */
@media (max-width: 480px) {
    .race-card {
        padding: 14px;
    }
    
    .race-option {
        padding: 12px 8px;
    }
    
    .race-option-value {
        font-size: 16px;
    }
}

/* =====================================
   ANCIEN DESIGN (compatibilité)
   ===================================== */

/* ----------------
   SOUS-ONGLETS STATS
   ---------------- */
.stats-sub-tabs {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    background: var(--background);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-light);
}

.stats-sub-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stats-sub-tab:hover {
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
    transform: none;
    box-shadow: none;
}

.stats-sub-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--background);
}

.stats-subtab-content {
    display: none;
}

.stats-subtab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ----------------
   PRICE CARD
   ---------------- */
.price-card {
    background: var(--background);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
    color: white;
    margin-bottom: var(--spacing-md);
    border: 2px solid var(--primary-color);
    box-shadow: var(--glow-primary);
}

.price-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: var(--spacing-xs);
}

.price-value {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
}

.price-change {
    font-size: 16px;
    font-weight: 600;
}

.price-change.positive {
    color: #4ade80;
}

.price-change.negative {
    color: #f87171;
}

/* ----------------
   PREDICTION SECTION
   ---------------- */
.prediction-section {
    margin-bottom: var(--spacing-md);
}

.prediction-info {
    text-align: center;
    color: var(--gray-medium);
    margin-bottom: var(--spacing-md);
}

.prediction-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.btn-prediction {
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid transparent;
}

.btn-prediction .btn-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-xs);
}

.btn-prediction .btn-text {
    font-size: 16px;
}

.btn-up {
    background: var(--success-color);
    color: white;
    border: 3px solid transparent;
}

.btn-up:hover {
    border-color: var(--success-color);
    box-shadow: var(--glow-success);
}

.btn-down {
    background: var(--error-color);
    color: white;
    border: 3px solid transparent;
}

.btn-down:hover {
    border-color: var(--error-color);
    box-shadow: var(--glow-error);
}

.btn-prediction:active {
    transform: scale(0.95);
}

/* ----------------
   WAITING SECTION
   ---------------- */
.waiting-section {
    margin-bottom: var(--spacing-md);
}

.waiting-card {
    background: var(--background);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--gray-light);
}

.waiting-item {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--gray-light);
}

.waiting-item:last-child {
    border-bottom: none;
}

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

.waiting-value {
    font-weight: 600;
    color: var(--white);
}

.countdown {
    color: var(--primary-color);
    font-size: 18px;
}

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

/* ----------------
   QUICK STATS
   ---------------- */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.quick-stat-item {
    background: var(--background);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--gray-light);
}

.quick-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.quick-stat-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

/* ----------------
   STATS TAB
   ---------------- */
/* =====================================
   PROFIL - SECTION GÉNÉRIQUE (V26)
   ===================================== */
.profile-section {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-left: 3px solid var(--primary-color);
}

.profile-section.border-orange {
    border-left-color: var(--secondary-color);
}

.profile-section.border-gold {
    border-left-color: #fbbf24;
}

.profile-section.border-blue {
    border-left-color: #3b82f6;
}

.profile-section.border-purple {
    border-left-color: #8b5cf6;
}

.profile-section.border-green {
    border-left-color: var(--success-color);
}

.profile-section.border-cyan {
    border-left-color: #06b6d4;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =====================================
   PROFIL - NIVEAU (V26)
   ===================================== */
.level-content {
    text-align: center;
}

.level-title-big {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.member-since {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: var(--spacing-md);
}

.level-progress {
    margin-top: var(--spacing-sm);
}

.level-progress-bar {
    height: 10px;
    background: var(--gray-light);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: width 0.5s ease;
}

.level-progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.level-progress-text .current-xp {
    color: var(--primary-color);
    font-weight: 600;
}

/* =====================================
   PROFIL - MEILLEUR BADGE (V26)
   ===================================== */
.rarest-badge-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rarest-badge-image {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.rarest-badge-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rarest-badge-name {
    font-size: 18px;
    font-weight: 700;
}

.rarest-badge-rarity {
    font-size: 13px;
    color: #fbbf24;
}

.rarest-badge-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.no-badge-message {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    padding: var(--spacing-md);
}

/* =====================================
   PROFIL - FUN FACTS (V26)
   ===================================== */
.fun-facts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.fun-fact-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}

.fun-fact-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.fun-fact-value {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.fun-fact-value.green { color: var(--success-color); }
.fun-fact-value.red { color: var(--error-color); }
.fun-fact-value.cyan { color: var(--primary-color); }

.fun-fact-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* =====================================
   PROFIL - CLASSEMENT (V26)
   ===================================== */
.ranking-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ranking-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}

.ranking-position {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ranking-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.ranking-points {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.ranking-link {
    color: var(--primary-color);
    font-size: 13px;
    cursor: pointer;
    text-align: right;
    margin-top: 12px;
}

.ranking-link:hover {
    text-decoration: underline;
}

/* ANCIEN STYLE - Gardé pour compatibilité */
.level-progress-card {
    background: var(--background);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--gray-light);
}

.level-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--white);
}

.progress-bar {
    height: 12px;
    background: var(--gray-light);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: var(--spacing-xs);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-sm);
}

.stat-card {
    background: var(--background);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.stat-card.highlight {
    background: var(--background);
    color: white;
    border: 2px solid var(--primary-color);
    box-shadow: var(--glow-primary);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: var(--spacing-xs);
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-card.highlight .stat-value {
    color: white;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-medium);
}

.stat-card.highlight .stat-label {
    color: rgba(255,255,255,0.9);
}

/* ----------------
   LEADERBOARD
   ---------------- */
.user-rank-card {
    background: var(--background);
    color: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    border: 2px solid var(--secondary-color);
    box-shadow: var(--glow-secondary);
}

.rank-number {
    font-size: 24px;
    margin-left: var(--spacing-xs);
    color: var(--secondary-color);
}

.leaderboard-list {
    max-height: 500px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    background: var(--background);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
    cursor: pointer;
}

.leaderboard-item:hover {
    background: var(--background-card-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.leaderboard-item.current-user {
    background: var(--background);
    border: 2px solid var(--primary-color);
    box-shadow: var(--glow-primary);
}

.rank {
    font-size: 20px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    color: var(--primary-color);
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.you-badge {
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: var(--spacing-xs);
}

.player-stats {
    font-size: 12px;
    color: var(--gray-medium);
}

.player-points {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

/* ----------------
   HISTORY
   ---------------- */
.history-list {
    max-height: 500px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    background: var(--background);
    border-radius: var(--radius-sm);
    border-left: 4px solid transparent;
    border: 1px solid var(--gray-light);
    border-left: 4px solid transparent;
}

.history-item.won {
    border-left-color: var(--success-color);
}

.history-item.lost {
    border-left-color: var(--error-color);
}

.history-icon {
    font-size: 24px;
}

.history-details {
    flex: 1;
}

.history-prediction {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--white);
}

.history-prices {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.history-date {
    font-size: 11px;
    color: var(--text-secondary);
}

.history-points {
    font-size: 16px;
    font-weight: bold;
    color: var(--success-color);
}

.positive {
    color: var(--success-color);
}

.negative {
    color: var(--error-color);
}


/* =====================================
   MISSIONS - SYSTÈME DE MISSIONS
   ===================================== */

/* Section missions */
.missions-section {
    margin-bottom: var(--spacing-lg);
}

.missions-section h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

/* Catégorie de missions */
.missions-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

/* En-tête de catégorie */
.missions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.missions-title {
    font-weight: 600;
    color: var(--text-primary);
}

.missions-counter {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Liste des missions */
.missions-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* Item de mission */
.mission-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mission-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mission-item.completed {
    border-left: 3px solid var(--success-color);
}

.mission-item.claimed {
    opacity: 0.6;
}

/* Icône de mission */
.mission-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

/* Info de mission */
.mission-info {
    flex: 1;
    min-width: 0;
}

.mission-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.mission-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

/* Barre de progression */
.mission-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.mission-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.mission-item.completed .mission-progress-fill {
    background: var(--success-color);
}

.mission-progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Récompense */
.mission-reward {
    flex-shrink: 0;
    text-align: right;
}

.reward-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.btn-claim {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 1.5s infinite;
}

.btn-claim:hover {
    transform: scale(1.05);
    box-shadow: var(--glow-success);
}

.claimed-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
}

/* Animation pour le bouton claim */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

/* Responsive missions */
@media (max-width: 768px) {
    .mission-item {
        flex-wrap: wrap;
    }
    
    .mission-info {
        flex: 1 1 calc(100% - 60px);
    }
    
    .mission-reward {
        flex: 1 1 100%;
        text-align: left;
        margin-top: var(--spacing-xs);
        padding-left: 48px;
    }
    
    .mission-icon {
        font-size: 1.3rem;
        width: 35px;
    }
    
    .mission-name {
        font-size: 0.9rem;
    }
}

/* =====================================
   PRIX CLIQUABLE + VARIATION %
   ===================================== */

.crypto-price-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 2px 6px;
    margin: -2px -6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: fit-content;
}

.crypto-price-wrapper:hover {
    background: rgba(0, 212, 255, 0.1);
}

.crypto-price-wrapper:hover .crypto-price {
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.price-change {
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.price-change.up {
    color: #10b981;
}

.price-change.down {
    color: #ef4444;
}


/* =====================================
   MODAL TRADINGVIEW
   ===================================== */

.chart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.chart-modal-content {
    background: #0a0e17;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-modal-header h2 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.chart-modal-close {
    color: #9ca3af;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.chart-modal-close:hover {
    color: #fff;
}

.chart-modal-body {
    flex: 1;
    padding: 0;
    min-height: 0;
}

#tradingviewChart {
    width: 100%;
    height: 100%;
}

/* Mobile */
@media (max-width: 768px) {
    .chart-modal {
        padding: 10px;
    }
    
    .chart-modal-content {
        height: 70vh;
        max-height: none;
        border-radius: 12px;
    }
    
    .chart-modal-header {
        padding: 12px 16px;
    }
    
    .chart-modal-header h2 {
        font-size: 16px;
    }
}
