/* ============================================================
   SPIN NUMBERS — WheelOfNames Layout
   Wheel CENTERED · Controls panel RIGHT · Purple theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Space+Mono:wght@400;700&display=swap');

/* ============================================================
   FIX GTRANSLATE SPINNER — Mobile
   Ajouter à la fin de spin-numbers.css
   ============================================================ */

.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf-ti6hGc,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO-ti6hGc,
.VIpgJd-ZVi9od-aZ2wEe,
.goog-te-spinner-pos,
.goog-te-spinner-animation {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ---------- CSS Variables — Purple dark (default) ---------- */
:root {
    --accent:         #e74c3c;
    --accent-hover:   #c0392b;
    --secondary:      #3498db;
    --secondary-hover:#2980b9;
    --success:        #27ae60;
    --success-hover:  #219e50;

    --bg:             #1E123C;
    --panel-bg:       #160e30;
    --panel-border:   rgba(255,255,255,0.08);
    --card-bg:        #2a1f4e;
    --border-color:   rgba(255,255,255,0.12);
    --text:           #ffffff;
    --text-muted:     rgba(236,240,241,0.55);
    /*--wheel-bg:       radial-gradient(circle at 50% 50%, #1a0a40 0%, #050010 100%);*/
    --wheel-bg: radial-gradient(circle at 50% 40%, #3a2570 0%, #22134a 55%, #0c0620 100%);


    --shadow:         0 8px 32px rgba(0,0,0,0.5);
    --shadow-inner:   inset 0 0 60px rgba(0,0,0,0.4);
    --ball-shadow:    0 2px 8px rgba(0,0,0,0.6);
    --result-shadow:  0 3px 8px rgba(0,0,0,0.5);
    --border-radius:  16px;
    --transition:     all 0.3s ease;

    --panel-width:    340px;
    --font-head:      'Outfit', sans-serif;
    --font-mono:      'Space Mono', monospace;
}

/* Light mode — purple family, no black */
body:not(.dark-mode) {
    --bg:           #f0eeff;
    --panel-bg:     #e8e0ff;
    --panel-border: rgba(80,40,180,0.12);
    --card-bg:      #f8f9fa;
    --border-color: #c8b8f5;
    --text:         #2a1060;
    --text-muted:   rgba(42,16,96,0.55);
    --wheel-bg:     radial-gradient(circle at 50% 50%, #ffffff 0%, #ffffff 100%);
    --shadow:       0 8px 32px rgba(80,40,200,0.15);
    --shadow-inner: inset 0 0 60px rgba(80,40,200,0.1);
}

/* ---------- Base Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-head);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
}

.configure-draw {
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text);
    opacity: 0.7;
    padding: 20px 20px 12px;
    text-align: center;
}

/* ============================================================
   FULL-SCREEN CONTAINER
   ============================================================ */

.spin-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

/* ============================================================
   HEADER STRIP
   ============================================================ */

.picker-instructions-wrapper {
    flex: 0 0 auto;
    text-align: center;
    padding: 14px 16px 10px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--panel-border);
    position: relative;
    z-index: 10;
}

.picker-instructions-wrapper-hero{
    padding-top: 20px;
    text-align: center;
}
.picker-numbers-title {
    font-family: var(--font-head);
    font-weight: 800;
    color: var(--text) !important;
    margin: 0 0 2px;
    letter-spacing: -0.3px;
    font-size: 35px;
    line-height: 50px;
}

h2 {
    font-family: var(--font-head);
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text);
    opacity: 0.7;
}

.text-primary-red { color: #ff6b6b; }

.picker-numbers-texte {
    font-size: 0.75rem;
    color: var(--text);
    opacity: 0.5;
    line-height: 1.5;
    max-width: 560px;
    margin: 0 auto;
    padding-bottom: 0;
}

/* ============================================================
   TOOL WRAPPER — wheel center + right panel
   ============================================================ */

.tool-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction:row-reverse;
    min-height: 0;
    overflow: hidden;
    position: relative;
    /*border-bottom: 1px solid rgba(255,255,255,0.08);*/
}

/* ============================================================
   CENTER — WHEEL ZONE
   ============================================================ */

.spin-info-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 0;
    position: relative;
    background: var(--bg);
}

