body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e293b, #334155);
    background-size: 400% 400%;
    animation: gradient-flow 12s ease infinite;
    color: #fff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
h1 { font-size: 2.5rem; margin-bottom: 1rem; text-shadow: 0 0 8px #22d3ee; }
.wheel-container {
    position: relative;
    width: 600px;
    height: 600px;
    max-width: 95vw;
    max-height: 95vw;
}
#wheel {
    display: block;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1;
}
#arrow {
    position: absolute;
    width: 75px;
    z-index: 10;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.result {
    font-size: 2em;
    margin: 20px;
    color: #facc15;
    text-shadow: 0 0 6px #f59e0b;
}
#spinBtn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    padding: 18px 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59,130,246,0.5);
    font-size: 2.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
#spinBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
#spinBtn:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 6px 18px rgba(34,211,238,0.6);
}
/* Formulaire personnalisé */
#settingsModal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(30,41,59,0.85);
    z-index: 200;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}
.settingsModal-content {
    background: #fff;
    padding: 32px 24px;
    border-radius: 18px;
    box-shadow: 0 8px 32px #0006;
    text-align: center;
    min-width: 220px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
}

.custom-form {
    background: rgba(30,41,59,0.7);
    border-radius: 18px;
    box-shadow: 0 4px 24px #0005;
    max-width: 420px;
    width: 95vw;
    color: #fff;
}
.case-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.case-row input[type="text"] {
    border-radius: 6px;
    border: 1px solid #334155;
    padding: 6px 8px;
    font-size: 1em;
    width: 60%;
    background: #fff;
    color: #222;
}
.case-row input[type="number"] {
    border-radius: 6px;
    border: 1px solid #334155;
    padding: 6px 8px;
    font-size: 1em;
    width: 60px;
    background: #fff;
    color: #222;
    text-align: center;
}
.remove-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}
.remove-btn:hover {
    background: #b91c1c;
}
.add-btn {
    background: #22d3ee;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    margin-top: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}
.add-btn:hover {
    background: #0ea5e9;
}
.update-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    margin-top: 18px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background 0.2s;
}
.update-btn:hover {
    background: #2563eb;
}
.close-modal-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    border: none;
    font-size: 2em;
    color: #334155;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.close-modal-btn:hover {
    color: #ef4444;
}
.settings-btn {
    transition: background 0.2s;
}
.settings-btn:hover {
    background: #e0e7ef;
}
.palette-color {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px #0002;
    cursor: pointer;
    display: inline-block;
    position: relative;
    margin: 2px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.palette-color.selected {
    border: 3px solid #3b82f6;
    box-shadow: 0 0 0 4px #3b82f666;
    transform: scale(1.12);
}
.palette-color .remove-color {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    font-size: 0.8em;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}
#addColorBtn {
    border-radius: 50%;
    background: #22d3ee;
    color: #fff;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    margin-left: 6px;
    margin-top: 2px;
}
#addColorBtn:hover {
    background: #0ea5e9;
}
@media (max-width: 700px) {
    .wheel-container {
        width: 95vw;
        height: 95vw;
        max-width: 380px;
        max-height: 380px;
    }
    #wheel {
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: 1 / 1;
    }
    #arrow {
        width: 46px;
    }
    #spinBtn {
        width: 54px;
        height: 54px;
        font-size: 1.3em;
        padding: 10px 0;
    }
    h1 {
        font-size: 1.4rem;
        margin-bottom: 0.6rem;
    }
    .result {
        font-size: 1.1em;
        margin: 12px;
    }
    .custom-form { padding: 10px 4vw 16px 4vw; }
    .case-row input[type="text"] { font-size: 0.95em; }
    .case-row input[type="number"] { font-size: 0.95em; }

    .settingsModal-content {
        padding: 16px 6vw;
        border-radius: 12px;
        min-width: 0;
        max-width: 98vw;
        max-height: 98vh;
    }
    .custom-form {
        padding: 8px 2vw 12px 2vw;
        font-size: 0.97em;
    }
    #colorPalette, #presetColors {
        gap: 6px;
    }
    .add-btn, .update-btn, .remove-btn {
        font-size: 0.95em;
        padding: 7px 12px;
    }
    h2 {
        font-size: 1.1em;
    }
    .close-modal-btn {
        top: 10px;
        right: 10px;
        font-size: 1.5em;
    }
}
