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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c0c1e 0%, #1a1a3e 50%, #2d1b69 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background animé avec étoiles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, #fff, transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent),
        radial-gradient(1px 1px at 200px 90px, #fff, transparent),
        radial-gradient(2px 2px at 240px 50px, #fff, transparent),
        radial-gradient(1px 1px at 280px 10px, #fff, transparent),
        radial-gradient(1px 1px at 320px 70px, #fff, transparent),
        radial-gradient(2px 2px at 360px 40px, #fff, transparent),
        radial-gradient(1px 1px at 400px 20px, #fff, transparent),
        radial-gradient(1px 1px at 440px 80px, #fff, transparent),
        radial-gradient(2px 2px at 480px 60px, #fff, transparent),
        radial-gradient(1px 1px at 520px 30px, #fff, transparent),
        radial-gradient(1px 1px at 560px 90px, #fff, transparent),
        radial-gradient(2px 2px at 600px 10px, #fff, transparent),
        radial-gradient(1px 1px at 640px 50px, #fff, transparent),
        radial-gradient(1px 1px at 680px 80px, #fff, transparent),
        radial-gradient(2px 2px at 720px 20px, #fff, transparent),
        radial-gradient(1px 1px at 760px 60px, #fff, transparent);
    background-repeat: repeat;
    background-size: 800px 100px;
    animation: sparkle 20s linear infinite;
    z-index: -1;
    opacity: 0.8;
}

@keyframes sparkle {
    0% {
        transform: translateY(0px);
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px);
        opacity: 0.8;
    }
}

/* Étoiles filantes */
.shooting-star {
    position: fixed;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, #fff, transparent);
    border-radius: 50%;
    z-index: -1;
    animation: shoot 3s linear infinite;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
    transform-origin: 0 0;
    transform: rotate(45deg);
}

@keyframes shoot {
    0% {
        transform: translateX(-100px) translateY(-100px);
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(calc(100vh + 100px));
        opacity: 0;
    }
}

/* Particules flottantes */
.floating-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    z-index: -1;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #ffffff;
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.password-section {
    margin-bottom: 30px;
}

.password-display {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#passwordOutput {
    flex: 1;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

#passwordOutput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.copy-btn {
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    min-width: 50px;
}

.copy-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.copy-btn:active {
    transform: translateY(0);
}

.generate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.generate-btn:active {
    transform: translateY(0);
}

.options-section {
    margin-bottom: 30px;
}

.options-section h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.option-group {
    margin-bottom: 20px;
}

.option-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#lengthSlider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e1e5e9;
    outline: none;
    -webkit-appearance: none;
}

#lengthSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

#lengthSlider::-webkit-slider-thumb:hover {
    background: #5a6fd8;
    transform: scale(1.2);
}

#lengthSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

#lengthValue {
    color: #667eea;
    font-weight: 700;
    font-size: 1.1rem;
}

.checkbox-group {
    display: grid;
    gap: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.checkbox-group label:hover {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.checkbox-group input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

.custom-symbols-input {
    margin-top: 10px;
    margin-left: 30px;
    transition: all 0.3s ease;
}

.custom-symbols-input input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.custom-symbols-input input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.custom-symbols-input input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.strength-indicator {
    margin-bottom: 20px;
}

.strength-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.strength-bar {
    width: 100%;
    height: 10px;
    background: #e1e5e9;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    transition: all 0.5s ease;
    border-radius: 5px;
}

.strength-text {
    text-align: center;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #44aa00;
}

.notification.error {
    background: #ff4444;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .password-display {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
    }
}

/* Animations pour les interactions */
.generate-btn:hover,
.copy-btn:hover {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Style pour les cases à cocher personnalisées */
input[type="checkbox"] {
    position: relative;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    animation: checkmark 0.3s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}
