/* ===== LevelUp — Dashboard Coco RPG Dark ===== */

.mp-coco-app {
    --bg:        #0d0d14;
    --surface:   #13131f;
    --surface2:  #1a1a2e;
    --border:    #252540;
    --purple:    #a78bfa;
    --purple-d:  #7c3aed;
    --gold:      #fbbf24;
    --gold-d:    #d97706;
    --green:     #34d399;
    --green-d:   #059669;
    --red:       #f87171;
    --blue:      #60a5fa;
    --text:      #e2e8f0;
    --dim:       #64748b;
    --radius:    14px;
    --radius-sm: 8px;

    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    max-width: 680px;
    margin: 0 auto;
    padding: 16px 14px 80px;
    min-height: 100vh;
}

/* ── Auth wall ──────────────────────────────────────────────────────── */
.mp-auth-wall {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; min-height: 60vh; gap: 16px;
    text-align: center;
}
.mp-auth-icon { font-size: 48px; }
.mp-btn-login {
    background: linear-gradient(135deg, var(--purple-d), var(--purple));
    color: #fff; border: none; border-radius: 99px;
    padding: 12px 28px; font-size: 15px; font-weight: 700;
    text-decoration: none; display: inline-block;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.mp-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.mp-header-left  { display: flex; align-items: center; gap: 14px; }
.mp-header-right { display: flex; align-items: center; gap: 12px; }
.mp-avatar       { font-size: 38px; filter: drop-shadow(0 0 8px rgba(167,139,250,.5)); }
.mp-hero-name    { font-size: 22px; font-weight: 900; color: var(--purple); letter-spacing: -.5px; }
.mp-hero-date    { font-size: 12px; color: var(--dim); text-transform: capitalize; }
.mp-balance-gem  { font-size: 30px; animation: floatGem 3s ease-in-out infinite; }
.mp-balance-num  { font-size: 34px; font-weight: 900; color: var(--gold); line-height: 1;
                   text-shadow: 0 0 20px rgba(251,191,36,.4); }
.mp-balance-lbl  { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }

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

/* ── Gate MDJ ───────────────────────────────────────────────────────── */
.mp-mdj-gate {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 2px solid;
    margin-bottom: 8px;
    transition: all .4s ease;
}
.mp-mdj-locked {
    border-color: #3f3f5a;
    background: rgba(63,63,90,.15);
}
.mp-mdj-unlocked {
    border-color: var(--green);
    background: rgba(52,211,153,.08);
    box-shadow: 0 0 20px rgba(52,211,153,.2);
}
.mp-mdj-left   { display: flex; align-items: center; gap: 12px; }
.mp-mdj-icon   { font-size: 26px; }
.mp-mdj-label  { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.mp-mdj-status { font-size: 13px; font-weight: 700; }
.mp-mdj-locked  .mp-mdj-status { color: var(--dim); }
.mp-mdj-unlocked .mp-mdj-status { color: var(--green); }

.mp-mdj-counter {
    font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums;
}
.mp-mdj-locked   .mp-mdj-counter { color: var(--dim); }
.mp-mdj-unlocked .mp-mdj-counter { color: var(--green); text-shadow: 0 0 12px rgba(52,211,153,.6); }
.mp-mdj-sep { font-size: 18px; color: var(--dim); margin: 0 2px; }

/* Barre Tortue */
.mp-tortue-bar-wrap { margin-bottom: 14px; }
.mp-tortue-bar {
    height: 6px; background: var(--surface2);
    border-radius: 99px; overflow: hidden;
}
.mp-tortue-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, var(--green));
    border-radius: 99px;
    transition: width .6s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 0 8px rgba(52,211,153,.5);
}