.wheel-container-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    position: relative;
}

/* Wheel — square, centered, fills available height/width */
#wheelContainer {
    position: relative;
    width:  min(calc(100vw - var(--panel-width) - 80px), calc(100vh - 180px));
    height: min(calc(100vw - var(--panel-width) - 80px), calc(100vh - 180px));
    border-radius: 50%;
    /*background: var(--wheel-bg);*/
    box-shadow: var(--shadow-inner), 0 20px 60px rgba(0,0,0,0.35);
    overflow: hidden;
    transition: background 0.5s;
    contain: layout style paint;
     border: 4px solid transparent;
    background:
        var(--wheel-bg) padding-box,
        linear-gradient(135deg, #a855f7, #6c3fc5, #ff6b6b) border-box;
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.25));
}

#wheelContainer::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 38%;
    height: 38%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,107,107,0.25) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* SPIN button */
.spin-button {
    position: absolute;
    inset: 0;
    width: 88px;
    height: 88px;
    min-width: 88px;
    min-height: 88px;
    border-radius: 50%;
    margin: auto;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 5;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    background: #D70932;
    box-shadow: 0 0 0 6px rgba(215,9,50,0.2), 0 6px 20px rgba(215,9,50,0.5);
    transition: box-shadow 0.2s, transform 0.2s;
}

.spin-button::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 88px;
    height: 88px;
    border-radius: 50% 0 50% 50%;
    transform: rotate(-45deg);
    background: #ff6b6b;
    z-index: 2;
}

.spin-button::after {
    content: "SPIN";
    position: absolute;
    width: 88px;
    height: 88px;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.spin-button:hover:not(:disabled) {
    box-shadow: 0 0 0 10px rgba(215,9,50,0.18), 0 8px 28px rgba(215,9,50,0.55);
    background: #960019;
}

.spin-button:active:not(:disabled) { transform: scale(0.96); }

.spin-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Result tray */
.result-tray {
    min-height: 52px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 8px;
    width: 100%;
    max-width: 600px;
}

/* Copy button */
.copy-container {
    text-align: center;
    min-height: 44px;
}

#copyBtn {
    padding: 9px 28px;
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(52,152,219,0.35);
    letter-spacing: 0.5px;
}

#copyBtn:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

/* ============================================================
   RIGHT — CONTROLS PANEL
   ============================================================ */

.controls {
    flex: 0 0 var(--panel-width);
    width: var(--panel-width);
    min-width: var(--panel-width);
    background: var(--panel-bg);
    border-left: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    z-index: 9999;
    padding-bottom: 50px;
}

.controls::-webkit-scrollbar { width: 4px; }
.controls::-webkit-scrollbar-track { background: transparent; }
.controls::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* Inputs */
.input-group-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 20px 20px 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="number"] {
    width: 100%;
    padding: 10px 8px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    color: var(--text);
    background: var(--card-bg);
    transition: var(--transition);
    height: 68px;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(231,76,60,0.15);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type="number"] { -moz-appearance: textfield; }

/* Setup button */
.input-group-setup {
    padding: 14px 20px;
}

#setup {
    width: 100%;
    padding: 13px 24px;
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(39,174,96,0.3);
    letter-spacing: 0.5px;
}

#setup:hover:not(:disabled) {
    background: var(--success-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(39,174,96,0.4);
}

#setup:active:not(:disabled) { transform: translateY(0); }
#setup:disabled { opacity: 0.5; cursor: not-allowed; }

/* Divider before steps */
.input-group-setup::after {
    content: '';
    display: block;
    height: 1px;
    background: var(--panel-border);
    margin-top: 15px;
}

