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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeIn 0.8s ease-out;
}

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

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.logo a {
    text-decoration: none;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 400;
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.tab {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #64748b;
}

.tab.active {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
}

input[type="number"],
input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 
        0 10px 25px -5px rgba(59, 130, 246, 0.1),
        0 4px 6px -2px rgba(59, 130, 246, 0.05),
        0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Courier New', monospace;
}

/* Style spécial pour le select "Nombre" - plus étroit */
.count-select {
    width: 80px !important;
    max-width: 80px;
    padding: 16px 12px;
    text-align: center;
    margin: 0 auto;
}

/* Style spécial pour la valeur de longueur en gras et rouge */
#lengthValue {
    font-weight: bold !important;
    color: #dc2626 !important;
    font-size: 1.1rem;
}

/* Options de génération sur une ligne avec textes raccourcis */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: space-between;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 1;
    min-width: 120px;
    max-width: 180px;
    font-size: 0.9rem;
}

.checkbox-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.1);
}

.checkbox-item.active {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.2);
}

.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 
        0 10px 25px -5px rgba(59, 130, 246, 0.4),
        0 4px 6px -2px rgba(59, 130, 246, 0.05);
    margin-bottom: 20px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 40px -5px rgba(59, 130, 246, 0.4),
        0 8px 16px -4px rgba(59, 130, 246, 0.2);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-secondary {
    background: #f8fafc;
    color: #374151;
    border: 2px solid #e5e7eb;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.1);
}

.password-display {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.06),
        0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.password-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.password-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.password-text {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #1f2937;
    word-break: break-all;
    line-height: 1.6;
    flex: 1;
    margin-right: 10px;
}

.copy-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    min-width: 70px;
}

.copy-btn:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.strength-meter {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
}

.strength-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

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

.strength-weak { background: linear-gradient(90deg, #ef4444, #dc2626); width: 25%; }
.strength-medium { background: linear-gradient(90deg, #f59e0b, #d97706); width: 50%; }
.strength-good { background: linear-gradient(90deg, #10b981, #059669); width: 75%; }
.strength-strong { background: linear-gradient(90deg, #3b82f6, #1d4ed8); width: 100%; }

.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 0.9rem;
}

.footer a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.slider-container {
    margin: 15px 0;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.feature-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dual-input {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: end;
}

.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 2px solid #f87171;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.2);
}

.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 2px solid #34d399;
    color: #047857;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.2);
}

.info-message {
    text-align: center;
    color: #64748b;
    font-style: italic;
    margin: 15px 0;
    font-size: 0.9rem;
    padding: 12px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

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

@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 30px 20px;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 8px;
    }

    .checkbox-item {
        max-width: none;
    }
    
    .logo {
        font-size: 2rem;
    }

    .dual-input {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .tabs {
        flex-direction: column;
        gap: 5px;
    }

    .count-select {
        max-width: none !important;
        width: 100% !important;
    }
}