/* ── Prochaine récompense ───────────────────────────────────────────── */
.mp-next-reward {
    display: flex; align-items: center; gap: 14px;
    background: var(--surface2);
    border: 1px solid var(--purple-d);
    border-radius: var(--radius);
    padding: 13px 16px;
    margin-bottom: 20px;
}
.mp-next-reward-icon { font-size: 26px; }
.mp-next-reward-body { flex: 1; }
.mp-next-reward-lbl  { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.mp-next-reward-name { font-size: 15px; font-weight: 700; color: var(--purple); }
.mp-next-reward-miss { text-align: right; }
.mp-next-reward-miss span { display: block; font-size: 22px; font-weight: 900; color: var(--gold); }
.mp-next-reward-miss small { font-size: 10px; color: var(--dim); }

/* ── Mode sections ──────────────────────────────────────────────────── */
.mp-mode-section { margin-bottom: 24px; }

.mp-mode-header {
    padding: 10px 14px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin-bottom: 2px;
}
.mp-mode-tortue .mp-mode-header { background: linear-gradient(90deg, #1e3a5f, #1a2744); border-left: 4px solid #60a5fa; }
.mp-mode-ninja  .mp-mode-header { background: linear-gradient(90deg, #2d1b69, #1e1040); border-left: 4px solid var(--purple); }
.mp-mode-fusee  .mp-mode-header { background: linear-gradient(90deg, #422006, #2c1506); border-left: 4px solid var(--gold); }

.mp-mode-label    { font-size: 13px; font-weight: 900; letter-spacing: .5px; }
.mp-mode-subtitle { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .5px; margin-top: 1px; }
.mp-mode-tortue .mp-mode-label { color: var(--blue); }
.mp-mode-ninja  .mp-mode-label { color: var(--purple); }
.mp-mode-fusee  .mp-mode-label { color: var(--gold); }

/* ── Quest cards ────────────────────────────────────────────────────── */
.mp-quest-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 13px 16px;
    margin-bottom: 2px;
    transition: transform .15s, box-shadow .15s, background .2s;
    position: relative;
    overflow: hidden;
}
.mp-quest-card:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); margin-bottom: 0; }
.mp-quest-card:hover { transform: translateX(2px); }

/* Statut — bord gauche coloré */
.mp-quest-pending   { border-left: 3px solid var(--border); }
.mp-quest-done      { border-left: 3px solid var(--gold); background: rgba(251,191,36,.04); }
.mp-quest-validated { border-left: 3px solid var(--green); background: rgba(52,211,153,.05); opacity: .85; }
.mp-quest-rejected  { border-left: 3px solid var(--red); opacity: .45; }

/* Shimmer sur les cartes pending (modo) */
.mp-mode-tortue .mp-quest-pending::before,
.mp-mode-ninja  .mp-quest-pending::before,
.mp-mode-fusee  .mp-quest-pending::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.015) 50%, transparent 100%);
    animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50%       { transform: translateX(100%); }
}

.mp-quest-icon  { font-size: 24px; flex-shrink: 0; width: 32px; text-align: center; }
.mp-quest-body  { flex: 1; min-width: 0; }
.mp-quest-title { font-size: 15px; font-weight: 700; line-height: 1.2; }
.mp-quest-desc  { font-size: 11px; color: var(--dim); margin-top: 3px; line-height: 1.4; }
.mp-quest-right { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex-shrink: 0; }

.mp-pts-possible { font-size: 13px; color: var(--dim); }
.mp-pts-earned   { font-size: 20px; font-weight: 900; color: var(--green);
                   text-shadow: 0 0 10px rgba(52,211,153,.4); }

/* Boutons claim selon mode */
.mp-btn-claim {
    border: none; border-radius: var(--radius-sm);
    padding: 8px 14px; font-size: 13px; font-weight: 800;
    cursor: pointer; letter-spacing: .3px;
    transition: opacity .2s, transform .1s, box-shadow .2s;
    white-space: nowrap;
}
.mp-btn-claim:hover  { opacity: .9; transform: scale(1.05); }
.mp-btn-claim:active { transform: scale(.95); }
.mp-btn-claim:disabled { opacity: .3; cursor: not-allowed; transform: none; }

.mp-btn-tortue {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #fff;
    box-shadow: 0 0 12px rgba(59,130,246,.35);
}
.mp-btn-ninja {
    background: linear-gradient(135deg, var(--purple-d), var(--purple));
    color: #fff;
    box-shadow: 0 0 12px rgba(124,58,237,.35);
}
.mp-btn-fusee {
    background: linear-gradient(135deg, var(--gold-d), var(--gold));
    color: #0d0d14;
    box-shadow: 0 0 12px rgba(251,191,36,.35);
}

/* Badges statut */
.mp-badge {
    font-size: 11px; font-weight: 700; padding: 4px 10px;
    border-radius: 99px; white-space: nowrap;
}
.mp-badge-done      { background: rgba(251,191,36,.15); color: var(--gold); border: 1px solid rgba(251,191,36,.3); }
.mp-badge-validated { background: rgba(52,211,153,.12); color: var(--green); border: 1px solid rgba(52,211,153,.3); }
.mp-badge-rejected  { background: rgba(248,113,113,.12); color: var(--red); border: 1px solid rgba(248,113,113,.3); }

/* ── Empty state ────────────────────────────────────────────────────── */
.mp-empty-quests {
    text-align: center; padding: 60px 20px;
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--border);
}
.mp-empty-icon { font-size: 48px; margin-bottom: 16px; opacity: .6; }
.mp-empty-sub  { font-size: 13px; color: var(--dim); margin-top: 4px; }

/* ── Shop ───────────────────────────────────────────────────────────── */
.mp-shop-section { margin-top: 32px; }
.mp-shop-title {
    font-size: 13px; font-weight: 900; text-transform: uppercase;
    letter-spacing: 2px; color: var(--dim);
    margin-bottom: 12px; padding-left: 2px;
}
.mp-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.mp-shop-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 10px;
    text-align: center; transition: transform .2s, box-shadow .2s;
    opacity: .45;
}
.mp-shop-card:hover { transform: translateY(-2px); }
.mp-shop-unlocked {
    opacity: 1; border-color: var(--gold);
    box-shadow: 0 0 16px rgba(251,191,36,.18);
}
.mp-shop-partial { opacity: .8; border-color: var(--purple-d); }
.mp-shop-icon    { font-size: 28px; margin-bottom: 8px; }
.mp-shop-name    { font-size: 12px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.mp-shop-cost    { font-size: 11px; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.mp-shop-free    { color: var(--green); }
.mp-shop-avail   { font-size: 10px; color: var(--green); margin-top: 4px; }
.mp-shop-bar     { height: 3px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.mp-shop-bar-fill { height: 100%; background: linear-gradient(90deg, var(--purple-d), var(--gold)); border-radius: 99px; }
.mp-shop-pct     { font-size: 10px; color: var(--dim); }

/* ── Toast ──────────────────────────────────────────────────────────── */
.mp-toast {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%);
    background: var(--surface2);
    border: 1px solid var(--purple);
    color: var(--text);
    padding: 12px 24px; border-radius: 99px;
    font-size: 14px; font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 24px rgba(0,0,0,.6), 0 0 20px rgba(124,58,237,.2);
    animation: toastIn .3s cubic-bezier(.34,1.56,.64,1);
    white-space: nowrap; max-width: 90vw;
}
@keyframes toastIn {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
