/* ============================================
   ELITE ARENA — Theme 3D Candy / Royal Match
   ============================================ */

:root {
    --gold-light: #FFE259;
    --gold-dark: #FFA751;
    --primary-cyan: #00F0FF;
    --shadow-3d-dark: 0 8px 0 #0f172a, 0 15px 25px rgba(0,0,0,0.5);
    --shadow-btn-gold: 0 6px 0 #B37B00, 0 10px 15px rgba(255, 199, 0, 0.4);
    --shadow-btn-cyan: 0 6px 0 #0088A8, 0 10px 15px rgba(0, 240, 255, 0.4);
    --shadow-btn-pink: 0 6px 0 #B3004B, 0 10px 15px rgba(255, 42, 133, 0.4);
    --shadow-btn-green: 0 6px 0 #065F46, 0 10px 15px rgba(16, 185, 129, 0.4);

    /* Compat anciennes variables */
    --bg-deep: #070B19;
    --bg-mid: #0F172A;
    --card: #1E2945;
    --card-hi: #24305E;
    --border: rgba(255,255,255,0.10);
    --primary: #00F0FF;
    --primary-dark: #0088A8;
    --gold: #FFC700;
    --gold-dark: #B37B00;
    --success: #10B981;
    --danger: #FF2A85;
    --purple: #A855F7;
    --pink: #FF2A85;
    --text: #E2E8F0;
    --text-dim: #94A3B8;
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background-color: #070B19;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.15), transparent 50%),
        radial-gradient(circle at 100% 60%, rgba(168, 85, 247, 0.12), transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(255, 42, 133, 0.12), transparent 50%);
    background-attachment: fixed;
    color: #E2E8F0;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Fredoka', 'Orbitron', sans-serif; letter-spacing: .01em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

/* ============ BUTTONS 3D CANDY ============ */
.btn-3d {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Fredoka', 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 9999px;
    transition: all 0.1s ease;
    user-select: none;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.4);
    text-shadow: 0 2px 2px rgba(0,0,0,0.5);
    text-decoration: none;
    padding: 10px 18px;
    font-size: 13px;
    line-height: 1;
}
.btn-3d::before {
    content: '';
    position: absolute;
    top: 2px; left: 10%; right: 10%;
    height: 35%;
    background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 100%);
    border-radius: 999px;
    pointer-events: none;
}
.btn-3d:active { transform: translateY(4px) !important; box-shadow: 0 2px 0 rgba(0,0,0,0.8) !important; }
.btn-3d-gold  { background: linear-gradient(180deg, #FFF066 0%, #FFB700 50%, #E68A00 100%); box-shadow: var(--shadow-btn-gold); color: #3A1D00; text-shadow: 0 1px 0 rgba(255,255,255,0.4); }
.btn-3d-cyan  { background: linear-gradient(180deg, #70F8FF 0%, #00C6FF 50%, #008BB3 100%); box-shadow: var(--shadow-btn-cyan); color: #002B36; text-shadow: 0 1px 0 rgba(255,255,255,0.4); }
.btn-3d-pink  { background: linear-gradient(180deg, #FF70B8 0%, #FF2A85 50%, #C40058 100%); box-shadow: var(--shadow-btn-pink); color: #FFFFFF; }
.btn-3d-green { background: linear-gradient(180deg, #51F6A5 0%, #10B981 50%, #047857 100%); box-shadow: var(--shadow-btn-green); color: #013220; }

/* Compat anciens boutons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-family: 'Fredoka', 'Inter', sans-serif;
    font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
    padding: 12px 20px; border-radius: 9999px; border: 2px solid rgba(255,255,255,.4);
    cursor: pointer; transition: all .1s ease; text-decoration: none;
    box-shadow: var(--shadow-btn-cyan); color: #002B36;
    background: linear-gradient(180deg, #70F8FF 0%, #00C6FF 50%, #008BB3 100%);
    text-shadow: 0 1px 0 rgba(255,255,255,.4);
    position: relative; overflow: hidden;
}
.btn::before {
    content: ''; position: absolute; top: 2px; left: 10%; right: 10%; height: 35%;
    background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0));
    border-radius: 999px; pointer-events: none;
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.8); }
.btn-primary { background: linear-gradient(180deg, #70F8FF 0%, #00C6FF 50%, #008BB3 100%); box-shadow: var(--shadow-btn-cyan); color: #002B36; }
.btn-gold    { background: linear-gradient(180deg, #FFF066 0%, #FFB700 50%, #E68A00 100%); box-shadow: var(--shadow-btn-gold); color: #3A1D00; }
.btn-success { background: linear-gradient(180deg, #51F6A5 0%, #10B981 50%, #047857 100%); box-shadow: var(--shadow-btn-green); color: #013220; }
.btn-danger  { background: linear-gradient(180deg, #FF70B8 0%, #FF2A85 50%, #C40058 100%); box-shadow: var(--shadow-btn-pink); color: #fff; }
.btn-ghost {
    background: rgba(30, 41, 69, .9); color: #E2E8F0;
    border: 2px solid rgba(255,255,255,.15);
    box-shadow: 0 4px 0 rgba(0,0,0,.4);
    text-shadow: none;
}
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 11px; }

/* ============ CARDS 3D GLASS ============ */
.card, .card-3d {
    background: linear-gradient(165deg, rgba(30, 41, 69, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-bottom: 4px solid rgba(0, 0, 0, 0.4);
    border-radius: 24px;
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    padding: 18px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease;
}
.card-3d-glow {
    border: 2px solid rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.25), 0 12px 30px rgba(0, 0, 0, 0.6);
}
.card-hover:hover { transform: translateY(-3px); border-color: rgba(0,240,255,.5); }

/* ============ AVATAR RINGS ============ */
.avatar-ring-gold {
    position: relative; padding: 3px; display: inline-block;
    background: linear-gradient(135deg, #FFE259 0%, #FFB700 50%, #9A5100 100%);
    border-radius: 9999px;
    box-shadow: 0 0 12px rgba(255, 199, 0, 0.5);
}
.avatar-ring-gold img { display: block; }
.avatar-ring-silver {
    padding: 3px;
    background: linear-gradient(135deg, #E2E8F0 0%, #94A3B8 50%, #475569 100%);
    border-radius: 9999px;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.4);
    display: inline-block;
}
.avatar-ring-bronze {
    padding: 3px;
    background: linear-gradient(135deg, #F97316 0%, #C2410C 50%, #7C2D12 100%);
    border-radius: 9999px;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
    display: inline-block;
}

/* ============ FORMS ============ */
.field { margin-bottom: 14px; }
.field label {
    display: block; font-size: 11px; font-weight: 700; color: #94A3B8;
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em;
}
.field input, .field select, .field textarea {
    width: 100%; padding: 12px 16px;
    background: rgba(15, 23, 42, .9);
    border: 2px solid rgba(255,255,255,.1);
    border-radius: 12px; color: #E2E8F0;
    font-family: inherit; font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: #00F0FF;
    box-shadow: 0 0 0 3px rgba(0,240,255,.15);
}

/* ============ ALERTS ============ */
.alert, .alert-3d {
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    border-left: 4px solid;
    background: rgba(30, 41, 69, .9);
    backdrop-filter: blur(8px);
}
.alert-3d.alert-info,    .alert-info    { background: rgba(0,240,255,.12); border-color: #00F0FF; color: #70F8FF; }
.alert-3d.alert-success, .alert-success { background: rgba(16,185,129,.12); border-color: #10B981; color: #51F6A5; }
.alert-3d.alert-warning, .alert-warning { background: rgba(255,199,0,.12); border-color: #FFC700; color: #FFE259; }
.alert-3d.alert-danger,  .alert-danger  { background: rgba(255,42,133,.12); border-color: #FF2A85; color: #FF70B8; }

/* ============================================
   GIFT CARDS — 2 par ligne / 1 seul plus grand
   ============================================ */
.gifts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Si un seul cadeau → pleine largeur (plus grand) */
.gifts-grid.single {
    grid-template-columns: 1fr;
    max-width: 100%;
}

/* Sur très petits écrans (< 340px) → 1 par ligne */
@media (max-width: 340px) {
    .gifts-grid {
        grid-template-columns: 1fr;
    }
}

/* Ajustements pour mode 2 colonnes */
.gifts-grid .gift-card {
    min-width: 0;
}
.gifts-grid .gift-img {
    aspect-ratio: 4/3;
}
.gifts-grid .gift-body {
    padding: 10px;
    gap: 6px;
}
.gifts-grid .gift-title {
    font-size: 13px;
    line-height: 1.2;
}
.gifts-grid .countdown {
    gap: 3px;
}
.gifts-grid .cd-box {
    min-width: 32px;
    padding: 4px 6px;
}
.gifts-grid .cd-val {
    font-size: 13px;
}
.gifts-grid .cd-lbl {
    font-size: 8px;
}
.gifts-grid .podium {
    gap: 6px;
    padding: 6px 0;
}
.gifts-grid .podium-avatar {
    width: 36px;
    height: 36px;
}
.gifts-grid .podium-1 .podium-avatar {
    width: 46px;
    height: 46px;
}
.gifts-grid .podium-name {
    font-size: 9px;
    max-width: 50px;
}
.gifts-grid .podium-score {
    font-size: 11px;
}
.gifts-grid .badge-game {
    font-size: 9px;
    padding: 2px 8px;
}

/* En mode single (1 seul cadeau), on agrandit tout */
.gifts-grid.single .gift-img {
    aspect-ratio: 16/9;
}
.gifts-grid.single .gift-body {
    padding: 14px;
    gap: 10px;
}
.gifts-grid.single .gift-title {
    font-size: 17px;
}
.gifts-grid.single .countdown {
    gap: 6px;
}
.gifts-grid.single .cd-box {
    min-width: 42px;
    padding: 6px 10px;
}
.gifts-grid.single .cd-val {
    font-size: 16px;
}
.gifts-grid.single .cd-lbl {
    font-size: 9px;
}
.gifts-grid.single .podium-avatar {
    width: 48px;
    height: 48px;
}
.gifts-grid.single .podium-1 .podium-avatar {
    width: 60px;
    height: 60px;
}
.gifts-grid.single .podium-name {
    font-size: 11px;
    max-width: 70px;
}
.gifts-grid.single .podium-score {
    font-size: 13px;
}
.gifts-grid.single .badge-game {
    font-size: 10px;
    padding: 3px 10px;
}

/* Carte cadeau (design de base) */
.gift-card {
    background: linear-gradient(165deg, rgba(30, 41, 69, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-bottom: 4px solid rgba(0, 0, 0, 0.4);
    border-radius: 22px;
    overflow: hidden;
    transition: transform .2s cubic-bezier(.34,1.56,.64,1), border-color .2s, box-shadow .2s;
    display: flex; flex-direction: column;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,.5);
}
.gift-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0,240,255,.5);
    box-shadow: 0 0 25px rgba(0,240,255,.2), 0 15px 30px rgba(0,0,0,.6);
}
.gift-img {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #1C2541, #0B132B);
    display: flex; align-items: center; justify-content: center;
    font-size: 60px; overflow: hidden; position: relative;
}
.gift-img img { width: 100%; height: 100%; object-fit: cover; }
.gift-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.gift-title { font-family: 'Fredoka', sans-serif; font-size: 15px; font-weight: 700; line-height: 1.3; color: #fff; }
.gift-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11px; color: #94A3B8; }

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .05em;
}
.badge-game   { background: rgba(0,240,255,.15); color: #00F0FF; border: 1px solid rgba(0,240,255,.3); }
.badge-active { background: rgba(16,185,129,.15); color: #51F6A5; border: 1px solid rgba(16,185,129,.3); }
.badge-ended  { background: rgba(255,42,133,.15); color: #FF70B8; border: 1px solid rgba(255,42,133,.3); }
.badge-draft  { background: rgba(148,163,184,.15); color: #94A3B8; }
.badge-coins  {
    background: rgba(255,199,0,.15); color: #FFC700;
    padding: 8px 14px; border-radius: 999px;
    font-size: 14px; font-weight: 700;
    border: 1px solid rgba(255,199,0,.3);
    cursor: pointer; transition: background .15s;
    font-family: inherit;
}
.badge-coins:hover { background: rgba(255,199,0,.25); }

/* ============ COUNTDOWN ============ */
.countdown { display: flex; gap: 6px; justify-content: center; }
.cd-box {
    background: rgba(15, 23, 42, .9);
    border: 1.5px solid rgba(255,199,0,.4);
    border-radius: 10px; padding: 6px 10px; min-width: 42px;
    text-align: center; display: flex; flex-direction: column;
}
.cd-val {
    font-family: 'Orbitron', sans-serif; font-weight: 900;
    font-size: 16px; color: #FFC700;
    font-variant-numeric: tabular-nums;
}
.cd-lbl { font-size: 9px; color: #94A3B8; text-transform: uppercase; font-weight: 700; }
.countdown-ended { text-align: center; color: #FF70B8; font-weight: 700; font-size: 13px; }

/* ============ PODIUM ============ */
.podium { display: flex; gap: 10px; align-items: flex-end; justify-content: center; padding: 10px 0; }
.podium-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.podium-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,.15);
    object-fit: cover; background: #1C2541;
}
.podium-1 .podium-avatar { border-color: #FFC700; width: 56px; height: 56px; box-shadow: 0 0 14px rgba(255,199,0,.5); }
.podium-2 .podium-avatar { border-color: #C0C0C0; }
.podium-3 .podium-avatar { border-color: #CD7F32; }
.podium-name { font-size: 10px; color: #94A3B8; max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.podium-score { font-family: 'Orbitron', sans-serif; font-size: 12px; font-weight: 900; color: #00F0FF; }
.crown { position: absolute; top: -14px; font-size: 18px; }

/* ============ TOASTS ============ */
#toast-container {
    position: fixed; bottom: 100px; right: 16px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none; max-width: calc(100vw - 32px);
}
.toast {
    background: linear-gradient(165deg, rgba(30, 41, 69, 0.95), rgba(15, 23, 42, 0.98));
    border: 2px solid rgba(255,255,255,.12);
    border-left: 4px solid #00F0FF;
    border-radius: 14px; padding: 12px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.6);
    display: flex; align-items: center; gap: 10px;
    min-width: 240px; max-width: 360px;
    pointer-events: auto;
    animation: toast-in .35s cubic-bezier(.2,.9,.3,1.3);
    font-size: 13px; font-weight: 600;
}
.toast.removing { animation: toast-out .3s forwards; }
.toast-success { border-left-color: #10B981; }
.toast-danger  { border-left-color: #FF2A85; }
.toast-warning { border-left-color: #FFC700; }
.toast-gold    { border-left-color: #FFC700; background: linear-gradient(90deg, rgba(255,199,0,.15), rgba(15,23,42,.98)); }
.toast-icon { font-size: 20px; flex-shrink: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.9); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px) scale(.9); } }

/* ============ FLOAT SCORE ============ */
.float-score {
    position: absolute; font-family: 'Orbitron', sans-serif; font-weight: 900;
    font-size: 34px; pointer-events: none;
    animation: float-up 1s ease-out forwards;
    z-index: 50; text-shadow: 0 3px 10px rgba(0,0,0,.7);
}
.float-score.plus { color: #51F6A5; }
.float-score.minus { color: #FF70B8; }
@keyframes float-up {
    0% { opacity: 0; transform: translateY(0) scale(.5); }
    20% { opacity: 1; transform: translateY(-15px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-90px) scale(1); }
}

/* ============ UTILITAIRES ============ */
.text-center { text-align: center; }
.text-dim { color: #94A3B8; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* ============ RECORDS GRID ============ */
.records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.record-card {
    background: linear-gradient(165deg, rgba(30, 41, 69, 0.85), rgba(15, 23, 42, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-bottom: 4px solid rgba(0,0,0,.4);
    border-radius: 20px; overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .2s cubic-bezier(.34,1.56,.64,1), border-color .2s, box-shadow .2s;
    box-shadow: 0 8px 20px -5px rgba(0,0,0,.5);
}
.record-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0,240,255,.5);
    box-shadow: 0 0 22px rgba(0,240,255,.18), 0 12px 25px rgba(0,0,0,.6);
}
.record-img {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #0B132B, #1C2541);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.record-img img { width: 100%; height: 100%; object-fit: cover; }
.record-body { padding: 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.record-score {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px; font-weight: 900;
    color: #00F0FF; line-height: 1;
    text-shadow: 0 0 16px rgba(0,240,255,.5);
}
.record-label {
    font-size: 9px; color: #94A3B8;
    letter-spacing: .15em; text-transform: uppercase;
    margin-bottom: 4px; font-weight: 800;
}
.record-name {
    font-size: 12px; font-weight: 700; color: #E2E8F0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.record-badge {
    font-size: 10px; color: #94A3B8;
    padding: 2px 8px;
    background: rgba(15,23,42,.8);
    border-radius: 999px;
    display: inline-block; align-self: center; margin-top: 2px;
}
.record-date { font-size: 10px; color: #64748B; margin-top: 4px; }

/* ============ GAME FULLSCREEN ============ */
body.game-active {
    overflow: hidden !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
body.game-active .sticky,
body.game-active nav,
body.game-active .container > h1,
body.game-active .container > .alert { display: none !important; }
body.game-active main { padding: 0 !important; max-width: 100% !important; }

/* ============ AVATAR FRAMES (compat) ============ */
.avatar-frame {
    width: 88px; height: 88px; border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent;
    background: linear-gradient(165deg, #1C2541, #0B132B);
    background-image: linear-gradient(165deg, #1C2541, #0B132B), linear-gradient(135deg, #FFE259, #FFB700, #9A5100);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(255,199,0,.4);
}
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    overflow: hidden; background: #1C2541; flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.15);
}
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.victoires-badge {
    position: absolute; bottom: -4px; right: -4px;
    background: linear-gradient(135deg, #FFE259, #FFB700);
    color: #3A1D00; border-radius: 999px;
    padding: 3px 10px; font-weight: 900; font-size: 11px;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 2px 6px rgba(0,0,0,.4);
    border: 2px solid #0B132B;
}

.parrain-box {
    background: rgba(15,23,42,.7);
    border: 1.5px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

/* ============ MINI RECORDS ============ */
.mini-records { display: flex; flex-direction: column; gap: 8px; }
.mini-record {
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(165deg, rgba(30, 41, 69, 0.7), rgba(15, 23, 42, 0.9));
    border: 2px solid rgba(255,255,255,.08);
    border-bottom-width: 3px;
    border-bottom-color: rgba(0,0,0,.4);
    border-radius: 14px;
    padding: 8px 12px;
    transition: border-color .15s;
}
.mini-record:hover { border-color: rgba(0,240,255,.5); }
.mini-record-img {
    width: 46px; height: 46px; border-radius: 10px;
    overflow: hidden; background: #0B132B;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.mini-record-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-record-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.mini-record-score {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px; font-weight: 900;
    color: #00F0FF; min-width: 42px; line-height: 1;
}
.mini-record-name {
    flex: 1; font-size: 13px; font-weight: 700;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini-record-date { font-size: 10px; color: #64748B; flex-shrink: 0; }

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(7, 11, 25, .85);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; z-index: 9999;
    animation: fade-in .2s;
}
@keyframes fade-in { from { opacity: 0; } }
.modal-box {
    background: linear-gradient(165deg, rgba(30, 41, 69, 0.98), rgba(15, 23, 42, 0.98));
    border: 2px solid rgba(0, 240, 255, 0.4);
    border-radius: 22px;
    padding: 22px;
    max-width: 480px; width: 100%;
    max-height: 80vh; overflow-y: auto;
    box-shadow: 0 0 30px rgba(0,240,255,.2), 0 20px 60px rgba(0,0,0,.7);
    animation: modal-pop .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modal-pop { from { transform: scale(.85); opacity: 0; } }

.history-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    background: rgba(15,23,42,.6);
    border-radius: 12px; margin-bottom: 6px;
    border: 1px solid rgba(255,255,255,.05);
}
.history-icon {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900; font-size: 13px;
    min-width: 48px; text-align: center;
    padding: 6px 8px; border-radius: 8px;
}
.history-icon.plus  { background: rgba(16,185,129,.15); color: #51F6A5; }
.history-icon.minus { background: rgba(255,42,133,.15); color: #FF70B8; }
.history-raison { font-size: 13px; font-weight: 700; text-transform: capitalize; }
.history-details { font-size: 11px; color: #94A3B8; margin-top: 2px; }
.history-date { font-size: 10px; color: #64748B; margin-top: 3px; }

/* ============ GAINS HIDDEN ============ */
.gain-hidden { display: none !important; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(7, 11, 25, 0.8); }
::-webkit-scrollbar-thumb { background: #24305E; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #00F0FF; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============ ANIMATIONS ============ */
@keyframes float { 0%, 100% { transform: translateY(0px) rotate(0deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
.animate-float { animation: float 4s ease-in-out infinite; }
@keyframes pulseGlow { 0%, 100% { filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.6)); } 50% { filter: drop-shadow(0 0 25px rgba(255, 42, 133, 0.8)); } }
.animate-pulse-glow { animation: pulseGlow 2.5s infinite ease-in-out; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.shimmer-bg { position: relative; overflow: hidden; }
.shimmer-bg::after {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%); animation: shimmer 3s infinite;
}

/* ============ RESPONSIVE ============ */
@media (min-width: 720px) {
    .max-w-md { max-width: 640px; }
}

/* ============ BOUTON FERMETURE MODAL ============ */
.modal-close-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 2px solid rgba(255,255,255,.2);
    color: #94A3B8;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s ease;
    z-index: 100;
    font-family: inherit;
}
.modal-close-x:hover {
    background: rgba(255,42,133,.2);
    border-color: rgba(255,42,133,.5);
    color: #FF70B8;
    transform: scale(1.1);
}
.modal-close-x:active {
    transform: scale(.95);
}