/* Steps — vertical list */
.steps-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 20px 20px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--panel-border);
    transition: var(--transition);
}

.step:last-child { border-bottom: none; }

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: #ff6b6b;
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
    font-size: 11px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(215,9,50,0.3);
}

.step p {
    margin: 0;
    font-size: 11.5px;
    color: var(--text);
    opacity: 0.7;
    line-height: 1.55;
}

/* ============================================================
   THEME TOGGLE
   ============================================================ */

.theme-toggle {
    position: absolute;
    top: 12px;
    right: calc(var(--panel-width) + 12px);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    z-index: 30;
    background: var(--card-bg);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--panel-border);
    transition: var(--transition);
    opacity: 0.75;
}

.theme-toggle:hover { opacity: 1; }

.theme-toggle .sun  { opacity: 1;   transition: opacity 0.3s; }
.theme-toggle .moon { opacity: 0.3; transition: opacity 0.3s; }
body.dark-mode .theme-toggle .sun  { opacity: 0.3; }
body.dark-mode .theme-toggle .moon { opacity: 1;   }

/* ============================================================
   VOLUME CONTROL
   ============================================================ */

.volume-control {
    position: absolute;
    bottom: 0;
    z-index: 10;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--panel-border);
    border-radius: 50%;
    transition: var(--transition);
}

.volume-control:hover { opacity: 0.8; }

#muteBtn {
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
    min-height: unset;
}

#volumeSlider {
    display: none;
    width: 60px;
    height: 4px;
    border-radius: 4px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

#volumeSlider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

/* ============================================================
   BALLS
   ============================================================ */

.ball {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--hue), 80%, 50%);
    /*box-shadow:*/
    /*    inset -3px -3px 6px rgba(0,0,0,0.3),*/
    /*    inset 3px 3px 6px rgba(255,255,255,0.2),*/
    /*    var(--ball-shadow);*/
    transform: translate(-50%, -50%);
    transition: opacity 0.5s, transform 0.5s;
    background-image:
        radial-gradient(circle at top left, rgba(255,255,255,0.2), transparent 40%),
        radial-gradient(circle at bottom right, rgba(0,0,0,0.2), transparent 40%);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    contain: layout style;
     box-shadow:
        inset -3px -3px 6px rgba(0,0,0,0.3),
        inset 3px 3px 6px rgba(255,255,255,0.2),
        0 4px 10px rgba(0,0,0,0.5);  
}

.ball::before {
    content: '';
    position: absolute;
    width: 60%; height: 60%;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.1);
    z-index: 1;
    top: 5px; left: 6px;
}

.ball::after {
    content: attr(data-value);
    position: absolute;
    font-size: 11px;
    font-weight: 700;
    color: #333;
    text-align: center;
    z-index: 2;
    pointer-events: none;
}

.ball.removed {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1);
    pointer-events: none;
}

.ball.extra { background: #0068aa; }

/* ============================================================
   RESULT BALLS
   ============================================================ */

.result-ball {
    width: 44px; height: 44px;
    min-width: 44px; min-height: 44px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--result-shadow);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    flex-shrink: 0;
    overflow: hidden;
}

.result-ball.show { transform: scale(1); opacity: 1; }

.result-ball.extra.show {
    background: #0068aa;
    color: #fff;
    width: 50px; height: 50px;
    min-width: 50px; min-height: 50px;
    font-size: 22px;
    position: relative;
    top: -2px;
}

.result-ball.match-wheel {
    width: 36px; height: 36px;
    min-width: 36px; min-height: 36px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    cursor: default;
    user-select: none;
    pointer-events: none;
    background: hsl(var(--hue), 80%, 50%);
    box-shadow:
        inset -3px -3px 6px rgba(0,0,0,0.3),
        inset 3px 3px 6px rgba(255,255,255,0.2),
        0 2px 4px rgba(0,0,0,0.3);
    background-image:
        radial-gradient(circle at top left, rgba(255,255,255,0.2), transparent 40%),
        radial-gradient(circle at bottom right, rgba(0,0,0,0.2), transparent 40%);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.result-ball.match-wheel::before {
    content: '';
    position: absolute;
    width: 60%; height: 60%;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.1);
    z-index: 1;
    top: 6px; left: 7px;
}

