@keyframes shake {
    0%, 100% { transform: scale(1.1) rotate(0deg); }
    25% { transform: scale(1.15) rotate(3deg); }
    75% { transform: scale(1.15) rotate(-3deg); }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.05);
        filter: brightness(1.2) drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    }
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) translateX(-10px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) translateX(10px) rotate(360deg); opacity: 0; }
}

@keyframes diceRoll {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1.2); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #6B73FF 50%, #000DFF 75%, #9A4AE2 100%);
    color: var(--text-primary);
    margin: 0;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Particules flottantes */
.particle {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    z-index: 1;
}

.particle-1 { width: 4px; height: 4px; background: rgba(255, 255, 255, 0.6); animation: particleFloat 15s infinite linear; animation-delay: 0s; left: 10%; }
.particle-2 { width: 6px; height: 6px; background: rgba(0, 212, 255, 0.4); animation: particleFloat 18s infinite linear; animation-delay: -5s; left: 20%; }
.particle-3 { width: 3px; height: 3px; background: rgba(255, 255, 255, 0.8); animation: particleFloat 12s infinite linear; animation-delay: -8s; left: 35%; }
.particle-4 { width: 5px; height: 5px; background: rgba(154, 74, 226, 0.5); animation: particleFloat 20s infinite linear; animation-delay: -12s; left: 50%; }
.particle-5 { width: 4px; height: 4px; background: rgba(255, 255, 255, 0.5); animation: particleFloat 16s infinite linear; animation-delay: -3s; left: 65%; }
.particle-6 { width: 7px; height: 7px; background: rgba(0, 212, 255, 0.3); animation: particleFloat 14s infinite linear; animation-delay: -10s; left: 80%; }
.particle-7 { width: 3px; height: 3px; background: rgba(255, 255, 255, 0.7); animation: particleFloat 22s infinite linear; animation-delay: -6s; left: 90%; }
.particle-8 { width: 5px; height: 5px; background: rgba(102, 126, 234, 0.4); animation: particleFloat 17s infinite linear; animation-delay: -2s; left: 15%; }
.particle-9 { width: 4px; height: 4px; background: rgba(255, 255, 255, 0.6); animation: particleFloat 19s infinite linear; animation-delay: -9s; left: 25%; }
.particle-10 { width: 6px; height: 6px; background: rgba(118, 75, 162, 0.5); animation: particleFloat 13s infinite linear; animation-delay: -4s; left: 40%; }
.particle-11 { width: 3px; height: 3px; background: rgba(0, 212, 255, 0.7); animation: particleFloat 21s infinite linear; animation-delay: -11s; left: 55%; }
.particle-12 { width: 7px; height: 7px; background: rgba(255, 255, 255, 0.3); animation: particleFloat 15s infinite linear; animation-delay: -1s; left: 70%; }
.particle-13 { width: 4px; height: 4px; background: rgba(107, 115, 255, 0.6); animation: particleFloat 18s infinite linear; animation-delay: -7s; left: 85%; }
.particle-14 { width: 5px; height: 5px; background: rgba(255, 255, 255, 0.8); animation: particleFloat 16s infinite linear; animation-delay: -13s; left: 5%; }
.particle-15 { width: 6px; height: 6px; background: rgba(154, 74, 226, 0.4); animation: particleFloat 20s infinite linear; animation-delay: -14s; left: 95%; }

.particle-dynamic {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.particle-star {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    animation: particleFloat 25s infinite linear, spin 4s infinite linear;
}

.particle-star::before {
    content: "✦";
}

.particle-triangle {
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-bottom: 5px solid rgba(0, 212, 255, 0.5);
    position: fixed;
    pointer-events: none;
    z-index: 1;
    animation: particleFloat 22s infinite linear, spin 6s infinite linear;
}

.particle-diamond {
    width: 6px;
    height: 6px;
    background: rgba(154, 74, 226, 0.6);
    transform: rotate(45deg);
    position: fixed;
    pointer-events: none;
    z-index: 1;
    animation: particleFloat 20s infinite linear, spin 8s infinite linear;
}

.datetime {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 1.2em;
    font-weight: 300;
    color: var(--text-secondary);
    z-index: 10;
    text-align: right;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.copyright {
    position: fixed;
    bottom: 15px;
    right: 20px;
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    z-index: 10;
    text-align: right;
    line-height: 1.3;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.copyright:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.copyright .name {
    font-weight: 600;
    color: var(--accent-glow);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.copyright .email {
    font-size: 0.9em;
    opacity: 0.8;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .datetime {
        font-size: 0.9em;
        top: 10px;
        right: 10px;
        padding: 6px 10px;
    }

    .container {
        padding: 2rem 1.5rem;
        margin-top: 1rem;
    }

    h1 {
        font-size: 2em;
    }

    .controls {
        flex-direction: column;
        gap: 15px;
    }

    .dice {
        width: 80px;
        height: 80px;
        font-size: 2.5em;
    }

    #result-container {
        gap: 15px;
    }
}