.result-ball.match-wheel::after {
    content: attr(data-value);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #333;
    text-shadow: 0 1px 1px rgba(255,255,255,0.4);
    z-index: 2;
    pointer-events: none;
}

/* ============================================================
   POPUP
   ============================================================ */

.picker-popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,6,30,0.75);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.picker-popup-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 16px;
}

.picker-popup-content {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 36px 28px 32px;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
    max-width: 460px;
    width: 100%;
    text-align: center;
    color: var(--text);
    position: relative;
}

.picker-popup-close {
    position: absolute;
    top: 12px; right: 12px;
    background: var(--card-bg);
    border: 1px solid var(--panel-border);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, transform 0.2s;
    box-shadow: none;
    min-height: unset;
    padding: 0;
}

.picker-popup-close:hover { transform: scale(1.1); }

.picker-popup h2,
.picker-popup h3 {
    color: var(--text);
    margin: 0 0 20px;
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 800;
}

.picker-popup .result-tray { justify-content: center; margin: 10px auto; }
.picker-popup .result-tray#popupBonus { display: none; }

.picker-popup-copy {
    margin-top: 24px;
    padding: 12px 32px;
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(39,174,96,0.3);
    min-height: 44px;
}

.picker-popup-copy:hover:not(:disabled) {
    background: var(--success-hover);
    transform: translateY(-2px);
}

.picker-popup-copy:disabled { opacity: 0.55; cursor: not-allowed; }

/* ============================================================
   CONFETTI
   ============================================================ */

.confetti {
    position: absolute;
    pointer-events: none;
    width: 100%; height: 100%;
    top: 40px; left: 0;
    overflow: visible;
}

/* ============================================================
   DRAW COUNTER / MISC
   ============================================================ */

.draw-counter {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    opacity: 0.6;
    text-align: center;
}

.steps-grid-mobile { display: none; }

button { font-family: var(--font-head); cursor: pointer; }
img { height: auto; max-width: 100%; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1465px) {
    .wheel-container-block {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        width: 100%;
        left:0;
        position: relative;
    }
}

/* Mobile / Tablet < 900px */
@media (max-width: 899px) {
    :root { --panel-width: 100%; }

    .spin-container { min-height: auto; overflow: visible; }

    .picker-instructions-wrapper { padding: 14px 16px 10px; }

    .tool-wrapper { flex-direction: column; overflow: visible; }

    .controls {
        order: -1;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        border-left: none;
        border-bottom: 1px solid var(--panel-border);
        overflow: visible;
        padding: 16px;
        display: flex;
        flex-direction: column;
    }

    .input-group-wrapper { padding: 0 0 12px; }
    .input-group-setup   { padding: 0 0 12px; }
    .steps-grid          { padding: 0; }

    .spin-info-container { padding: 20px 16px 32px; }

    #wheelContainer {
        width:  min(88vw, 440px);
        height: min(88vw, 440px);
    }

    .steps-grid { display: none; }
    .steps-grid-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0 16px 32px;
    }

    .steps-grid-mobile .step {
        padding: 10px 12px;
        background: var(--card-bg);
        border-radius: 10px;
        border: 1px solid var(--border-color);
    }

    .theme-toggle { right: 12px; top: 10px; }
}

/* Small mobile */
@media (max-width: 479px) {
    .picker-numbers-title { font-size: 1.05rem; }
    h2 { font-size: 0.78rem; }
    .picker-numbers-texte { font-size: 0.7rem; }
    input[type="number"] { font-size: 1.5rem; height: 58px; }
    #wheelContainer {
        width:  min(92vw, 340px);
        height: min(92vw, 340px);
    }
    .result-ball {
        width: 36px; height: 36px;
        min-width: 36px; min-height: 36px;
        font-size: 13px;
    }
}

/* Large desktop */
@media (min-width: 1400px) {
    :root { --panel-width: 380px; }
    #wheelContainer {
        width:  min(calc(100vw - 380px - 100px), calc(100vh - 180px));
        height: min(calc(100vw - 380px - 100px), calc(100vh - 180px));
    }
}


.sn-spin-counter {
    margin: 18px auto 0;
    padding: 14px 18px;
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 14px;
    border: 1px solid rgba(255, 107, 107, 0.22);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.12);
}

.sn-counter-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.12);
    animation: snPulse 2.2s ease-in-out infinite;
}

.sn-counter-icon svg {
    animation: snRotate 5s linear infinite;
}

.sn-counter-content {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sn-counter-label {
    font-size: 16px;
    font-weight: 600;
}

#sn-total-spins {
    margin-top: 3px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

@keyframes snPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.25);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
}

@keyframes snRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .sn-spin-counter {
        max-width: 100%;
        padding: 12px 14px;
    }

    #sn-total-spins {
        font-size: 22px;
    }
    
}



/* ============================================================
   CUSTOMIZE ADDON — Spin Numbers
   Add this block at the END of spin-numbers.css
   ============================================================ */

/* ---------- CUSTOMIZE Button in sidebar ---------- */
.customize-btn-wrapper {
    padding: 0 20px 16px;
}

#customizeBtn {
    width: 100%;
    padding: 12px 20px;
    background: #452E5A;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

#customizeBtn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #7c4dd5, #b86ef9);
    opacity: 0;
    transition: opacity 0.25s;
}

#customizeBtn:hover::before { opacity: 1; }
#customizeBtn:hover{ color: #111; }
#customizeBtn:active { transform: scale(0.97); }

#customizeBtn .btn-icon {
    position: relative;
    z-index: 1;
    font-size: 16px;
    line-height: 1;
}

#customizeBtn span:not(.btn-icon) {
    position: relative;
    z-index: 1;
}

/* ---------- CUSTOMIZE POPUP OVERLAY ---------- */
.customize-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 6, 30, 0.82);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 16px;
    animation: cpFadeIn 0.2s ease;
}

.customize-popup-overlay.open {
    display: flex;
}

@keyframes cpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---------- POPUP PANEL ---------- */
.customize-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 22px;
    box-shadow: 0 32px 100px rgba(0,0,0,0.55);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    animation: cpSlideUp 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.customize-panel::-webkit-scrollbar { width: 4px; }
.customize-panel::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

@keyframes cpSlideUp {
    from { opacity: 0; transform: translateY(28px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ---------- POPUP HEADER ---------- */
.customize-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 16px;
    border-bottom: 1px solid var(--panel-border);
    position: sticky;
    top: 0;
    background: var(--panel-bg);
    z-index: 1;
    border-radius: 22px 22px 0 0;
}

.customize-header-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.customize-header-title .cp-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c3fc5, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.customize-close {
    background: var(--card-bg);
    border: 1px solid var(--panel-border);
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
    min-height: unset;
    box-shadow: none;
    line-height: 1;
}

.customize-close:hover { background: var(--border-color); transform: scale(1.1); }

/* ---------- POPUP TABS ---------- */
.customize-tabs {
    display: flex;
    gap: 4px;
    padding: 14px 24px 0;
    border-bottom: 1px solid var(--panel-border);
}

.cp-tab {
    padding: 8px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    opacity: 0.5;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    margin-bottom: -1px;
    box-shadow: none;
    min-height: unset;
    border-radius: 0;
}

.cp-tab:hover { opacity: 0.8; }

.cp-tab.active {
    opacity: 1;
    border-bottom-color: #a855f7;
    color: #a855f7;
}

/* ---------- POPUP BODY ---------- */
.customize-body {
    padding: 20px 24px 24px;
}

.cp-section {
    display: none;
}

.cp-section.active {
    display: block;
}

/* ---------- SECTION LABEL ---------- */
.cp-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text);
    opacity: 0.45;
    margin: 0 0 10px;
}

.cp-section-block {
    margin-bottom: 24px;
}

/* ---------- THEME GRID ---------- */
.cp-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.cp-theme-card {
    border-radius: 12px;
    padding: 12px 10px;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    position: relative;
}

.cp-theme-card:hover { transform: translateY(-2px); }
.cp-theme-card.selected { border-color: #a855f7; }

.cp-theme-card.selected::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #a855f7;
}

.cp-theme-preview {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cp-theme-name {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    opacity: 0.8;
    text-align: center;
}

/* ---------- BALL SIZE SLIDER ---------- */
.cp-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.cp-slider-row input[type="range"] {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: var(--border-color);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    border: none;
    padding: 0;
}

.cp-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(168,85,247,0.2);
    transition: box-shadow 0.2s;
}

.cp-slider-row input[type="range"]:hover::-webkit-slider-thumb {
    box-shadow: 0 0 0 5px rgba(168,85,247,0.25);
}

.cp-slider-val {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    min-width: 36px;
    text-align: right;
}

/* ---------- TOGGLE ROWS ---------- */
.cp-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--card-bg);
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.cp-toggle-row:hover { background: var(--border-color); }

.cp-toggle-label {
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    opacity: 0.8;
}

.cp-toggle {
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: var(--border-color);
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
}

.cp-toggle.on { background: #a855f7; }

.cp-toggle::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.25s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.cp-toggle.on::after { transform: translateX(18px); }

/* ---------- COLOR PICKERS ---------- */
.cp-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cp-color-row label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    opacity: 0.7;
    flex: 1;
}

.cp-color-row input[type="color"] {
    width: 40px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 2px;
}

/* ---------- FOOTER BUTTONS ---------- */
.customize-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--panel-border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cp-btn-reset {
    padding: 10px 22px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.7;
    box-shadow: none;
}

.cp-btn-reset:hover { opacity: 1; background: var(--card-bg); }

.cp-btn-apply {
    padding: 10px 28px;
    background: linear-gradient(135deg, #6c3fc5, #a855f7);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(168,85,247,0.35);
    letter-spacing: 0.4px;
}

.cp-btn-apply:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(168,85,247,0.45); }
.cp-btn-apply:active { transform: translateY(0); }

/* ---------- copyBtn visible toggle ---------- */
#copyBtn { display: none; }
#copyBtn.visible { display: inline-block; }

/* ---------- Live preview wheel theme ---------- */
#wheelContainer.theme-ocean {
    background: radial-gradient(circle at 50% 50%, #1a3a5c 0%, #0a1e30 100%);
}
#wheelContainer.theme-forest {
    background: radial-gradient(circle at 50% 50%, #1c3a2a 0%, #0a1f14 100%);
}
#wheelContainer.theme-sunset {
    background: radial-gradient(circle at 50% 50%, #4a1c2a 0%, #2a0a10 100%);
}
#wheelContainer.theme-cosmic {
    background: radial-gradient(circle at 50% 50%, #33267a 0%, #1b1340 100%);
}
#wheelContainer.theme-gold {
    background: radial-gradient(circle at 50% 50%, #3a2a0a 0%, #1a1000 100%);
}
#wheelContainer.theme-light {
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f0eeff 100%);
}

/* Spin button theme variants */
.spin-button.sb-ocean  { background: #1565c0; box-shadow: 0 0 0 6px rgba(21,101,192,0.2), 0 6px 20px rgba(21,101,192,0.5); }
.spin-button.sb-ocean::before  { background: #42a5f5; }
.spin-button.sb-forest { background: #2e7d32; box-shadow: 0 0 0 6px rgba(46,125,50,0.2), 0 6px 20px rgba(46,125,50,0.5); }
.spin-button.sb-forest::before { background: #66bb6a; }
.spin-button.sb-sunset { background: #e65100; box-shadow: 0 0 0 6px rgba(230,81,0,0.2), 0 6px 20px rgba(230,81,0,0.5); }
.spin-button.sb-sunset::before { background: #ff8a65; }
.spin-button.sb-cosmic { background: #4a148c; box-shadow: 0 0 0 6px rgba(74,20,140,0.2), 0 6px 20px rgba(74,20,140,0.5); }
.spin-button.sb-cosmic::before { background: #ab47bc; }
.spin-button.sb-gold   { background: #f57f17; box-shadow: 0 0 0 6px rgba(245,127,23,0.2), 0 6px 20px rgba(245,127,23,0.5); }
.spin-button.sb-gold::before   { background: #ffee58; }
.spin-button.sb-light  { background: #6c3fc5; box-shadow: 0 0 0 6px rgba(108,63,197,0.2), 0 6px 20px rgba(108,63,197,0.5); }
.spin-button.sb-light::before  { background: #a855f7; }

/* Ball glow effect toggle */
#wheel .ball.glow-on {
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.4)) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Wheel border effect toggle */
#wheelContainer.wheel-border {
    box-shadow: var(--shadow-inner), 0 20px 60px rgba(0,0,0,0.35), 0 0 0 4px rgba(168,85,247,0.4);
}

/* Responsive adjustments */
@media (max-width: 560px) {
    .customize-panel { border-radius: 16px; }
    .cp-theme-grid { grid-template-columns: repeat(2, 1fr); }
    .customize-header { padding: 18px 18px 14px; }
    .customize-body { padding: 16px 18px 20px; }
    .customize-footer { padding: 14px 18px 16px; }
    .customize-tabs { padding: 12px 18px 0; }
    .customize-btn-wrapper { padding: 0 0 16px; } 


}

/* ---------- IMAGE UPLOAD ZONE ---------- */
.cp-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.cp-upload-zone:hover,
.cp-upload-zone.drag-over {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.06);
}

.cp-upload-zone.drag-over {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.cp-upload-inner {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    pointer-events: none;
}

.cp-upload-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 2px;
}

.cp-upload-text {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    opacity: 0.75;
    margin: 0;
}

.cp-upload-link {
    color: #a855f7;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cp-upload-hint {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text);
    opacity: 0.35;
    margin: 0;
}

/* Preview state */
.cp-upload-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
}

.cp-upload-preview img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(168, 85, 247, 0.4);
    flex-shrink: 0;
}

.cp-upload-preview-actions {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.cp-preview-name {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text);
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-remove-img {
    align-self: flex-start;
    padding: 4px 12px;
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 6px;
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-height: unset;
    box-shadow: none;
}

.cp-remove-img:hover {
    background: rgba(231, 76, 60, 0.22);
    transform: none;
}

/* wheelContainer needs position:relative for ::after to work */
#wheelContainer {
    position: relative;
}


.sn-my-spins-counter {
    margin-bottom: 10px;
    border-color: rgba(107, 180, 255, 0.25);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.1);
}
 
.sn-my-icon {
    color: #3498db;
    background: rgba(52, 152, 219, 0.12);
    animation: snPulse 2.8s ease-in-out infinite;
}
 
/* Pas d'animation rotate sur l'icône horloge */
.sn-my-icon svg {
    animation: none;
}
 
#sn-my-spins-today {
    margin-top: 3px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #3498db;
}

/* ── Popup action row ── */
.picker-popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.picker-popup-spin-again {
    padding: 12px 28px;
    background:#AB30AE;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(215,9,50,0.35);
    letter-spacing: 0.5px;
    min-height: 44px;
}

.picker-popup-spin-again:hover {
    background: #a80025;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(215,9,50,0.5);
}

.picker-popup-spin-again:active { transform: translateY(0); }

.picker-popup-close-btn {
    padding: 12px 24px;
    background: #D70932;
    color: var(--text);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    opacity: 0.7;
    min-height: 44px;
}

.picker-popup-close-btn:hover {
    opacity: .6;
    background: #D70932;
}

/* Retire le margin-top du copy seul (maintenant dans flex) */
.picker-popup-actions .picker-popup-copy {
    margin-top: 0;
}

/* ============================================================
   POPULAR DRAW CONFIGURATIONS — Complete styles
   ============================================================ */

.sn-config-stats-section {
    padding: 0 20px 40px;
}

.sn-config-stats-title {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin: 0 0 8px;
}

.sn-config-stats-subtitle {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.6;
    text-align: center;
    max-width: 560px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.sn-config-stats-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

/* ── Carte OTHERS (la 6e) ── */
.sn-config-card-other {
    border-style: dashed;
    border-color: rgba(168, 85, 247, 0.35);
    background: linear-gradient(135deg, rgba(108,63,197,0.08), rgba(255,107,107,0.05));
}
 
.sn-config-card-other:hover {
    border-color: rgba(168, 85, 247, 0.6);
}
 
.sn-config-card-other .sn-config-values {
    color: #a855f7;
}
 
.sn-config-card-other .sn-config-bar-fill {
    background: linear-gradient(90deg, #a855f7, #c599ff);
    opacity: 0.7;
}

/* ── Meta header ── */
.sn-config-stats-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text);
    opacity: 0.6;
    grid-column: 1 / -1;
}

.sn-config-meta-item strong {
    color: var(--text);
    opacity: 1;
    font-weight: 700;
}

.sn-config-meta-sep {
    opacity: 0.4;
}

/* ── Cards ── */
.sn-config-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 20px;
    transition: var(--transition);
    cursor: default;
}

.sn-config-card:hover {
    transform: translateY(-3px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.sn-config-card:hover .sn-config-values {
    color: #ff6b6b;
    transition: color 0.2s;
}

/* ── Card header ── */
.sn-config-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.sn-config-card-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sn-config-card-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sn-config-rank {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.sn-config-values {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
}


.sn-config-percentage {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.12);
    padding: 3px 9px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ── Progress bar ── */
.sn-config-bar-track {
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 10px;
}

.sn-config-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #6c3fc5, #ff6b6b);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* ── Description ── */
.sn-config-description {
    font-size: 0.85rem;
    color: var(--text);
    opacity: 0.65;
    line-height: 1.6;
    margin: 0;
}

/* ── Empty state ── */
.sn-config-stats-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text);
}

.sn-config-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.sn-config-empty-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 8px;
    opacity: 0.8;
}

.sn-config-empty-text {
    font-size: 0.88rem;
    opacity: 0.5;
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Loading state ── */
.sn-config-stats-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    grid-column: 1 / -1;
    color: var(--text);
    opacity: 0.5;
    font-size: 0.9rem;
}

.sn-config-loading-dots {
    display: flex;
    gap: 4px;
}

.sn-config-loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff6b6b;
    animation: snDotBounce 1.2s infinite ease-in-out;
}

.sn-config-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.sn-config-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes snDotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1;   }
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .sn-config-stats-list {
        grid-template-columns: 1fr;
    }

    .sn-config-stats-section {
        padding: 0 16px 32px;
    }

    .sn-config-stats-title {
        font-size: 1.2rem;
    }
    
}

.sn-counter-context {
    padding: 12px 20px 16px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    border-top: 1px solid var(--panel-border);
    margin-top: 4px;
}

.sn-counter-context p {
    margin: 0;
}


/* ============================================================
   BADGE "TOP" — rouge, dynamique sur la config #1 (plus haut %)
   ============================================================ */

.sn-config-top-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-head);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #fff;
    background: #D70932;
    padding: 2px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(215, 9, 50, 0.45);
    animation: snTopPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes snTopPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(215, 9, 50, 0.45);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 2px 14px rgba(215, 9, 50, 0.7);
        transform: scale(1.05);
    }
}

/* Garde le header aligné quand le badge est présent */
.sn-config-card-left {
    flex-wrap: wrap;
}
 